Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(43)

Side by Side Diff: icu46/source/common/unicode/pmac.h

Issue 6463014: Move header files (ICU 4.6) from source/{common,i18n}/unicode... (Closed) Base URL: svn://chrome-svn/chrome/trunk/deps/third_party/
Patch Set: Created 9 years, 10 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View unified diff | Download patch | Annotate | Revision Log
« no previous file with comments | « icu46/source/common/unicode/plinux.h ('k') | icu46/source/common/unicode/ppalmos.h » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
(Empty)
1 /*
2 ******************************************************************************
3 *
4 * Copyright (C) 1997-2010, International Business Machines
5 * Corporation and others. All Rights Reserved.
6 *
7 ******************************************************************************
8 *
9 * Note: autoconf creates platform.h from platform.h.in at configure time.
10 *
11 ******************************************************************************
12 *
13 * FILE NAME : platform.h
14 *
15 * Date Name Description
16 * 05/13/98 nos Creation (content moved here from ptypes.h).
17 * 03/02/99 stephen Added AS400 support.
18 * 03/30/99 stephen Added Linux support.
19 * 04/13/99 stephen Reworked for autoconf.
20 ******************************************************************************
21 */
22
23 #ifndef _PLATFORM_H
24 #define _PLATFORM_H
25
26 /**
27 * \file
28 * \brief Basic types for the platform
29 */
30
31 /* This file should be included before uvernum.h. */
32 #if defined(UVERNUM_H)
33 # error Do not include unicode/uvernum.h before #including unicode/platform.h. Instead of unicode/uvernum.h, #include unicode/uversion.h
34 #endif
35
36 /**
37 * Determine wheter to enable auto cleanup of libraries.
38 * @internal
39 */
40 #ifndef UCLN_NO_AUTO_CLEANUP
41 #define UCLN_NO_AUTO_CLEANUP 1
42 #endif
43
44 /* Need platform.h when using CYGWINMSVC to get definitions above. Ignore everyt hing else. */
45 #ifndef CYGWINMSVC
46
47 /** Define the platform we're on. */
48 #ifndef U_DARWIN
49 #define U_DARWIN
50 #endif
51
52 #include <AvailabilityMacros.h>
53
54 /**
55 * \def U_HAVE_DIRENT_H
56 * Define whether dirent.h is available
57 * @internal
58 */
59 #ifndef U_HAVE_DIRENT_H
60 #if MAC_OS_X_VERSION_MIN_REQUIRED < MAC_OS_X_VERSION_10_5
61 #define U_HAVE_DIRENT_H 0
62 #else
63 #define U_HAVE_DIRENT_H 1
64 #endif
65 #endif
66
67 /** Define whether inttypes.h is available */
68 #ifndef U_HAVE_INTTYPES_H
69 #define U_HAVE_INTTYPES_H 1
70 #endif
71
72 /**
73 * Define what support for C++ streams is available.
74 * If U_IOSTREAM_SOURCE is set to 199711, then &lt;iostream&gt; is available
75 * (1997711 is the date the ISO/IEC C++ FDIS was published), and then
76 * one should qualify streams using the std namespace in ICU header
77 * files.
78 * If U_IOSTREAM_SOURCE is set to 198506, then &lt;iostream.h&gt; is
79 * available instead (198506 is the date when Stroustrup published
80 * "An Extensible I/O Facility for C++" at the summer USENIX conference).
81 * If U_IOSTREAM_SOURCE is 0, then C++ streams are not available and
82 * support for them will be silently suppressed in ICU.
83 *
84 */
85
86 #ifndef U_IOSTREAM_SOURCE
87 #define U_IOSTREAM_SOURCE 199711
88 #endif
89
90 /**
91 * \def U_HAVE_STD_STRING
92 * Define whether the standard C++ (STL) &lt;string&gt; header is available.
93 * For platforms that do not use platform.h and do not define this constant
94 * in their platform-specific headers, std_string.h defaults
95 * U_HAVE_STD_STRING to 1.
96 * @internal
97 */
98 #ifndef U_HAVE_STD_STRING
99 #define U_HAVE_STD_STRING 1
100 #endif
101
102 /** @{ Determines whether specific types are available */
103 #ifndef U_HAVE_INT8_T
104 #define U_HAVE_INT8_T 1
105 #endif
106
107 #ifndef U_HAVE_UINT8_T
108 #define U_HAVE_UINT8_T 1
109 #endif
110
111 #ifndef U_HAVE_INT16_T
112 #define U_HAVE_INT16_T 1
113 #endif
114
115 #ifndef U_HAVE_UINT16_T
116 #define U_HAVE_UINT16_T 1
117 #endif
118
119 #ifndef U_HAVE_INT32_T
120 #define U_HAVE_INT32_T 1
121 #endif
122
123 #ifndef U_HAVE_UINT32_T
124 #define U_HAVE_UINT32_T 1
125 #endif
126
127 #ifndef U_HAVE_INT64_T
128 #define U_HAVE_INT64_T 1
129 #endif
130
131 #ifndef U_HAVE_UINT64_T
132 #define U_HAVE_UINT64_T 1
133 #endif
134
135 /** @} */
136
137 /*===========================================================================*/
138 /** @{ Compiler and environment features */
139 /*===========================================================================*/
140
141 /* Define whether namespace is supported */
142 #ifndef U_HAVE_NAMESPACE
143 #define U_HAVE_NAMESPACE 1
144 #endif
145
146 /* Determines the endianness of the platform
147 It's done this way in case multiple architectures are being built at once.
148 For example, Darwin supports fat binaries, which can be both PPC and x86 base d. */
149 #if defined(BYTE_ORDER) && defined(BIG_ENDIAN)
150 #define U_IS_BIG_ENDIAN (BYTE_ORDER == BIG_ENDIAN)
151 #else
152 #define U_IS_BIG_ENDIAN 0
153 #endif
154
155 /* 1 or 0 to enable or disable threads. If undefined, default is: enable thread s. */
156 #ifndef ICU_USE_THREADS
157 #define ICU_USE_THREADS 1
158 #endif
159
160 /* On strong memory model CPUs (e.g. x86 CPUs), we use a safe & quick double che ck lock. */
161 #if defined(__GNUC__) && (defined(__i386__) || defined(__x86_64__))
162 #define UMTX_STRONG_MEMORY_MODEL 1
163 #endif
164
165 #ifndef U_DEBUG
166 #define U_DEBUG 0
167 #endif
168
169 #ifndef U_RELEASE
170 #define U_RELEASE 1
171 #endif
172
173 /* Determine whether to disable renaming or not. This overrides the
174 setting in umachine.h which is for all platforms. */
175 #ifndef U_DISABLE_RENAMING
176 #define U_DISABLE_RENAMING 0
177 #endif
178
179 /* Determine whether to override new and delete. */
180 #ifndef U_OVERRIDE_CXX_ALLOCATION
181 #define U_OVERRIDE_CXX_ALLOCATION 1
182 #endif
183 /* Determine whether to override placement new and delete for STL. */
184 #ifndef U_HAVE_PLACEMENT_NEW
185 #define U_HAVE_PLACEMENT_NEW 1
186 #endif
187
188 /* Determine whether to enable tracing. */
189 #ifndef U_ENABLE_TRACING
190 #define U_ENABLE_TRACING 0
191 #endif
192
193 /**
194 * Whether to enable Dynamic loading in ICU
195 * @internal
196 */
197 #ifndef U_ENABLE_DYLOAD
198 #define U_ENABLE_DYLOAD 1
199 #endif
200
201 /**
202 * Whether to test Dynamic loading as an OS capabilty
203 * @internal
204 */
205 #ifndef U_CHECK_DYLOAD
206 #define U_CHECK_DYLOAD 1
207 #endif
208
209
210 /** Do we allow ICU users to use the draft APIs by default? */
211 #ifndef U_DEFAULT_SHOW_DRAFT
212 #define U_DEFAULT_SHOW_DRAFT 1
213 #endif
214
215 /** @} */
216
217 /*===========================================================================*/
218 /** @{ Character data types */
219 /*===========================================================================*/
220
221 #if ((defined(OS390) && (!defined(__CHARSET_LIB) || !__CHARSET_LIB))) || defined (OS400)
222 # define U_CHARSET_FAMILY 1
223 #endif
224
225 /** @} */
226
227 /*===========================================================================*/
228 /** @{ Information about wchar support */
229 /*===========================================================================*/
230
231 #ifndef U_HAVE_WCHAR_H
232 #define U_HAVE_WCHAR_H 1
233 #endif
234
235 #ifndef U_SIZEOF_WCHAR_T
236 #define U_SIZEOF_WCHAR_T 4
237 #endif
238
239 #ifndef U_HAVE_WCSCPY
240 #define U_HAVE_WCSCPY 1
241 #endif
242
243 /** @} */
244
245 /**
246 * @{
247 * \def U_DECLARE_UTF16
248 * Do not use this macro. Use the UNICODE_STRING or U_STRING_DECL macros
249 * instead.
250 * @internal
251 *
252 * \def U_GNUC_UTF16_STRING
253 * @internal
254 */
255 #ifndef U_GNUC_UTF16_STRING
256 #define U_GNUC_UTF16_STRING 0
257 #endif
258 #if 1 || defined(U_CHECK_UTF16_STRING)
259 #if (defined(__xlC__) && defined(__IBM_UTF_LITERAL) && U_SIZEOF_WCHAR_T != 2) \
260 || (defined(__HP_aCC) && __HP_aCC >= 035000) \
261 || (defined(__HP_cc) && __HP_cc >= 111106) \
262 || U_GNUC_UTF16_STRING
263 #define U_DECLARE_UTF16(string) u ## string
264 #elif (defined(__SUNPRO_CC) && __SUNPRO_CC >= 0x550)
265 /* || (defined(__SUNPRO_C) && __SUNPRO_C >= 0x580) */
266 /* Sun's C compiler has issues with this notation, and it's unreliable. */
267 #define U_DECLARE_UTF16(string) U ## string
268 #elif U_SIZEOF_WCHAR_T == 2 \
269 && (U_CHARSET_FAMILY == 0 || ((defined(OS390) || defined(OS400)) && defined( __UCS2__)))
270 #define U_DECLARE_UTF16(string) L ## string
271 #endif
272 #endif
273
274 /** @} */
275
276 /*===========================================================================*/
277 /** @{ Information about POSIX support */
278 /*===========================================================================*/
279
280 #ifndef U_HAVE_NL_LANGINFO_CODESET
281 #define U_HAVE_NL_LANGINFO_CODESET 1
282 #endif
283
284 #ifndef U_NL_LANGINFO_CODESET
285 #define U_NL_LANGINFO_CODESET CODESET
286 #endif
287
288 #if 1
289 #define U_TZSET tzset
290 #endif
291 #if MAC_OS_X_VERSION_MIN_REQUIRED < MAC_OS_X_VERSION_10_5
292 #define U_TIMEZONE 0
293 #else
294 #define U_TIMEZONE timezone
295 #endif
296 #if 1
297 #define U_TZNAME tzname
298 #endif
299
300 #define U_HAVE_MMAP 1
301 #define U_HAVE_POPEN 1
302
303 /** @} */
304
305 /*===========================================================================*/
306 /** @{ Symbol import-export control */
307 /*===========================================================================*/
308
309 #if 1
310 /* Chrome-local change: on the Mac, ICU is exclusively used as a static
311 * library, and nothing should ever be marked with default visibility.
312 * Defining U_STATIC_IMPLEMENTATION handles most of this, but unfortunately
313 * C functions declared with U_CAPI (defined in umachine.h) will still use
314 * the definition of U_EXPORT. */
315 #define U_EXPORT
316 #elif 0
317 #define U_EXPORT __attribute__((visibility("default")))
318 #elif (defined(__SUNPRO_CC) && __SUNPRO_CC >= 0x550) \
319 || (defined(__SUNPRO_C) && __SUNPRO_C >= 0x550)
320 #define U_EXPORT __global
321 /*#elif defined(__HP_aCC) || defined(__HP_cc)
322 #define U_EXPORT __declspec(dllexport)*/
323 #else
324 #define U_EXPORT
325 #endif
326
327 /* U_CALLCONV is releated to U_EXPORT2 */
328 #define U_EXPORT2
329
330 /* cygwin needs to export/import data */
331 #if defined(U_CYGWIN) && !defined(__GNUC__)
332 #define U_IMPORT __declspec(dllimport)
333 #else
334 #define U_IMPORT
335 #endif
336
337 /* @} */
338
339 /*===========================================================================*/
340 /** @{ Code alignment and C function inlining */
341 /*===========================================================================*/
342
343 #ifndef U_INLINE
344 # ifdef __cplusplus
345 # define U_INLINE inline
346 # else
347 # define U_INLINE __inline__
348 # endif
349 #endif
350
351 #ifndef U_ALIGN_CODE
352 #define U_ALIGN_CODE(n)
353 #endif
354
355 /** @} */
356
357 /*===========================================================================*/
358 /** @{ GCC built in functions for atomic memory operations */
359 /*===========================================================================*/
360
361 /**
362 * \def U_HAVE_GCC_ATOMICS
363 * @internal
364 */
365 #ifndef U_HAVE_GCC_ATOMICS
366 #define U_HAVE_GCC_ATOMICS 1
367 #endif
368
369 /** @} */
370
371 /*===========================================================================*/
372 /** @{ Programs used by ICU code */
373 /*===========================================================================*/
374
375 /**
376 * \def U_MAKE
377 * What program to execute to run 'make'
378 */
379 #ifndef U_MAKE
380 #define U_MAKE "/usr/bin/gnumake"
381 #endif
382
383 /** @} */
384
385 #endif /* CYGWINMSVC */
386
387 /*===========================================================================*/
388 /* Custom icu entry point renaming */
389 /*===========================================================================*/
390
391 /**
392 * Define the library suffix with C syntax.
393 * @internal
394 */
395 # define U_LIB_SUFFIX_C_NAME
396 /**
397 * Define the library suffix as a string with C syntax
398 * @internal
399 */
400 # define U_LIB_SUFFIX_C_NAME_STRING ""
401 /**
402 * 1 if a custom library suffix is set
403 * @internal
404 */
405 # define U_HAVE_LIB_SUFFIX 0
406
407 #if U_HAVE_LIB_SUFFIX
408 # ifndef U_ICU_ENTRY_POINT_RENAME
409 /* Renaming pattern: u_strcpy_41_suffix */
410 # define U_ICU_ENTRY_POINT_RENAME(x) x ## _ ## 46 ##
411 # define U_DEF_ICUDATA_ENTRY_POINT(major, minor) icudt####major##minor##_dat
412
413 # endif
414 #endif
415
416 #endif
OLDNEW
« no previous file with comments | « icu46/source/common/unicode/plinux.h ('k') | icu46/source/common/unicode/ppalmos.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698