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 /* Determines whether specific types are available */ 00046 #define U_HAVE_INT8_T 0 00047 #define U_HAVE_UINT8_T 0 00048 #define U_HAVE_INT16_T 0 00049 #define U_HAVE_UINT16_T 0 00050 #define U_HAVE_INT32_T 0 00051 #define U_HAVE_UINT32_T 0 00052 #define U_HAVE_INT64_T 0 00053 #define U_HAVE_UINT64_T 0 00054 00055 /* Define whether namespace is supported */ 00056 #define U_HAVE_NAMESPACE 1 00057 00058 /* Determines the endianness of the platform */ 00059 #define U_IS_BIG_ENDIAN 0 00060 00061 /* Determine whether to override new and delete. */ 00062 #ifndef U_OVERRIDE_CXX_ALLOCATION 00063 #define U_OVERRIDE_CXX_ALLOCATION 1 00064 #endif 00065 /* Determine whether to override placement new and delete for STL. */ 00066 #ifndef U_HAVE_PLACEMENT_NEW 00067 #define U_HAVE_PLACEMENT_NEW 1 00068 #endif 00069 00070 /*===========================================================================*/ 00071 /* Generic data types */ 00072 /*===========================================================================*/ 00073 00074 /* If your platform does not have the <inttypes.h> header, you may 00075 need to edit the typedefs below. */ 00076 #if U_HAVE_INTTYPES_H 00077 #include <inttypes.h> 00078 #else 00079 00080 #if ! U_HAVE_INT8_T 00081 typedef signed char int8_t; 00082 #endif 00083 00084 #if ! U_HAVE_UINT8_T 00085 typedef unsigned char uint8_t; 00086 #endif 00087 00088 #if ! U_HAVE_INT16_T 00089 typedef signed short int16_t; 00090 #endif 00091 00092 #if ! U_HAVE_UINT16_T 00093 typedef unsigned short uint16_t; 00094 #endif 00095 00096 #if ! U_HAVE_INT32_T 00097 # if defined(_LP64) 00098 typedef signed int int32_t; 00099 # else 00100 typedef signed long int32_t; 00101 # endif 00102 #endif 00103 00104 #if ! U_HAVE_UINT32_T 00105 # if defined(_LP64) 00106 typedef unsigned int uint32_t; 00107 # else 00108 typedef unsigned long uint32_t; 00109 # endif 00110 #endif 00111 00112 #if ! U_HAVE_INT64_T 00113 /* Could use _MSC_VER to detect Microsoft compiler. */ 00114 typedef signed __int64 int64_t; 00115 #endif 00116 00117 #if ! U_HAVE_UINT64_T 00118 /* Could use _MSC_VER to detect Microsoft compiler. */ 00119 typedef unsigned __int64 uint64_t; 00120 #endif 00121 00122 #endif 00123 00124 /*===========================================================================*/ 00125 /* Character data types */ 00126 /*===========================================================================*/ 00127 00128 #define U_SIZEOF_WCHAR_T 2 00129 00130 /*===========================================================================*/ 00131 /* Do we have wcscpy and other similar functions */ 00132 /*===========================================================================*/ 00133 00134 #define U_HAVE_WCSCPY 1 00135 00136 /*===========================================================================*/ 00137 /* Information about POSIX support */ 00138 /*===========================================================================*/ 00139 00140 #define U_TZSET _tzset 00141 #define U_HAVE_TIMEZONE 1 00142 #if U_HAVE_TIMEZONE 00143 # define U_TIMEZONE _timezone 00144 #endif 00145 #define U_TZNAME _tzname 00146 00147 #define U_HAVE_MMAP 0 00148 00149 /*===========================================================================*/ 00150 /* Symbol import-export control */ 00151 /*===========================================================================*/ 00152 00153 #define U_EXPORT __declspec(dllexport) 00154 #define U_EXPORT2 __cdecl 00155 #define U_IMPORT __declspec(dllimport) 00156 00157 /*===========================================================================*/ 00158 /* Code alignment and C function inlining */ 00159 /*===========================================================================*/ 00160 00161 #define U_INLINE __inline 00162 00163 #if defined(_MSC_VER) && defined(_M_IX86) 00164 #define U_ALIGN_CODE(val) __asm align val 00165 #else 00166 #define U_ALIGN_CODE(val) 00167 #endif 00168 00169 00170 /*===========================================================================*/ 00171 /* Programs used by ICU code */ 00172 /*===========================================================================*/ 00173 00174 #define U_MAKE "nmake" 00175