Main Page   Class Hierarchy   Alphabetical List   Compound List   File List   Compound Members   File Members   Search  

platform.h

Go to the documentation of this file.
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 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 /*===========================================================================*/
00093 /* Platform/Language determination                                           */
00094 /*===========================================================================*/
00095 
00096 #ifdef macintosh
00097 #ifdef XP_MAC
00098 #undef XP_MAC
00099 #endif
00100 #define XP_MAC 1
00101 #include <string.h>
00102 #endif
00103 
00104 /*===========================================================================*/
00105 /* Generic data types                                                        */
00106 /*===========================================================================*/
00107 
00108 /* If your platform does not have the <inttypes.h> header, you may
00109    need to edit the typedefs below. */
00110 #if U_HAVE_INTTYPES_H
00111 
00112 #include <inttypes.h>
00113 /* autoconf 2.13 sometimes can't properly find uint8_t, so we depend on <inttypes.h>. */
00114 /* os/390 on the other hand, never defines int8_t in <inttypes.h>. */
00115 /* So we have this work around */
00116 #ifdef OS390
00117 #if ! U_HAVE_INT8_T
00118 typedef signed char int8_t;
00119 #endif
00120 #if ! U_HAVE_UINT8_T
00121 typedef unsigned char uint8_t;
00122 #endif
00123 #endif /* OS390 */
00124 
00125 #else /* U_HAVE_INTTYPES_H */
00126 
00127 #include <sys/types.h>
00128 #if STDC_HEADERS
00129 #include <stdlib.h>
00130 #include <stddef.h>
00131 #endif /* STDC_HEADERS */
00132 
00133 #if ! U_HAVE_INT8_T
00134 typedef signed char int8_t;
00135 #endif
00136 
00137 #if ! U_HAVE_UINT8_T
00138 typedef unsigned char uint8_t;
00139 #endif
00140 
00141 #if ! U_HAVE_INT16_T
00142 typedef signed short int16_t;
00143 #endif
00144 
00145 #if ! U_HAVE_UINT16_T
00146 typedef unsigned short uint16_t;
00147 #endif
00148 
00149 #if ! U_HAVE_INT32_T
00150 #   if defined(_LP64)
00151       typedef signed int  int32_t;
00152 #   else
00153       typedef signed long int32_t;
00154 #   endif
00155 #endif
00156 
00157 #if ! U_HAVE_UINT32_T
00158 #   if defined(_LP64)
00159       typedef unsigned int  uint32_t;
00160 #   else
00161       typedef unsigned long uint32_t;
00162 #   endif
00163 #endif
00164 
00165 #endif
00166 
00167 /*===========================================================================*/
00168 /* Character data types                                                      */
00169 /*===========================================================================*/
00170 
00171 #ifdef OS390
00172 #   define U_CHARSET_FAMILY 1
00173 #endif
00174 
00175 /*===========================================================================*/
00176 /* Information about wchar support                                           */
00177 /*===========================================================================*/
00178 
00179 #define U_HAVE_WCHAR_H      1
00180 #define U_SIZEOF_WCHAR_T    4
00181 
00182 #define U_HAVE_WCSCPY       1
00183 
00184 /*===========================================================================*/
00185 /* Information about POSIX support                                           */
00186 /*===========================================================================*/
00187 
00188 #define U_HAVE_NL_LANGINFO          1
00189 #define U_HAVE_NL_LANGINFO_CODESET  1
00190 #define U_NL_LANGINFO_CODESET       _NL_CTYPE_CODESET_NAME
00191 
00192 #define U_TZSET         tzset
00193 #define U_HAVE_TIMEZONE 1
00194 #if U_HAVE_TIMEZONE
00195 #   define U_TIMEZONE   timezone
00196 #endif
00197 #define U_TZNAME        tzname
00198 
00199 #define U_HAVE_MMAP     1
00200 
00201 /*===========================================================================*/
00202 /* Symbol import-export control                                              */
00203 /*===========================================================================*/
00204 
00205 #define U_EXPORT
00206 #define U_EXPORT2
00207 #define U_IMPORT
00208 
00209 /*===========================================================================*/
00210 /* Code alignment and C function inlining                                    */
00211 /*===========================================================================*/
00212 
00213 #ifndef U_INLINE
00214 #define U_INLINE inline
00215 #endif
00216 
00217 #define U_ALIGN_CODE(n) 
00218 
00219 /*===========================================================================*/
00220 /* Programs used by ICU code                                                 */
00221 /*===========================================================================*/
00222 
00223 #define U_MAKE  "/usr/bin/gmake"
00224 

Generated on Mon Dec 3 19:00:22 2001 for ICU 2.0 by doxygen1.2.11.1 written by Dimitri van Heesch, © 1997-2001