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 /* 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 0
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 /* Determine whether to override new and delete. */
00099 #ifndef U_OVERRIDE_CXX_ALLOCATION
00100 #define U_OVERRIDE_CXX_ALLOCATION 1
00101 #endif
00102 /* Determine whether to override placement new and delete for STL. */
00103 #ifndef U_HAVE_PLACEMENT_NEW
00104 #define U_HAVE_PLACEMENT_NEW 1
00105 #endif
00106 
00107 /* Define the library suffix in a C syntax. */
00108 #define U_HAVE_LIB_SUFFIX 0
00109 #define U_LIB_SUFFIX_C_NAME 
00110 #define U_LIB_SUFFIX_C_NAME_STRING ""
00111 
00112 /*===========================================================================*/
00113 /* Platform/Language determination                                           */
00114 /*===========================================================================*/
00115 
00116 #ifdef macintosh
00117 #ifdef XP_MAC
00118 #undef XP_MAC
00119 #endif
00120 #define XP_MAC 1
00121 #include <string.h>
00122 #endif
00123 
00124 /*===========================================================================*/
00125 /* Generic data types                                                        */
00126 /*===========================================================================*/
00127 
00128 /* If your platform does not have the <inttypes.h> header, you may
00129    need to edit the typedefs below. */
00130 #if U_HAVE_INTTYPES_H
00131 
00132 /* autoconf 2.13 sometimes can't properly find the data types in <inttypes.h> */
00133 /* os/390 needs <inttypes.h>, but it doesn't have int8_t, and it sometimes */
00134 /* doesn't have uint8_t depending on the OS version. */
00135 /* So we have this work around. */
00136 #ifdef OS390
00137 /* The features header is needed to get (u)int64_t sometimes. */
00138 #include <features.h>
00139 #if ! U_HAVE_INT8_T
00140 typedef signed char int8_t;
00141 #endif
00142 #if !defined(__uint8_t)
00143 #define __uint8_t 1
00144 typedef unsigned char uint8_t;
00145 #endif
00146 #endif /* OS390 */
00147 
00148 #include <inttypes.h>
00149 
00150 #else /* U_HAVE_INTTYPES_H */
00151 
00152 #include <sys/types.h>
00153 #if STDC_HEADERS
00154 #include <stdlib.h>
00155 #include <stddef.h>
00156 #endif /* STDC_HEADERS */
00157 
00158 #if ! U_HAVE_INT8_T
00159 typedef signed char int8_t;
00160 #endif
00161 
00162 #if ! U_HAVE_UINT8_T
00163 typedef unsigned char uint8_t;
00164 #endif
00165 
00166 #if ! U_HAVE_INT16_T
00167 typedef signed short int16_t;
00168 #endif
00169 
00170 #if ! U_HAVE_UINT16_T
00171 typedef unsigned short uint16_t;
00172 #endif
00173 
00174 #if ! U_HAVE_INT32_T
00175 #   if defined(_LP64)
00176       typedef signed int  int32_t;
00177 #   else
00178       typedef signed long int32_t;
00179 #   endif
00180 #endif
00181 
00182 #if ! U_HAVE_UINT32_T
00183 #   if defined(_LP64)
00184       typedef unsigned int  uint32_t;
00185 #   else
00186       typedef unsigned long uint32_t;
00187 #   endif
00188 #endif
00189 
00190 #if ! U_HAVE_INT64_T
00191     typedef signed long long int64_t;
00192 /* else we may not have a 64-bit type */
00193 #endif
00194 
00195 #if ! U_HAVE_UINT64_T
00196     typedef unsigned long long uint64_t;
00197 /* else we may not have a 64-bit type */
00198 #endif
00199 
00200 #endif
00201 
00202 /*===========================================================================*/
00203 /* Character data types                                                      */
00204 /*===========================================================================*/
00205 
00206 #ifdef OS390
00207 #   define U_CHARSET_FAMILY 1
00208 #endif
00209 
00210 /*===========================================================================*/
00211 /* Information about wchar support                                           */
00212 /*===========================================================================*/
00213 
00214 #define U_HAVE_WCHAR_H      1
00215 #define U_SIZEOF_WCHAR_T    4
00216 
00217 #define U_HAVE_WCSCPY       1
00218 
00219 /*===========================================================================*/
00220 /* Information about POSIX support                                           */
00221 /*===========================================================================*/
00222 
00223 #define U_HAVE_NL_LANGINFO          1
00224 #define U_HAVE_NL_LANGINFO_CODESET  1
00225 #define U_NL_LANGINFO_CODESET       CODESET
00226 
00227 #define U_TZSET         tzset
00228 #define U_HAVE_TIMEZONE 1
00229 #if U_HAVE_TIMEZONE
00230 #   define U_TIMEZONE   timezone
00231 #endif
00232 #define U_TZNAME        tzname
00233 
00234 #define U_HAVE_MMAP     1
00235 #define U_HAVE_POPEN    1
00236 
00237 /*===========================================================================*/
00238 /* Symbol import-export control                                              */
00239 /*===========================================================================*/
00240 
00241 #define U_EXPORT
00242 /* U_CALLCONV is releated to U_EXPORT2 */
00243 #define U_EXPORT2
00244 
00245 /* cygwin needs to export/import data */
00246 #ifdef U_CYGWIN
00247 #define U_IMPORT __declspec(dllimport)
00248 #else
00249 #define U_IMPORT 
00250 #endif
00251 
00252 /*===========================================================================*/
00253 /* Code alignment and C function inlining                                    */
00254 /*===========================================================================*/
00255 
00256 #ifndef U_INLINE
00257 #define U_INLINE inline
00258 #endif
00259 
00260 #define U_ALIGN_CODE(n) 
00261 
00262 /*===========================================================================*/
00263 /* Programs used by ICU code                                                 */
00264 /*===========================================================================*/
00265 
00266 #define U_MAKE  "make"
00267 

Generated on Wed Sep 3 17:47:09 2003 for ICU 2.6 by doxygen 1.3.2