00001
00002
00003
00004
00005
00006
00007
00008
00009
00010
00011
00012
00013
00014
00015
00016
00017
00018
00019
00020 #ifndef INCL_AUTOTOOLS_ADAPTER
00021 #define INCL_AUTOTOOLS_ADAPTER
00022
00025
00026
00027
00028
00029 #include <config.h>
00030 #include <string.h>
00031 #include <stdlib.h>
00032 #include <ctype.h>
00033 #include <stdio.h>
00034 #include <time.h>
00035 #include <stdarg.h>
00036 #include <unistd.h>
00037
00038
00039 #include <netinet/in.h>
00040
00041
00042
00043 #include <base/test.h>
00044
00045
00046 #ifndef __CYGWIN__
00047 # define __declspec(x)
00048 # define __cdecl
00049 #endif
00050
00051 #define BOOL int
00052 #define TRUE 1
00053 #define FALSE 0
00054
00055
00056 #define VOCL_ENCODING_FIX
00057
00058
00059 #ifdef USE_WCHAR
00060
00061 #undef WCHAR
00062 #include <wchar.h>
00063 #include <wctype.h>
00064
00065 #define WCHAR wchar_t
00066 #define WCHAR_PRINTF "s"
00067 #define TEXT(_x) L##_x
00068
00069
00070 WCHAR *wcstok(WCHAR *s, const WCHAR *delim);
00071
00072 inline int _wtoi(const WCHAR *s) { return (int)wcstol(s, NULL, 10); }
00073
00074 #define _wcsicmp wcscasecmp
00075 #define wcsicmp wcscasecmp
00076 #define snwprintf swprintf
00077
00078 #else
00079
00080
00081 # undef WCHAR
00082 # define WCHAR char
00083 # define WCHAR_PRINTF "s"
00084 # define TEXT(_x) _x
00085
00086 # define SYNC4J_LINEBREAK "\n"
00087
00088 # define wsprintf sprintf
00089 # define _wfopen fopen
00090 # define wprintf printf
00091 # define fwprintf fprintf
00092 # define wsprintf sprintf
00093 # define swprintf snprintf
00094 # define snwprintf snprintf
00095 # define wcscpy strcpy
00096 # define wcsncpy strncpy
00097 # define wcsncmp strncmp
00098 # define wcslen strlen
00099 # define wcstol strtol
00100 # define wcstoul strtoul
00101 # define wcsstr strstr
00102 # define wcscmp strcmp
00103 # define wcstok strtok
00104 inline char towlower(char x) { return tolower(x); }
00105 inline char towupper(char x) { return toupper(x); }
00106 # define wmemmove memmove
00107 # define wmemcpy memcpy
00108 # define wmemcmp memcmp
00109 # define wmemset memset
00110 # define wcschr strchr
00111 # define wcsrchr strrchr
00112 # define wcscat strcat
00113 # define wcsncat strncat
00114 # define _wtoi atoi
00115 # define wcstod strtod
00116 # define wcsicmp strcasecmp
00117 # define _wcsicmp strcasecmp
00118 # define _stricmp strcasecmp
00119
00120 #endif
00121
00122
00123
00124 #undef NULL
00125 #define NULL 0
00126
00127 #define min(x,y) ( (x) < (y) ? (x) : (y) )
00128 #define max(x,y) ( (x) > (y) ? (x) : (y) )
00129
00131 #endif
00132