diff options
author | Peter Breitenlohner <peb@mppmu.mpg.de> | 2012-11-16 11:52:12 +0000 |
---|---|---|
committer | Peter Breitenlohner <peb@mppmu.mpg.de> | 2012-11-16 11:52:12 +0000 |
commit | 351b5fe3106e281bf9269440e6270dc1b56635f5 (patch) | |
tree | 29d6be38592c9384cec27797b3ea3560730adfd6 /Build/source/libs/icu/icu-50.1/common/unicode | |
parent | 361ad3a3d62671dd95699b6fc55d6cbb79424811 (diff) |
icu: build fix for gcc-4.7
tardate 2012-11-16
libs/*: avoid use of deprecated 'INCLUDES'.
git-svn-id: svn://tug.org/texlive/trunk@28277 c570f23f-e606-0410-a88d-b1316a301751
Diffstat (limited to 'Build/source/libs/icu/icu-50.1/common/unicode')
3 files changed, 8 insertions, 8 deletions
diff --git a/Build/source/libs/icu/icu-50.1/common/unicode/platform.h b/Build/source/libs/icu/icu-50.1/common/unicode/platform.h index 94769d63f9a..46b8d5c8fde 100644 --- a/Build/source/libs/icu/icu-50.1/common/unicode/platform.h +++ b/Build/source/libs/icu/icu-50.1/common/unicode/platform.h @@ -664,9 +664,9 @@ * does not support 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 requires support for UTF-16 literals + * C++11 and C11 require support for UTF-16 literals */ -# if (defined(__cplusplus) && __cplusplus >= 201103L) +# if (defined(__cplusplus) && __cplusplus >= 201103L) || (defined(__STDC_VERSION__) && __STDC_VERSION__ >= 201112L) # define U_HAVE_CHAR16_T 1 # else # define U_HAVE_CHAR16_T 0 diff --git a/Build/source/libs/icu/icu-50.1/common/unicode/umachine.h b/Build/source/libs/icu/icu-50.1/common/unicode/umachine.h index 6dd6a8e5889..d1102f49365 100644 --- a/Build/source/libs/icu/icu-50.1/common/unicode/umachine.h +++ b/Build/source/libs/icu/icu-50.1/common/unicode/umachine.h @@ -256,7 +256,7 @@ typedef int8_t UBool; /** * \var UChar - * Define UChar to be char16_t, if available, + * Define UChar to be UCHAR_TYPE, if that is #defined (for example, to char16_t), * or wchar_t if that is 16 bits wide; always assumed to be unsigned. * If neither is available, then define UChar to be uint16_t. * @@ -266,10 +266,10 @@ typedef int8_t UBool; * * @stable ICU 4.4 */ - -/* Define UChar to be compatible with char16_t or wchar_t if possible. */ -#if U_HAVE_CHAR16_T - typedef char16_t UChar; +#if defined(UCHAR_TYPE) + typedef UCHAR_TYPE UChar; +/* Not #elif U_HAVE_CHAR16_T -- because that is type-incompatible with pre-C++11 callers + typedef char16_t UChar; */ #elif U_SIZEOF_WCHAR_T==2 typedef wchar_t UChar; #elif defined(__CHAR16_TYPE__) diff --git a/Build/source/libs/icu/icu-50.1/common/unicode/ustring.h b/Build/source/libs/icu/icu-50.1/common/unicode/ustring.h index c5774315858..d2ea31c6747 100644 --- a/Build/source/libs/icu/icu-50.1/common/unicode/ustring.h +++ b/Build/source/libs/icu/icu-50.1/common/unicode/ustring.h @@ -939,7 +939,7 @@ u_memrchr32(const UChar *s, UChar32 c, int32_t count); * @stable ICU 2.0 */ #if defined(U_DECLARE_UTF16) -# define U_STRING_DECL(var, cs, length) static const UChar var[(length)+1]=U_DECLARE_UTF16(cs) +# define U_STRING_DECL(var, cs, length) static const UChar *var=(const UChar *)U_DECLARE_UTF16(cs) /**@stable ICU 2.0 */ # define U_STRING_INIT(var, cs, length) #elif U_SIZEOF_WCHAR_T==U_SIZEOF_UCHAR && (U_CHARSET_FAMILY==U_ASCII_FAMILY || (U_SIZEOF_UCHAR == 2 && defined(U_WCHAR_IS_UTF16))) |