modified dll/win32/kernel32/misc/lang.c
[reactos.git] / reactos / lib / 3rdparty / icu4ros / icu / source / common / unicode / pwin32.h
1 /*
2 ******************************************************************************
3 *
4 * Copyright (C) 1997-2007, 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 /**
20 * \file
21 * \brief Configuration constants for the Windows platform
22 */
23
24 /* Define the platform we're on. */
25 #ifndef U_WINDOWS
26 #define U_WINDOWS
27 #endif
28
29 #if defined(__BORLANDC__)
30 #define U_HAVE_PLACEMENT_NEW 0
31 #define U_HAVE_INTTYPES_H 1
32 #define __STDC_CONSTANT_MACROS
33 #endif
34
35 /* _MSC_VER is used to detect the Microsoft compiler. */
36 #if defined(_MSC_VER)
37 #define U_INT64_IS_LONG_LONG 0
38 #else
39 #define U_INT64_IS_LONG_LONG 1
40 #endif
41
42 /* Define whether inttypes.h is available */
43 #ifndef U_HAVE_INTTYPES_H
44 #define U_HAVE_INTTYPES_H 0
45 #endif
46
47 /*
48 * Define what support for C++ streams is available.
49 * If U_IOSTREAM_SOURCE is set to 199711, then <iostream> is available
50 * (1997711 is the date the ISO/IEC C++ FDIS was published), and then
51 * one should qualify streams using the std namespace in ICU header
52 * files.
53 * If U_IOSTREAM_SOURCE is set to 198506, then <iostream.h> is
54 * available instead (198506 is the date when Stroustrup published
55 * "An Extensible I/O Facility for C++" at the summer USENIX conference).
56 * If U_IOSTREAM_SOURCE is 0, then C++ streams are not available and
57 * support for them will be silently suppressed in ICU.
58 *
59 */
60
61 #ifndef U_IOSTREAM_SOURCE
62 #define U_IOSTREAM_SOURCE 199711
63 #endif
64
65 /* Determines whether specific types are available */
66 #ifndef U_HAVE_INT8_T
67 #define U_HAVE_INT8_T U_HAVE_INTTYPES_H
68 #endif
69
70 #ifndef U_HAVE_UINT8_T
71 #define U_HAVE_UINT8_T U_HAVE_INTTYPES_H
72 #endif
73
74 #ifndef U_HAVE_INT16_T
75 #define U_HAVE_INT16_T U_HAVE_INTTYPES_H
76 #endif
77
78 #ifndef U_HAVE_UINT16_T
79 #define U_HAVE_UINT16_T U_HAVE_INTTYPES_H
80 #endif
81
82 #ifndef U_HAVE_INT32_T
83 #define U_HAVE_INT32_T U_HAVE_INTTYPES_H
84 #endif
85
86 #ifndef U_HAVE_UINT32_T
87 #define U_HAVE_UINT32_T U_HAVE_INTTYPES_H
88 #endif
89
90 #ifndef U_HAVE_INT64_T
91 #define U_HAVE_INT64_T U_HAVE_INTTYPES_H
92 #endif
93
94 #ifndef U_HAVE_UINT64_T
95 #define U_HAVE_UINT64_T U_HAVE_INTTYPES_H
96 #endif
97
98 /* Define 64 bit limits */
99 #if !U_INT64_IS_LONG_LONG
100 # ifndef INT64_C
101 # define INT64_C(x) ((int64_t)x)
102 # endif
103 # ifndef UINT64_C
104 # define UINT64_C(x) ((uint64_t)x)
105 # endif
106 /* else use the umachine.h definition */
107 #endif
108
109 /*===========================================================================*/
110 /* Generic data types */
111 /*===========================================================================*/
112
113 /* If your platform does not have the <inttypes.h> header, you may
114 need to edit the typedefs below. */
115 #if U_HAVE_INTTYPES_H
116 #include <inttypes.h>
117 #else /* U_HAVE_INTTYPES_H */
118
119 #if ! U_HAVE_INT8_T
120 typedef signed char int8_t;
121 #endif
122
123 #if ! U_HAVE_UINT8_T
124 typedef unsigned char uint8_t;
125 #endif
126
127 #if ! U_HAVE_INT16_T
128 typedef signed short int16_t;
129 #endif
130
131 #if ! U_HAVE_UINT16_T
132 typedef unsigned short uint16_t;
133 #endif
134
135 #if ! U_HAVE_INT32_T
136 typedef signed int int32_t;
137 #endif
138
139 #if ! U_HAVE_UINT32_T
140 typedef unsigned int uint32_t;
141 #endif
142
143 #if ! U_HAVE_INT64_T
144 #if U_INT64_IS_LONG_LONG
145 typedef signed long long int64_t;
146 #else
147 typedef signed __int64 int64_t;
148 #endif
149 #endif
150
151 #if ! U_HAVE_UINT64_T
152 #if U_INT64_IS_LONG_LONG
153 typedef unsigned long long uint64_t;
154 #else
155 typedef unsigned __int64 uint64_t;
156 #endif
157 #endif
158 #endif
159
160 /*===========================================================================*/
161 /* Compiler and environment features */
162 /*===========================================================================*/
163
164 /* Define whether namespace is supported */
165 #ifndef U_HAVE_NAMESPACE
166 #define U_HAVE_NAMESPACE 1
167 #endif
168
169 /* Determines the endianness of the platform */
170 #define U_IS_BIG_ENDIAN 0
171
172 /* 1 or 0 to enable or disable threads. If undefined, default is: enable threads. */
173 #define ICU_USE_THREADS 1
174
175 /* On strong memory model CPUs (e.g. x86 CPUs), we use a safe & quick double check mutex lock. */
176 /*
177 Microsoft can define _M_IX86, _M_AMD64 (before Visual Studio 8) or _M_X64 (starting in Visual Studio 8).
178 Intel can define _M_IX86 or _M_X64
179 */
180 #if defined(_M_IX86) || defined(_M_AMD64) || defined(_M_X64) || (defined(__GNUC__) && (defined(__i386__) || defined(__x86_64__)))
181 #define UMTX_STRONG_MEMORY_MODEL 1
182 #endif
183
184 #ifndef U_DEBUG
185 #ifdef _DEBUG
186 #define U_DEBUG 1
187 #else
188 #define U_DEBUG 0
189 #endif
190 #endif
191
192 #ifndef U_RELEASE
193 #ifdef NDEBUG
194 #define U_RELEASE 1
195 #else
196 #define U_RELEASE 0
197 #endif
198 #endif
199
200 /* Determine whether to disable renaming or not. This overrides the
201 setting in umachine.h which is for all platforms. */
202 #ifndef U_DISABLE_RENAMING
203 #define U_DISABLE_RENAMING 0
204 #endif
205
206 /* Determine whether to override new and delete. */
207 #ifndef U_OVERRIDE_CXX_ALLOCATION
208 #define U_OVERRIDE_CXX_ALLOCATION 1
209 #endif
210 /* Determine whether to override placement new and delete for STL. */
211 #ifndef U_HAVE_PLACEMENT_NEW
212 #define U_HAVE_PLACEMENT_NEW 1
213 #endif
214 /* Determine whether to override new and delete for MFC. */
215 #if !defined(U_HAVE_DEBUG_LOCATION_NEW) && defined(_MSC_VER)
216 #define U_HAVE_DEBUG_LOCATION_NEW 1
217 #endif
218
219 /* Determine whether to enable tracing. */
220 #ifndef U_ENABLE_TRACING
221 #define U_ENABLE_TRACING 0
222 #endif
223
224 /* Do we allow ICU users to use the draft APIs by default? */
225 #ifndef U_DEFAULT_SHOW_DRAFT
226 #define U_DEFAULT_SHOW_DRAFT 1
227 #endif
228
229 /* Define the library suffix in a C syntax. */
230 #define U_HAVE_LIB_SUFFIX 0
231 #define U_LIB_SUFFIX_C_NAME
232 #define U_LIB_SUFFIX_C_NAME_STRING ""
233
234 /*===========================================================================*/
235 /* Information about wchar support */
236 /*===========================================================================*/
237
238 #define U_HAVE_WCHAR_H 1
239 #define U_SIZEOF_WCHAR_T 2
240
241 #define U_HAVE_WCSCPY 1
242
243 /**
244 * \def U_DECLARE_UTF16
245 * Do not use this macro. Use the UNICODE_STRING or U_STRING_DECL macros
246 * instead.
247 * @internal
248 */
249 #if 1
250 #define U_DECLARE_UTF16(string) L ## string
251 #endif
252
253 /*===========================================================================*/
254 /* Information about POSIX support */
255 /*===========================================================================*/
256
257 #if 1
258 #define U_TZSET _tzset
259 #endif
260 #if 1
261 #define U_TIMEZONE _timezone
262 #endif
263 #if 1
264 #define U_TZNAME _tzname
265 #endif
266 #if 1
267 #define U_DAYLIGHT _daylight
268 #endif
269
270 #define U_HAVE_MMAP 0
271 #define U_HAVE_POPEN 0
272
273 /*===========================================================================*/
274 /* Symbol import-export control */
275 /*===========================================================================*/
276
277 #ifdef U_STATIC_IMPLEMENTATION
278 #define U_EXPORT
279 #else
280 #define U_EXPORT __declspec(dllexport)
281 #endif
282 #define U_EXPORT2 __cdecl
283 #define U_IMPORT __declspec(dllimport)
284
285 /*===========================================================================*/
286 /* Code alignment and C function inlining */
287 /*===========================================================================*/
288
289 #ifndef U_INLINE
290 # ifdef __cplusplus
291 # define U_INLINE inline
292 # else
293 # define U_INLINE __inline
294 # endif
295 #endif
296
297 #if defined(_MSC_VER) && defined(_M_IX86) && !defined(_MANAGED)
298 #define U_ALIGN_CODE(val) __asm align val
299 #else
300 #define U_ALIGN_CODE(val)
301 #endif
302
303
304 /*===========================================================================*/
305 /* Programs used by ICU code */
306 /*===========================================================================*/
307
308 #ifndef U_MAKE
309 #define U_MAKE "nmake"
310 #define U_MAKE_IS_NMAKE 1
311 #endif