diff options
author | mcheshkov <mcheshkov@yandex-team.ru> | 2022-02-10 16:46:15 +0300 |
---|---|---|
committer | Daniil Cherednik <dcherednik@yandex-team.ru> | 2022-02-10 16:46:15 +0300 |
commit | e9d19cec64684c9c1e6b0c98297e5b895cf904fe (patch) | |
tree | 2768b1223e96a8a0610a93d18425d9647c1123c8 /contrib/libs/icu/include/unicode/platform.h | |
parent | 60040c91ffe701a84689b2c6310ff845e65cff42 (diff) | |
download | ydb-e9d19cec64684c9c1e6b0c98297e5b895cf904fe.tar.gz |
Restoring authorship annotation for <mcheshkov@yandex-team.ru>. Commit 1 of 2.
Diffstat (limited to 'contrib/libs/icu/include/unicode/platform.h')
-rw-r--r-- | contrib/libs/icu/include/unicode/platform.h | 230 |
1 files changed, 115 insertions, 115 deletions
diff --git a/contrib/libs/icu/include/unicode/platform.h b/contrib/libs/icu/include/unicode/platform.h index 2bb2f8b318..2bc9706707 100644 --- a/contrib/libs/icu/include/unicode/platform.h +++ b/contrib/libs/icu/include/unicode/platform.h @@ -1,4 +1,4 @@ -// © 2016 and later: Unicode, Inc. and others. +// © 2016 and later: Unicode, Inc. and others. // License & terms of use: http://www.unicode.org/copyright.html /* ****************************************************************************** @@ -38,7 +38,7 @@ * and/or from other macros that are predefined by the compiler * or defined in standard (POSIX or platform or compiler) headers. * - * As a temporary workaround, you can add an explicit \#define for some macros + * As a temporary workaround, you can add an explicit \#define for some macros * before it is first tested, or add an equivalent -D macro definition * to the compiler's command line. * @@ -132,17 +132,17 @@ #define U_PF_BROWSER_NATIVE_CLIENT 4020 /** Android is based on Linux. @internal */ #define U_PF_ANDROID 4050 -/** Fuchsia is a POSIX-ish platform. @internal */ -#define U_PF_FUCHSIA 4100 +/** Fuchsia is a POSIX-ish platform. @internal */ +#define U_PF_FUCHSIA 4100 /* Maximum value for Linux-based platform is 4499 */ -/** - * Emscripten is a C++ transpiler for the Web that can target asm.js or - * WebAssembly. It provides some POSIX-compatible wrappers and stubs and - * some Linux-like functionality, but is not fully compatible with - * either. - * @internal - */ -#define U_PF_EMSCRIPTEN 5010 +/** + * Emscripten is a C++ transpiler for the Web that can target asm.js or + * WebAssembly. It provides some POSIX-compatible wrappers and stubs and + * some Linux-like functionality, but is not fully compatible with + * either. + * @internal + */ +#define U_PF_EMSCRIPTEN 5010 /** 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 */ @@ -160,10 +160,10 @@ # define U_PLATFORM U_PF_ANDROID /* Android wchar_t support depends on the API level. */ # include <android/api-level.h> -#elif defined(__pnacl__) || defined(__native_client__) +#elif defined(__pnacl__) || defined(__native_client__) # define U_PLATFORM U_PF_BROWSER_NATIVE_CLIENT -#elif defined(__Fuchsia__) -# define U_PLATFORM U_PF_FUCHSIA +#elif defined(__Fuchsia__) +# define U_PLATFORM U_PF_FUCHSIA #elif defined(linux) || defined(__linux__) || defined(__linux) # define U_PLATFORM U_PF_LINUX #elif defined(__APPLE__) && defined(__MACH__) @@ -200,8 +200,8 @@ # define U_PLATFORM U_PF_OS390 #elif defined(__OS400__) || defined(__TOS_OS400__) # define U_PLATFORM U_PF_OS400 -#elif defined(__EMSCRIPTEN__) -# define U_PLATFORM U_PF_EMSCRIPTEN +#elif defined(__EMSCRIPTEN__) +# define U_PLATFORM U_PF_EMSCRIPTEN #else # define U_PLATFORM U_PF_UNKNOWN #endif @@ -217,9 +217,9 @@ # define CYGWINMSVC #endif */ -#ifdef U_IN_DOXYGEN -# define CYGWINMSVC -#endif +#ifdef U_IN_DOXYGEN +# define CYGWINMSVC +#endif /** * \def U_PLATFORM_USES_ONLY_WIN32_API @@ -251,18 +251,18 @@ #endif /** - * \def U_PLATFORM_HAS_WINUWP_API - * Defines whether target is intended for Universal Windows Platform API - * Set to 1 for Windows10 Release Solution Configuration - * @internal - */ -#ifdef U_PLATFORM_HAS_WINUWP_API - /* Use the predefined value. */ -#else -# define U_PLATFORM_HAS_WINUWP_API 0 -#endif - -/** + * \def U_PLATFORM_HAS_WINUWP_API + * Defines whether target is intended for Universal Windows Platform API + * Set to 1 for Windows10 Release Solution Configuration + * @internal + */ +#ifdef U_PLATFORM_HAS_WINUWP_API + /* Use the predefined value. */ +#else +# define U_PLATFORM_HAS_WINUWP_API 0 +#endif + +/** * \def U_PLATFORM_IMPLEMENTS_POSIX * Defines whether the platform implements (most of) the POSIX API. * Set to 1 for Cygwin and most other platforms. @@ -423,42 +423,42 @@ # define U_HAVE_DEBUG_LOCATION_NEW 0 #endif -/* Compatibility with compilers other than clang: http://clang.llvm.org/docs/LanguageExtensions.html */ -#ifdef __has_attribute -# define UPRV_HAS_ATTRIBUTE(x) __has_attribute(x) -#else -# define UPRV_HAS_ATTRIBUTE(x) 0 +/* Compatibility with compilers other than clang: http://clang.llvm.org/docs/LanguageExtensions.html */ +#ifdef __has_attribute +# define UPRV_HAS_ATTRIBUTE(x) __has_attribute(x) +#else +# define UPRV_HAS_ATTRIBUTE(x) 0 #endif -#ifdef __has_cpp_attribute -# define UPRV_HAS_CPP_ATTRIBUTE(x) __has_cpp_attribute(x) -#else -# define UPRV_HAS_CPP_ATTRIBUTE(x) 0 +#ifdef __has_cpp_attribute +# define UPRV_HAS_CPP_ATTRIBUTE(x) __has_cpp_attribute(x) +#else +# define UPRV_HAS_CPP_ATTRIBUTE(x) 0 #endif -#ifdef __has_declspec_attribute -# define UPRV_HAS_DECLSPEC_ATTRIBUTE(x) __has_declspec_attribute(x) -#else -# define UPRV_HAS_DECLSPEC_ATTRIBUTE(x) 0 +#ifdef __has_declspec_attribute +# define UPRV_HAS_DECLSPEC_ATTRIBUTE(x) __has_declspec_attribute(x) +#else +# define UPRV_HAS_DECLSPEC_ATTRIBUTE(x) 0 #endif -#ifdef __has_builtin -# define UPRV_HAS_BUILTIN(x) __has_builtin(x) -#else -# define UPRV_HAS_BUILTIN(x) 0 -#endif -#ifdef __has_feature -# define UPRV_HAS_FEATURE(x) __has_feature(x) -#else -# define UPRV_HAS_FEATURE(x) 0 +#ifdef __has_builtin +# define UPRV_HAS_BUILTIN(x) __has_builtin(x) +#else +# define UPRV_HAS_BUILTIN(x) 0 #endif -#ifdef __has_extension -# define UPRV_HAS_EXTENSION(x) __has_extension(x) -#else -# define UPRV_HAS_EXTENSION(x) 0 +#ifdef __has_feature +# define UPRV_HAS_FEATURE(x) __has_feature(x) +#else +# define UPRV_HAS_FEATURE(x) 0 #endif -#ifdef __has_warning -# define UPRV_HAS_WARNING(x) __has_warning(x) -#else -# define UPRV_HAS_WARNING(x) 0 +#ifdef __has_extension +# define UPRV_HAS_EXTENSION(x) __has_extension(x) +#else +# define UPRV_HAS_EXTENSION(x) 0 #endif +#ifdef __has_warning +# define UPRV_HAS_WARNING(x) __has_warning(x) +#else +# define UPRV_HAS_WARNING(x) 0 +#endif /** * \def U_MALLOC_ATTR @@ -476,9 +476,9 @@ * Attribute to specify the size of the allocated buffer for malloc-like functions * @internal */ -#if (defined(__GNUC__) && \ - (__GNUC__ > 4 || (__GNUC__ == 4 && __GNUC_MINOR__ >= 3))) || \ - UPRV_HAS_ATTRIBUTE(alloc_size) +#if (defined(__GNUC__) && \ + (__GNUC__ > 4 || (__GNUC__ == 4 && __GNUC_MINOR__ >= 3))) || \ + UPRV_HAS_ATTRIBUTE(alloc_size) # define U_ALLOC_SIZE_ATTR(X) __attribute__ ((alloc_size(X))) # define U_ALLOC_SIZE_ATTR2(X,Y) __attribute__ ((alloc_size(X,Y))) #else @@ -500,20 +500,20 @@ /* Otherwise use the predefined value. */ #elif !defined(__cplusplus) # define U_CPLUSPLUS_VERSION 0 -#elif __cplusplus >= 201402L || (defined(_MSVC_LANG) && _MSVC_LANG >= 201402L) +#elif __cplusplus >= 201402L || (defined(_MSVC_LANG) && _MSVC_LANG >= 201402L) # define U_CPLUSPLUS_VERSION 14 -#elif __cplusplus >= 201103L || (defined(_MSVC_LANG) && _MSVC_LANG >= 201103L) +#elif __cplusplus >= 201103L || (defined(_MSVC_LANG) && _MSVC_LANG >= 201103L) # define U_CPLUSPLUS_VERSION 11 #else // C++98 or C++03 # define U_CPLUSPLUS_VERSION 1 #endif -#if (U_PLATFORM == U_PF_AIX || U_PLATFORM == U_PF_OS390) && defined(__cplusplus) &&(U_CPLUSPLUS_VERSION < 11) -// add in std::nullptr_t -namespace std { - typedef decltype(nullptr) nullptr_t; -}; +#if (U_PLATFORM == U_PF_AIX || U_PLATFORM == U_PF_OS390) && defined(__cplusplus) &&(U_CPLUSPLUS_VERSION < 11) +// add in std::nullptr_t +namespace std { + typedef decltype(nullptr) nullptr_t; +}; #endif /** @@ -525,7 +525,7 @@ namespace std { */ #ifdef U_NOEXCEPT /* Use the predefined value. */ -#else +#else # define U_NOEXCEPT noexcept #endif @@ -535,23 +535,23 @@ namespace std { * http://clang.llvm.org/docs/AttributeReference.html#fallthrough-clang-fallthrough * @internal */ -#ifndef __cplusplus - // Not for C. -#elif defined(U_FALLTHROUGH) - // Use the predefined value. -#elif defined(__clang__) - // Test for compiler vs. feature separately. - // Other compilers might choke on the feature test. -# if UPRV_HAS_CPP_ATTRIBUTE(clang::fallthrough) || \ - (UPRV_HAS_FEATURE(cxx_attributes) && \ - UPRV_HAS_WARNING("-Wimplicit-fallthrough")) +#ifndef __cplusplus + // Not for C. +#elif defined(U_FALLTHROUGH) + // Use the predefined value. +#elif defined(__clang__) + // Test for compiler vs. feature separately. + // Other compilers might choke on the feature test. +# if UPRV_HAS_CPP_ATTRIBUTE(clang::fallthrough) || \ + (UPRV_HAS_FEATURE(cxx_attributes) && \ + UPRV_HAS_WARNING("-Wimplicit-fallthrough")) # define U_FALLTHROUGH [[clang::fallthrough]] # endif -#elif defined(__GNUC__) && (__GNUC__ >= 7) -# define U_FALLTHROUGH __attribute__((fallthrough)) -#endif - -#ifndef U_FALLTHROUGH +#elif defined(__GNUC__) && (__GNUC__ >= 7) +# define U_FALLTHROUGH __attribute__((fallthrough)) +#endif + +#ifndef U_FALLTHROUGH # define U_FALLTHROUGH #endif @@ -647,8 +647,8 @@ namespace std { */ #ifdef U_CHARSET_IS_UTF8 /* Use the predefined value. */ -#elif U_PLATFORM_IS_LINUX_BASED || U_PLATFORM_IS_DARWIN_BASED || \ - U_PLATFORM == U_PF_EMSCRIPTEN +#elif U_PLATFORM_IS_LINUX_BASED || U_PLATFORM_IS_DARWIN_BASED || \ + U_PLATFORM == U_PF_EMSCRIPTEN # define U_CHARSET_IS_UTF8 1 #else # define U_CHARSET_IS_UTF8 0 @@ -735,7 +735,7 @@ namespace std { * narrow-character strings are in EBCDIC. */ # define U_SIZEOF_WCHAR_T 2 -# else +# else /* * LOCALETYPE(*CLD) or LOCALETYPE(*LOCALE) is specified. * Wide-character strings are in 16-bit EBCDIC, @@ -766,14 +766,14 @@ namespace std { #else /* * Notes: - * Visual Studio 2010 (_MSC_VER==1600) defines char16_t as a typedef - * and does not support u"abc" string literals. - * Visual Studio 2015 (_MSC_VER>=1900) and above adds support for - * both char16_t and u"abc" string literals. + * Visual Studio 2010 (_MSC_VER==1600) defines char16_t as a typedef + * and does not support u"abc" string literals. + * Visual Studio 2015 (_MSC_VER>=1900) and above adds support for + * both char16_t and u"abc" string literals. * gcc 4.4 defines the __CHAR16_TYPE__ macro to a usable type but * does not support u"abc" string literals. * C++11 and C11 require support for UTF-16 literals - * TODO: Fix for plain C. Doesn't work on Mac. + * TODO: Fix for plain C. Doesn't work on Mac. */ # if U_CPLUSPLUS_VERSION >= 11 || (defined(__STDC_VERSION__) && __STDC_VERSION__ >= 201112L) # define U_HAVE_CHAR16_T 1 @@ -794,8 +794,8 @@ namespace std { #elif U_HAVE_CHAR16_T \ || (defined(__xlC__) && defined(__IBM_UTF_LITERAL) && U_SIZEOF_WCHAR_T != 2) \ || (defined(__HP_aCC) && __HP_aCC >= 035000) \ - || (defined(__HP_cc) && __HP_cc >= 111106) \ - || (defined(U_IN_DOXYGEN)) + || (defined(__HP_cc) && __HP_cc >= 111106) \ + || (defined(U_IN_DOXYGEN)) # define U_DECLARE_UTF16(string) u ## string #elif U_SIZEOF_WCHAR_T == 2 \ && (U_CHARSET_FAMILY == 0 || (U_PF_OS390 <= U_PLATFORM && U_PLATFORM <= U_PF_OS400 && defined(__UCS2__))) @@ -814,9 +814,9 @@ namespace std { /* Use the predefined value. */ #elif defined(U_STATIC_IMPLEMENTATION) # define U_EXPORT -#elif defined(_MSC_VER) || (UPRV_HAS_DECLSPEC_ATTRIBUTE(dllexport) && \ - UPRV_HAS_DECLSPEC_ATTRIBUTE(dllimport)) -# define U_EXPORT __declspec(dllexport) +#elif defined(_MSC_VER) || (UPRV_HAS_DECLSPEC_ATTRIBUTE(dllexport) && \ + UPRV_HAS_DECLSPEC_ATTRIBUTE(dllimport)) +# define U_EXPORT __declspec(dllexport) #elif defined(__GNUC__) # define U_EXPORT __attribute__((visibility("default"))) #elif (defined(__SUNPRO_CC) && __SUNPRO_CC >= 0x550) \ @@ -828,7 +828,7 @@ namespace std { # define U_EXPORT #endif -/* U_CALLCONV is related to U_EXPORT2 */ +/* U_CALLCONV is related to U_EXPORT2 */ #ifdef U_EXPORT2 /* Use the predefined value. */ #elif defined(_MSC_VER) @@ -839,8 +839,8 @@ namespace std { #ifdef U_IMPORT /* Use the predefined value. */ -#elif defined(_MSC_VER) || (UPRV_HAS_DECLSPEC_ATTRIBUTE(dllexport) && \ - UPRV_HAS_DECLSPEC_ATTRIBUTE(dllimport)) +#elif defined(_MSC_VER) || (UPRV_HAS_DECLSPEC_ATTRIBUTE(dllexport) && \ + UPRV_HAS_DECLSPEC_ATTRIBUTE(dllimport)) /* Windows needs to export/import data. */ # define U_IMPORT __declspec(dllimport) #else @@ -870,16 +870,16 @@ namespace std { # define U_CALLCONV U_EXPORT2 #endif -/** - * \def U_CALLCONV_FPTR - * Similar to U_CALLCONV, but only used on function pointers. - * @internal - */ -#if U_PLATFORM == U_PF_OS390 && defined(__cplusplus) -# define U_CALLCONV_FPTR U_CALLCONV -#else -# define U_CALLCONV_FPTR -#endif +/** + * \def U_CALLCONV_FPTR + * Similar to U_CALLCONV, but only used on function pointers. + * @internal + */ +#if U_PLATFORM == U_PF_OS390 && defined(__cplusplus) +# define U_CALLCONV_FPTR U_CALLCONV +#else +# define U_CALLCONV_FPTR +#endif /* @} */ -#endif // _PLATFORM_H +#endif // _PLATFORM_H |