1From 0e94085f74b562bf8edf5418142323785a069454 Mon Sep 17 00:00:00 2001 2From: =?UTF-8?q?Andreas=20M=C3=BCller?= <schnitzeltony@gmail.com> 3Date: Wed, 2 Dec 2020 22:34:54 +0100 4Subject: [PATCH] Fix build with icu >= 68 5MIME-Version: 1.0 6Content-Type: text/plain; charset=UTF-8 7Content-Transfer-Encoding: 8bit 8 9Upstream-Status: Pending 10 11Signed-off-by: Andreas Müller <schnitzeltony@gmail.com> 12--- 13 Source/WebCore/platform/text/TextCodecICU.cpp | 15 +++++++++++++++ 14 Source/WebCore/platform/text/icu/UTextProvider.h | 15 +++++++++++++++ 15 .../platform/text/icu/UTextProviderLatin1.cpp | 15 +++++++++++++++ 16 .../platform/text/icu/UTextProviderUTF16.cpp | 15 +++++++++++++++ 17 4 files changed, 60 insertions(+) 18 19diff --git a/Source/WebCore/platform/text/TextCodecICU.cpp b/Source/WebCore/platform/text/TextCodecICU.cpp 20index dd6ff0675..7ce8a70ef 100644 21--- a/Source/WebCore/platform/text/TextCodecICU.cpp 22+++ b/Source/WebCore/platform/text/TextCodecICU.cpp 23@@ -39,6 +39,21 @@ 24 #include <wtf/text/StringBuilder.h> 25 #include <wtf/unicode/CharacterNames.h> 26 27+// Since icu 68.1 icu we have to: 28+#ifndef TRUE 29+// Taken from umachibe.h: 30+/** 31+ * The TRUE value of a UBool. 32+ * 33+ * @deprecated ICU 68 Use standard "true" instead. 34+ */ 35+# define TRUE true 36+#endif 37+ 38+#ifndef FALSE 39+# define FALSE false 40+#endif 41+ 42 namespace WebCore { 43 44 const size_t ConversionBufferSize = 16384; 45diff --git a/Source/WebCore/platform/text/icu/UTextProvider.h b/Source/WebCore/platform/text/icu/UTextProvider.h 46index c254fc4c7..9d2ad8b8c 100644 47--- a/Source/WebCore/platform/text/icu/UTextProvider.h 48+++ b/Source/WebCore/platform/text/icu/UTextProvider.h 49@@ -28,6 +28,21 @@ 50 51 #include <unicode/utext.h> 52 53+// Since icu 68.1 icu we have to: 54+#ifndef TRUE 55+// Taken from umachibe.h: 56+/** 57+ * The TRUE value of a UBool. 58+ * 59+ * @deprecated ICU 68 Use standard "true" instead. 60+ */ 61+# define TRUE true 62+#endif 63+ 64+#ifndef FALSE 65+# define FALSE false 66+#endif 67+ 68 namespace WebCore { 69 70 enum class UTextProviderContext { 71diff --git a/Source/WebCore/platform/text/icu/UTextProviderLatin1.cpp b/Source/WebCore/platform/text/icu/UTextProviderLatin1.cpp 72index cd6852c71..0c95ea529 100644 73--- a/Source/WebCore/platform/text/icu/UTextProviderLatin1.cpp 74+++ b/Source/WebCore/platform/text/icu/UTextProviderLatin1.cpp 75@@ -29,6 +29,21 @@ 76 #include "UTextProvider.h" 77 #include <wtf/text/StringImpl.h> 78 79+// Since icu 68.1 icu we have to: 80+#ifndef TRUE 81+// Taken from umachibe.h: 82+/** 83+ * The TRUE value of a UBool. 84+ * 85+ * @deprecated ICU 68 Use standard "true" instead. 86+ */ 87+# define TRUE true 88+#endif 89+ 90+#ifndef FALSE 91+# define FALSE false 92+#endif 93+ 94 namespace WebCore { 95 96 // Latin1 provider 97diff --git a/Source/WebCore/platform/text/icu/UTextProviderUTF16.cpp b/Source/WebCore/platform/text/icu/UTextProviderUTF16.cpp 98index 7aaac48c8..6ac693602 100644 99--- a/Source/WebCore/platform/text/icu/UTextProviderUTF16.cpp 100+++ b/Source/WebCore/platform/text/icu/UTextProviderUTF16.cpp 101@@ -28,6 +28,21 @@ 102 103 #include "UTextProvider.h" 104 105+// Since icu 68.1 icu we have to: 106+#ifndef TRUE 107+// Taken from umachibe.h: 108+/** 109+ * The TRUE value of a UBool. 110+ * 111+ * @deprecated ICU 68 Use standard "true" instead. 112+ */ 113+# define TRUE true 114+#endif 115+ 116+#ifndef FALSE 117+# define FALSE false 118+#endif 119+ 120 namespace WebCore { 121 122 // UTF16ContextAware provider 123-- 1242.26.2 125 126