X-Git-Url: https://git.saurik.com/apple/icu.git/blobdiff_plain/51004dcb01e06fef634b61be77ed73dd61cb6db9..b801cf366c7671a99bdcef84d1e9c0ec64b36723:/icuSources/common/unicode/platform.h?ds=sidebyside diff --git a/icuSources/common/unicode/platform.h b/icuSources/common/unicode/platform.h index 26f12f42..48290006 100644 --- a/icuSources/common/unicode/platform.h +++ b/icuSources/common/unicode/platform.h @@ -1,7 +1,7 @@ /* ****************************************************************************** * -* Copyright (C) 1997-2012, International Business Machines +* Copyright (C) 1997-2015, International Business Machines * Corporation and others. All Rights Reserved. * ****************************************************************************** @@ -121,10 +121,16 @@ #define U_PF_QNX 3700 /** Linux is a Unix-like operating system. @internal */ #define U_PF_LINUX 4000 +/** + * Native Client is pretty close to Linux. + * See https://developer.chrome.com/native-client and + * http://www.chromium.org/nativeclient + * @internal + */ +#define U_PF_BROWSER_NATIVE_CLIENT 4020 /** Android is based on Linux. @internal */ #define U_PF_ANDROID 4050 -/** "Classic" Mac OS (1984-2001) @internal */ -#define U_PF_CLASSIC_MACOS 8000 +/* Maximum value for Linux-based platform is 4499 */ /** z/OS is the successor to OS/390 which was the successor to MVS. @internal */ #define U_PF_OS390 9000 /** "IBM i" is the current name of what used to be i5/OS and earlier OS/400. @internal */ @@ -142,8 +148,17 @@ # define U_PLATFORM U_PF_ANDROID /* Android wchar_t support depends on the API level. */ # include +#elif defined(__native_client__) +# define U_PLATFORM U_PF_BROWSER_NATIVE_CLIENT #elif defined(linux) || defined(__linux__) || defined(__linux) # define U_PLATFORM U_PF_LINUX +#elif defined(__APPLE__) && defined(__MACH__) +# include +# if defined(TARGET_OS_IPHONE) && TARGET_OS_IPHONE /* variant of TARGET_OS_MAC */ +# define U_PLATFORM U_PF_IPHONE +# else +# define U_PLATFORM U_PF_DARWIN +# endif #elif defined(BSD) || defined(__FreeBSD__) || defined(__FreeBSD_kernel__) || defined(__NetBSD__) || defined(__OpenBSD__) || defined(__MirBSD__) # define U_PLATFORM U_PF_BSD #elif defined(sun) || defined(__sun) @@ -162,15 +177,6 @@ # define U_PLATFORM U_PF_HPUX #elif defined(sgi) || defined(__sgi) # define U_PLATFORM U_PF_IRIX -#elif defined(__APPLE__) && defined(__MACH__) -# include -# if defined(TARGET_OS_IPHONE) && TARGET_OS_IPHONE /* variant of TARGET_OS_MAC */ -# define U_PLATFORM U_PF_IPHONE -# else -# define U_PLATFORM U_PF_DARWIN -# endif -#elif defined(macintosh) -# define U_PLATFORM U_PF_CLASSIC_MACOS #elif defined(__QNX__) || defined(__QNXNTO__) # define U_PLATFORM U_PF_QNX #elif defined(__TOS_MVS__) @@ -230,7 +236,7 @@ */ #ifdef U_PLATFORM_IMPLEMENTS_POSIX /* Use the predefined value. */ -#elif U_PLATFORM_USES_ONLY_WIN32_API || U_PLATFORM == U_PF_CLASSIC_MACOS +#elif U_PLATFORM_USES_ONLY_WIN32_API # define U_PLATFORM_IMPLEMENTS_POSIX 0 #else # define U_PLATFORM_IMPLEMENTS_POSIX 1 @@ -243,7 +249,7 @@ */ #ifdef U_PLATFORM_IS_LINUX_BASED /* Use the predefined value. */ -#elif U_PF_LINUX <= U_PLATFORM && U_PLATFORM <= U_PF_ANDROID +#elif U_PF_LINUX <= U_PLATFORM && U_PLATFORM <= 4499 # define U_PLATFORM_IS_LINUX_BASED 1 #else # define U_PLATFORM_IS_LINUX_BASED 0 @@ -339,8 +345,6 @@ */ #ifdef U_HAVE_STD_STRING /* Use the predefined value. */ -#elif U_PLATFORM == U_PF_ANDROID -# define U_HAVE_STD_STRING 0 #else # define U_HAVE_STD_STRING 1 #endif @@ -581,7 +585,7 @@ */ #ifdef U_SIZEOF_WCHAR_T /* Use the predefined value. */ -#elif (U_PLATFORM == U_PF_ANDROID && __ANDROID_API__ < 9) || U_PLATFORM == U_PF_CLASSIC_MACOS +#elif (U_PLATFORM == U_PF_ANDROID && __ANDROID_API__ < 9) /* * Classic Mac OS and Mac OS X before 10.3 (Panther) did not support wchar_t or wstring. * Newer Mac OS X has size 4.