platform.h

00001 /*
00002 ******************************************************************************
00003 *
00004 *   Copyright (C) 1997-2004, 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 /* Generic data types                                                        */
00082 /*===========================================================================*/
00083 
00084 #include <sys/types.h>
00085 
00086 /* If your platform does not have the <inttypes.h> header, you may
00087    need to edit the typedefs below. */
00088 #if U_HAVE_INTTYPES_H
00089 
00090 /* autoconf 2.13 sometimes can't properly find the data types in <inttypes.h> */
00091 /* os/390 needs <inttypes.h>, but it doesn't have int8_t, and it sometimes */
00092 /* doesn't have uint8_t depending on the OS version. */
00093 /* So we have this work around. */
00094 #ifdef OS390
00095 /* The features header is needed to get (u)int64_t sometimes. */
00096 #include <features.h>
00097 #if ! U_HAVE_INT8_T
00098 typedef signed char int8_t;
00099 #endif
00100 #if !defined(__uint8_t)
00101 #define __uint8_t 1
00102 typedef unsigned char uint8_t;
00103 #endif
00104 #endif /* OS390 */
00105 
00106 #include <inttypes.h>
00107 
00108 #else /* U_HAVE_INTTYPES_H */
00109 
00110 #if ! U_HAVE_INT8_T
00111 typedef signed char int8_t;
00112 #endif
00113 
00114 #if ! U_HAVE_UINT8_T
00115 typedef unsigned char uint8_t;
00116 #endif
00117 
00118 #if ! U_HAVE_INT16_T
00119 typedef signed short int16_t;
00120 #endif
00121 
00122 #if ! U_HAVE_UINT16_T
00123 typedef unsigned short uint16_t;
00124 #endif
00125 
00126 #if ! U_HAVE_INT32_T
00127 typedef signed int int32_t;
00128 #endif
00129 
00130 #if ! U_HAVE_UINT32_T
00131 typedef unsigned int uint32_t;
00132 #endif
00133 
00134 #if ! U_HAVE_INT64_T
00135     typedef signed long long int64_t;
00136 /* else we may not have a 64-bit type */
00137 #endif
00138 
00139 #if ! U_HAVE_UINT64_T
00140     typedef unsigned long long uint64_t;
00141 /* else we may not have a 64-bit type */
00142 #endif
00143 
00144 #endif
00145 
00146 /*===========================================================================*/
00147 /* Compiler and environment features                                         */
00148 /*===========================================================================*/
00149 
00150 /* Define whether namespace is supported */
00151 #ifndef U_HAVE_NAMESPACE
00152 #define U_HAVE_NAMESPACE 1
00153 #endif
00154 
00155 /* Determines the endianness of the platform
00156    It's done this way in case multiple architectures are being built at once.
00157    For example, Darwin supports fat binaries, which can be both PPC and x86 based. */
00158 #if defined(BYTE_ORDER) && defined(BIG_ENDIAN)
00159 #define U_IS_BIG_ENDIAN (BYTE_ORDER == BIG_ENDIAN)
00160 #else
00161 #define U_IS_BIG_ENDIAN 0
00162 #endif
00163 
00164 /* 1 or 0 to enable or disable threads.  If undefined, default is: enable threads. */
00165 #define ICU_USE_THREADS 1
00166 
00167 #ifndef U_DEBUG
00168 #define U_DEBUG 0
00169 #endif
00170 
00171 #ifndef U_RELEASE
00172 #define U_RELEASE 1
00173 #endif
00174 
00175 /* Determine whether to disable renaming or not. This overrides the
00176    setting in umachine.h which is for all platforms. */
00177 #ifndef U_DISABLE_RENAMING
00178 #define U_DISABLE_RENAMING 0
00179 #endif
00180 
00181 /* Determine whether to override new and delete. */
00182 #ifndef U_OVERRIDE_CXX_ALLOCATION
00183 #define U_OVERRIDE_CXX_ALLOCATION 1
00184 #endif
00185 /* Determine whether to override placement new and delete for STL. */
00186 #ifndef U_HAVE_PLACEMENT_NEW
00187 #define U_HAVE_PLACEMENT_NEW 1
00188 #endif
00189 
00190 /* Determine whether to enable tracing. */
00191 #ifndef U_ENABLE_TRACING
00192 #define U_ENABLE_TRACING 1
00193 #endif
00194 
00195 /* Define the library suffix in a C syntax. */
00196 #define U_HAVE_LIB_SUFFIX 0
00197 #define U_LIB_SUFFIX_C_NAME 
00198 #define U_LIB_SUFFIX_C_NAME_STRING ""
00199 
00200 /*===========================================================================*/
00201 /* Character data types                                                      */
00202 /*===========================================================================*/
00203 
00204 #if defined(OS390) || defined(OS400)
00205 #   define U_CHARSET_FAMILY 1
00206 #endif
00207 
00208 /*===========================================================================*/
00209 /* Information about wchar support                                           */
00210 /*===========================================================================*/
00211 
00212 #define U_HAVE_WCHAR_H      1
00213 #define U_SIZEOF_WCHAR_T    4
00214 
00215 #define U_HAVE_WCSCPY       1
00216 
00217 /*===========================================================================*/
00218 /* Information about POSIX support                                           */
00219 /*===========================================================================*/
00220 
00221 #define U_HAVE_NL_LANGINFO          1
00222 #define U_HAVE_NL_LANGINFO_CODESET  1
00223 #define U_NL_LANGINFO_CODESET       CODESET
00224 
00225 #if 1
00226 #define U_TZSET         tzset
00227 #endif
00228 #if 1
00229 #define U_TIMEZONE      timezone
00230 #endif
00231 #if 1
00232 #define U_TZNAME        tzname
00233 #endif
00234 
00235 #define U_HAVE_MMAP     1
00236 #define U_HAVE_POPEN    1
00237 
00238 /*===========================================================================*/
00239 /* Symbol import-export control                                              */
00240 /*===========================================================================*/
00241 
00242 #define U_EXPORT
00243 /* U_CALLCONV is releated to U_EXPORT2 */
00244 #define U_EXPORT2
00245 
00246 /* cygwin needs to export/import data */
00247 #ifdef U_CYGWIN
00248 #define U_IMPORT __declspec(dllimport)
00249 #else
00250 #define U_IMPORT 
00251 #endif
00252 
00253 /*===========================================================================*/
00254 /* Code alignment and C function inlining                                    */
00255 /*===========================================================================*/
00256 
00257 #ifndef U_INLINE
00258 #define U_INLINE inline
00259 #endif
00260 
00261 #define U_ALIGN_CODE(n) 
00262 
00263 /*===========================================================================*/
00264 /* Programs used by ICU code                                                 */
00265 /*===========================================================================*/
00266 
00267 #define U_MAKE  "make"

Generated on Tue Nov 16 10:03:05 2004 for ICU 3.2 by  doxygen 1.3.9.1