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