]> git.saurik.com Git - apple/icu.git/blob - icuSources/common/unicode/pwin32.h
ICU-6.2.8.tar.gz
[apple/icu.git] / icuSources / common / unicode / pwin32.h
1 /*
2 ******************************************************************************
3 *
4 * Copyright (C) 1997-2004, International Business Machines
5 * Corporation and others. All Rights Reserved.
6 *
7 ******************************************************************************
8 *
9 * FILE NAME : platform.h
10 *
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 ******************************************************************************
17 */
18
19 /* Define the platform we're on. */
20 #ifndef WIN32
21 #define WIN32
22 #endif
23
24 #if defined(__BORLANDC__)
25 #define U_HAVE_PLACEMENT_NEW 0
26 #define U_HAVE_INTTYPES_H 1
27 #define __STDC_CONSTANT_MACROS
28 #endif
29
30 /* Define whether inttypes.h is available */
31 #ifndef U_HAVE_INTTYPES_H
32 #define U_HAVE_INTTYPES_H 0
33 #endif
34
35 /*
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
40 * files.
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.
46 *
47 */
48
49 #ifndef U_IOSTREAM_SOURCE
50 #define U_IOSTREAM_SOURCE 199711
51 #endif
52
53 /* Determines whether specific types are available */
54 #ifndef U_HAVE_INT8_T
55 #define U_HAVE_INT8_T U_HAVE_INTTYPES_H
56 #endif
57
58 #ifndef U_HAVE_UINT8_T
59 #define U_HAVE_UINT8_T U_HAVE_INTTYPES_H
60 #endif
61
62 #ifndef U_HAVE_INT16_T
63 #define U_HAVE_INT16_T U_HAVE_INTTYPES_H
64 #endif
65
66 #ifndef U_HAVE_UINT16_T
67 #define U_HAVE_UINT16_T U_HAVE_INTTYPES_H
68 #endif
69
70 #ifndef U_HAVE_INT32_T
71 #define U_HAVE_INT32_T U_HAVE_INTTYPES_H
72 #endif
73
74 #ifndef U_HAVE_UINT32_T
75 #define U_HAVE_UINT32_T U_HAVE_INTTYPES_H
76 #endif
77
78 #ifndef U_HAVE_INT64_T
79 #define U_HAVE_INT64_T U_HAVE_INTTYPES_H
80 #endif
81
82 #ifndef U_HAVE_UINT64_T
83 #define U_HAVE_UINT64_T U_HAVE_INTTYPES_H
84 #endif
85
86 /* Define 64 bit limits */
87 #define INT64_C(x) ((int64_t)x)
88 #define UINT64_C(x) ((uint64_t)x)
89
90 /*===========================================================================*/
91 /* Generic data types */
92 /*===========================================================================*/
93
94 /* If your platform does not have the <inttypes.h> header, you may
95 need to edit the typedefs below. */
96 #if U_HAVE_INTTYPES_H
97 #include <inttypes.h>
98 #else /* U_HAVE_INTTYPES_H */
99
100 #if ! U_HAVE_INT8_T
101 typedef signed char int8_t;
102 #endif
103
104 #if ! U_HAVE_UINT8_T
105 typedef unsigned char uint8_t;
106 #endif
107
108 #if ! U_HAVE_INT16_T
109 typedef signed short int16_t;
110 #endif
111
112 #if ! U_HAVE_UINT16_T
113 typedef unsigned short uint16_t;
114 #endif
115
116 #if ! U_HAVE_INT32_T
117 typedef signed int int32_t;
118 #endif
119
120 #if ! U_HAVE_UINT32_T
121 typedef unsigned int uint32_t;
122 #endif
123
124 #if ! U_HAVE_INT64_T
125 /* _MSC_VER is used to detect the Microsoft compiler. */
126 #ifdef _MSC_VER
127 typedef signed __int64 int64_t;
128 #else
129 typedef signed long long int64_t;
130 #endif
131 #endif
132
133 #if ! U_HAVE_UINT64_T
134 /* _MSC_VER is used to detect the Microsoft compiler. */
135 #ifdef _MSC_VER
136 typedef unsigned __int64 uint64_t;
137 #else
138 typedef unsigned long long uint64_t;
139 #endif
140 #endif
141 #endif
142
143 /*===========================================================================*/
144 /* Compiler and environment features */
145 /*===========================================================================*/
146
147 /* Define whether namespace is supported */
148 #ifndef U_HAVE_NAMESPACE
149 #define U_HAVE_NAMESPACE 1
150 #endif
151
152 /* Determines the endianness of the platform */
153 #define U_IS_BIG_ENDIAN 0
154
155 /* 1 or 0 to enable or disable threads. If undefined, default is: enable threads. */
156 #define ICU_USE_THREADS 1
157
158 /* Windows currently only runs on x86 CPUs which currently all have strong memory models. */
159 #define UMTX_STRONG_MEMORY_MODEL 1
160
161 #ifndef U_DEBUG
162 #ifdef _DEBUG
163 #define U_DEBUG 1
164 #else
165 #define U_DEBUG 0
166 #endif
167 #endif
168
169 #ifndef U_RELEASE
170 #ifdef NDEBUG
171 #define U_RELEASE 1
172 #else
173 #define U_RELEASE 0
174 #endif
175 #endif
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
180 #endif
181
182 /* Determine whether to override new and delete. */
183 #ifndef U_OVERRIDE_CXX_ALLOCATION
184 #define U_OVERRIDE_CXX_ALLOCATION 1
185 #endif
186 /* Determine whether to override placement new and delete for STL. */
187 #ifndef U_HAVE_PLACEMENT_NEW
188 #define U_HAVE_PLACEMENT_NEW 1
189 #endif
190
191 /* Determine whether to enable tracing. */
192 #ifndef U_ENABLE_TRACING
193 #define U_ENABLE_TRACING 1
194 #endif
195
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 ""
200
201 /*===========================================================================*/
202 /* Information about wchar support */
203 /*===========================================================================*/
204
205 #define U_HAVE_WCHAR_H 1
206 #define U_SIZEOF_WCHAR_T 2
207
208 #define U_HAVE_WCSCPY 1
209
210 /*===========================================================================*/
211 /* Information about POSIX support */
212 /*===========================================================================*/
213
214 #define U_TZSET _tzset
215 #define U_HAVE_TIMEZONE 1
216 #if U_HAVE_TIMEZONE
217 # define U_TIMEZONE _timezone
218 #endif
219 #define U_TZNAME _tzname
220
221 #define U_HAVE_MMAP 0
222 #define U_HAVE_POPEN 0
223
224 /*===========================================================================*/
225 /* Symbol import-export control */
226 /*===========================================================================*/
227
228 #ifdef U_STATIC_IMPLEMENTATION
229 #define U_EXPORT
230 #else
231 #define U_EXPORT __declspec(dllexport)
232 #endif
233 #define U_EXPORT2 __cdecl
234 #define U_IMPORT __declspec(dllimport)
235
236 /*===========================================================================*/
237 /* Code alignment and C function inlining */
238 /*===========================================================================*/
239
240 #ifndef U_INLINE
241 #define U_INLINE __inline
242 #endif
243
244 #if defined(_MSC_VER) && defined(_M_IX86)
245 #define U_ALIGN_CODE(val) __asm align val
246 #else
247 #define U_ALIGN_CODE(val)
248 #endif
249
250
251 /*===========================================================================*/
252 /* Programs used by ICU code */
253 /*===========================================================================*/
254
255 #ifndef U_MAKE
256 #define U_MAKE "nmake"
257 #define U_MAKE_IS_NMAKE 1
258 #endif