ICU 4.8.1.1
4.8.1.1
|
00001 /* 00002 ****************************************************************************** 00003 * 00004 * Copyright (C) 1997-2011, International Business Machines 00005 * Corporation and others. All Rights Reserved. 00006 * 00007 ****************************************************************************** 00008 * 00009 * FILE NAME : platform.h 00010 * 00011 * Date Name Description 00012 * 05/13/98 nos Creation (content moved here from ptypes.h). 00013 * 03/02/99 stephen Added AS400 support. 00014 * 03/30/99 stephen Added Linux support. 00015 * 04/13/99 stephen Reworked for autoconf. 00016 ****************************************************************************** 00017 */ 00018 00025 #ifndef U_WINDOWS 00026 #define U_WINDOWS 00027 #endif 00028 00029 #if defined(__BORLANDC__) 00030 #define U_HAVE_PLACEMENT_NEW 0 00031 #define __STDC_CONSTANT_MACROS 00032 #endif 00033 00035 #if defined(_MSC_VER) 00036 #define U_INT64_IS_LONG_LONG 0 00037 #else 00038 #define U_INT64_IS_LONG_LONG 1 00039 #endif 00040 00042 #ifndef U_HAVE_INTTYPES_H 00043 # if defined(__BORLANDC__) 00044 # define U_HAVE_INTTYPES_H 1 00045 # else 00046 # define U_HAVE_INTTYPES_H 0 00047 # endif 00048 #endif 00049 00064 #ifndef U_IOSTREAM_SOURCE 00065 #define U_IOSTREAM_SOURCE 199711 00066 #endif 00067 00070 #ifndef U_HAVE_INT8_T 00071 #define U_HAVE_INT8_T U_HAVE_INTTYPES_H 00072 #endif 00073 00074 #ifndef U_HAVE_UINT8_T 00075 #define U_HAVE_UINT8_T U_HAVE_INTTYPES_H 00076 #endif 00077 00078 #ifndef U_HAVE_INT16_T 00079 #define U_HAVE_INT16_T U_HAVE_INTTYPES_H 00080 #endif 00081 00082 #ifndef U_HAVE_UINT16_T 00083 #define U_HAVE_UINT16_T U_HAVE_INTTYPES_H 00084 #endif 00085 00086 #ifndef U_HAVE_INT32_T 00087 #define U_HAVE_INT32_T U_HAVE_INTTYPES_H 00088 #endif 00089 00090 #ifndef U_HAVE_UINT32_T 00091 #define U_HAVE_UINT32_T U_HAVE_INTTYPES_H 00092 #endif 00093 00094 #ifndef U_HAVE_INT64_T 00095 #define U_HAVE_INT64_T U_HAVE_INTTYPES_H 00096 #endif 00097 00098 #ifndef U_HAVE_UINT64_T 00099 #define U_HAVE_UINT64_T U_HAVE_INTTYPES_H 00100 #endif 00101 00105 #if !U_INT64_IS_LONG_LONG 00106 # ifndef INT64_C 00107 # define INT64_C(x) ((int64_t)x) 00108 # endif 00109 # ifndef UINT64_C 00110 # define UINT64_C(x) ((uint64_t)x) 00111 # endif 00112 00113 #endif 00114 00115 /*===========================================================================*/ 00118 /*===========================================================================*/ 00119 00122 #if U_HAVE_INTTYPES_H 00123 #include <inttypes.h> 00124 #else /* U_HAVE_INTTYPES_H */ 00125 00126 #if ! U_HAVE_INT8_T 00127 typedef signed char int8_t; 00128 #endif 00129 00130 #if ! U_HAVE_UINT8_T 00131 typedef unsigned char uint8_t; 00132 #endif 00133 00134 #if ! U_HAVE_INT16_T 00135 typedef signed short int16_t; 00136 #endif 00137 00138 #if ! U_HAVE_UINT16_T 00139 typedef unsigned short uint16_t; 00140 #endif 00141 00142 #if ! U_HAVE_INT32_T 00143 typedef signed int int32_t; 00144 #endif 00145 00146 #if ! U_HAVE_UINT32_T 00147 typedef unsigned int uint32_t; 00148 #endif 00149 00150 #if ! U_HAVE_INT64_T 00151 #if U_INT64_IS_LONG_LONG 00152 typedef signed long long int64_t; 00153 #else 00154 typedef signed __int64 int64_t; 00155 #endif 00156 #endif 00157 00158 #if ! U_HAVE_UINT64_T 00159 #if U_INT64_IS_LONG_LONG 00160 typedef unsigned long long uint64_t; 00161 #else 00162 typedef unsigned __int64 uint64_t; 00163 #endif 00164 #endif 00165 #endif 00166 00171 /*===========================================================================*/ 00173 /*===========================================================================*/ 00174 00176 #ifndef U_HAVE_NAMESPACE 00177 #define U_HAVE_NAMESPACE 1 00178 #endif 00179 00181 #define U_IS_BIG_ENDIAN 0 00182 00184 #ifndef ICU_USE_THREADS 00185 #define ICU_USE_THREADS 1 00186 #endif 00187 00189 #ifndef UCLN_NO_AUTO_CLEANUP 00190 #define UCLN_NO_AUTO_CLEANUP 1 00191 #endif 00192 00194 #ifndef U_DEBUG 00195 #ifdef _DEBUG 00196 #define U_DEBUG 1 00197 #else 00198 #define U_DEBUG 0 00199 #endif 00200 #endif 00201 00203 #ifndef U_RELEASE 00204 #ifdef NDEBUG 00205 #define U_RELEASE 1 00206 #else 00207 #define U_RELEASE 0 00208 #endif 00209 #endif 00210 00213 #ifndef U_DISABLE_RENAMING 00214 #define U_DISABLE_RENAMING 0 00215 #endif 00216 00218 #ifndef U_OVERRIDE_CXX_ALLOCATION 00219 #define U_OVERRIDE_CXX_ALLOCATION 1 00220 #endif 00221 00222 #ifndef U_HAVE_PLACEMENT_NEW 00223 #define U_HAVE_PLACEMENT_NEW 1 00224 #endif 00225 00226 #if !defined(U_HAVE_DEBUG_LOCATION_NEW) && defined(_MSC_VER) 00227 #define U_HAVE_DEBUG_LOCATION_NEW 1 00228 #endif 00229 00231 #ifndef U_ENABLE_TRACING 00232 #define U_ENABLE_TRACING 0 00233 #endif 00234 00236 #ifndef U_DEFAULT_SHOW_DRAFT 00237 #define U_DEFAULT_SHOW_DRAFT 1 00238 #endif 00239 00241 #ifndef U_HAVE_LIB_SUFFIX 00242 #define U_HAVE_LIB_SUFFIX 0 00243 #endif 00244 #ifndef U_LIB_SUFFIX_C_NAME 00245 #define U_LIB_SUFFIX_C_NAME 00246 #endif 00247 #ifndef U_LIB_SUFFIX_C_NAME_STRING 00248 #define U_LIB_SUFFIX_C_NAME_STRING "" 00249 #endif 00250 00252 /*===========================================================================*/ 00254 /*===========================================================================*/ 00255 00256 #define U_HAVE_WCHAR_H 1 00257 #define U_SIZEOF_WCHAR_T 2 00258 00259 #define U_HAVE_WCSCPY 1 00260 00269 #if 1 00270 #define U_DECLARE_UTF16(string) L ## string 00271 #endif 00272 00273 /*===========================================================================*/ 00275 /*===========================================================================*/ 00276 00280 #if 1 00281 #define U_TZSET _tzset 00282 #endif 00283 00286 #if 1 00287 #define U_TIMEZONE _timezone 00288 #endif 00289 00292 #if 1 00293 #define U_TZNAME _tzname 00294 #endif 00295 00298 #if 1 00299 #define U_DAYLIGHT _daylight 00300 #endif 00301 00302 #define U_HAVE_MMAP 0 00303 #define U_HAVE_POPEN 0 00304 00305 #ifndef U_ENABLE_DYLOAD 00306 #define U_ENABLE_DYLOAD 1 00307 #endif 00308 00309 00312 /*===========================================================================*/ 00314 /*===========================================================================*/ 00315 00316 #ifdef U_STATIC_IMPLEMENTATION 00317 #define U_EXPORT 00318 #else 00319 #define U_EXPORT __declspec(dllexport) 00320 #endif 00321 #define U_EXPORT2 __cdecl 00322 #define U_IMPORT __declspec(dllimport) 00323 00325 /*===========================================================================*/ 00327 /*===========================================================================*/ 00328 00329 #ifndef U_INLINE 00330 # ifdef __cplusplus 00331 # define U_INLINE inline 00332 # else 00333 # define U_INLINE __inline 00334 # endif 00335 #endif 00336 00337 #if defined(_MSC_VER) && defined(_M_IX86) && !defined(_MANAGED) 00338 #define U_ALIGN_CODE(val) __asm align val 00339 #else 00340 #define U_ALIGN_CODE(val) 00341 #endif 00342 00346 #if defined(_MSC_VER) && (_MSC_VER < 1400) 00347 #define U_HAVE_MSVC_2003_OR_EARLIER 00348 #endif 00349 00350 00353 /*===========================================================================*/ 00355 /*===========================================================================*/ 00356 00357 #ifndef U_MAKE 00358 #define U_MAKE "nmake" 00359 #define U_MAKE_IS_NMAKE 1 00360 #endif 00361