ICU 4.6
4.6
|
00001 /* 00002 ****************************************************************************** 00003 * 00004 * Copyright (C) 1997-2010, 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__) || defined(__MINGW32__) 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 00193 /* On strong memory model CPUs (e.g. x86 CPUs), we use a safe & quick double check mutex lock. */ 00198 #if defined(_M_IX86) || defined(_M_AMD64) || defined(_M_X64) || (defined(__GNUC__) && (defined(__i386__) || defined(__x86_64__))) 00199 #define UMTX_STRONG_MEMORY_MODEL 1 00200 #endif 00201 00203 #ifndef U_DEBUG 00204 #ifdef _DEBUG 00205 #define U_DEBUG 1 00206 #else 00207 #define U_DEBUG 0 00208 #endif 00209 #endif 00210 00212 #ifndef U_RELEASE 00213 #ifdef NDEBUG 00214 #define U_RELEASE 1 00215 #else 00216 #define U_RELEASE 0 00217 #endif 00218 #endif 00219 00222 #ifndef U_DISABLE_RENAMING 00223 #define U_DISABLE_RENAMING 0 00224 #endif 00225 00227 #ifndef U_OVERRIDE_CXX_ALLOCATION 00228 #define U_OVERRIDE_CXX_ALLOCATION 1 00229 #endif 00230 00231 #ifndef U_HAVE_PLACEMENT_NEW 00232 #define U_HAVE_PLACEMENT_NEW 1 00233 #endif 00234 00235 #if !defined(U_HAVE_DEBUG_LOCATION_NEW) && defined(_MSC_VER) 00236 #define U_HAVE_DEBUG_LOCATION_NEW 1 00237 #endif 00238 00240 #ifndef U_ENABLE_TRACING 00241 #define U_ENABLE_TRACING 0 00242 #endif 00243 00245 #ifndef U_DEFAULT_SHOW_DRAFT 00246 #define U_DEFAULT_SHOW_DRAFT 1 00247 #endif 00248 00250 #ifndef U_HAVE_LIB_SUFFIX 00251 #define U_HAVE_LIB_SUFFIX 0 00252 #endif 00253 #ifndef U_LIB_SUFFIX_C_NAME 00254 #define U_LIB_SUFFIX_C_NAME 00255 #endif 00256 #ifndef U_LIB_SUFFIX_C_NAME_STRING 00257 #define U_LIB_SUFFIX_C_NAME_STRING "" 00258 #endif 00259 00261 /*===========================================================================*/ 00263 /*===========================================================================*/ 00264 00265 #define U_HAVE_WCHAR_H 1 00266 #define U_SIZEOF_WCHAR_T 2 00267 00268 #define U_HAVE_WCSCPY 1 00269 00278 #if 1 00279 #define U_DECLARE_UTF16(string) L ## string 00280 #endif 00281 00282 /*===========================================================================*/ 00284 /*===========================================================================*/ 00285 00289 #if 1 00290 #define U_TZSET _tzset 00291 #endif 00292 00295 #if 1 00296 #define U_TIMEZONE _timezone 00297 #endif 00298 00301 #if 1 00302 #define U_TZNAME _tzname 00303 #endif 00304 00307 #if 1 00308 #define U_DAYLIGHT _daylight 00309 #endif 00310 00311 #define U_HAVE_MMAP 0 00312 #define U_HAVE_POPEN 0 00313 00314 #ifndef U_ENABLE_DYLOAD 00315 #define U_ENABLE_DYLOAD 1 00316 #endif 00317 00318 00321 /*===========================================================================*/ 00323 /*===========================================================================*/ 00324 00325 #ifdef U_STATIC_IMPLEMENTATION 00326 #define U_EXPORT 00327 #else 00328 #define U_EXPORT __declspec(dllexport) 00329 #endif 00330 #define U_EXPORT2 __cdecl 00331 #define U_IMPORT __declspec(dllimport) 00332 00334 /*===========================================================================*/ 00336 /*===========================================================================*/ 00337 00338 #ifndef U_INLINE 00339 # ifdef __cplusplus 00340 # define U_INLINE inline 00341 # else 00342 # define U_INLINE __inline 00343 # endif 00344 #endif 00345 00346 #if defined(_MSC_VER) && defined(_M_IX86) && !defined(_MANAGED) 00347 #define U_ALIGN_CODE(val) __asm align val 00348 #else 00349 #define U_ALIGN_CODE(val) 00350 #endif 00351 00355 #if defined(_MSC_VER) && (_MSC_VER < 1400) 00356 #define U_HAVE_MSVC_2003_OR_EARLIER 00357 #endif 00358 00359 00362 /*===========================================================================*/ 00364 /*===========================================================================*/ 00365 00366 #ifndef U_MAKE 00367 #define U_MAKE "nmake" 00368 #define U_MAKE_IS_NMAKE 1 00369 #endif 00370