Main Page | Class Hierarchy | Alphabetical List | Data Structures | File List | Data Fields | Globals | Related Pages

platform.h

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 U_LINUX 00021 #define U_LINUX 00022 #endif 00023 00024 /* Define whether inttypes.h is available */ 00025 #ifndef U_HAVE_INTTYPES_H 00026 #define U_HAVE_INTTYPES_H 1 00027 #endif 00028 00029 /* 00030 * Define what support for C++ streams is available. 00031 * If U_IOSTREAM_SOURCE is set to 199711, then <iostream> is available 00032 * (1997711 is the date the ISO/IEC C++ FDIS was published), and then 00033 * one should qualify streams using the std namespace in ICU header 00034 * files. 00035 * If U_IOSTREAM_SOURCE is set to 198506, then <iostream.h> is 00036 * available instead (198506 is the date when Stroustrup published 00037 * "An Extensible I/O Facility for C++" at the summer USENIX conference). 00038 * If U_IOSTREAM_SOURCE is 0, then C++ streams are not available and 00039 * support for them will be silently suppressed in ICU. 00040 * 00041 */ 00042 00043 #ifndef U_IOSTREAM_SOURCE 00044 #define U_IOSTREAM_SOURCE 199711 00045 #endif 00046 00047 #ifndef U_DEBUG 00048 #define U_DEBUG 0 00049 #endif 00050 00051 #ifndef U_RELEASE 00052 #define U_RELEASE 1 00053 #endif 00054 00055 /* Determines whether specific types are available */ 00056 #ifndef U_HAVE_INT8_T 00057 #define U_HAVE_INT8_T 1 00058 #endif 00059 00060 #ifndef U_HAVE_UINT8_T 00061 #define U_HAVE_UINT8_T 0 00062 #endif 00063 00064 #ifndef U_HAVE_INT16_T 00065 #define U_HAVE_INT16_T 1 00066 #endif 00067 00068 #ifndef U_HAVE_UINT16_T 00069 #define U_HAVE_UINT16_T 0 00070 #endif 00071 00072 #ifndef U_HAVE_INT32_T 00073 #define U_HAVE_INT32_T 1 00074 #endif 00075 00076 #ifndef U_HAVE_UINT32_T 00077 #define U_HAVE_UINT32_T 0 00078 #endif 00079 00080 #ifndef U_HAVE_INT64_T 00081 #define U_HAVE_INT64_T 1 00082 #endif 00083 00084 #ifndef U_HAVE_UINT64_T 00085 #define U_HAVE_UINT64_T 0 00086 #endif 00087 00088 00089 /* Define whether namespace is supported */ 00090 #ifndef U_HAVE_NAMESPACE 00091 #define U_HAVE_NAMESPACE 1 00092 #endif 00093 00094 /* Determines the endianness of the platform */ 00095 #define U_IS_BIG_ENDIAN 0 00096 00097 /* 1 or 0 to enable or disable threads. If undefined, default is: enable threads. */ 00098 #define ICU_USE_THREADS 1 00099 00100 /* Determine whether to disable renaming or not. This overrides the 00101 setting in umachine.h which is for all platforms. */ 00102 #ifndef U_DISABLE_RENAMING 00103 #define U_DISABLE_RENAMING 0 00104 #endif 00105 00106 /* Determine whether to override new and delete. */ 00107 #ifndef U_OVERRIDE_CXX_ALLOCATION 00108 #define U_OVERRIDE_CXX_ALLOCATION 1 00109 #endif 00110 /* Determine whether to override placement new and delete for STL. */ 00111 #ifndef U_HAVE_PLACEMENT_NEW 00112 #define U_HAVE_PLACEMENT_NEW 1 00113 #endif 00114 00115 /* Determine whether to enable tracing. */ 00116 #ifndef U_ENABLE_TRACING 00117 #define U_ENABLE_TRACING 1 00118 #endif 00119 00120 /* Define the library suffix in a C syntax. */ 00121 #define U_HAVE_LIB_SUFFIX 0 00122 #define U_LIB_SUFFIX_C_NAME 00123 #define U_LIB_SUFFIX_C_NAME_STRING "" 00124 00125 /*===========================================================================*/ 00126 /* Platform/Language determination */ 00127 /*===========================================================================*/ 00128 00129 #ifdef macintosh 00130 #ifdef XP_MAC 00131 #undef XP_MAC 00132 #endif 00133 #define XP_MAC 1 00134 #include <string.h> 00135 #endif 00136 00137 /*===========================================================================*/ 00138 /* Generic data types */ 00139 /*===========================================================================*/ 00140 00141 /* If your platform does not have the <inttypes.h> header, you may 00142 need to edit the typedefs below. */ 00143 #if U_HAVE_INTTYPES_H 00144 00145 /* autoconf 2.13 sometimes can't properly find the data types in <inttypes.h> */ 00146 /* os/390 needs <inttypes.h>, but it doesn't have int8_t, and it sometimes */ 00147 /* doesn't have uint8_t depending on the OS version. */ 00148 /* So we have this work around. */ 00149 #ifdef OS390 00150 /* The features header is needed to get (u)int64_t sometimes. */ 00151 #include <features.h> 00152 #if ! U_HAVE_INT8_T 00153 typedef signed char int8_t; 00154 #endif 00155 #if !defined(__uint8_t) 00156 #define __uint8_t 1 00157 typedef unsigned char uint8_t; 00158 #endif 00159 #endif /* OS390 */ 00160 00161 #include <inttypes.h> 00162 00163 #else /* U_HAVE_INTTYPES_H */ 00164 00165 #include <sys/types.h> 00166 #if STDC_HEADERS 00167 #include <stdlib.h> 00168 #include <stddef.h> 00169 #endif /* STDC_HEADERS */ 00170 00171 #if ! U_HAVE_INT8_T 00172 typedef signed char int8_t; 00173 #endif 00174 00175 #if ! U_HAVE_UINT8_T 00176 typedef unsigned char uint8_t; 00177 #endif 00178 00179 #if ! U_HAVE_INT16_T 00180 typedef signed short int16_t; 00181 #endif 00182 00183 #if ! U_HAVE_UINT16_T 00184 typedef unsigned short uint16_t; 00185 #endif 00186 00187 #if ! U_HAVE_INT32_T 00188 # if defined(_LP64) 00189 typedef signed int int32_t; 00190 # else 00191 typedef signed long int32_t; 00192 # endif 00193 #endif 00194 00195 #if ! U_HAVE_UINT32_T 00196 # if defined(_LP64) 00197 typedef unsigned int uint32_t; 00198 # else 00199 typedef unsigned long uint32_t; 00200 # endif 00201 #endif 00202 00203 #if ! U_HAVE_INT64_T 00204 typedef signed long long int64_t; 00205 /* else we may not have a 64-bit type */ 00206 #endif 00207 00208 #if ! U_HAVE_UINT64_T 00209 typedef unsigned long long uint64_t; 00210 /* else we may not have a 64-bit type */ 00211 #endif 00212 00213 #endif 00214 00215 /*===========================================================================*/ 00216 /* Character data types */ 00217 /*===========================================================================*/ 00218 00219 #ifdef OS390 00220 # define U_CHARSET_FAMILY 1 00221 #endif 00222 00223 /*===========================================================================*/ 00224 /* Information about wchar support */ 00225 /*===========================================================================*/ 00226 00227 #define U_HAVE_WCHAR_H 1 00228 #define U_SIZEOF_WCHAR_T 4 00229 00230 #define U_HAVE_WCSCPY 1 00231 00232 /*===========================================================================*/ 00233 /* Information about POSIX support */ 00234 /*===========================================================================*/ 00235 00236 #define U_HAVE_NL_LANGINFO 1 00237 #define U_HAVE_NL_LANGINFO_CODESET 1 00238 #define U_NL_LANGINFO_CODESET CODESET 00239 00240 #define U_TZSET tzset 00241 #define U_HAVE_TIMEZONE 1 00242 #if U_HAVE_TIMEZONE 00243 # define U_TIMEZONE timezone 00244 #endif 00245 #define U_TZNAME tzname 00246 00247 #define U_HAVE_MMAP 1 00248 #define U_HAVE_POPEN 1 00249 00250 /*===========================================================================*/ 00251 /* Symbol import-export control */ 00252 /*===========================================================================*/ 00253 00254 #define U_EXPORT 00255 /* U_CALLCONV is releated to U_EXPORT2 */ 00256 #define U_EXPORT2 00257 00258 /* cygwin needs to export/import data */ 00259 #ifdef U_CYGWIN 00260 #define U_IMPORT __declspec(dllimport) 00261 #else 00262 #define U_IMPORT 00263 #endif 00264 00265 /*===========================================================================*/ 00266 /* Code alignment and C function inlining */ 00267 /*===========================================================================*/ 00268 00269 #ifndef U_INLINE 00270 #define U_INLINE inline 00271 #endif 00272 00273 #define U_ALIGN_CODE(n) 00274 00275 /*===========================================================================*/ 00276 /* Programs used by ICU code */ 00277 /*===========================================================================*/ 00278 00279 #define U_MAKE "make"

Generated on Wed Jul 28 09:15:54 2004 for ICU 2.8 by doxygen 1.3.7