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

platform.h

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 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 /* Determines whether specific types are available */ 00048 #ifndef U_HAVE_INT8_T 00049 #define U_HAVE_INT8_T 1 00050 #endif 00051 00052 #ifndef U_HAVE_UINT8_T 00053 #define U_HAVE_UINT8_T 0 00054 #endif 00055 00056 #ifndef U_HAVE_INT16_T 00057 #define U_HAVE_INT16_T 1 00058 #endif 00059 00060 #ifndef U_HAVE_UINT16_T 00061 #define U_HAVE_UINT16_T 0 00062 #endif 00063 00064 #ifndef U_HAVE_INT32_T 00065 #define U_HAVE_INT32_T 1 00066 #endif 00067 00068 #ifndef U_HAVE_UINT32_T 00069 #define U_HAVE_UINT32_T 0 00070 #endif 00071 00072 #ifndef U_HAVE_INT64_T 00073 #define U_HAVE_INT64_T 1 00074 #endif 00075 00076 #ifndef U_HAVE_UINT64_T 00077 #define U_HAVE_UINT64_T 0 00078 #endif 00079 00080 00081 /* Define whether namespace is supported */ 00082 #ifndef U_HAVE_NAMESPACE 00083 #define U_HAVE_NAMESPACE 1 00084 #endif 00085 00086 /* Determines the endianness of the platform */ 00087 #define U_IS_BIG_ENDIAN 1 00088 00089 /* 1 or 0 to enable or disable threads. If undefined, default is: enable threads. */ 00090 #define ICU_USE_THREADS 1 00091 00092 /* Determine whether to disable renaming or not. This overrides the 00093 setting in umachine.h which is for all platforms. */ 00094 #ifndef U_DISABLE_RENAMING 00095 #define U_DISABLE_RENAMING 0 00096 #endif 00097 00098 /* Define the library suffix in a C syntax. */ 00099 #define U_HAVE_LIB_SUFFIX 0 00100 #define U_LIB_SUFFIX_C_NAME 00101 #define U_LIB_SUFFIX_C_NAME_STRING "" 00102 00103 /*===========================================================================*/ 00104 /* Platform/Language determination */ 00105 /*===========================================================================*/ 00106 00107 #ifdef macintosh 00108 #ifdef XP_MAC 00109 #undef XP_MAC 00110 #endif 00111 #define XP_MAC 1 00112 #include <string.h> 00113 #endif 00114 00115 /*===========================================================================*/ 00116 /* Generic data types */ 00117 /*===========================================================================*/ 00118 00119 /* If your platform does not have the <inttypes.h> header, you may 00120 need to edit the typedefs below. */ 00121 #if U_HAVE_INTTYPES_H 00122 00123 #include <inttypes.h> 00124 /* autoconf 2.13 sometimes can't properly find uint8_t, so we depend on <inttypes.h>. */ 00125 /* os/390 on the other hand, never defines int8_t in <inttypes.h>. */ 00126 /* So we have this work around */ 00127 #ifdef OS390 00128 #if ! U_HAVE_INT8_T 00129 typedef signed char int8_t; 00130 #endif 00131 #if ! U_HAVE_UINT8_T 00132 typedef unsigned char uint8_t; 00133 #endif 00134 #endif /* OS390 */ 00135 00136 #else /* U_HAVE_INTTYPES_H */ 00137 00138 #include <sys/types.h> 00139 #if STDC_HEADERS 00140 #include <stdlib.h> 00141 #include <stddef.h> 00142 #endif /* STDC_HEADERS */ 00143 00144 #if ! U_HAVE_INT8_T 00145 typedef signed char int8_t; 00146 #endif 00147 00148 #if ! U_HAVE_UINT8_T 00149 typedef unsigned char uint8_t; 00150 #endif 00151 00152 #if ! U_HAVE_INT16_T 00153 typedef signed short int16_t; 00154 #endif 00155 00156 #if ! U_HAVE_UINT16_T 00157 typedef unsigned short uint16_t; 00158 #endif 00159 00160 #if ! U_HAVE_INT32_T 00161 # if defined(_LP64) 00162 typedef signed int int32_t; 00163 # else 00164 typedef signed long int32_t; 00165 # endif 00166 #endif 00167 00168 #if ! U_HAVE_UINT32_T 00169 # if defined(_LP64) 00170 typedef unsigned int uint32_t; 00171 # else 00172 typedef unsigned long uint32_t; 00173 # endif 00174 #endif 00175 00176 #if ! U_HAVE_INT64_T 00177 typedef signed long long int64_t; 00178 /* else we may not have a 64-bit type */ 00179 #endif 00180 00181 #if ! U_HAVE_UINT64_T 00182 typedef unsigned long long uint64_t; 00183 /* else we may not have a 64-bit type */ 00184 #endif 00185 00186 #endif 00187 00188 /*===========================================================================*/ 00189 /* Character data types */ 00190 /*===========================================================================*/ 00191 00192 #ifdef OS390 00193 # define U_CHARSET_FAMILY 1 00194 #endif 00195 00196 /*===========================================================================*/ 00197 /* Information about wchar support */ 00198 /*===========================================================================*/ 00199 00200 #define U_HAVE_WCHAR_H 1 00201 #define U_SIZEOF_WCHAR_T 4 00202 00203 #define U_HAVE_WCSCPY 1 00204 00205 /*===========================================================================*/ 00206 /* Information about POSIX support */ 00207 /*===========================================================================*/ 00208 00209 #define U_HAVE_NL_LANGINFO 1 00210 #define U_HAVE_NL_LANGINFO_CODESET 1 00211 #define U_NL_LANGINFO_CODESET CODESET 00212 00213 #define U_TZSET tzset 00214 #define U_HAVE_TIMEZONE 1 00215 #if U_HAVE_TIMEZONE 00216 # define U_TIMEZONE timezone 00217 #endif 00218 #define U_TZNAME tzname 00219 00220 #define U_HAVE_MMAP 1 00221 00222 /*===========================================================================*/ 00223 /* Symbol import-export control */ 00224 /*===========================================================================*/ 00225 00226 #define U_EXPORT 00227 /* U_CALLCONV is releated to U_EXPORT2 */ 00228 #define U_EXPORT2 00229 #define U_IMPORT 00230 00231 /*===========================================================================*/ 00232 /* Code alignment and C function inlining */ 00233 /*===========================================================================*/ 00234 00235 #ifndef U_INLINE 00236 #define U_INLINE inline 00237 #endif 00238 00239 #define U_ALIGN_CODE(n) 00240 00241 /*===========================================================================*/ 00242 /* Programs used by ICU code */ 00243 /*===========================================================================*/ 00244 00245 #define U_MAKE "make" 00246

Generated on Wed Jul 28 05:45:12 2004 for ICU 2.1 by doxygen 1.3.7