/* * sysdeps.h - Try to include the right system headers and get other * system-specific stuff right * * Frodo (C) 1994-1997,2002 Christian Bauer */ #include "sysconfig.h" extern "C" { #include #include #include #include #ifndef __PSXOS__ #include #include #endif #ifdef HAVE_SYS_TYPES_H #include #endif #ifdef HAVE_VALUES_H #include #endif #ifdef HAVE_STRINGS_H #include #endif #ifdef HAVE_STRING_H #include #endif #ifdef HAVE_UNISTD_H #include #endif #ifdef HAVE_FCNTL_H #include #endif #ifdef HAVE_UTIME_H #include #endif #ifdef HAVE_SYS_PARAM_H #include #endif #ifdef HAVE_SYS_SELECT_H #include #endif #ifdef HAVE_SYS_VFS_H #include #endif #ifdef HAVE_SYS_STAT_H #include #endif #ifdef HAVE_SYS_MOUNT_H #include #endif #ifdef HAVE_SYS_STATFS_H #include #endif #ifdef HAVE_SYS_STATVFS_H #include #endif #if TIME_WITH_SYS_TIME # include # include #else # if HAVE_SYS_TIME_H # include # else #ifndef __PSXOS__ # include #endif # endif #endif #if HAVE_DIRENT_H # include #else # define dirent direct # if HAVE_SYS_NDIR_H # include # endif # if HAVE_SYS_DIR_H # include # endif # if HAVE_NDIR_H # include # endif #endif #ifndef __PSXOS__ #include #endif #include #if EEXIST == ENOTEMPTY #define BROKEN_OS_PROBABLY_AIX #endif #ifdef HAVE_LINUX_JOYSTICK_H #include #endif #ifdef __NeXT__ #define S_IRUSR S_IREAD #define S_IWUSR S_IWRITE #define S_IXUSR S_IEXEC #define S_ISDIR(val) (S_IFDIR & val) struct utimbuf { time_t actime; time_t modtime; }; #endif #ifdef __DOS__ #include #include #else #undef O_BINARY #define O_BINARY 0 #endif #ifdef __mac__ #define bool Boolean #endif #ifdef __riscos #define bool int #endif #ifdef WIN32 #include #include #if !defined(M_PI) #define M_PI 3.14159265358979323846 #endif #define S_ISDIR(m) (((m) & S_IFMT) == S_IFDIR) #if _MSC_VER < 1100 #define bool char #endif #define LITTLE_ENDIAN_UNALIGNED 1 #endif /* If char has more then 8 bits, good night. */ #ifndef __BEOS__ typedef unsigned char uint8; typedef signed char int8; #if SIZEOF_SHORT == 2 typedef unsigned short uint16; typedef short int16; #elif SIZEOF_INT == 2 typedef unsigned int uint16; typedef int int16; #else #error No 2 byte type, you lose. #endif #if SIZEOF_INT == 4 typedef unsigned int uint32; typedef int int32; #elif SIZEOF_LONG == 4 typedef unsigned long uint32; typedef long int32; #else #error No 4 byte type, you lose. #endif #endif // __BEOS__ #define UNUSED(x) (x = x) }