00001
00002
00003
00004
00005
00006
00007
00008
00009
00010
00011
00012
00013
00014
00015 #ifndef COMMON_H
00016 #define COMMON_H
00017
00018
00019
00020 #if HAVE_CONFIG_H
00021 # include "config.h"
00022
00023
00024 # if defined(__APPLE__)
00025 # undef HAVE_POLL
00026 # endif
00027 #else
00028
00029 # if defined(_WIN32)
00030 # define SYSAPI_WIN32 1
00031 # define WINAPI_MSWINDOWS 1
00032 # endif
00033
00034
00035 # if defined(__APPLE__)
00036 # define SYSAPI_UNIX 1
00037 # define WINAPI_CARBON 1
00038
00039 # define HAVE_CXX_BOOL 1
00040 # define HAVE_CXX_CASTS 1
00041 # define HAVE_CXX_EXCEPTIONS 1
00042 # define HAVE_CXX_MUTABLE 1
00043 # define HAVE_CXX_STDLIB 1
00044 # define HAVE_GETPWUID_R 1
00045 # define HAVE_GMTIME_R 1
00046 # define HAVE_INET_ATON 1
00047 # define HAVE_INTTYPES_H 1
00048 # define HAVE_ISTREAM 1
00049 # define HAVE_MEMORY_H 1
00050 # define HAVE_NANOSLEEP 1
00051 # define HAVE_OSTREAM 1
00052 # define HAVE_POSIX_SIGWAIT 1
00053 # define HAVE_PTHREAD 1
00054 # define HAVE_PTHREAD_SIGNAL 1
00055 # include <sys/types.h>
00056 # include <sys/socket.h>
00057 # if defined(_SOCKLEN_T)
00058 # define HAVE_SOCKLEN_T 1
00059 # endif
00060 # define HAVE_SSTREAM 1
00061 # define HAVE_STDINT_H 1
00062 # define HAVE_STDLIB_H 1
00063 # define HAVE_STRINGS_H 1
00064 # define HAVE_STRING_H 1
00065 # define HAVE_SYS_SELECT_H 1
00066 # define HAVE_SYS_SOCKET_H 1
00067 # define HAVE_SYS_STAT_H 1
00068 # define HAVE_SYS_TIME_H 1
00069 # define HAVE_SYS_TYPES_H 1
00070 # define HAVE_SYS_UTSNAME_H 1
00071 # define HAVE_UNISTD_H 1
00072 # define HAVE_VSNPRINTF 1
00073
00074
00075
00076 # define SELECT_TYPE_ARG1 int
00077 # define SELECT_TYPE_ARG234 (fd_set *)
00078 # define SELECT_TYPE_ARG5 (struct timeval *)
00079 # define SIZEOF_CHAR 1
00080 # define SIZEOF_INT 4
00081 # define SIZEOF_LONG 4
00082 # define SIZEOF_SHORT 2
00083 # define STDC_HEADERS 1
00084 # define TIME_WITH_SYS_TIME 1
00085 # define X_DISPLAY_MISSING 1
00086 # endif
00087 #endif
00088
00089
00090 #if (_MSC_VER >= 1200)
00091
00092 # define for if (false) { } else for
00093
00094
00095 # pragma warning(disable: 4786) // identifier truncated in debug info
00096 # pragma warning(disable: 4514) // unreferenced inline function removed
00097
00098
00099 # pragma warning(disable: 4127) // conditional expression is constant
00100
00101
00102 # if defined(NDEBUG)
00103 # pragma warning(disable: 4702) // unreachable code
00104 # pragma warning(disable: 4701) // variable maybe used uninitialized
00105 # endif
00106 #endif // (_MSC_VER >= 1200)
00107
00108
00109 #if defined(_MSC_VER)
00110 # include <wchar.h>
00111 # define TYPE_OF_SIZE_1 __int8
00112 # define TYPE_OF_SIZE_2 __int16
00113 # define TYPE_OF_SIZE_4 __int32
00114 #else
00115 # define SIZE_OF_CHAR 1
00116 # define SIZE_OF_SHORT 2
00117 # define SIZE_OF_INT 4
00118 # define SIZE_OF_LONG 4
00119 #endif
00120
00121
00122
00123
00124
00125 #if defined(__APPLE__)
00126 #define __FP__
00127 #endif
00128
00129
00130 #include <stddef.h>
00131
00132
00133 #include <assert.h>
00134 #include <stdlib.h>
00135 #include <string.h>
00136
00137 #endif