00001 /* 00002 ****************************************************************************** 00003 * 00004 * Copyright (C) 1997-2003, 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 00019 /* Define the platform we're on. */ 00020 #ifndef WIN32 00021 #define WIN32 00022 #endif 00023 00024 /* Define whether inttypes.h is available */ 00025 #define U_HAVE_INTTYPES_H 0 00026 00027 /* 00028 * Define what support for C++ streams is available. 00029 * If U_IOSTREAM_SOURCE is set to 199711, then <iostream> is available 00030 * (1997711 is the date the ISO/IEC C++ FDIS was published), and then 00031 * one should qualify streams using the std namespace in ICU header 00032 * files. 00033 * If U_IOSTREAM_SOURCE is set to 198506, then <iostream.h> is 00034 * available instead (198506 is the date when Stroustrup published 00035 * "An Extensible I/O Facility for C++" at the summer USENIX conference). 00036 * If U_IOSTREAM_SOURCE is 0, then C++ streams are not available and 00037 * support for them will be silently suppressed in ICU. 00038 * 00039 */ 00040 00041 #ifndef U_IOSTREAM_SOURCE 00042 #define U_IOSTREAM_SOURCE 199711 00043 #endif 00044 00045 #ifndef U_DEBUG 00046 #ifdef _DEBUG 00047 #define U_DEBUG 1 00048 #else 00049 #define U_DEBUG 0 00050 #endif 00051 #endif 00052 00053 #ifndef U_RELEASE 00054 #ifdef NDEBUG 00055 #define U_RELEASE 1 00056 #else 00057 #define U_RELEASE 0 00058 #endif 00059 #endif 00060 00061 /* Determines whether specific types are available */ 00062 #define U_HAVE_INT8_T 0 00063 #define U_HAVE_UINT8_T 0 00064 #define U_HAVE_INT16_T 0 00065 #define U_HAVE_UINT16_T 0 00066 #define U_HAVE_INT32_T 0 00067 #define U_HAVE_UINT32_T 0 00068 #define U_HAVE_INT64_T 0 00069 #define U_HAVE_UINT64_T 0 00070 00071 /* Define 64 bit limits */ 00072 #define INT64_C(x) x 00073 #define UINT64_C(x) x 00074 00075 /* Define whether namespace is supported */ 00076 #define U_HAVE_NAMESPACE 1 00077 00078 /* Determines the endianness of the platform */ 00079 #define U_IS_BIG_ENDIAN 0 00080 00081 /* Determine whether to override new and delete. */ 00082 #ifndef U_OVERRIDE_CXX_ALLOCATION 00083 #define U_OVERRIDE_CXX_ALLOCATION 1 00084 #endif 00085 /* Determine whether to override placement new and delete for STL. */ 00086 #ifndef U_HAVE_PLACEMENT_NEW 00087 #define U_HAVE_PLACEMENT_NEW 1 00088 #endif 00089 00090 /*===========================================================================*/ 00091 /* Generic data types */ 00092 /*===========================================================================*/ 00093 00094 /* If your platform does not have the <inttypes.h> header, you may 00095 need to edit the typedefs below. */ 00096 #if U_HAVE_INTTYPES_H 00097 #include <inttypes.h> 00098 #else 00099 00100 #if ! U_HAVE_INT8_T 00101 typedef signed char int8_t; 00102 #endif 00103 00104 #if ! U_HAVE_UINT8_T 00105 typedef unsigned char uint8_t; 00106 #endif 00107 00108 #if ! U_HAVE_INT16_T 00109 typedef signed short int16_t; 00110 #endif 00111 00112 #if ! U_HAVE_UINT16_T 00113 typedef unsigned short uint16_t; 00114 #endif 00115 00116 #if ! U_HAVE_INT32_T 00117 # if defined(_LP64) 00118 typedef signed int int32_t; 00119 # else 00120 typedef signed long int32_t; 00121 # endif 00122 #endif 00123 00124 #if ! U_HAVE_UINT32_T 00125 # if defined(_LP64) 00126 typedef unsigned int uint32_t; 00127 # else 00128 typedef unsigned long uint32_t; 00129 # endif 00130 #endif 00131 00132 #if ! U_HAVE_INT64_T 00133 /* Could use _MSC_VER to detect Microsoft compiler. */ 00134 typedef signed __int64 int64_t; 00135 #endif 00136 00137 #if ! U_HAVE_UINT64_T 00138 /* Could use _MSC_VER to detect Microsoft compiler. */ 00139 typedef unsigned __int64 uint64_t; 00140 #endif 00141 00142 #endif 00143 00144 /*===========================================================================*/ 00145 /* Character data types */ 00146 /*===========================================================================*/ 00147 00148 #define U_SIZEOF_WCHAR_T 2 00149 00150 /*===========================================================================*/ 00151 /* Do we have wcscpy and other similar functions */ 00152 /*===========================================================================*/ 00153 00154 #define U_HAVE_WCSCPY 1 00155 00156 /*===========================================================================*/ 00157 /* Information about POSIX support */ 00158 /*===========================================================================*/ 00159 00160 #define U_TZSET _tzset 00161 #define U_HAVE_TIMEZONE 1 00162 #if U_HAVE_TIMEZONE 00163 # define U_TIMEZONE _timezone 00164 #endif 00165 #define U_TZNAME _tzname 00166 00167 #define U_HAVE_MMAP 0 00168 00169 /*===========================================================================*/ 00170 /* Symbol import-export control */ 00171 /*===========================================================================*/ 00172 00173 #define U_EXPORT __declspec(dllexport) 00174 #define U_EXPORT2 __cdecl 00175 #define U_IMPORT __declspec(dllimport) 00176 00177 /*===========================================================================*/ 00178 /* Code alignment and C function inlining */ 00179 /*===========================================================================*/ 00180 00181 #define U_INLINE __inline 00182 00183 #if defined(_MSC_VER) && defined(_M_IX86) 00184 #define U_ALIGN_CODE(val) __asm align val 00185 #else 00186 #define U_ALIGN_CODE(val) 00187 #endif 00188 00189 00190 /*===========================================================================*/ 00191 /* Programs used by ICU code */ 00192 /*===========================================================================*/ 00193 00194 #define U_MAKE "nmake" 00195