OLD | NEW |
1 /* | 1 /* |
2 ****************************************************************************** | 2 ****************************************************************************** |
3 * | 3 * |
4 * Copyright (C) 1997-2010, International Business Machines | 4 * Copyright (C) 1997-2010, International Business Machines |
5 * Corporation and others. All Rights Reserved. | 5 * Corporation and others. All Rights Reserved. |
6 * | 6 * |
7 ****************************************************************************** | 7 ****************************************************************************** |
8 * | 8 * |
9 * Note: autoconf creates platform.h from platform.h.in at configure time. | 9 * Note: autoconf creates platform.h from platform.h.in at configure time. |
10 * | 10 * |
(...skipping 32 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
43 | 43 |
44 /* Need platform.h when using CYGWINMSVC to get definitions above. Ignore everyt
hing else. */ | 44 /* Need platform.h when using CYGWINMSVC to get definitions above. Ignore everyt
hing else. */ |
45 #ifndef CYGWINMSVC | 45 #ifndef CYGWINMSVC |
46 | 46 |
47 /** Define the platform we're on. */ | 47 /** Define the platform we're on. */ |
48 #ifndef U_DARWIN | 48 #ifndef U_DARWIN |
49 #define U_DARWIN | 49 #define U_DARWIN |
50 #endif | 50 #endif |
51 | 51 |
52 #include <AvailabilityMacros.h> | 52 #include <AvailabilityMacros.h> |
| 53 #include <TargetConditionals.h> |
| 54 |
| 55 /** |
| 56 * Add a second platform define to handle differences between Mac OS X and iOS |
| 57 */ |
| 58 #if TARGET_OS_IPHONE |
| 59 #ifndef U_IOS |
| 60 #define U_IOS |
| 61 #endif |
| 62 #endif |
53 | 63 |
54 /** | 64 /** |
55 * \def U_HAVE_DIRENT_H | 65 * \def U_HAVE_DIRENT_H |
56 * Define whether dirent.h is available | 66 * Define whether dirent.h is available |
57 * @internal | 67 * @internal |
58 */ | 68 */ |
59 #ifndef U_HAVE_DIRENT_H | 69 #ifndef U_HAVE_DIRENT_H |
60 #if MAC_OS_X_VERSION_MIN_REQUIRED < MAC_OS_X_VERSION_10_5 | 70 #if MAC_OS_X_VERSION_MIN_REQUIRED < MAC_OS_X_VERSION_10_5 |
61 #define U_HAVE_DIRENT_H 0 | 71 #define U_HAVE_DIRENT_H 0 |
62 #else | 72 #else |
(...skipping 218 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
281 #define U_HAVE_NL_LANGINFO_CODESET 1 | 291 #define U_HAVE_NL_LANGINFO_CODESET 1 |
282 #endif | 292 #endif |
283 | 293 |
284 #ifndef U_NL_LANGINFO_CODESET | 294 #ifndef U_NL_LANGINFO_CODESET |
285 #define U_NL_LANGINFO_CODESET CODESET | 295 #define U_NL_LANGINFO_CODESET CODESET |
286 #endif | 296 #endif |
287 | 297 |
288 #if 1 | 298 #if 1 |
289 #define U_TZSET tzset | 299 #define U_TZSET tzset |
290 #endif | 300 #endif |
| 301 #ifndef U_IOS |
| 302 /* The iOS version of timezone is busted (at least in the simulator, it is |
| 303 never set to anything useful). Leave it undefined to avoid a code path |
| 304 in putil.c. */ |
291 #if MAC_OS_X_VERSION_MIN_REQUIRED < MAC_OS_X_VERSION_10_5 | 305 #if MAC_OS_X_VERSION_MIN_REQUIRED < MAC_OS_X_VERSION_10_5 |
292 #define U_TIMEZONE 0 | 306 #define U_TIMEZONE 0 |
293 #else | 307 #else |
294 #define U_TIMEZONE timezone | 308 #define U_TIMEZONE timezone |
295 #endif | 309 #endif |
| 310 #endif // !U_IOS |
296 #if 1 | 311 #if 1 |
297 #define U_TZNAME tzname | 312 #define U_TZNAME tzname |
298 #endif | 313 #endif |
299 | 314 |
300 #define U_HAVE_MMAP 1 | 315 #define U_HAVE_MMAP 1 |
301 #define U_HAVE_POPEN 1 | 316 #define U_HAVE_POPEN 1 |
302 | 317 |
303 /** @} */ | 318 /** @} */ |
304 | 319 |
305 /*===========================================================================*/ | 320 /*===========================================================================*/ |
(...skipping 109 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
415 /* On the Mac, we define U_WCHAR_IS_UTF32 to treat wchar_t as though it | 430 /* On the Mac, we define U_WCHAR_IS_UTF32 to treat wchar_t as though it |
416 contains UTF-32 at all times. Strictly speaking, that's not entirely | 431 contains UTF-32 at all times. Strictly speaking, that's not entirely |
417 correct given Mac's libc (__STDC_ISO_10646__ is not defined) , but provided | 432 correct given Mac's libc (__STDC_ISO_10646__ is not defined) , but provided |
418 that we ignore libc's locale support (by not calling setlocale) and its | 433 that we ignore libc's locale support (by not calling setlocale) and its |
419 multibyte string support, this should be fine. Our codebase makes enough | 434 multibyte string support, this should be fine. Our codebase makes enough |
420 other assumptions about a UTF-8 locale and UTF-32 wchar_t strings for this | 435 other assumptions about a UTF-8 locale and UTF-32 wchar_t strings for this |
421 to make sense. */ | 436 to make sense. */ |
422 #define U_WCHAR_IS_UTF32 | 437 #define U_WCHAR_IS_UTF32 |
423 | 438 |
424 #endif | 439 #endif |
OLD | NEW |