diff options
author | Matt A. Tobin <mattatobin@localhost.localdomain> | 2018-02-02 04:16:08 -0500 |
---|---|---|
committer | Matt A. Tobin <mattatobin@localhost.localdomain> | 2018-02-02 04:16:08 -0500 |
commit | ad18d877ddd2a44d98fa12ccd3dbbcf4d0ac4299 (patch) | |
tree | 10027f336435511475e392454359edea8e25895d /intl/icu-patches | |
parent | 15477ed9af4859dacb069040b5d4de600803d3bc (diff) | |
download | uxp-ad18d877ddd2a44d98fa12ccd3dbbcf4d0ac4299.tar.gz |
Add m-esr52 at 52.6.0
Diffstat (limited to 'intl/icu-patches')
6 files changed, 360 insertions, 0 deletions
diff --git a/intl/icu-patches/bug-1172609-timezone-recreateDefault.diff b/intl/icu-patches/bug-1172609-timezone-recreateDefault.diff new file mode 100644 index 0000000000..132b14ff6d --- /dev/null +++ b/intl/icu-patches/bug-1172609-timezone-recreateDefault.diff @@ -0,0 +1,85 @@ +# Adds threadsafe recreateDefault() method to ICU::Timezone. + +diff --git a/intl/icu/source/i18n/timezone.cpp b/intl/icu/source/i18n/timezone.cpp +--- a/intl/icu/source/i18n/timezone.cpp ++++ b/intl/icu/source/i18n/timezone.cpp +@@ -108,16 +108,19 @@ static const UChar WORLD[] = {0x + static const UChar GMT_ID[] = {0x47, 0x4D, 0x54, 0x00}; /* "GMT" */ + static const UChar UNKNOWN_ZONE_ID[] = {0x45, 0x74, 0x63, 0x2F, 0x55, 0x6E, 0x6B, 0x6E, 0x6F, 0x77, 0x6E, 0x00}; /* "Etc/Unknown" */ + static const int32_t GMT_ID_LENGTH = 3; + static const int32_t UNKNOWN_ZONE_ID_LENGTH = 11; + + static icu::TimeZone* DEFAULT_ZONE = NULL; + static icu::UInitOnce gDefaultZoneInitOnce = U_INITONCE_INITIALIZER; + ++// Prevents DEFAULT_ZONE from being deleted while another thread is cloning it. ++static UMutex gDefaultZoneMutex = U_MUTEX_INITIALIZER; ++ + static icu::TimeZone* _GMT = NULL; + static icu::TimeZone* _UNKNOWN_ZONE = NULL; + static icu::UInitOnce gStaticZonesInitOnce = U_INITONCE_INITIALIZER; + + static char TZDATA_VERSION[16]; + static icu::UInitOnce gTZDataVersionInitOnce = U_INITONCE_INITIALIZER; + + static int32_t* MAP_SYSTEM_ZONES = NULL; +@@ -554,26 +557,36 @@ static void U_CALLCONV initDefault() + } + + // ------------------------------------- + + TimeZone* U_EXPORT2 + TimeZone::createDefault() + { + umtx_initOnce(gDefaultZoneInitOnce, initDefault); ++ ++ Mutex mutex_lock(&gDefaultZoneMutex); + return (DEFAULT_ZONE != NULL) ? DEFAULT_ZONE->clone() : NULL; + } + ++void ++TimeZone::recreateDefault() ++{ ++ TimeZone *default_zone = TimeZone::detectHostTimeZone(); ++ adoptDefault(default_zone); ++} ++ + // ------------------------------------- + + void U_EXPORT2 + TimeZone::adoptDefault(TimeZone* zone) + { + if (zone != NULL) + { ++ Mutex mutex_lock(&gDefaultZoneMutex); + TimeZone *old = DEFAULT_ZONE; + DEFAULT_ZONE = zone; + delete old; + ucln_i18n_registerCleanup(UCLN_I18N_TIMEZONE, timeZone_cleanup); + } + } + // ------------------------------------- + +diff --git a/intl/icu/source/i18n/unicode/timezone.h b/intl/icu/source/i18n/unicode/timezone.h +--- a/intl/icu/source/i18n/unicode/timezone.h ++++ b/intl/icu/source/i18n/unicode/timezone.h +@@ -299,16 +299,19 @@ public: + * and made the default. + * + * @return A default TimeZone. Clients are responsible for deleting the time zone + * object returned. + * @stable ICU 2.0 + */ + static TimeZone* U_EXPORT2 createDefault(void); + ++#define ICU_TZ_HAS_RECREATE_DEFAULT ++ static void U_EXPORT2 recreateDefault(); ++ + /** + * Sets the default time zone (i.e., what's returned by createDefault()) to be the + * specified time zone. If NULL is specified for the time zone, the default time + * zone is set to the default host time zone. This call adopts the TimeZone object + * passed in; the client is no longer responsible for deleting it. + * + * <p>This function is not thread safe. It is an error for multiple threads + * to concurrently attempt to set the default time zone, or for any thread diff --git a/intl/icu-patches/bug-1198952-workaround-make-3.82-bug.diff b/intl/icu-patches/bug-1198952-workaround-make-3.82-bug.diff new file mode 100644 index 0000000000..6f8ed3f330 --- /dev/null +++ b/intl/icu-patches/bug-1198952-workaround-make-3.82-bug.diff @@ -0,0 +1,38 @@ +diff --git a/intl/icu/source/Makefile.in b/intl/icu/source/Makefile.in +index 9db6c52..1b9a964 100644 +--- a/intl/icu/source/Makefile.in ++++ b/intl/icu/source/Makefile.in +@@ -134,28 +134,32 @@ endif + + LOCAL_SUBDIRS = $(SUBDIRS) + CLEAN_FIRST_SUBDIRS = $(TOOLS) + + $(LIBDIR) $(BINDIR): + -$(MKINSTALLDIRS) $@ + + ## Recursive targets ++## Strictly speaking, the $(MAKEOVERRIDES) is not necessary when recursing, but ++## there is a bug in GNU make 3.82 that throws away the original overrides in ++## favor of RECURSIVE=YES when the submake in the subdirectory restarts itself ++## after dependency files have been created. + all-recursive install-recursive clean-recursive distclean-recursive dist-recursive check-recursive check-exhaustive-recursive: $(LIBDIR) $(BINDIR) + @dot_seen=no; \ + target=`echo $@ | sed s/-recursive//`; \ + list='$(LOCAL_SUBDIRS)'; for subdir in $$list; do \ + echo "$(MAKE)[$(MAKELEVEL)]: Making \`$$target' in \`$$subdir'"; \ + if test "$$subdir" = "."; then \ + dot_seen=yes; \ + local_target="$$target-local"; \ + else \ + local_target="$$target"; \ + fi; \ +- (cd $$subdir && $(MAKE) RECURSIVE=YES $$local_target) || exit; \ ++ (cd $$subdir && $(MAKE) $(MAKEOVERRIDES) RECURSIVE=YES $$local_target) || exit; \ + done; \ + if test "$$dot_seen" = "no"; then \ + $(MAKE) "$$target-local" || exit; \ + fi + + clean-recursive-with-twist: + $(MAKE) clean-recursive LOCAL_SUBDIRS='$(CLEAN_FIRST_SUBDIRS) $(filter-out $(CLEAN_FIRST_SUBDIRS),$(LOCAL_SUBDIRS))' + diff --git a/intl/icu-patches/bug-1228227-bug-1263325-libc++-gcc_hidden.diff b/intl/icu-patches/bug-1228227-bug-1263325-libc++-gcc_hidden.diff new file mode 100644 index 0000000000..de47f07810 --- /dev/null +++ b/intl/icu-patches/bug-1228227-bug-1263325-libc++-gcc_hidden.diff @@ -0,0 +1,66 @@ +Limit libstdc++ workaround to not upset libc++ with pragma visibility. + +https://ssl.icu-project.org/trac/ticket/12023 + +diff --git a/intl/icu/source/common/unicode/std_string.h b/intl/icu/source/common/unicode/std_string.h +--- a/intl/icu/source/common/unicode/std_string.h ++++ b/intl/icu/source/common/unicode/std_string.h +@@ -24,16 +24,16 @@ + * \brief C++ API: Central ICU header for including the C++ standard <string> + * header and for related definitions. + */ + + #include "unicode/utypes.h" + + #if U_HAVE_STD_STRING + +-#if !defined(_MSC_VER) ++#if defined(__GLIBCXX__) + namespace std { class type_info; } // WORKAROUND: http://llvm.org/bugs/show_bug.cgi?id=13364 + #endif + #include <string> + + #endif // U_HAVE_STD_STRING + + #endif // __STD_STRING_H__ +diff --git a/intl/icu/source/common/utypeinfo.h b/intl/icu/source/common/utypeinfo.h +--- a/intl/icu/source/common/utypeinfo.h ++++ b/intl/icu/source/common/utypeinfo.h +@@ -19,14 +19,14 @@ + // Whenever 'typeid' is used, this header has to be included + // instead of <typeinfo>. + // Visual Studio 10 emits warning 4275 with this change. If you compile + // with exception disabled, you have to suppress warning 4275. + #if defined(_MSC_VER) && _HAS_EXCEPTIONS == 0 + #include <exception> + using std::exception; + #endif +-#if !defined(_MSC_VER) ++#if defined(__GLIBCXX__) + namespace std { class type_info; } // WORKAROUND: http://llvm.org/bugs/show_bug.cgi?id=13364 + #endif + #include <typeinfo> // for 'typeid' to work + + #endif +diff --git a/intl/icu/source/io/unicode/ustream.h b/intl/icu/source/io/unicode/ustream.h +--- a/intl/icu/source/io/unicode/ustream.h ++++ b/intl/icu/source/io/unicode/ustream.h +@@ -25,17 +25,17 @@ + * \file + * \brief C++ API: Unicode iostream like API + * + * At this time, this API is very limited. It contains + * operator<< and operator>> for UnicodeString manipulation with the + * C++ I/O stream API. + */ + +-#if !defined(_MSC_VER) ++#if defined(__GLIBCXX__) + namespace std { class type_info; } // WORKAROUND: http://llvm.org/bugs/show_bug.cgi?id=13364 + #endif + + #if U_IOSTREAM_SOURCE >= 199711 + #if (__GNUC__ == 2) + #include <iostream> + #else + #include <istream> diff --git a/intl/icu-patches/bug-915735 b/intl/icu-patches/bug-915735 new file mode 100644 index 0000000000..5308207760 --- /dev/null +++ b/intl/icu-patches/bug-915735 @@ -0,0 +1,29 @@ +Bug 915735 - Fix linking the ICU libraries on Mac + +diff --git a/intl/icu/source/config/mh-darwin b/intl/icu/source/config/mh-darwin +index 97d6bfc..fe1490e 100644 +--- a/intl/icu/source/config/mh-darwin ++++ b/intl/icu/source/config/mh-darwin +@@ -23,21 +23,17 @@ ARFLAGS += -c + COMPILE.c= $(CC) $(DEFS) $(CPPFLAGS) $(CFLAGS) -fno-common -c + COMPILE.cc= $(CXX) $(DEFS) $(CPPFLAGS) $(CXXFLAGS) -fno-common -c + + ## Commands to make a shared library + SHLIB.c= $(CC) -dynamiclib -dynamic $(CFLAGS) $(LDFLAGS) $(LD_SOOPTIONS) + SHLIB.cc= $(CXX) -dynamiclib -dynamic $(CXXFLAGS) $(LDFLAGS) $(LD_SOOPTIONS) + + ## Compiler switches to embed a library name and version information +-ifeq ($(ENABLE_RPATH),YES) +-LD_SONAME = -Wl,-compatibility_version -Wl,$(SO_TARGET_VERSION_MAJOR) -Wl,-current_version -Wl,$(SO_TARGET_VERSION) -install_name $(libdir)/$(notdir $(MIDDLE_SO_TARGET)) +-else +-LD_SONAME = -Wl,-compatibility_version -Wl,$(SO_TARGET_VERSION_MAJOR) -Wl,-current_version -Wl,$(SO_TARGET_VERSION) -install_name $(notdir $(MIDDLE_SO_TARGET)) +-endif ++LD_SONAME = -Wl,-compatibility_version -Wl,$(SO_TARGET_VERSION_MAJOR) -Wl,-current_version -Wl,$(SO_TARGET_VERSION) -install_name @executable_path/$(notdir $(MIDDLE_SO_TARGET)) + + ## Compiler switch to embed a runtime search path + LD_RPATH= + LD_RPATH_PRE= -Wl,-rpath, + + ## Environment variable to set a runtime search path + LDLIBRARYPATH_ENVVAR = DYLD_LIBRARY_PATH + diff --git a/intl/icu-patches/suppress-warnings.diff b/intl/icu-patches/suppress-warnings.diff new file mode 100644 index 0000000000..28b0ac9d9e --- /dev/null +++ b/intl/icu-patches/suppress-warnings.diff @@ -0,0 +1,80 @@ +diff --git a/intl/icu/source/acinclude.m4 b/intl/icu/source/acinclude.m4 +--- a/intl/icu/source/acinclude.m4 ++++ b/intl/icu/source/acinclude.m4 +@@ -473,30 +473,36 @@ AC_DEFUN([AC_CHECK_STRICT_COMPILE], + *) + # Do not use -ansi. It limits us to C90, and it breaks some platforms. + # We use -std=c99 to disable the gnu99 defaults and its associated warnings + CFLAGS="$CFLAGS -std=c99" + ;; + esac + + CFLAGS="$CFLAGS -Wall -pedantic -Wshadow -Wpointer-arith -Wmissing-prototypes -Wwrite-strings" ++ ++ # Suppress clang C warnings: ++ CFLAGS="$CFLAGS -Wno-sign-compare -Wno-unused" + else + case "${host}" in + *-*-cygwin) + if test "`$CC /help 2>&1 | head -c9`" = "Microsoft" + then + CFLAGS="$CFLAGS /W4" + fi ;; + *-*-mingw*) + CFLAGS="$CFLAGS -W4" ;; + esac + fi + if test "$GXX" = yes + then + CXXFLAGS="$CXXFLAGS -W -Wall -pedantic -Wpointer-arith -Wwrite-strings -Wno-long-long" ++ ++ # Suppress clang C++ warnings: ++ CXXFLAGS="$CXXFLAGS -Wno-unused -Wno-unused-parameter" + else + case "${host}" in + *-*-cygwin) + if test "`$CXX /help 2>&1 | head -c9`" = "Microsoft" + then + CXXFLAGS="$CXXFLAGS /W4" + fi ;; + *-*-mingw*) +diff --git a/intl/icu/source/configure b/intl/icu/source/configure +--- a/intl/icu/source/configure ++++ b/intl/icu/source/configure +@@ -4319,30 +4319,36 @@ fi + *) + # Do not use -ansi. It limits us to C90, and it breaks some platforms. + # We use -std=c99 to disable the gnu99 defaults and its associated warnings + CFLAGS="$CFLAGS -std=c99" + ;; + esac + + CFLAGS="$CFLAGS -Wall -pedantic -Wshadow -Wpointer-arith -Wmissing-prototypes -Wwrite-strings" ++ ++ # Suppress clang C warnings: ++ CFLAGS="$CFLAGS -Wno-sign-compare -Wno-unused" + else + case "${host}" in + *-*-cygwin) + if test "`$CC /help 2>&1 | head -c9`" = "Microsoft" + then + CFLAGS="$CFLAGS /W4" + fi ;; + *-*-mingw*) + CFLAGS="$CFLAGS -W4" ;; + esac + fi + if test "$GXX" = yes + then + CXXFLAGS="$CXXFLAGS -W -Wall -pedantic -Wpointer-arith -Wwrite-strings -Wno-long-long" ++ ++ # Suppress clang C++ warnings: ++ CXXFLAGS="$CXXFLAGS -Wno-unused -Wno-unused-parameter" + else + case "${host}" in + *-*-cygwin) + if test "`$CXX /help 2>&1 | head -c9`" = "Microsoft" + then + CXXFLAGS="$CXXFLAGS /W4" + fi ;; + *-*-mingw*) diff --git a/intl/icu-patches/ucol_getKeywordValuesForLocale-ulist_resetList.diff b/intl/icu-patches/ucol_getKeywordValuesForLocale-ulist_resetList.diff new file mode 100644 index 0000000000..ebc4bd7d7f --- /dev/null +++ b/intl/icu-patches/ucol_getKeywordValuesForLocale-ulist_resetList.diff @@ -0,0 +1,62 @@ +https://ssl.icu-project.org/trac/ticket/12827 +https://ssl.icu-project.org/trac/changeset/39484 (Excluding test-related bits +because we remove the "test" directory before applying the ICU patches.) + +Index: /intl/icu/source/common/ulist.c +=================================================================== +--- /intl/icu/source/common/ulist.c (revision 39483) ++++ /intl/icu/source/common/ulist.c (revision 39484) +@@ -30,5 +30,4 @@ + + int32_t size; +- int32_t currentIndex; + }; + +@@ -52,5 +51,4 @@ + newList->tail = NULL; + newList->size = 0; +- newList->currentIndex = -1; + + return newList; +@@ -81,6 +79,7 @@ + p->next->previous = p->previous; + } +- list->curr = NULL; +- list->currentIndex = 0; ++ if (p == list->curr) { ++ list->curr = p->next; ++ } + --list->size; + if (p->forceDelete) { +@@ -151,5 +150,4 @@ + list->head->previous = newItem; + list->head = newItem; +- list->currentIndex++; + } + +@@ -194,5 +192,4 @@ + curr = list->curr; + list->curr = curr->next; +- list->currentIndex++; + + return curr->data; +@@ -210,5 +207,4 @@ + if (list != NULL) { + list->curr = list->head; +- list->currentIndex = 0; + } + } +@@ -273,3 +269,2 @@ + return (UList *)(en->context); + } +- +Index: /intl/icu/source/i18n/ucol_res.cpp +=================================================================== +--- /intl/icu/source/i18n/ucol_res.cpp (revision 39483) ++++ /intl/icu/source/i18n/ucol_res.cpp (revision 39484) +@@ -681,4 +681,5 @@ + } + memcpy(en, &defaultKeywordValues, sizeof(UEnumeration)); ++ ulist_resetList(sink.values); // Initialize the iterator. + en->context = sink.values; + sink.values = NULL; // Avoid deletion in the sink destructor. |