00001
00002
00003
00004
00005
00006
00007
00008
00009
00010 #ifndef _NPT_CONFIG_H_
00011 #define _NPT_CONFIG_H_
00012
00013
00014
00015
00016 #define NPT_CONFIG_HAVE_ASSERT_H
00017 #define NPT_CONFIG_HAVE_STD_C
00018 #define NPT_CONFIG_HAVE_STDLIB_H
00019 #define NPT_CONFIG_HAVE_STDIO_H
00020 #define NPT_CONFIG_HAVE_STDARG_H
00021 #define NPT_CONFIG_HAVE_STRING_H
00022
00023
00024
00025
00026 #if defined(NPT_CONFIG_HAVE_STD_C)
00027 #define NPT_CONFIG_HAVE_MALLOC
00028 #define NPT_CONFIG_HAVE_CALLOC
00029 #define NPT_CONFIG_HAVE_REALLOC
00030 #define NPT_CONFIG_HAVE_FREE
00031 #define NPT_CONFIG_HAVE_MEMCPY
00032 #define NPT_CONFIG_HAVE_MEMSET
00033 #define NPT_CONFIG_HAVE_MEMCMP
00034 #define NPT_CONFIG_HAVE_GETENV
00035 #endif
00036
00037 #if defined(NPT_CONFIG_HAVE_STRING_H)
00038 #define NPT_CONFIG_HAVE_STRCMP
00039 #define NPT_CONFIG_HAVE_STRNCMP
00040 #define NPT_CONFIG_HAVE_STRDUP
00041 #define NPT_CONFIG_HAVE_STRLEN
00042 #define NPT_CONFIG_HAVE_STRCPY
00043 #define NPT_CONFIG_HAVE_STRNCPY
00044 #endif
00045
00046 #if defined(NPT_CONFIG_HAVE_STDIO_H)
00047 #define NPT_CONFIG_HAVE_SPRINTF
00048 #define NPT_CONFIG_HAVE_SNPRINTF
00049 #define NPT_CONFIG_HAVE_VSPRINTF
00050 #define NPT_CONFIG_HAVE_VSNPRINTF
00051 #endif
00052
00053
00054
00055
00056 #define NPT_CONFIG_HAVE_NEW_H
00057
00058
00059
00060
00061 #define NPT_CONFIG_HAVE_SOCKADDR_SA_LEN
00062
00063
00064
00065
00066
00067 #if defined(_WIN32) || defined(_XBOX)
00068 #if !defined(STRICT)
00069 #define STRICT
00070 #endif
00071 #define vsnprintf _vsnprintf
00072 #define snprintf _snprintf
00073 #endif
00074
00075
00076 #if defined(__QNX__)
00077 #endif
00078
00079
00080 #if defined(__CYGWIN__)
00081 #undef NPT_CONFIG_HAVE_SOCKADDR_SA_LEN
00082 #endif
00083
00084
00085 #if defined(__linux__)
00086 #undef NPT_CONFIG_HAVE_SOCKADDR_SA_LEN
00087 #endif
00088
00089
00090
00091
00092
00093 #if defined(__GNUC__)
00094 #define NPT_COMPILER_UNUSED(p) (void)p
00095 #else
00096 #define NPT_COMPILER_UNUSED(p)
00097 #endif
00098
00099
00100 #if defined(__TCS__)
00101 #undef NPT_CONFIG_HAVE_ASSERT_H
00102 #undef NPT_CONFIG_HAVE_SNPRINTF
00103 #undef NPT_CONFIG_HAVE_VSNPRINTF
00104 #endif
00105
00106
00107 #if defined(__PALMOS__)
00108 #if __PALMOS__ <= 0x05000000
00109 #undef NPT_CONFIG_HAVE_ASSERT_H
00110 #undef NPT_CONFIG_HAVE_SNPRINTF
00111 #undef NPT_CONFIG_HAVE_VSNPRINTF
00112 #endif
00113 #endif
00114
00115
00116 #if defined(_MSC_VER)
00117 #if defined(_WIN64)
00118 typedef __int64 NPT_PointerLong;
00119 #else
00120 typedef __w64 long NPT_PointerLong;
00121 #endif
00122 #define NPT_POINTER_TO_LONG(_p) ((NPT_PointerLong) (_p) )
00123 #if _MSC_VER >= 1400 && !defined(_WIN32_WCE)
00124 #define NPT_CONFIG_HAVE_FOPEN_S
00125 #define NPT_vsnprintf(s,c,f,a) _vsnprintf_s(s,c,_TRUNCATE,f,a)
00126 #define NPT_snprintf(s,c,f,...) _snprintf_s(s,c,_TRUNCATE,f,__VA_ARGS__)
00127 #define NPT_strncpy(d,s,c) strncpy_s(d,c,s,_TRUNCATE)
00128 #undef NPT_CONFIG_HAVE_GETENV
00129 #define NPT_CONFIG_HAVE_DUPENV_S
00130 #define dupenv_s _dupenv_s
00131 #else
00132 #define NPT_vsnprintf _vsnprintf
00133 #define NPT_snprintf _snprintf
00134 #endif
00135 #if defined(_DEBUG)
00136 #define _CRTDBG_MAP_ALLOC
00137 #endif
00138 #endif
00139
00140
00141 #if defined(_WIN32_WCE)
00142 #if defined(NPT_CONFIG_HAVE_FOPEN_S)
00143 #undef NPT_CONFIG_HAVE_FOPEN_S
00144 #endif
00145 #endif
00146
00147
00148 #if defined(__SYMBIAN32__)
00149 #undef NPT_CONFIG_HAVE_NEW_H
00150 #include "e32std.h"
00151 #define explicit
00152 #undef NPT_CONFIG_HAVE_VSNPRINTF
00153 #undef NPT_CONFIG_HAVE_SNPRINTF
00154 #endif
00155
00156
00157
00158
00159 #ifndef NPT_POINTER_TO_LONG
00160 #define NPT_POINTER_TO_LONG(_p) ((long)(_p))
00161 #endif
00162
00163 #if !defined(NPT_snprintf)
00164 #define NPT_snprintf snprintf
00165 #endif
00166 #if !defined(NPT_strncpy)
00167 #define NPT_strncpy strncpy
00168 #endif
00169 #if !defined(NPT_vsnprintf)
00170 #define NPT_vsnprintf vsnprintf
00171 #endif
00172
00173
00174
00175
00176 #if defined(DMALLOC)
00177 #include <dmalloc.h>
00178 #endif
00179
00180 #endif // _NPT_CONFIG_H_