91#define U_PF_WINDOWS 1000
93#define U_PF_MINGW 1800
99#define U_PF_CYGWIN 1900
102#define U_PF_HPUX 2100
104#define U_PF_SOLARIS 2600
110#define U_PF_IRIX 3200
119#define U_PF_DARWIN 3500
121#define U_PF_IPHONE 3550
125#define U_PF_LINUX 4000
132#define U_PF_BROWSER_NATIVE_CLIENT 4020
134#define U_PF_ANDROID 4050
136#define U_PF_FUCHSIA 4100
145#define U_PF_EMSCRIPTEN 5010
147#define U_PF_OS390 9000
149#define U_PF_OS400 9400
153#elif defined(__MINGW32__)
154# define U_PLATFORM U_PF_MINGW
155#elif defined(__CYGWIN__)
156# define U_PLATFORM U_PF_CYGWIN
157#elif defined(WIN32) || defined(_WIN32) || defined(WIN64) || defined(_WIN64)
158# define U_PLATFORM U_PF_WINDOWS
159#elif defined(__ANDROID__)
160# define U_PLATFORM U_PF_ANDROID
162# include <android/api-level.h>
163#elif defined(__pnacl__) || defined(__native_client__)
164# define U_PLATFORM U_PF_BROWSER_NATIVE_CLIENT
165#elif defined(__Fuchsia__)
166# define U_PLATFORM U_PF_FUCHSIA
167#elif defined(linux) || defined(__linux__) || defined(__linux)
168# define U_PLATFORM U_PF_LINUX
169#elif defined(__APPLE__) && defined(__MACH__)
170# include <TargetConditionals.h>
171# if (defined(TARGET_OS_IPHONE) && TARGET_OS_IPHONE) && (defined(TARGET_OS_MACCATALYST) && !TARGET_OS_MACCATALYST)
172# define U_PLATFORM U_PF_IPHONE
174# define U_PLATFORM U_PF_DARWIN
176#elif defined(BSD) || defined(__FreeBSD__) || defined(__FreeBSD_kernel__) || defined(__NetBSD__) || defined(__OpenBSD__) || defined(__MirBSD__)
177# if defined(__FreeBSD__)
178# include <sys/endian.h>
180# define U_PLATFORM U_PF_BSD
181#elif defined(sun) || defined(__sun)
183# define U_PLATFORM U_PF_SOLARIS
184# if defined(__GNUC__)
189# include <sys/isa_defs.h>
191#elif defined(_AIX) || defined(__TOS_AIX__)
192# define U_PLATFORM U_PF_AIX
193#elif defined(_hpux) || defined(hpux) || defined(__hpux)
194# define U_PLATFORM U_PF_HPUX
195#elif defined(sgi) || defined(__sgi)
196# define U_PLATFORM U_PF_IRIX
197#elif defined(__QNX__) || defined(__QNXNTO__)
198# define U_PLATFORM U_PF_QNX
199#elif defined(__TOS_MVS__)
200# define U_PLATFORM U_PF_OS390
201#elif defined(__OS400__) || defined(__TOS_OS400__)
202# define U_PLATFORM U_PF_OS400
203#elif defined(__EMSCRIPTEN__)
204# define U_PLATFORM U_PF_EMSCRIPTEN
206# define U_PLATFORM U_PF_UNKNOWN
230#ifdef U_PLATFORM_USES_ONLY_WIN32_API
232#elif (U_PF_WINDOWS <= U_PLATFORM && U_PLATFORM <= U_PF_MINGW) || defined(CYGWINMSVC)
233# define U_PLATFORM_USES_ONLY_WIN32_API 1
236# define U_PLATFORM_USES_ONLY_WIN32_API 0
245#ifdef U_PLATFORM_HAS_WIN32_API
247#elif U_PF_WINDOWS <= U_PLATFORM && U_PLATFORM <= U_PF_CYGWIN
248# define U_PLATFORM_HAS_WIN32_API 1
250# define U_PLATFORM_HAS_WIN32_API 0
259#ifdef U_PLATFORM_HAS_WINUWP_API
262# define U_PLATFORM_HAS_WINUWP_API 0
271#ifdef U_PLATFORM_IMPLEMENTS_POSIX
273#elif U_PLATFORM_USES_ONLY_WIN32_API
274# define U_PLATFORM_IMPLEMENTS_POSIX 0
276# define U_PLATFORM_IMPLEMENTS_POSIX 1
284#ifdef U_PLATFORM_IS_LINUX_BASED
286#elif U_PF_LINUX <= U_PLATFORM && U_PLATFORM <= 4499
287# define U_PLATFORM_IS_LINUX_BASED 1
289# define U_PLATFORM_IS_LINUX_BASED 0
297#ifdef U_PLATFORM_IS_DARWIN_BASED
299#elif U_PF_DARWIN <= U_PLATFORM && U_PLATFORM <= U_PF_IPHONE
300# define U_PLATFORM_IS_DARWIN_BASED 1
302# define U_PLATFORM_IS_DARWIN_BASED 0
312#ifdef U_HAVE_STDINT_H
314#elif U_PLATFORM_USES_ONLY_WIN32_API
315# if defined(__BORLANDC__) || U_PLATFORM == U_PF_MINGW || (defined(_MSC_VER) && _MSC_VER>=1600)
317# define U_HAVE_STDINT_H 1
319# define U_HAVE_STDINT_H 0
321#elif U_PLATFORM == U_PF_SOLARIS
323# define U_HAVE_STDINT_H 0
324#elif U_PLATFORM == U_PF_AIX && !defined(_AIX51) && defined(_POWER)
326# define U_HAVE_STDINT_H 0
328# define U_HAVE_STDINT_H 1
337#ifdef U_HAVE_INTTYPES_H
339#elif U_PLATFORM == U_PF_SOLARIS
341# define U_HAVE_INTTYPES_H 1
342#elif U_PLATFORM == U_PF_AIX && !defined(_AIX51) && defined(_POWER)
344# define U_HAVE_INTTYPES_H 1
347# define U_HAVE_INTTYPES_H U_HAVE_STDINT_H
365# define U_GCC_MAJOR_MINOR (__GNUC__ * 100 + __GNUC_MINOR__)
367# define U_GCC_MAJOR_MINOR 0
375#ifdef U_IS_BIG_ENDIAN
377#elif defined(BYTE_ORDER) && defined(BIG_ENDIAN)
378# define U_IS_BIG_ENDIAN (BYTE_ORDER == BIG_ENDIAN)
379#elif defined(__BYTE_ORDER__) && defined(__ORDER_BIG_ENDIAN__)
381# define U_IS_BIG_ENDIAN (__BYTE_ORDER__ == __ORDER_BIG_ENDIAN__)
382#elif defined(__BIG_ENDIAN__) || defined(_BIG_ENDIAN)
383# define U_IS_BIG_ENDIAN 1
384#elif defined(__LITTLE_ENDIAN__) || defined(_LITTLE_ENDIAN)
385# define U_IS_BIG_ENDIAN 0
386#elif U_PLATFORM == U_PF_OS390 || U_PLATFORM == U_PF_OS400 || defined(__s390__) || defined(__s390x__)
388# define U_IS_BIG_ENDIAN 1
389#elif defined(_PA_RISC1_0) || defined(_PA_RISC1_1) || defined(_PA_RISC2_0)
391# define U_IS_BIG_ENDIAN 1
392#elif defined(sparc) || defined(__sparc) || defined(__sparc__)
394# define U_IS_BIG_ENDIAN 1
396# define U_IS_BIG_ENDIAN 0
404#ifdef U_HAVE_PLACEMENT_NEW
406#elif defined(__BORLANDC__)
407# define U_HAVE_PLACEMENT_NEW 0
409# define U_HAVE_PLACEMENT_NEW 1
418#ifdef U_HAVE_DEBUG_LOCATION_NEW
420#elif defined(_MSC_VER)
421# define U_HAVE_DEBUG_LOCATION_NEW 1
423# define U_HAVE_DEBUG_LOCATION_NEW 0
427#ifdef __has_attribute
428# define UPRV_HAS_ATTRIBUTE(x) __has_attribute(x)
430# define UPRV_HAS_ATTRIBUTE(x) 0
432#ifdef __has_cpp_attribute
433# define UPRV_HAS_CPP_ATTRIBUTE(x) __has_cpp_attribute(x)
435# define UPRV_HAS_CPP_ATTRIBUTE(x) 0
437#ifdef __has_declspec_attribute
438# define UPRV_HAS_DECLSPEC_ATTRIBUTE(x) __has_declspec_attribute(x)
440# define UPRV_HAS_DECLSPEC_ATTRIBUTE(x) 0
443# define UPRV_HAS_BUILTIN(x) __has_builtin(x)
445# define UPRV_HAS_BUILTIN(x) 0
448# define UPRV_HAS_FEATURE(x) __has_feature(x)
450# define UPRV_HAS_FEATURE(x) 0
452#ifdef __has_extension
453# define UPRV_HAS_EXTENSION(x) __has_extension(x)
455# define UPRV_HAS_EXTENSION(x) 0
458# define UPRV_HAS_WARNING(x) __has_warning(x)
460# define UPRV_HAS_WARNING(x) 0
468#if defined(__GNUC__) && __GNUC__>=3
469# define U_MALLOC_ATTR __attribute__ ((__malloc__))
471# define U_MALLOC_ATTR
479#if (defined(__GNUC__) && \
480 (__GNUC__ > 4 || (__GNUC__ == 4 && __GNUC_MINOR__ >= 3))) || \
481 UPRV_HAS_ATTRIBUTE(alloc_size)
482# define U_ALLOC_SIZE_ATTR(X) __attribute__ ((alloc_size(X)))
483# define U_ALLOC_SIZE_ATTR2(X,Y) __attribute__ ((alloc_size(X,Y)))
485# define U_ALLOC_SIZE_ATTR(X)
486# define U_ALLOC_SIZE_ATTR2(X,Y)
495#ifdef U_CPLUSPLUS_VERSION
496# if U_CPLUSPLUS_VERSION != 0 && !defined(__cplusplus)
497# undef U_CPLUSPLUS_VERSION
498# define U_CPLUSPLUS_VERSION 0
501#elif !defined(__cplusplus)
502# define U_CPLUSPLUS_VERSION 0
503#elif __cplusplus >= 201402L || (defined(_MSVC_LANG) && _MSVC_LANG >= 201402L)
504# define U_CPLUSPLUS_VERSION 14
505#elif __cplusplus >= 201103L || (defined(_MSVC_LANG) && _MSVC_LANG >= 201103L)
506# define U_CPLUSPLUS_VERSION 11
509# define U_CPLUSPLUS_VERSION 1
512#if (U_PLATFORM == U_PF_AIX || U_PLATFORM == U_PF_OS390) && defined(__cplusplus) &&(U_CPLUSPLUS_VERSION < 11)
515 typedef decltype(
nullptr) nullptr_t;
529# define U_NOEXCEPT noexcept
540#elif defined(U_FALLTHROUGH)
542#elif defined(__clang__)
545# if UPRV_HAS_CPP_ATTRIBUTE(clang::fallthrough) || \
546 (UPRV_HAS_FEATURE(cxx_attributes) && \
547 UPRV_HAS_WARNING("-Wimplicit-fallthrough"))
548# define U_FALLTHROUGH [[clang::fallthrough]]
550#elif defined(__GNUC__) && (__GNUC__ >= 7)
551# define U_FALLTHROUGH __attribute__((fallthrough))
555# define U_FALLTHROUGH
568#define U_ASCII_FAMILY 0
574#define U_EBCDIC_FAMILY 1
618#ifdef U_CHARSET_FAMILY
620#elif U_PLATFORM == U_PF_OS390 && (!defined(__CHARSET_LIB) || !__CHARSET_LIB)
621# define U_CHARSET_FAMILY U_EBCDIC_FAMILY
622#elif U_PLATFORM == U_PF_OS400 && !defined(__UTF32__)
623# define U_CHARSET_FAMILY U_EBCDIC_FAMILY
625# define U_CHARSET_FAMILY U_ASCII_FAMILY
648#ifdef U_CHARSET_IS_UTF8
650#elif U_PLATFORM_IS_LINUX_BASED || U_PLATFORM_IS_DARWIN_BASED || \
651 U_PLATFORM == U_PF_EMSCRIPTEN
652# define U_CHARSET_IS_UTF8 1
654# define U_CHARSET_IS_UTF8 0
671#elif U_PLATFORM == U_PF_ANDROID && __ANDROID_API__ < 9
677# define U_HAVE_WCHAR_H 0
679# define U_HAVE_WCHAR_H 1
688#ifdef U_SIZEOF_WCHAR_T
690#elif (U_PLATFORM == U_PF_ANDROID && __ANDROID_API__ < 9)
695# define U_SIZEOF_WCHAR_T 1
696#elif U_PLATFORM_HAS_WIN32_API || U_PLATFORM == U_PF_CYGWIN
697# define U_SIZEOF_WCHAR_T 2
698#elif U_PLATFORM == U_PF_AIX
708# define U_SIZEOF_WCHAR_T 4
710# define U_SIZEOF_WCHAR_T 2
712#elif U_PLATFORM == U_PF_OS390
719# define U_SIZEOF_WCHAR_T 4
721# define U_SIZEOF_WCHAR_T 2
723#elif U_PLATFORM == U_PF_OS400
724# if defined(__UTF32__)
730# define U_SIZEOF_WCHAR_T 4
731# elif defined(__UCS2__)
737# define U_SIZEOF_WCHAR_T 2
744# define U_SIZEOF_WCHAR_T 2
747# define U_SIZEOF_WCHAR_T 4
751#define U_HAVE_WCSCPY U_HAVE_WCHAR_H
764#ifdef U_HAVE_CHAR16_T
778# if U_CPLUSPLUS_VERSION >= 11 || (defined(__STDC_VERSION__) && __STDC_VERSION__ >= 201112L)
779# define U_HAVE_CHAR16_T 1
781# define U_HAVE_CHAR16_T 0
792#ifdef U_DECLARE_UTF16
794#elif U_HAVE_CHAR16_T \
795 || (defined(__xlC__) && defined(__IBM_UTF_LITERAL) && U_SIZEOF_WCHAR_T != 2) \
796 || (defined(__HP_aCC) && __HP_aCC >= 035000) \
797 || (defined(__HP_cc) && __HP_cc >= 111106) \
798 || (defined(U_IN_DOXYGEN))
799# define U_DECLARE_UTF16(string) u ## string
800#elif U_SIZEOF_WCHAR_T == 2 \
801 && (U_CHARSET_FAMILY == 0 || (U_PF_OS390 <= U_PLATFORM && U_PLATFORM <= U_PF_OS400 && defined(__UCS2__)))
802# define U_DECLARE_UTF16(string) L ## string
815#elif defined(U_STATIC_IMPLEMENTATION)
817#elif defined(_MSC_VER) || (UPRV_HAS_DECLSPEC_ATTRIBUTE(__dllexport__) && \
818 UPRV_HAS_DECLSPEC_ATTRIBUTE(__dllimport__))
819# define U_EXPORT __declspec(dllexport)
820#elif defined(__GNUC__)
821# define U_EXPORT __attribute__((visibility("default")))
822#elif (defined(__SUNPRO_CC) && __SUNPRO_CC >= 0x550) \
823 || (defined(__SUNPRO_C) && __SUNPRO_C >= 0x550)
824# define U_EXPORT __global
834#elif defined(_MSC_VER)
835# define U_EXPORT2 __cdecl
842#elif defined(_MSC_VER) || (UPRV_HAS_DECLSPEC_ATTRIBUTE(__dllexport__) && \
843 UPRV_HAS_DECLSPEC_ATTRIBUTE(__dllimport__))
845# define U_IMPORT __declspec(dllimport)
859#elif defined(__GNUC__)
860# define U_HIDDEN __attribute__((visibility("hidden")))
882#if U_PLATFORM == U_PF_OS390 && defined(__cplusplus)
883# define U_CALLCONV __cdecl
885# define U_CALLCONV U_EXPORT2
893#if U_PLATFORM == U_PF_OS390 && defined(__cplusplus)
894# define U_CALLCONV_FPTR U_CALLCONV
896# define U_CALLCONV_FPTR
User-configurable settings.
C API: definitions of ICU version numbers.