00001
00002
00003
00004
00005
00006
00007
00008
00009
00010
00011
00012 #if __GNUC__ >= 4
00013 #define DSL_API __attribute__ ((visibility("default")))
00014 #define DSL_API_CLASS __attribute__ ((visibility("default")))
00015 #else
00016 #define DSL_API
00017 #define DSL_API_CLASS
00018 #endif
00019 #define DSL_CC
00020
00021
00022 #include <sys/cdefs.h>
00023 #include <stdlib.h>
00024 #include <stdio.h>
00025 #include <string.h>
00026 #include <stdarg.h>
00027 #include <strings.h>
00028 #include <ctype.h>
00029 #include <sys/stat.h>
00030 #include <errno.h>
00031 #include <sys/types.h>
00032 #include <sys/time.h>
00033 #include <time.h>
00034 #include <limits.h>
00035
00036 #include <new>
00037 #include <pthread.h>
00038 #include <signal.h>
00039 #include <dirent.h>
00040 #include <unistd.h>
00041 #include <netdb.h>
00042 #include <sys/socket.h>
00043 #include <sys/select.h>
00044 #include <sys/utsname.h>
00045 #include <arpa/inet.h>
00046 #include <netinet/in.h>
00047 #include <fcntl.h>
00048 #include <dlfcn.h>
00049
00050
00051 #define PLATFORM "MacOSX"
00052 #ifndef MACOSX
00053 #define MACOSX
00054 #endif
00055 #ifdef __i386__
00056 #define CPU "x86"
00057 #elif __amd64__
00058 #define CPU "x86_64"
00059 #else
00060 #error "ERROR: Unknown CPU Type"
00061 #endif
00062
00063
00064 #define MAX_PATH 1024
00065 #define THREADTYPE void *
00066 #define PF_INET AF_INET
00067 #define PF_UNSPEC AF_UNSPEC
00068 typedef void * (*ThreadProto)(void *);
00069
00070
00071 #define stricmp strcasecmp
00072 #define strnicmp strncasecmp
00073 #define stristr strcasestr
00074 #define snwprintf swprintf
00075 #define dsl_mkdir(x,y) mkdir(x, y)
00076 DSL_API wchar_t * DSL_CC wcsdup(const wchar_t *s);