ICU 4.2.1
 All Data Structures Files Functions Variables Typedefs Enumerations Enumerator Friends Macros Groups Pages
pwin32.h
Go to the documentation of this file.
1 /*
2  ******************************************************************************
3  *
4  * Copyright (C) 1997-2009, 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 
25 #ifndef U_WINDOWS
26 #define U_WINDOWS
27 #endif
28 
29 #if defined(__BORLANDC__)
30 #define U_HAVE_PLACEMENT_NEW 0
31 #define __STDC_CONSTANT_MACROS
32 #endif
33 
35 #if defined(_MSC_VER)
36 #define U_INT64_IS_LONG_LONG 0
37 #else
38 #define U_INT64_IS_LONG_LONG 1
39 #endif
40 
42 #ifndef U_HAVE_INTTYPES_H
43 # if defined(__BORLANDC__) || defined(__MINGW32__)
44 # define U_HAVE_INTTYPES_H 1
45 # else
46 # define U_HAVE_INTTYPES_H 0
47 # endif
48 #endif
49 
64 #ifndef U_IOSTREAM_SOURCE
65 #define U_IOSTREAM_SOURCE 199711
66 #endif
67 
70 #ifndef U_HAVE_INT8_T
71 #define U_HAVE_INT8_T U_HAVE_INTTYPES_H
72 #endif
73 
74 #ifndef U_HAVE_UINT8_T
75 #define U_HAVE_UINT8_T U_HAVE_INTTYPES_H
76 #endif
77 
78 #ifndef U_HAVE_INT16_T
79 #define U_HAVE_INT16_T U_HAVE_INTTYPES_H
80 #endif
81 
82 #ifndef U_HAVE_UINT16_T
83 #define U_HAVE_UINT16_T U_HAVE_INTTYPES_H
84 #endif
85 
86 #ifndef U_HAVE_INT32_T
87 #define U_HAVE_INT32_T U_HAVE_INTTYPES_H
88 #endif
89 
90 #ifndef U_HAVE_UINT32_T
91 #define U_HAVE_UINT32_T U_HAVE_INTTYPES_H
92 #endif
93 
94 #ifndef U_HAVE_INT64_T
95 #define U_HAVE_INT64_T U_HAVE_INTTYPES_H
96 #endif
97 
98 #ifndef U_HAVE_UINT64_T
99 #define U_HAVE_UINT64_T U_HAVE_INTTYPES_H
100 #endif
101 
105 #if !U_INT64_IS_LONG_LONG
106 # ifndef INT64_C
107 # define INT64_C(x) ((int64_t)x)
108 # endif
109 # ifndef UINT64_C
110 # define UINT64_C(x) ((uint64_t)x)
111 # endif
112 
113 #endif
114 
115 /*===========================================================================*/
118 /*===========================================================================*/
119 
122 #if U_HAVE_INTTYPES_H
123 #include <inttypes.h>
124 #else /* U_HAVE_INTTYPES_H */
125 
126 #if ! U_HAVE_INT8_T
127 typedef signed char int8_t;
128 #endif
129 
130 #if ! U_HAVE_UINT8_T
131 typedef unsigned char uint8_t;
132 #endif
133 
134 #if ! U_HAVE_INT16_T
135 typedef signed short int16_t;
136 #endif
137 
138 #if ! U_HAVE_UINT16_T
139 typedef unsigned short uint16_t;
140 #endif
141 
142 #if ! U_HAVE_INT32_T
143 typedef signed int int32_t;
144 #endif
145 
146 #if ! U_HAVE_UINT32_T
147 typedef unsigned int uint32_t;
148 #endif
149 
150 #if ! U_HAVE_INT64_T
151 #if U_INT64_IS_LONG_LONG
152  typedef signed long long int64_t;
153 #else
154  typedef signed __int64 int64_t;
155 #endif
156 #endif
157 
158 #if ! U_HAVE_UINT64_T
159 #if U_INT64_IS_LONG_LONG
160  typedef unsigned long long uint64_t;
161 #else
162  typedef unsigned __int64 uint64_t;
163 #endif
164 #endif
165 #endif
166 
171 /*===========================================================================*/
173 /*===========================================================================*/
174 
176 #ifndef U_HAVE_NAMESPACE
177 #define U_HAVE_NAMESPACE 1
178 #endif
179 
181 #define U_IS_BIG_ENDIAN 0
182 
184 #define ICU_USE_THREADS 1
185 
186 /* On strong memory model CPUs (e.g. x86 CPUs), we use a safe & quick double check mutex lock. */
191 #if defined(_M_IX86) || defined(_M_AMD64) || defined(_M_X64) || (defined(__GNUC__) && (defined(__i386__) || defined(__x86_64__)))
192 #define UMTX_STRONG_MEMORY_MODEL 1
193 #endif
194 
196 #ifndef U_DEBUG
197 #ifdef _DEBUG
198 #define U_DEBUG 1
199 #else
200 #define U_DEBUG 0
201 #endif
202 #endif
203 
205 #ifndef U_RELEASE
206 #ifdef NDEBUG
207 #define U_RELEASE 1
208 #else
209 #define U_RELEASE 0
210 #endif
211 #endif
212 
215 #ifndef U_DISABLE_RENAMING
216 #define U_DISABLE_RENAMING 0
217 #endif
218 
220 #ifndef U_OVERRIDE_CXX_ALLOCATION
221 #define U_OVERRIDE_CXX_ALLOCATION 1
222 #endif
223 
224 #ifndef U_HAVE_PLACEMENT_NEW
225 #define U_HAVE_PLACEMENT_NEW 1
226 #endif
227 
228 #if !defined(U_HAVE_DEBUG_LOCATION_NEW) && defined(_MSC_VER)
229 #define U_HAVE_DEBUG_LOCATION_NEW 1
230 #endif
231 
233 #ifndef U_ENABLE_TRACING
234 #define U_ENABLE_TRACING 0
235 #endif
236 
238 #ifndef U_DEFAULT_SHOW_DRAFT
239 #define U_DEFAULT_SHOW_DRAFT 1
240 #endif
241 
243 #define U_HAVE_LIB_SUFFIX 0
244 #define U_LIB_SUFFIX_C_NAME
245 #define U_LIB_SUFFIX_C_NAME_STRING ""
246 
248 /*===========================================================================*/
250 /*===========================================================================*/
251 
252 #define U_HAVE_WCHAR_H 1
253 #define U_SIZEOF_WCHAR_T 2
254 
255 #define U_HAVE_WCSCPY 1
256 
265 #if 1
266 #define U_DECLARE_UTF16(string) L ## string
267 #endif
268 
269 /*===========================================================================*/
271 /*===========================================================================*/
272 
273 #if 1
274 #define U_TZSET _tzset
275 #endif
276 #if 1
277 #define U_TIMEZONE _timezone
278 #endif
279 #if 1
280 #define U_TZNAME _tzname
281 #endif
282 #if 1
283 #define U_DAYLIGHT _daylight
284 #endif
285 
286 #define U_HAVE_MMAP 0
287 #define U_HAVE_POPEN 0
288 
291 /*===========================================================================*/
293 /*===========================================================================*/
294 
295 #ifdef U_STATIC_IMPLEMENTATION
296 #define U_EXPORT
297 #else
298 #define U_EXPORT __declspec(dllexport)
299 #endif
300 #define U_EXPORT2 __cdecl
301 #define U_IMPORT __declspec(dllimport)
302 
304 /*===========================================================================*/
306 /*===========================================================================*/
307 
308 #ifndef U_INLINE
309 # ifdef __cplusplus
310 # define U_INLINE inline
311 # else
312 # define U_INLINE __inline
313 # endif
314 #endif
315 
316 #if defined(_MSC_VER) && defined(_M_IX86) && !defined(_MANAGED)
317 #define U_ALIGN_CODE(val) __asm align val
318 #else
319 #define U_ALIGN_CODE(val)
320 #endif
321 
325 #if defined(_MSC_VER) && (_MSC_VER < 1400)
326 #define U_HAVE_MSVC_2003_OR_EARLIER
327 #endif
328 
329 
332 /*===========================================================================*/
334 /*===========================================================================*/
335 
336 #ifndef U_MAKE
337 #define U_MAKE "nmake"
338 #define U_MAKE_IS_NMAKE 1
339 #endif
340 
unsigned char uint8_t
Define 64 bit limits.
Definition: pwin32.h:131
unsigned int uint32_t
Define 64 bit limits.
Definition: pwin32.h:147
unsigned long long uint64_t
Define 64 bit limits.
Definition: pwin32.h:160
signed short int16_t
Define 64 bit limits.
Definition: pwin32.h:135
signed char int8_t
Define 64 bit limits.
Definition: pwin32.h:127
signed long long int64_t
Define 64 bit limits.
Definition: pwin32.h:152
unsigned short uint16_t
Define 64 bit limits.
Definition: pwin32.h:139
signed int int32_t
Define 64 bit limits.
Definition: pwin32.h:143