]> git.saurik.com Git - apple/icu.git/blob - icuSources/common/unicode/pwin32.h
ICU-3.13.tar.gz
[apple/icu.git] / icuSources / common / unicode / pwin32.h
1 /*
2 ******************************************************************************
3 *
4 * Copyright (C) 1997-2003, 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 /* Define whether inttypes.h is available */
25 #define U_HAVE_INTTYPES_H 0
26
27 /*
28 * Define what support for C++ streams is available.
29 * If U_IOSTREAM_SOURCE is set to 199711, then <iostream> is available
30 * (1997711 is the date the ISO/IEC C++ FDIS was published), and then
31 * one should qualify streams using the std namespace in ICU header
32 * files.
33 * If U_IOSTREAM_SOURCE is set to 198506, then <iostream.h> is
34 * available instead (198506 is the date when Stroustrup published
35 * "An Extensible I/O Facility for C++" at the summer USENIX conference).
36 * If U_IOSTREAM_SOURCE is 0, then C++ streams are not available and
37 * support for them will be silently suppressed in ICU.
38 *
39 */
40
41 #ifndef U_IOSTREAM_SOURCE
42 #define U_IOSTREAM_SOURCE 199711
43 #endif
44
45 /* Determines whether specific types are available */
46 #define U_HAVE_INT8_T 0
47 #define U_HAVE_UINT8_T 0
48 #define U_HAVE_INT16_T 0
49 #define U_HAVE_UINT16_T 0
50 #define U_HAVE_INT32_T 0
51 #define U_HAVE_UINT32_T 0
52 #define U_HAVE_INT64_T 0
53 #define U_HAVE_UINT64_T 0
54
55 /* Define whether namespace is supported */
56 #define U_HAVE_NAMESPACE 1
57
58 /* Determines the endianness of the platform */
59 #define U_IS_BIG_ENDIAN 0
60
61 /* Determine whether to override new and delete. */
62 #ifndef U_OVERRIDE_CXX_ALLOCATION
63 #define U_OVERRIDE_CXX_ALLOCATION 1
64 #endif
65 /* Determine whether to override placement new and delete for STL. */
66 #ifndef U_HAVE_PLACEMENT_NEW
67 #define U_HAVE_PLACEMENT_NEW 1
68 #endif
69
70 /*===========================================================================*/
71 /* Generic data types */
72 /*===========================================================================*/
73
74 /* If your platform does not have the <inttypes.h> header, you may
75 need to edit the typedefs below. */
76 #if U_HAVE_INTTYPES_H
77 #include <inttypes.h>
78 #else
79
80 #if ! U_HAVE_INT8_T
81 typedef signed char int8_t;
82 #endif
83
84 #if ! U_HAVE_UINT8_T
85 typedef unsigned char uint8_t;
86 #endif
87
88 #if ! U_HAVE_INT16_T
89 typedef signed short int16_t;
90 #endif
91
92 #if ! U_HAVE_UINT16_T
93 typedef unsigned short uint16_t;
94 #endif
95
96 #if ! U_HAVE_INT32_T
97 # if defined(_LP64)
98 typedef signed int int32_t;
99 # else
100 typedef signed long int32_t;
101 # endif
102 #endif
103
104 #if ! U_HAVE_UINT32_T
105 # if defined(_LP64)
106 typedef unsigned int uint32_t;
107 # else
108 typedef unsigned long uint32_t;
109 # endif
110 #endif
111
112 #if ! U_HAVE_INT64_T
113 /* Could use _MSC_VER to detect Microsoft compiler. */
114 typedef signed __int64 int64_t;
115 #endif
116
117 #if ! U_HAVE_UINT64_T
118 /* Could use _MSC_VER to detect Microsoft compiler. */
119 typedef unsigned __int64 uint64_t;
120 #endif
121
122 #endif
123
124 /*===========================================================================*/
125 /* Character data types */
126 /*===========================================================================*/
127
128 #define U_SIZEOF_WCHAR_T 2
129
130 /*===========================================================================*/
131 /* Do we have wcscpy and other similar functions */
132 /*===========================================================================*/
133
134 #define U_HAVE_WCSCPY 1
135
136 /*===========================================================================*/
137 /* Information about POSIX support */
138 /*===========================================================================*/
139
140 #define U_TZSET _tzset
141 #define U_HAVE_TIMEZONE 1
142 #if U_HAVE_TIMEZONE
143 # define U_TIMEZONE _timezone
144 #endif
145 #define U_TZNAME _tzname
146
147 #define U_HAVE_MMAP 0
148
149 /*===========================================================================*/
150 /* Symbol import-export control */
151 /*===========================================================================*/
152
153 #define U_EXPORT __declspec(dllexport)
154 #define U_EXPORT2 __cdecl
155 #define U_IMPORT __declspec(dllimport)
156
157 /*===========================================================================*/
158 /* Code alignment and C function inlining */
159 /*===========================================================================*/
160
161 #define U_INLINE __inline
162
163 #if defined(_MSC_VER) && defined(_M_IX86)
164 #define U_ALIGN_CODE(val) __asm align val
165 #else
166 #define U_ALIGN_CODE(val)
167 #endif
168
169
170 /*===========================================================================*/
171 /* Programs used by ICU code */
172 /*===========================================================================*/
173
174 #define U_MAKE "nmake"
175