pwin32.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_WINDOWS
00026 #define U_WINDOWS
00027 #endif
00028 
00029 #if defined(__BORLANDC__)
00030 #define U_HAVE_PLACEMENT_NEW 0
00031 #define U_HAVE_INTTYPES_H 1
00032 #define __STDC_CONSTANT_MACROS
00033 #endif
00034 
00035 /* _MSC_VER is used to detect the Microsoft compiler. */
00036 #if defined(_MSC_VER)
00037 #define U_INT64_IS_LONG_LONG 0
00038 #else
00039 #define U_INT64_IS_LONG_LONG 1
00040 #endif
00041 
00042 /* Define whether inttypes.h is available */
00043 #ifndef U_HAVE_INTTYPES_H
00044 #define U_HAVE_INTTYPES_H 0
00045 #endif
00046 
00047 /*
00048  * Define what support for C++ streams is available.
00049  *     If U_IOSTREAM_SOURCE is set to 199711, then <iostream> is available
00050  * (1997711 is the date the ISO/IEC C++ FDIS was published), and then
00051  * one should qualify streams using the std namespace in ICU header
00052  * files.
00053  *     If U_IOSTREAM_SOURCE is set to 198506, then <iostream.h> is
00054  * available instead (198506 is the date when Stroustrup published
00055  * "An Extensible I/O Facility for C++" at the summer USENIX conference).
00056  *     If U_IOSTREAM_SOURCE is 0, then C++ streams are not available and
00057  * support for them will be silently suppressed in ICU.
00058  *
00059  */
00060 
00061 #ifndef U_IOSTREAM_SOURCE
00062 #define U_IOSTREAM_SOURCE 199711
00063 #endif
00064 
00065 /* Determines whether specific types are available */
00066 #ifndef U_HAVE_INT8_T
00067 #define U_HAVE_INT8_T U_HAVE_INTTYPES_H
00068 #endif
00069 
00070 #ifndef U_HAVE_UINT8_T
00071 #define U_HAVE_UINT8_T U_HAVE_INTTYPES_H
00072 #endif
00073 
00074 #ifndef U_HAVE_INT16_T
00075 #define U_HAVE_INT16_T U_HAVE_INTTYPES_H
00076 #endif
00077 
00078 #ifndef U_HAVE_UINT16_T
00079 #define U_HAVE_UINT16_T U_HAVE_INTTYPES_H
00080 #endif
00081 
00082 #ifndef U_HAVE_INT32_T
00083 #define U_HAVE_INT32_T U_HAVE_INTTYPES_H
00084 #endif
00085 
00086 #ifndef U_HAVE_UINT32_T
00087 #define U_HAVE_UINT32_T U_HAVE_INTTYPES_H
00088 #endif
00089 
00090 #ifndef U_HAVE_INT64_T
00091 #define U_HAVE_INT64_T U_HAVE_INTTYPES_H
00092 #endif
00093 
00094 #ifndef U_HAVE_UINT64_T
00095 #define U_HAVE_UINT64_T U_HAVE_INTTYPES_H
00096 #endif
00097 
00098 /* Define 64 bit limits */
00099 #if !U_INT64_IS_LONG_LONG
00100 # ifndef INT64_C
00101 #  define INT64_C(x) ((int64_t)x)
00102 # endif
00103 # ifndef UINT64_C
00104 #  define UINT64_C(x) ((uint64_t)x)
00105 # endif
00106 /* else use the umachine.h definition */
00107 #endif
00108 
00109 /*===========================================================================*/
00110 /* Generic data types                                                        */
00111 /*===========================================================================*/
00112 
00113 /* If your platform does not have the <inttypes.h> header, you may
00114    need to edit the typedefs below. */
00115 #if U_HAVE_INTTYPES_H
00116 #include <inttypes.h>
00117 #else /* U_HAVE_INTTYPES_H */
00118 
00119 #if ! U_HAVE_INT8_T
00120 typedef signed char int8_t;
00121 #endif
00122 
00123 #if ! U_HAVE_UINT8_T
00124 typedef unsigned char uint8_t;
00125 #endif
00126 
00127 #if ! U_HAVE_INT16_T
00128 typedef signed short int16_t;
00129 #endif
00130 
00131 #if ! U_HAVE_UINT16_T
00132 typedef unsigned short uint16_t;
00133 #endif
00134 
00135 #if ! U_HAVE_INT32_T
00136 typedef signed int int32_t;
00137 #endif
00138 
00139 #if ! U_HAVE_UINT32_T
00140 typedef unsigned int uint32_t;
00141 #endif
00142 
00143 #if ! U_HAVE_INT64_T
00144 #if U_INT64_IS_LONG_LONG
00145     typedef signed long long int64_t;
00146 #else
00147     typedef signed __int64 int64_t;
00148 #endif
00149 #endif
00150 
00151 #if ! U_HAVE_UINT64_T
00152 #if U_INT64_IS_LONG_LONG
00153     typedef unsigned long long uint64_t;
00154 #else
00155     typedef unsigned __int64 uint64_t;
00156 #endif
00157 #endif
00158 #endif
00159 
00160 /*===========================================================================*/
00161 /* Compiler and environment features                                         */
00162 /*===========================================================================*/
00163 
00164 /* Define whether namespace is supported */
00165 #ifndef U_HAVE_NAMESPACE
00166 #define U_HAVE_NAMESPACE 1
00167 #endif
00168 
00169 /* Determines the endianness of the platform */
00170 #define U_IS_BIG_ENDIAN 0
00171 
00172 /* 1 or 0 to enable or disable threads.  If undefined, default is: enable threads. */
00173 #define ICU_USE_THREADS 1
00174 
00175 /* On strong memory model CPUs (e.g. x86 CPUs), we use a safe & quick double check mutex lock. */
00176 /*
00177 Microsoft can define _M_IX86, _M_AMD64 (before Visual Studio 8) or _M_X64 (starting in Visual Studio 8). 
00178 Intel can define _M_IX86 or _M_X64
00179 */
00180 #if defined(_M_IX86) || defined(_M_AMD64) || defined(_M_X64) || (defined(__GNUC__) && (defined(__i386__) || defined(__x86_64__)))
00181 #define UMTX_STRONG_MEMORY_MODEL 1
00182 #endif
00183 
00184 #ifndef U_DEBUG
00185 #ifdef _DEBUG
00186 #define U_DEBUG 1
00187 #else
00188 #define U_DEBUG 0
00189 #endif
00190 #endif
00191 
00192 #ifndef U_RELEASE
00193 #ifdef NDEBUG
00194 #define U_RELEASE 1
00195 #else
00196 #define U_RELEASE 0
00197 #endif
00198 #endif
00199 
00200 /* Determine whether to disable renaming or not. This overrides the
00201    setting in umachine.h which is for all platforms. */
00202 #ifndef U_DISABLE_RENAMING
00203 #define U_DISABLE_RENAMING 0
00204 #endif
00205 
00206 /* Determine whether to override new and delete. */
00207 #ifndef U_OVERRIDE_CXX_ALLOCATION
00208 #define U_OVERRIDE_CXX_ALLOCATION 1
00209 #endif
00210 /* Determine whether to override placement new and delete for STL. */
00211 #ifndef U_HAVE_PLACEMENT_NEW
00212 #define U_HAVE_PLACEMENT_NEW 1
00213 #endif
00214 /* Determine whether to override new and delete for MFC. */
00215 #if !defined(U_HAVE_DEBUG_LOCATION_NEW) && defined(_MSC_VER)
00216 #define U_HAVE_DEBUG_LOCATION_NEW 1
00217 #endif
00218 
00219 /* Determine whether to enable tracing. */
00220 #ifndef U_ENABLE_TRACING
00221 #define U_ENABLE_TRACING 1
00222 #endif
00223 
00224 /* Do we allow ICU users to use the draft APIs by default? */
00225 #ifndef U_DEFAULT_SHOW_DRAFT
00226 #define U_DEFAULT_SHOW_DRAFT 1
00227 #endif
00228 
00229 /* Define the library suffix in a C syntax. */
00230 #define U_HAVE_LIB_SUFFIX 0
00231 #define U_LIB_SUFFIX_C_NAME 
00232 #define U_LIB_SUFFIX_C_NAME_STRING ""
00233 
00234 /*===========================================================================*/
00235 /* Information about wchar support                                           */
00236 /*===========================================================================*/
00237 
00238 #define U_HAVE_WCHAR_H 1
00239 #define U_SIZEOF_WCHAR_T 2
00240 
00241 #define U_HAVE_WCSCPY 1
00242 
00243 /*===========================================================================*/
00244 /* Information about POSIX support                                           */
00245 /*===========================================================================*/
00246 
00247 #if 1
00248 #define U_TZSET         _tzset
00249 #endif
00250 #if 1
00251 #define U_TIMEZONE      _timezone
00252 #endif
00253 #if 1
00254 #define U_TZNAME        _tzname
00255 #endif
00256 
00257 #define U_HAVE_MMAP 0
00258 #define U_HAVE_POPEN 0
00259 
00260 /*===========================================================================*/
00261 /* Symbol import-export control                                              */
00262 /*===========================================================================*/
00263 
00264 #ifdef U_STATIC_IMPLEMENTATION
00265 #define U_EXPORT
00266 #else
00267 #define U_EXPORT __declspec(dllexport)
00268 #endif
00269 #define U_EXPORT2 __cdecl
00270 #define U_IMPORT __declspec(dllimport)
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 #if defined(_MSC_VER) && defined(_M_IX86) && !defined(_MANAGED)
00285 #define U_ALIGN_CODE(val)    __asm      align val
00286 #else
00287 #define U_ALIGN_CODE(val)
00288 #endif
00289 
00290 
00291 /*===========================================================================*/
00292 /* Programs used by ICU code                                                 */
00293 /*===========================================================================*/
00294 
00295 #ifndef U_MAKE
00296 #define U_MAKE  "nmake"
00297 #define U_MAKE_IS_NMAKE 1
00298 #endif

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