]>
git.saurik.com Git - apple/icu.git/blob - icuSources/common/unicode/pwin32.h
2 ******************************************************************************
4 * Copyright (C) 1997-2004, International Business Machines
5 * Corporation and others. All Rights Reserved.
7 ******************************************************************************
9 * FILE NAME : platform.h
11 * Date Name Description
12 * 05/13/98 nos Creation (content moved here from ptypes.h).
13 * 03/02/99 stephen Added AS400 support.
14 * 03/30/99 stephen Added Linux support.
15 * 04/13/99 stephen Reworked for autoconf.
16 ******************************************************************************
19 /* Define the platform we're on. */
24 #if defined(__BORLANDC__)
25 #define U_HAVE_PLACEMENT_NEW 0
26 #define U_HAVE_INTTYPES_H 1
27 #define __STDC_CONSTANT_MACROS
30 /* Define whether inttypes.h is available */
31 #ifndef U_HAVE_INTTYPES_H
32 #define U_HAVE_INTTYPES_H 0
36 * Define what support for C++ streams is available.
37 * If U_IOSTREAM_SOURCE is set to 199711, then <iostream> is available
38 * (1997711 is the date the ISO/IEC C++ FDIS was published), and then
39 * one should qualify streams using the std namespace in ICU header
41 * If U_IOSTREAM_SOURCE is set to 198506, then <iostream.h> is
42 * available instead (198506 is the date when Stroustrup published
43 * "An Extensible I/O Facility for C++" at the summer USENIX conference).
44 * If U_IOSTREAM_SOURCE is 0, then C++ streams are not available and
45 * support for them will be silently suppressed in ICU.
49 #ifndef U_IOSTREAM_SOURCE
50 #define U_IOSTREAM_SOURCE 199711
53 /* Determines whether specific types are available */
55 #define U_HAVE_INT8_T U_HAVE_INTTYPES_H
58 #ifndef U_HAVE_UINT8_T
59 #define U_HAVE_UINT8_T U_HAVE_INTTYPES_H
62 #ifndef U_HAVE_INT16_T
63 #define U_HAVE_INT16_T U_HAVE_INTTYPES_H
66 #ifndef U_HAVE_UINT16_T
67 #define U_HAVE_UINT16_T U_HAVE_INTTYPES_H
70 #ifndef U_HAVE_INT32_T
71 #define U_HAVE_INT32_T U_HAVE_INTTYPES_H
74 #ifndef U_HAVE_UINT32_T
75 #define U_HAVE_UINT32_T U_HAVE_INTTYPES_H
78 #ifndef U_HAVE_INT64_T
79 #define U_HAVE_INT64_T U_HAVE_INTTYPES_H
82 #ifndef U_HAVE_UINT64_T
83 #define U_HAVE_UINT64_T U_HAVE_INTTYPES_H
86 /* Define 64 bit limits */
87 #define INT64_C(x) ((int64_t)x)
88 #define UINT64_C(x) ((uint64_t)x)
90 /*===========================================================================*/
91 /* Generic data types */
92 /*===========================================================================*/
94 /* If your platform does not have the <inttypes.h> header, you may
95 need to edit the typedefs below. */
98 #else /* U_HAVE_INTTYPES_H */
101 typedef signed char int8_t;
105 typedef unsigned char uint8_t;
109 typedef signed short int16_t;
112 #if ! U_HAVE_UINT16_T
113 typedef unsigned short uint16_t;
117 typedef signed int int32_t;
120 #if ! U_HAVE_UINT32_T
121 typedef unsigned int uint32_t;
125 /* _MSC_VER is used to detect the Microsoft compiler. */
127 typedef signed __int64
int64_t;
129 typedef signed long long int64_t;
133 #if ! U_HAVE_UINT64_T
134 /* _MSC_VER is used to detect the Microsoft compiler. */
136 typedef unsigned __int64
uint64_t;
138 typedef unsigned long long uint64_t;
143 /*===========================================================================*/
144 /* Compiler and environment features */
145 /*===========================================================================*/
147 /* Define whether namespace is supported */
148 #ifndef U_HAVE_NAMESPACE
149 #define U_HAVE_NAMESPACE 1
152 /* Determines the endianness of the platform */
153 #define U_IS_BIG_ENDIAN 0
155 /* 1 or 0 to enable or disable threads. If undefined, default is: enable threads. */
156 #define ICU_USE_THREADS 1
158 /* Windows currently only runs on x86 CPUs which currently all have strong memory models. */
159 #define UMTX_STRONG_MEMORY_MODEL 1
176 /* Determine whether to disable renaming or not. This overrides the
177 setting in umachine.h which is for all platforms. */
178 #ifndef U_DISABLE_RENAMING
179 #define U_DISABLE_RENAMING 0
182 /* Determine whether to override new and delete. */
183 #ifndef U_OVERRIDE_CXX_ALLOCATION
184 #define U_OVERRIDE_CXX_ALLOCATION 1
186 /* Determine whether to override placement new and delete for STL. */
187 #ifndef U_HAVE_PLACEMENT_NEW
188 #define U_HAVE_PLACEMENT_NEW 1
191 /* Determine whether to enable tracing. */
192 #ifndef U_ENABLE_TRACING
193 #define U_ENABLE_TRACING 1
196 /* Define the library suffix in a C syntax. */
197 #define U_HAVE_LIB_SUFFIX 0
198 #define U_LIB_SUFFIX_C_NAME
199 #define U_LIB_SUFFIX_C_NAME_STRING ""
201 /*===========================================================================*/
202 /* Information about wchar support */
203 /*===========================================================================*/
205 #define U_HAVE_WCHAR_H 1
206 #define U_SIZEOF_WCHAR_T 2
208 #define U_HAVE_WCSCPY 1
210 /*===========================================================================*/
211 /* Information about POSIX support */
212 /*===========================================================================*/
214 #define U_TZSET _tzset
215 #define U_HAVE_TIMEZONE 1
217 # define U_TIMEZONE _timezone
219 #define U_TZNAME _tzname
221 #define U_HAVE_MMAP 0
222 #define U_HAVE_POPEN 0
224 /*===========================================================================*/
225 /* Symbol import-export control */
226 /*===========================================================================*/
228 #ifdef U_STATIC_IMPLEMENTATION
231 #define U_EXPORT __declspec(dllexport)
233 #define U_EXPORT2 __cdecl
234 #define U_IMPORT __declspec(dllimport)
236 /*===========================================================================*/
237 /* Code alignment and C function inlining */
238 /*===========================================================================*/
241 #define U_INLINE __inline
244 #if defined(_MSC_VER) && defined(_M_IX86)
245 #define U_ALIGN_CODE(val) __asm align val
247 #define U_ALIGN_CODE(val)
251 /*===========================================================================*/
252 /* Programs used by ICU code */
253 /*===========================================================================*/
256 #define U_MAKE "nmake"
257 #define U_MAKE_IS_NMAKE 1