Main Page | Class Hierarchy | Compound List | File List | Compound Members | File Members | Related Pages

sysdeps.h

Go to the documentation of this file.
00001 /*
00002  *  sysdeps.h - Try to include the right system headers and get other
00003  *              system-specific stuff right
00004  *
00005  *  Frodo (C) 1994-1997 Christian Bauer
00006  */
00007 
00008 /*
00009  * sysconfig.h is generated from ./configure
00010  * we dont have this in EPOC, yet
00011  */
00012 #if defined(__SYMBIAN32__) || defined(__PSISOFT32__)
00013 #include "sysconfig.h.epoc32"
00014 #include <e32std.h>
00015 #else
00016 #include "sysconfig.h"
00017 #endif
00018 
00019 #include "elog.h"
00020 
00021 extern "C"
00022 {
00023   
00024 #include <stdio.h>
00025 #include <stdlib.h>
00026 #include <ctype.h>
00027 
00028 #ifndef __PSXOS__
00029 #include <errno.h>
00030 #include <signal.h>
00031 #endif
00032 
00033 #ifdef HAVE_SYS_TYPES_H
00034 #include <sys/types.h>
00035 #endif
00036 
00037 #ifdef HAVE_VALUES_H
00038 #include <values.h>
00039 #endif
00040 
00041 #ifdef HAVE_STRINGS_H
00042 #include <strings.h>
00043 #endif
00044 #ifdef HAVE_STRING_H
00045 #include <string.h>
00046 #endif
00047 
00048 #ifdef HAVE_UNISTD_H
00049 #include <unistd.h>
00050 #endif
00051 #ifdef HAVE_FCNTL_H
00052 #include <fcntl.h>
00053 #endif
00054 
00055 #ifdef HAVE_UTIME_H
00056 #include <utime.h>
00057 #endif
00058 
00059 #ifdef HAVE_SYS_PARAM_H
00060 #include <sys/param.h>
00061 #endif
00062 
00063 #ifdef HAVE_SYS_SELECT_H
00064 #include <sys/select.h>
00065 #endif
00066 
00067 #ifdef HAVE_SYS_VFS_H
00068 #include <sys/vfs.h>
00069 #endif
00070 
00071 #ifdef HAVE_SYS_STAT_H
00072 #include <sys/stat.h>
00073 #endif
00074 
00075 #ifdef HAVE_SYS_MOUNT_H
00076 #include <sys/mount.h>
00077 #endif
00078 
00079 #ifdef HAVE_SYS_STATFS_H
00080 #include <sys/statfs.h>
00081 #endif
00082 
00083 #ifdef HAVE_SYS_STATVFS_H
00084 #include <sys/statvfs.h>
00085 #endif
00086 
00087 #if TIME_WITH_SYS_TIME
00088 # include <sys/time.h>
00089 # include <time.h>
00090 #else
00091 # if HAVE_SYS_TIME_H
00092 #  include <sys/time.h>
00093 # else
00094 #ifndef __PSXOS__
00095 #  include <time.h>
00096 #endif
00097 # endif
00098 #endif
00099 
00100 #if HAVE_DIRENT_H
00101 # include <dirent.h>
00102 #else
00103 # define dirent direct
00104 # if HAVE_SYS_NDIR_H
00105 #  include <sys/ndir.h>
00106 # endif
00107 # if HAVE_SYS_DIR_H
00108 #  include <sys/dir.h>
00109 # endif
00110 # if HAVE_NDIR_H
00111 #  include <ndir.h>
00112 # endif
00113 #endif
00114 
00115 #ifndef __PSXOS__
00116 #include <errno.h>
00117 #endif
00118 
00119 #if EEXIST == ENOTEMPTY
00120 #define BROKEN_OS_PROBABLY_AIX
00121 #endif
00122 
00123 #ifdef HAVE_LINUX_JOYSTICK_H
00124 #include <linux/joystick.h>
00125 #endif
00126 
00127 #ifdef __NeXT__
00128 #define S_IRUSR S_IREAD
00129 #define S_IWUSR S_IWRITE
00130 #define S_IXUSR S_IEXEC
00131 #define S_ISDIR(val) (S_IFDIR & val)
00132 struct utimbuf
00133 {
00134     time_t actime;
00135     time_t modtime;
00136 };
00137 #endif
00138 
00139 #ifdef __DOS__
00140 #include <pc.h>
00141 #include <io.h>
00142 #else
00143 #undef O_BINARY
00144 #define O_BINARY 0
00145 #endif
00146 
00147 #ifdef __mac__
00148 #define bool Boolean
00149 #endif
00150 
00151 #ifdef __riscos
00152 #define bool int
00153 #endif
00154 
00155 #ifdef WIN32
00156 #include <windows.h>
00157 #include <direct.h>
00158 #if !defined(M_PI)
00159 #define M_PI 3.14159265358979323846
00160 #endif
00161 #define S_ISDIR(m) (((m) & S_IFMT) == S_IFDIR)
00162 #if _MSC_VER < 1100
00163 #define bool char
00164 #endif
00165 #define LITTLE_ENDIAN_UNALIGNED 1
00166 #endif
00167 
00168 /* If char has more then 8 bits, good night. */
00169 #ifndef __BEOS__
00170 typedef unsigned char uint8;
00171 typedef signed char int8;
00172 
00173 #if SIZEOF_SHORT == 2
00174 typedef unsigned short uint16;
00175 typedef short int16;
00176 #elif SIZEOF_INT == 2
00177 typedef unsigned int uint16;
00178 typedef int int16;
00179 #else
00180 #error No 2 byte type, you lose.
00181 #endif
00182 
00183 #if SIZEOF_INT == 4
00184 typedef unsigned int uint32;
00185 typedef int int32;
00186 #elif SIZEOF_LONG == 4
00187 typedef unsigned long uint32;
00188 typedef long int32;
00189 #else
00190 #error No 4 byte type, you lose.
00191 #endif
00192 #endif  // __BEOS__
00193 
00194 #define UNUSED(x) (x = x)
00195 
00196 #if defined(__linux__) && !defined(__SYMBIAN32__)
00197 #ifndef COLOR_DEPTH
00198 #define COLOR_DEPTH             8 // default 8 bits color depth for linux
00199 #endif
00200 
00201 //#define GLOBAL_PREFS
00202 #endif
00203 
00204 
00205 }

Generated on Tue Feb 8 04:08:13 2005 for E32frodo by doxygen 1.3.3