diff options
author | Eike Rathke <erack@redhat.com> | 2021-11-16 14:53:14 +0100 |
---|---|---|
committer | Eike Rathke <erack@redhat.com> | 2021-11-16 20:23:45 +0100 |
commit | 263961306ede0656ebb7904034a2172615ce81d0 (patch) | |
tree | ee25601971c03fe2cd498e09bf532d6ecaaa6475 /external | |
parent | rtl::Static->thread-safe static (diff) | |
download | core-263961306ede0656ebb7904034a2172615ce81d0.tar.gz core-263961306ede0656ebb7904034a2172615ce81d0.zip |
Update to ICU 70.1
Unicode 14, 5 new scripts, 12 new Unicode blocks.
In i18npool/qa/cppunit/test_breakiterator.cxx
TestBreakIterator::testLao() had to be disabled/adapted.
Needs to be investigated, see comments there.
As is, Lao script word break has regressions.
Correct UBLOCK_TANGUT_SUPPLEMENT Unicode range endpoint to
0x18D7F, see
https://www.unicode.org/versions/Unicode14.0.0/erratafixed.html
for which ublock_getCode(0x18D8F) now returned UBLOCK_NO_BLOCK and
thus luckily the assert in svx/source/dialog/charmap.cxx hit.
Change-Id: I4bad16ecfab3f44be365b8f884c57f34af68218e
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/125322
Reviewed-by: Eike Rathke <erack@redhat.com>
Tested-by: Jenkins
Diffstat (limited to 'external')
-rw-r--r-- | external/icu/UnpackedTarball_icu.mk | 3 | ||||
-rw-r--r-- | external/icu/c++20-comparison.patch | 171 | ||||
-rw-r--r-- | external/icu/c++20-comparison.patch.1 | 82 | ||||
-rw-r--r-- | external/icu/e450fa50fc242282551f56b941dc93b9a8a0bcbb.patch.2 | 106 | ||||
-rw-r--r-- | external/icu/icu4c-aix.patch.1 | 16 | ||||
-rw-r--r-- | external/icu/icu4c-android.patch.1 | 24 | ||||
-rw-r--r-- | external/icu/icu4c-khmerbreakengine.patch.1 | 89 |
7 files changed, 145 insertions, 346 deletions
diff --git a/external/icu/UnpackedTarball_icu.mk b/external/icu/UnpackedTarball_icu.mk index b47d519b1ae2..c0ffe47dad3e 100644 --- a/external/icu/UnpackedTarball_icu.mk +++ b/external/icu/UnpackedTarball_icu.mk @@ -33,7 +33,7 @@ $(eval $(call gb_UnpackedTarball_add_patches,icu,\ external/icu/icu4c-rtti.patch.1 \ external/icu/icu4c-clang-cl.patch.1 \ external/icu/gcc9.patch \ - external/icu/c++20-comparison.patch \ + external/icu/c++20-comparison.patch.1 \ external/icu/ubsan.patch.1 \ external/icu/Wdeprecated-copy-dtor.patch \ external/icu/strict_ansi.patch \ @@ -42,7 +42,6 @@ $(eval $(call gb_UnpackedTarball_add_patches,icu,\ external/icu/icu4c-khmerbreakengine.patch.1 \ external/icu/icu4c-$(if $(filter ANDROID,$(OS)),android,rpath).patch.1 \ $(if $(filter-out ANDROID,$(OS)),external/icu/icu4c-icudata-stdlibs.patch.1) \ - external/icu/e450fa50fc242282551f56b941dc93b9a8a0bcbb.patch.2 \ )) $(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 deleted file mode 100644 index 44053e6719ca..000000000000 --- a/external/icu/c++20-comparison.patch +++ /dev/null @@ -1,171 +0,0 @@ ---- 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. diff --git a/external/icu/c++20-comparison.patch.1 b/external/icu/c++20-comparison.patch.1 new file mode 100644 index 000000000000..3d2d7c042951 --- /dev/null +++ b/external/icu/c++20-comparison.patch.1 @@ -0,0 +1,82 @@ +diff -ur icu.org/source/i18n/unicode/rbtz.h icu/source/i18n/unicode/rbtz.h +--- icu.org/source/i18n/unicode/rbtz.h 2021-10-28 18:04:57.000000000 +0200 ++++ icu/source/i18n/unicode/rbtz.h 2021-11-15 18:56:24.364137609 +0100 +@@ -87,6 +87,7 @@ + * @stable ICU 3.8 + */ + virtual bool operator!=(const TimeZone& that) const; ++ bool operator!=(const RuleBasedTimeZone& that) const {return !operator==(that);} + + /** + * Adds the `TimeZoneRule` which represents time transitions. +diff -ur icu.org/source/i18n/unicode/simpletz.h icu/source/i18n/unicode/simpletz.h +--- icu.org/source/i18n/unicode/simpletz.h 2021-10-28 18:04:57.000000000 +0200 ++++ icu/source/i18n/unicode/simpletz.h 2021-11-15 19:01:41.774487719 +0100 +@@ -112,6 +112,7 @@ + * @stable ICU 2.0 + */ + virtual bool operator==(const TimeZone& that) const override; ++ bool operator!=(const SimpleTimeZone& that) const {return !operator==(that);} + + /** + * Constructs a SimpleTimeZone with the given raw GMT offset and time zone ID, +diff -ur icu.org/source/i18n/unicode/smpdtfmt.h icu/source/i18n/unicode/smpdtfmt.h +--- icu.org/source/i18n/unicode/smpdtfmt.h 2021-10-28 18:04:57.000000000 +0200 ++++ icu/source/i18n/unicode/smpdtfmt.h 2021-11-15 19:02:47.382353381 +0100 +@@ -877,6 +877,7 @@ + * @stable ICU 2.0 + */ + virtual bool operator==(const Format& other) const override; ++ bool operator!=(const SimpleDateFormat& that) const {return !operator==(that);} + + + using DateFormat::format; +diff -ur icu.org/source/i18n/unicode/stsearch.h icu/source/i18n/unicode/stsearch.h +--- icu.org/source/i18n/unicode/stsearch.h 2021-10-28 18:04:57.000000000 +0200 ++++ icu/source/i18n/unicode/stsearch.h 2021-11-15 19:03:27.014272230 +0100 +@@ -298,6 +298,7 @@ + * @stable ICU 2.0 + */ + virtual bool operator==(const SearchIterator &that) const override; ++ bool operator!=(const StringSearch &that) const {return !operator==(that);} + + // public get and set methods ---------------------------------------- + +diff -ur icu.org/source/i18n/unicode/tzrule.h icu/source/i18n/unicode/tzrule.h +--- icu.org/source/i18n/unicode/tzrule.h 2021-10-28 18:04:57.000000000 +0200 ++++ icu/source/i18n/unicode/tzrule.h 2021-11-15 19:14:52.191331967 +0100 +@@ -257,6 +257,7 @@ + * @stable ICU 3.8 + */ + virtual bool operator!=(const TimeZoneRule& that) const override; ++ bool operator!=(const InitialTimeZoneRule& that) const {return !operator==(that);} + + /** + * Gets the time when this rule takes effect in the given year. +@@ -468,6 +469,7 @@ + * @stable ICU 3.8 + */ + virtual bool operator!=(const TimeZoneRule& that) const override; ++ bool operator!=(const AnnualTimeZoneRule& that) const {return !operator==(that);} + + /** + * Gets the start date/time rule used by this rule. +@@ -684,6 +686,7 @@ + * @stable ICU 3.8 + */ + virtual bool operator!=(const TimeZoneRule& that) const override; ++ bool operator!=(const TimeArrayTimeZoneRule& that) const {return !operator==(that);} + + /** + * Gets the time type of the start times used by this rule. The return value +diff -ur icu.org/source/i18n/unicode/vtzone.h icu/source/i18n/unicode/vtzone.h +--- icu.org/source/i18n/unicode/vtzone.h 2021-10-28 18:04:57.000000000 +0200 ++++ icu/source/i18n/unicode/vtzone.h 2021-11-15 19:16:07.461130004 +0100 +@@ -83,6 +83,7 @@ + * @stable ICU 3.8 + */ + virtual bool operator!=(const TimeZone& that) const; ++ bool operator!=(const VTimeZone& that) const {return !operator==(that);} + + /** + * Create a <code>VTimeZone</code> instance by the time zone ID. diff --git a/external/icu/e450fa50fc242282551f56b941dc93b9a8a0bcbb.patch.2 b/external/icu/e450fa50fc242282551f56b941dc93b9a8a0bcbb.patch.2 deleted file mode 100644 index d23605807f14..000000000000 --- a/external/icu/e450fa50fc242282551f56b941dc93b9a8a0bcbb.patch.2 +++ /dev/null @@ -1,106 +0,0 @@ -From e450fa50fc242282551f56b941dc93b9a8a0bcbb Mon Sep 17 00:00:00 2001 -From: Frank Tang <ftang@chromium.org> -Date: Tue, 13 Apr 2021 15:16:50 -0700 -Subject: [PATCH] ICU-21587 Fix memory bug w/ baseName - -Edge cases not fixed in assign and move assign operator -while the locale is long and call setKeywordValue with incorrect -keyword/values. ---- - icu4c/source/common/locid.cpp | 11 +++++++++-- - icu4c/source/test/intltest/loctest.cpp | 26 ++++++++++++++++++++++++++ - icu4c/source/test/intltest/loctest.h | 2 ++ - 3 files changed, 37 insertions(+), 2 deletions(-) - -diff --git a/icu4c/source/common/locid.cpp b/icu4c/source/common/locid.cpp -index 02cd82a7b8e..3c6e5b06690 100644 ---- a/icu4c/source/common/locid.cpp -+++ b/icu4c/source/common/locid.cpp -@@ -469,14 +469,18 @@ Locale& Locale::operator=(Locale&& other) U_NOEXCEPT { - if ((baseName != fullName) && (baseName != fullNameBuffer)) uprv_free(baseName); - if (fullName != fullNameBuffer) uprv_free(fullName); - -- if (other.fullName == other.fullNameBuffer) { -+ if (other.fullName == other.fullNameBuffer || other.baseName == other.fullNameBuffer) { - uprv_strcpy(fullNameBuffer, other.fullNameBuffer); -+ } -+ if (other.fullName == other.fullNameBuffer) { - fullName = fullNameBuffer; - } else { - fullName = other.fullName; - } - -- if (other.baseName == other.fullName) { -+ if (other.baseName == other.fullNameBuffer) { -+ baseName = fullNameBuffer; -+ } else if (other.baseName == other.fullName) { - baseName = fullName; - } else { - baseName = other.baseName; -@@ -2681,6 +2685,9 @@ Locale::setKeywordValue(const char* keywordName, const char* keywordValue, UErro - if (fullName != fullNameBuffer) { - // if full Name is already on the heap, need to free it. - uprv_free(fullName); -+ if (baseName == fullName) { -+ baseName = newFullName; // baseName should not point to freed memory. -+ } - } - fullName = newFullName; - status = U_ZERO_ERROR; -diff --git a/icu4c/source/test/intltest/loctest.cpp b/icu4c/source/test/intltest/loctest.cpp -index ce41a4c00e7..5503b008b0c 100644 ---- a/icu4c/source/test/intltest/loctest.cpp -+++ b/icu4c/source/test/intltest/loctest.cpp -@@ -284,6 +284,8 @@ void LocaleTest::runIndexedTest( int32_t index, UBool exec, const char* &name, c - TESTCASE_AUTO(TestSetUnicodeKeywordValueNullInLongLocale); - TESTCASE_AUTO(TestCanonicalize); - TESTCASE_AUTO(TestLeak21419); -+ TESTCASE_AUTO(TestLongLocaleSetKeywordAssign); -+ TESTCASE_AUTO(TestLongLocaleSetKeywordMoveAssign); - TESTCASE_AUTO_END; - } - -@@ -6520,6 +6522,30 @@ void LocaleTest::TestSetUnicodeKeywordValueInLongLocale() { - } - } - -+void LocaleTest::TestLongLocaleSetKeywordAssign() { -+ IcuTestErrorCode status(*this, "TestLongLocaleSetKeywordAssign"); -+ // A long base name, with an illegal keyword and copy constructor -+ icu::Locale l("de_AAAAAAA1_AAAAAAA2_AAAAAAA3_AAAAAAA4_AAAAAAA5_AAAAAAA6_" -+ "AAAAAAA7_AAAAAAA8_AAAAAAA9_AAAAAA10_AAAAAA11_AAAAAA12_" -+ "AAAAAA13_AAAAAA14_AAAAAA15_AAAAAA16_AAAAAA17_AAAAAA18"); -+ Locale l2; -+ l.setUnicodeKeywordValue("co", "12", status); // Cause an error -+ status.reset(); -+ l2 = l; // copy operator on such bogus locale. -+} -+ -+void LocaleTest::TestLongLocaleSetKeywordMoveAssign() { -+ IcuTestErrorCode status(*this, "TestLongLocaleSetKeywordMoveAssign"); -+ // A long base name, with an illegal keyword and copy constructor -+ icu::Locale l("de_AAAAAAA1_AAAAAAA2_AAAAAAA3_AAAAAAA4_AAAAAAA5_AAAAAAA6_" -+ "AAAAAAA7_AAAAAAA8_AAAAAAA9_AAAAAA10_AAAAAA11_AAAAAA12_" -+ "AAAAAA13_AAAAAA14_AAAAAA15_AAAAAA16_AAAAAA17"); -+ Locale l2; -+ l.setUnicodeKeywordValue("co", "12", status); // Cause an error -+ status.reset(); -+ Locale l3 = std::move(l); // move assign -+} -+ - void LocaleTest::TestSetUnicodeKeywordValueNullInLongLocale() { - IcuTestErrorCode status(*this, "TestSetUnicodeKeywordValueNullInLongLocale"); - const char *exts[] = {"cf", "cu", "em", "kk", "kr", "ks", "kv", "lb", "lw", -diff --git a/icu4c/source/test/intltest/loctest.h b/icu4c/source/test/intltest/loctest.h -index 05be4037bd6..12a93bde53d 100644 ---- a/icu4c/source/test/intltest/loctest.h -+++ b/icu4c/source/test/intltest/loctest.h -@@ -156,6 +156,8 @@ class LocaleTest: public IntlTest { - void TestSetUnicodeKeywordValueInLongLocale(); - void TestSetUnicodeKeywordValueNullInLongLocale(); - void TestLeak21419(); -+ void TestLongLocaleSetKeywordAssign(); -+ void TestLongLocaleSetKeywordMoveAssign(); - - private: - void _checklocs(const char* label, diff --git a/external/icu/icu4c-aix.patch.1 b/external/icu/icu4c-aix.patch.1 index 77982163b965..bcbbe3ab9484 100644 --- a/external/icu/icu4c-aix.patch.1 +++ b/external/icu/icu4c-aix.patch.1 @@ -1,6 +1,6 @@ diff -ur icu.org/source/config/mh-aix-gcc icu/source/config/mh-aix-gcc ---- icu.org/source/config/mh-aix-gcc 2016-06-15 20:58:17.000000000 +0200 -+++ icu/source/config/mh-aix-gcc 2017-04-21 21:58:49.731432198 +0200 +--- icu.org/source/config/mh-aix-gcc 2021-10-28 18:04:57.000000000 +0200 ++++ icu/source/config/mh-aix-gcc 2021-11-15 18:35:48.737774348 +0100 @@ -18,84 +18,29 @@ GEN_DEPS.c= $(CC) -E -MM $(DEFS) $(CPPFLAGS) GEN_DEPS.cc= $(CXX) -E -MM $(DEFS) $(CPPFLAGS) @@ -15,8 +15,8 @@ diff -ur icu.org/source/config/mh-aix-gcc icu/source/config/mh-aix-gcc -LD_SOOPTIONS= -Wl,-bsymbolic - -## Commands to make a shared library --SHLIB.c= $(AIX_PREDELETE) $(CC) $(CFLAGS) $(LDFLAGS) -shared -Wl,-bexpall $(LD_SOOPTIONS) --SHLIB.cc= $(AIX_PREDELETE) $(CXX) $(CXXFLAGS) $(LDFLAGS) -shared -Wl,-bexpall $(LD_SOOPTIONS) +-SHLIB.c= $(AIX_PREDELETE) $(CC) $(CFLAGS) $(LDFLAGS) -shared $(LD_SOOPTIONS) +-SHLIB.cc= $(AIX_PREDELETE) $(CXX) $(CXXFLAGS) $(LDFLAGS) -shared $(LD_SOOPTIONS) - -## Compiler switch to embed a runtime search path -LD_RPATH= -I @@ -114,9 +114,9 @@ diff -ur icu.org/source/config/mh-aix-gcc icu/source/config/mh-aix-gcc ## BIR - bind with internal references [so app data and icu data doesn't collide] diff -ur icu.org/source/tools/pkgdata/pkgdata.cpp icu/source/tools/pkgdata/pkgdata.cpp ---- icu.org/source/tools/pkgdata/pkgdata.cpp 2017-03-21 02:03:49.000000000 +0100 -+++ icu/source/tools/pkgdata/pkgdata.cpp 2017-04-21 21:58:49.732432195 +0200 -@@ -934,7 +934,7 @@ +--- icu.org/source/tools/pkgdata/pkgdata.cpp 2021-10-28 18:04:57.000000000 +0200 ++++ icu/source/tools/pkgdata/pkgdata.cpp 2021-11-15 18:28:38.342143852 +0100 +@@ -959,7 +959,7 @@ uprv_strcat(pkgDataFlags[SO_EXT], "."); uprv_strcat(pkgDataFlags[SO_EXT], pkgDataFlags[A_EXT]); @@ -125,7 +125,7 @@ diff -ur icu.org/source/tools/pkgdata/pkgdata.cpp icu/source/tools/pkgdata/pkgda sprintf(libFileNames[LIB_FILE_VERSION_TMP], "%s%s%s", libFileNames[LIB_FILE], FILE_EXTENSION_SEP, -@@ -1407,15 +1407,6 @@ +@@ -1439,15 +1439,6 @@ pkgDataFlags[LDICUDTFLAGS], targetDir, libFileNames[LIB_FILE_CYGWIN_VERSION], diff --git a/external/icu/icu4c-android.patch.1 b/external/icu/icu4c-android.patch.1 index 602d225d7812..9ba252b402d1 100644 --- a/external/icu/icu4c-android.patch.1 +++ b/external/icu/icu4c-android.patch.1 @@ -1,8 +1,8 @@ diff -ur icu.org/source/common/unicode/platform.h icu/source/common/unicode/platform.h ---- icu.org/source/common/unicode/platform.h 2019-10-03 13:16:41.000000000 +0200 -+++ icu/source/common/unicode/platform.h 2019-10-29 22:58:26.881221287 +0100 +--- icu.org/source/common/unicode/platform.h 2021-10-28 18:04:57.000000000 +0200 ++++ icu/source/common/unicode/platform.h 2021-11-15 21:03:11.474638494 +0100 @@ -818,7 +818,7 @@ - UPRV_HAS_DECLSPEC_ATTRIBUTE(dllimport)) + UPRV_HAS_DECLSPEC_ATTRIBUTE(__dllimport__)) # define U_EXPORT __declspec(dllexport) #elif defined(__GNUC__) -# define U_EXPORT __attribute__((visibility("default"))) @@ -11,8 +11,8 @@ diff -ur icu.org/source/common/unicode/platform.h icu/source/common/unicode/plat || (defined(__SUNPRO_C) && __SUNPRO_C >= 0x550) # define U_EXPORT __global diff -ur icu.org/source/config/mh-linux icu/source/config/mh-linux ---- icu.org/source/config/mh-linux 2018-09-29 02:34:41.000000000 +0200 -+++ icu/source/config/mh-linux 2018-10-20 00:33:36.558130876 +0200 +--- icu.org/source/config/mh-linux 2021-11-15 20:56:39.460705065 +0100 ++++ icu/source/config/mh-linux 2021-11-15 21:03:11.474638494 +0100 @@ -27,7 +27,7 @@ ## Compiler switch to embed a library name @@ -23,9 +23,9 @@ diff -ur icu.org/source/config/mh-linux icu/source/config/mh-linux #SH# LD_SONAME= diff -ur icu.org/source/configure icu/source/configure ---- icu.org/source/configure 2018-10-02 00:39:56.000000000 +0200 -+++ icu/source/configure 2018-10-20 00:33:36.559130874 +0200 -@@ -5207,7 +5207,7 @@ +--- icu.org/source/configure 2021-11-15 20:56:39.875703936 +0100 ++++ icu/source/configure 2021-11-15 21:03:11.475638491 +0100 +@@ -5272,7 +5273,7 @@ else icu_cv_host_frag=mh-linux-va fi ;; @@ -34,7 +34,7 @@ diff -ur icu.org/source/configure icu/source/configure i[34567]86-*-cygwin) if test "$GCC" = yes; then icu_cv_host_frag=mh-cygwin -@@ -6400,6 +6400,10 @@ +@@ -6472,6 +6466,10 @@ # Check to see if genccode can generate simple assembly. GENCCODE_ASSEMBLY= case "${host}" in @@ -45,7 +45,7 @@ diff -ur icu.org/source/configure icu/source/configure *-linux*|*-kfreebsd*-gnu*|i*86-*-*bsd*|i*86-pc-gnu) if test "$GCC" = yes; then # We're using gcc, and the simple -a gcc command line works for genccode -@@ -7499,6 +7503,10 @@ +@@ -7594,6 +7592,10 @@ # wchar_t can be used CHECK_UTF16_STRING_RESULT="available" ;; @@ -57,8 +57,8 @@ diff -ur icu.org/source/configure icu/source/configure ;; esac diff -ur icu.org/source/i18n/decimfmt.cpp icu/source/i18n/decimfmt.cpp ---- icu.org/source/i18n/decimfmt.cpp 2018-10-02 00:39:56.000000000 +0200 -+++ icu/source/i18n/decimfmt.cpp 2018-10-20 00:33:36.560130873 +0200 +--- icu.org/source/i18n/decimfmt.cpp 2021-10-28 18:04:57.000000000 +0200 ++++ icu/source/i18n/decimfmt.cpp 2021-11-15 21:03:11.476638489 +0100 @@ -9,6 +9,13 @@ // Helpful in toString methods and elsewhere. #define UNISTR_FROM_STRING_EXPLICIT diff --git a/external/icu/icu4c-khmerbreakengine.patch.1 b/external/icu/icu4c-khmerbreakengine.patch.1 index 0ce46ac473ec..719fdd846114 100644 --- a/external/icu/icu4c-khmerbreakengine.patch.1 +++ b/external/icu/icu4c-khmerbreakengine.patch.1 @@ -1,6 +1,6 @@ diff -ur icu.org/source/common/dictbe.cpp icu/source/common/dictbe.cpp ---- icu.org/source/common/dictbe.cpp 2021-04-08 02:10:27.000000000 +0200 -+++ icu/source/common/dictbe.cpp 2021-05-11 22:41:25.504455054 +0200 +--- icu.org/source/common/dictbe.cpp 2021-10-28 18:04:57.000000000 +0200 ++++ icu/source/common/dictbe.cpp 2021-11-15 20:39:03.710870385 +0100 @@ -32,7 +32,19 @@ ****************************************************************** */ @@ -22,7 +22,7 @@ diff -ur icu.org/source/common/dictbe.cpp icu/source/common/dictbe.cpp } DictionaryBreakEngine::~DictionaryBreakEngine() { -@@ -79,6 +91,169 @@ +@@ -81,6 +93,169 @@ fSet.compact(); } @@ -192,7 +192,7 @@ diff -ur icu.org/source/common/dictbe.cpp icu/source/common/dictbe.cpp /* ****************************************************************** * PossibleWord -@@ -108,7 +283,7 @@ +@@ -110,7 +285,7 @@ ~PossibleWord() {} // Fill the list of candidates if needed, select the longest, and return the number found @@ -201,7 +201,7 @@ diff -ur icu.org/source/common/dictbe.cpp icu/source/common/dictbe.cpp // Select the currently marked candidate, point after it in the text, and invalidate self int32_t acceptMarked( UText *text ); -@@ -129,12 +304,12 @@ +@@ -131,12 +306,12 @@ }; @@ -216,7 +216,7 @@ diff -ur icu.org/source/common/dictbe.cpp icu/source/common/dictbe.cpp // Dictionary leaves text after longest prefix, not longest word. Back up. if (count <= 0) { utext_setNativeIndex(text, start); -@@ -803,53 +978,30 @@ +@@ -808,53 +983,30 @@ * KhmerBreakEngine */ @@ -282,22 +282,13 @@ diff -ur icu.org/source/common/dictbe.cpp icu/source/common/dictbe.cpp UTRACE_EXIT_STATUS(status); } -@@ -862,176 +1014,204 @@ - int32_t rangeStart, - int32_t rangeEnd, - UVector32 &foundBreaks ) const { +@@ -869,175 +1021,204 @@ + UVector32 &foundBreaks, + UErrorCode& status ) const { + if (U_FAILURE(status)) return 0; - if ((rangeEnd - rangeStart) < KHMER_MIN_WORD_SPAN) { - return 0; // Not enough characters for two words -- } -- -- uint32_t wordsFound = 0; -- int32_t cpWordLength = 0; -- int32_t cuWordLength = 0; -- int32_t current; + uint32_t wordsFound = foundBreaks.size(); - UErrorCode status = U_ZERO_ERROR; -- PossibleWord words[KHMER_LOOKAHEAD]; -- + int32_t before = 0; + int32_t after = 0; + int32_t finalBefore = 0; @@ -312,7 +303,14 @@ diff -ur icu.org/source/common/dictbe.cpp icu/source/common/dictbe.cpp + if (rangeStart > 0) { + --scanStart; + startZwsp = scanBeforeStart(text, scanStart, breakStart); -+ } + } +- +- uint32_t wordsFound = 0; +- int32_t cpWordLength = 0; +- int32_t cuWordLength = 0; +- int32_t current; +- PossibleWord words[KHMER_LOOKAHEAD]; +- utext_setNativeIndex(text, rangeStart); + scanFwdClusters(text, rangeEnd, initAfter); + bool endZwsp = scanAfterEnd(text, utext_nativeLength(text), scanEnd, breakEnd); @@ -628,15 +626,15 @@ diff -ur icu.org/source/common/dictbe.cpp icu/source/common/dictbe.cpp (void) foundBreaks.popi(); - wordsFound -= 1; } -- + - return wordsFound; + return foundBreaks.size() - wordsFound; } #if !UCONFIG_NO_NORMALIZATION diff -ur icu.org/source/common/dictbe.h icu/source/common/dictbe.h ---- icu.org/source/common/dictbe.h 2021-04-08 02:10:27.000000000 +0200 -+++ icu/source/common/dictbe.h 2021-05-11 22:37:49.753857647 +0200 +--- icu.org/source/common/dictbe.h 2021-10-28 18:04:57.000000000 +0200 ++++ icu/source/common/dictbe.h 2021-11-15 20:41:53.052317579 +0100 @@ -34,7 +34,8 @@ * threads without synchronization.</p> */ @@ -733,28 +731,25 @@ diff -ur icu.org/source/common/dictbe.h icu/source/common/dictbe.h * <p>Virtual destructor.</p> */ virtual ~DictionaryBreakEngine(); -@@ -293,11 +364,13 @@ - */ - - UnicodeSet fKhmerWordSet; -- UnicodeSet fEndWordSet; -- UnicodeSet fBeginWordSet; -- UnicodeSet fMarkSet; -- DictionaryMatcher *fDictionary; -- -+ UnicodeSet fBeginWordSet; +@@ -303,10 +374,12 @@ + */ + + UnicodeSet fKhmerWordSet; +- UnicodeSet fEndWordSet; + UnicodeSet fBeginWordSet; +- UnicodeSet fMarkSet; +- DictionaryMatcher *fDictionary; + UnicodeSet fPuncSet; + DictionaryMatcher *fDictionary; + + const uint32_t BADSNLP = 256 * 20; + const uint32_t kuint32max = 0x7FFFFFFF; -+ - public: - - /** + + public: + diff -ur icu.org/source/common/dictionarydata.cpp icu/source/common/dictionarydata.cpp ---- icu.org/source/common/dictionarydata.cpp 2021-04-08 02:10:27.000000000 +0200 -+++ icu/source/common/dictionarydata.cpp 2021-05-11 22:37:49.754857645 +0200 +--- icu.org/source/common/dictionarydata.cpp 2021-10-28 18:04:57.000000000 +0200 ++++ icu/source/common/dictionarydata.cpp 2021-11-15 19:25:00.583694898 +0100 @@ -44,7 +44,7 @@ int32_t UCharsDictionaryMatcher::matches(UText *text, int32_t maxLength, int32_t limit, @@ -802,8 +797,8 @@ diff -ur icu.org/source/common/dictionarydata.cpp icu/source/common/dictionaryda if (values != NULL) { values[wordCount] = bt.getValue(); diff -ur icu.org/source/common/dictionarydata.h icu/source/common/dictionarydata.h ---- icu.org/source/common/dictionarydata.h 2021-04-08 02:10:27.000000000 +0200 -+++ icu/source/common/dictionarydata.h 2021-05-11 22:37:49.754857645 +0200 +--- icu.org/source/common/dictionarydata.h 2021-10-28 18:04:57.000000000 +0200 ++++ icu/source/common/dictionarydata.h 2021-11-15 20:44:34.484790590 +0100 @@ -21,6 +21,7 @@ #include "unicode/utext.h" #include "unicode/udata.h" @@ -825,17 +820,17 @@ diff -ur icu.org/source/common/dictionarydata.h icu/source/common/dictionarydata virtual ~UCharsDictionaryMatcher(); virtual int32_t matches(UText *text, int32_t maxLength, int32_t limit, int32_t *lengths, int32_t *cpLengths, int32_t *values, -- int32_t *prefix) const; -+ int32_t *prefix, UnicodeSet const* ignoreSet = NULL, int32_t minLength = 0) const; - virtual int32_t getType() const; +- int32_t *prefix) const override; ++ int32_t *prefix, UnicodeSet const* ignoreSet = NULL, int32_t minLength = 0) const override; + virtual int32_t getType() const override; private: const UChar *characters; @@ -125,7 +126,7 @@ virtual ~BytesDictionaryMatcher(); virtual int32_t matches(UText *text, int32_t maxLength, int32_t limit, int32_t *lengths, int32_t *cpLengths, int32_t *values, -- int32_t *prefix) const; -+ int32_t *prefix, UnicodeSet const* ignoreSet = NULL, int32_t minLength = 0) const; - virtual int32_t getType() const; +- int32_t *prefix) const override; ++ int32_t *prefix, UnicodeSet const* ignoreSet = NULL, int32_t minLength = 0) const override; + virtual int32_t getType() const override; private: UChar32 transform(UChar32 c) const; |