platform.h

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

Generated on Mon Aug 13 07:17:24 2007 for ICU 3.6 by  doxygen 1.5.2