00001
00002
00003
00004
00005
00006
00007
00008
00009
00010
00011
00012 #import <OmniBase/SystemType.h>
00013
00014 #if defined(__APPLE__) && defined(__MACH__)
00015
00016
00017
00018
00019 #import <libc.h>
00020 #import <stddef.h>
00021 #import <arpa/nameser.h>
00022 #import <resolv.h>
00023 #import <netdb.h>
00024 #import <sys/types.h>
00025 #import <sys/time.h>
00026 #import <sys/dir.h>
00027 #import <sys/errno.h>
00028 #import <sys/stat.h>
00029 #import <sys/uio.h>
00030 #import <sys/file.h>
00031 #import <fcntl.h>
00032 #if (OBOperatingSystemMajorVersion == 10) && !defined(MAC_OS_X_VERSION_MAX_ALLOWED)
00033
00034 #import <Carbon/Carbon.h>
00035 #define bool bool // So <c.h> won't try to define the 'bool' type (with true and false)
00036
00037 #endif
00038 #import <c.h>
00039 #import <unistd.h>
00040 #import <math.h>
00041
00042 #import <pthread.h>
00043
00044 #else
00045
00046
00047
00048
00049
00050 #error Unknown system!
00051
00052 #endif
00053
00054
00055
00056 #ifndef OBSocketRead
00057 #define OBSocketRead(socketFD, buffer, byteCount) read(socketFD, buffer, byteCount)
00058 #endif
00059 #ifndef OBSocketWrite
00060 #define OBSocketWrite(socketFD, buffer, byteCount) write(socketFD, buffer, byteCount)
00061 #endif
00062 #ifndef OBSocketWriteVectors
00063 #define OBSocketWriteVectors(socketFD, buffers, bufferCount) writev(socketFD, buffers, bufferCount)
00064 #endif
00065 #ifndef OBSocketClose
00066 #define OBSocketClose(socketFD) close(socketFD)
00067 #endif