summaryrefslogtreecommitdiff
path: root/external/icu
diff options
context:
space:
mode:
Diffstat (limited to 'external/icu')
-rw-r--r--external/icu/UnpackedTarball_icu.mk1
-rw-r--r--external/icu/c++20-comparison.patch171
2 files changed, 172 insertions, 0 deletions
diff --git a/external/icu/UnpackedTarball_icu.mk b/external/icu/UnpackedTarball_icu.mk
index d8a16e0e3777..4d45f2108f99 100644
--- a/external/icu/UnpackedTarball_icu.mk
+++ b/external/icu/UnpackedTarball_icu.mk
@@ -43,6 +43,7 @@ $(eval $(call gb_UnpackedTarball_add_patches,icu,\
external/icu/char8_t.patch \
external/icu/CVE-2018-18928.patch.2 \
external/icu/clang-cl.patch \
+ external/icu/c++20-comparison.patch \
))
$(eval $(call gb_UnpackedTarball_add_file,icu,source/data/brkitr/khmerdict.dict,external/icu/khmerdict.dict))
diff --git a/external/icu/c++20-comparison.patch b/external/icu/c++20-comparison.patch
new file mode 100644
index 000000000000..44053e6719ca
--- /dev/null
+++ b/external/icu/c++20-comparison.patch
@@ -0,0 +1,171 @@
+--- source/common/uvector.cpp
++++ source/common/uvector.cpp
+@@ -110,7 +110,7 @@
+ }
+
+ // This only does something sensible if this object has a non-null comparer
+-UBool UVector::operator==(const UVector& other) {
++UBool UVector::operator==(const UVector& other) const {
+ int32_t i;
+ if (count != other.count) return FALSE;
+ if (comparer != NULL) {
+--- source/common/uvector.h
++++ source/common/uvector.h
+@@ -113,12 +113,12 @@
+ * equal if they are of the same size and all elements are equal,
+ * as compared using this object's comparer.
+ */
+- UBool operator==(const UVector& other);
++ UBool operator==(const UVector& other) const;
+
+ /**
+ * Equivalent to !operator==()
+ */
+- inline UBool operator!=(const UVector& other);
++ inline UBool operator!=(const UVector& other) const;
+
+ //------------------------------------------------------------
+ // java.util.Vector API
+@@ -382,7 +382,7 @@
+ return elementAt(index);
+ }
+
+-inline UBool UVector::operator!=(const UVector& other) {
++inline UBool UVector::operator!=(const UVector& other) const {
+ return !operator==(other);
+ }
+
+--- source/i18n/tzrule.cpp
++++ source/i18n/tzrule.cpp
+@@ -53,7 +53,7 @@
+ return *this;
+ }
+
+-UBool
++bool
+ TimeZoneRule::operator==(const TimeZoneRule& that) const {
+ return ((this == &that) ||
+ (typeid(*this) == typeid(that) &&
+@@ -120,7 +120,7 @@
+ return *this;
+ }
+
+-UBool
++bool
+ InitialTimeZoneRule::operator==(const TimeZoneRule& that) const {
+ return ((this == &that) ||
+ (typeid(*this) == typeid(that) &&
+@@ -226,7 +226,7 @@
+ return *this;
+ }
+
+-UBool
++bool
+ AnnualTimeZoneRule::operator==(const TimeZoneRule& that) const {
+ if (this == &that) {
+ return TRUE;
+@@ -445,7 +445,7 @@
+ return *this;
+ }
+
+-UBool
++bool
+ TimeArrayTimeZoneRule::operator==(const TimeZoneRule& that) const {
+ if (this == &that) {
+ return TRUE;
+--- source/i18n/unicode/rbtz.h
++++ source/i18n/unicode/rbtz.h
+@@ -85,6 +85,7 @@
+ * @stable ICU 3.8
+ */
+ virtual UBool operator!=(const TimeZone& that) const;
++ UBool operator!=(const RuleBasedTimeZone& that) const {return !operator==(that);}
+
+ /**
+ * Adds the <code>TimeZoneRule</code> which represents time transitions.
+--- source/i18n/unicode/simpletz.h
++++ source/i18n/unicode/simpletz.h
+@@ -110,6 +110,7 @@
+ * @stable ICU 2.0
+ */
+ virtual UBool operator==(const TimeZone& that) const;
++ UBool operator!=(const SimpleTimeZone& that) const {return !operator==(that);}
+
+ /**
+ * Constructs a SimpleTimeZone with the given raw GMT offset and time zone ID,
+--- source/i18n/unicode/smpdtfmt.h
++++ source/i18n/unicode/smpdtfmt.h
+@@ -874,6 +874,7 @@
+ * @stable ICU 2.0
+ */
+ virtual UBool operator==(const Format& other) const;
++ UBool operator!=(const SimpleDateFormat& that) const {return !operator==(that);}
+
+
+ using DateFormat::format;
+--- source/i18n/unicode/stsearch.h
++++ source/i18n/unicode/stsearch.h
+@@ -297,6 +297,7 @@
+ * @stable ICU 2.0
+ */
+ virtual UBool operator==(const SearchIterator &that) const;
++ UBool operator!=(const StringSearch &that) const {return !operator==(that);}
+
+ // public get and set methods ----------------------------------------
+
+--- source/i18n/unicode/tzrule.h
++++ source/i18n/unicode/tzrule.h
+@@ -54,7 +54,7 @@
+ * @return true if the given <code>TimeZoneRule</code> objects are semantically equal.
+ * @stable ICU 3.8
+ */
+- virtual UBool operator==(const TimeZoneRule& that) const;
++ virtual bool operator==(const TimeZoneRule& that) const;
+
+ /**
+ * Return true if the given <code>TimeZoneRule</code> objects are semantically unequal. Objects
+@@ -245,7 +245,7 @@
+ * @return true if the given <code>TimeZoneRule</code> objects are semantically equal.
+ * @stable ICU 3.8
+ */
+- virtual UBool operator==(const TimeZoneRule& that) const;
++ virtual bool operator==(const TimeZoneRule& that) const;
+
+ /**
+ * Return true if the given <code>TimeZoneRule</code> objects are semantically unequal. Objects
+@@ -255,6 +255,7 @@
+ * @stable ICU 3.8
+ */
+ virtual UBool operator!=(const TimeZoneRule& that) const;
++ UBool operator!=(const InitialTimeZoneRule& that) const {return !operator==(that);}
+
+ /**
+ * Gets the time when this rule takes effect in the given year.
+@@ -456,7 +457,7 @@
+ * @return true if the given <code>TimeZoneRule</code> objects are semantically equal.
+ * @stable ICU 3.8
+ */
+- virtual UBool operator==(const TimeZoneRule& that) const;
++ virtual bool operator==(const TimeZoneRule& that) const;
+
+ /**
+ * Return true if the given <code>TimeZoneRule</code> objects are semantically unequal. Objects
+@@ -672,7 +673,7 @@
+ * @return true if the given <code>TimeZoneRule</code> objects are semantically equal.
+ * @stable ICU 3.8
+ */
+- virtual UBool operator==(const TimeZoneRule& that) const;
++ virtual bool operator==(const TimeZoneRule& that) const;
+
+ /**
+ * Return true if the given <code>TimeZoneRule</code> objects are semantically unequal. Objects
+--- source/i18n/unicode/vtzone.h
++++ source/i18n/unicode/vtzone.h
+@@ -81,6 +81,7 @@
+ * @stable ICU 3.8
+ */
+ virtual UBool operator!=(const TimeZone& that) const;
++ UBool operator!=(const VTimeZone& that) const {return !operator==(that);}
+
+ /**
+ * Create a <code>VTimeZone</code> instance by the time zone ID.