mirror of
https://github.com/aaru-dps/fstester.git
synced 2025-12-16 19:24:39 +00:00
Add support for NeXTStep, OpenStep and Apple Rhapsody.
This commit is contained in:
@@ -25,6 +25,15 @@ Copyright (C) 2011-2021 Natalia Portillo
|
|||||||
#if defined(__APPLE__) && defined(__MACH__)
|
#if defined(__APPLE__) && defined(__MACH__)
|
||||||
#include "darwin/darwin.h"
|
#include "darwin/darwin.h"
|
||||||
#else
|
#else
|
||||||
|
|
||||||
|
#if defined(__NeXT__)
|
||||||
|
#if NS_TARGET < 42 && !defined(_POSIX_SOURCE)
|
||||||
|
#error Need to be compiled with -posix argument
|
||||||
|
#elif NS_TARGET >= 42 && defined(_POSIX_SOURCE)
|
||||||
|
#error Need to be compiled without -posix argument
|
||||||
|
#endif
|
||||||
|
#endif
|
||||||
|
|
||||||
#include <errno.h>
|
#include <errno.h>
|
||||||
#include <sys/utsname.h>
|
#include <sys/utsname.h>
|
||||||
|
|
||||||
|
|||||||
@@ -25,6 +25,10 @@ Copyright (C) 2011-2021 Natalia Portillo
|
|||||||
#ifndef AARU_FSTESTER_SETTER_SRC_UNIX_PERMS_H_
|
#ifndef AARU_FSTESTER_SETTER_SRC_UNIX_PERMS_H_
|
||||||
#define AARU_FSTESTER_SETTER_SRC_UNIX_PERMS_H_
|
#define AARU_FSTESTER_SETTER_SRC_UNIX_PERMS_H_
|
||||||
|
|
||||||
|
#if defined(__NeXT__) && NS_TARGET <= 32
|
||||||
|
typedef int mode_t;
|
||||||
|
#endif
|
||||||
|
|
||||||
typedef struct
|
typedef struct
|
||||||
{
|
{
|
||||||
char filename[256];
|
char filename[256];
|
||||||
|
|||||||
@@ -22,6 +22,14 @@ Aaru Data Preservation Suite
|
|||||||
Copyright (C) 2011-2021 Natalia Portillo
|
Copyright (C) 2011-2021 Natalia Portillo
|
||||||
*****************************************************************************/
|
*****************************************************************************/
|
||||||
|
|
||||||
|
#if defined(__NeXT__)
|
||||||
|
#if NS_TARGET < 42 && !defined(_POSIX_SOURCE)
|
||||||
|
#error Need to be compiled with -posix argument
|
||||||
|
#elif NS_TARGET >= 42 && defined(_POSIX_SOURCE)
|
||||||
|
#error Need to be compiled without -posix argument
|
||||||
|
#endif
|
||||||
|
#endif
|
||||||
|
|
||||||
#include <errno.h>
|
#include <errno.h>
|
||||||
#include <stddef.h>
|
#include <stddef.h>
|
||||||
#include <stdio.h>
|
#include <stdio.h>
|
||||||
|
|||||||
@@ -26,6 +26,26 @@ Copyright (C) 2011-2021 Natalia Portillo
|
|||||||
#include <stddef.h>
|
#include <stddef.h>
|
||||||
#include <stdio.h>
|
#include <stdio.h>
|
||||||
|
|
||||||
|
#ifdef __NeXT__
|
||||||
|
|
||||||
|
#if NS_TARGET < 42 && !defined(_POSIX_SOURCE)
|
||||||
|
#error Need to be compiled with -posix argument
|
||||||
|
#elif NS_TARGET >= 42 && defined(_POSIX_SOURCE)
|
||||||
|
#error Need to be compiled without -posix argument
|
||||||
|
#endif
|
||||||
|
|
||||||
|
#define HAVE_STATFS_FTYPE
|
||||||
|
|
||||||
|
#if NS_TARGET >= 42 // Rhapsody DR1
|
||||||
|
#define NEED_SYS_TYPES_H
|
||||||
|
#define HAVE_SYS_MOUNT_H
|
||||||
|
#define USE_STATFS_FTYPENAME
|
||||||
|
#else
|
||||||
|
#include <sys/vfs.h>
|
||||||
|
#endif // Rhapsody DR1
|
||||||
|
|
||||||
|
#endif // __NeXT__
|
||||||
|
|
||||||
#ifdef HAVE_SYS_STATFS_H
|
#ifdef HAVE_SYS_STATFS_H
|
||||||
#include <sys/statfs.h>
|
#include <sys/statfs.h>
|
||||||
#endif
|
#endif
|
||||||
@@ -190,7 +210,7 @@ void GetVolumeInfo(const char* path, size_t* clusterSize)
|
|||||||
log_write("\tFlags: 0x%08lX\n", buf.f_flag);
|
log_write("\tFlags: 0x%08lX\n", buf.f_flag);
|
||||||
#endif
|
#endif
|
||||||
}
|
}
|
||||||
#else
|
#elif !defined(__NeXT__) || (defined(NS_TARGET) && NS_TARGET >= 42)
|
||||||
if(buf.f_flags)
|
if(buf.f_flags)
|
||||||
{
|
{
|
||||||
#if defined(__linux__) || defined(__LINUX__) || defined(__gnu_linux)
|
#if defined(__linux__) || defined(__LINUX__) || defined(__gnu_linux)
|
||||||
|
|||||||
Reference in New Issue
Block a user