Bug 1405993 - Part 2: Remove no longer used ICU patches. r=Waldo
authorAndré Bargull <andre.bargull@gmail.com>
Wed, 01 Nov 2017 11:48:48 -0700
changeset 391987 d6daf71433d29c79dd89b8251d647826b45fab65
parent 391986 53015dab607555789926343c75a478f10337df0b
child 391988 00c94696d5a37d1f1a9856a34c386ecb89bbeab0
push id32909
push usercbrindusan@mozilla.com
push dateWed, 15 Nov 2017 22:25:14 +0000
treeherdermozilla-central@f41930a869a8 [default view] [failures only]
perfherder[talos] [build metrics] [platform microbench] (compared to previous push)
reviewersWaldo
bugs1405993
milestone59.0a1
first release with
nightly linux32
nightly linux64
nightly mac
nightly win32
nightly win64
last release without
nightly linux32
nightly linux64
nightly mac
nightly win32
nightly win64
Bug 1405993 - Part 2: Remove no longer used ICU patches. r=Waldo
intl/icu-patches/bug-1373763-convertToPosix-stack-value-out-of-scope.diff
intl/icu-patches/bug-1380083
intl/icu-patches/bug-1387476-timezone-detection.diff
intl/icu-patches/bug-1387937.diff
intl/icu-patches/u_setMemoryFunctions-callconvention-anachronism-msvc.diff
intl/update-icu.sh
deleted file mode 100644
--- a/intl/icu-patches/bug-1373763-convertToPosix-stack-value-out-of-scope.diff
+++ /dev/null
@@ -1,34 +0,0 @@
-Move the stack allocated buffer to the top-level, so its value can be accessed after the if-statement.
-
-https://ssl.icu-project.org/trac/ticket/13263
-
-diff --git a/intl/icu/source/common/locmap.cpp b/intl/icu/source/common/locmap.cpp
---- a/intl/icu/source/common/locmap.cpp
-+++ b/intl/icu/source/common/locmap.cpp
-@@ -1028,24 +1028,25 @@ U_CAPI int32_t
- uprv_convertToPosix(uint32_t hostid, char *posixID, int32_t posixIDCapacity, UErrorCode* status)
- {
-     uint16_t langID;
-     uint32_t localeIndex;
-     UBool bLookup = TRUE;
-     const char *pPosixID = NULL;
- 
- #ifdef USE_WINDOWS_LCID_MAPPING_API
-+    char locName[LOCALE_NAME_MAX_LENGTH] = {};      // ICU name can't be longer than Windows name
-+
-     // Note: Windows primary lang ID 0x92 in LCID is used for Central Kurdish and
-     // GetLocaleInfo() maps such LCID to "ku". However, CLDR uses "ku" for
-     // Northern Kurdish and "ckb" for Central Kurdish. For this reason, we cannot
-     // use the Windows API to resolve locale ID for this specific case.
-     if ((hostid & 0x3FF) != 0x92) {
-         int32_t tmpLen = 0;
-         UChar windowsLocaleName[LOCALE_NAME_MAX_LENGTH];  // ULOC_FULLNAME_CAPACITY > LOCALE_NAME_MAX_LENGTH
--        char locName[LOCALE_NAME_MAX_LENGTH];             // ICU name can't be longer than Windows name
- 
-         // Note: LOCALE_ALLOW_NEUTRAL_NAMES was enabled in Windows7+, prior versions did not handle neutral (no-region) locale names.
-         tmpLen = LCIDToLocaleName(hostid, (PWSTR)windowsLocaleName, UPRV_LENGTHOF(windowsLocaleName), LOCALE_ALLOW_NEUTRAL_NAMES);
-         if (tmpLen > 1) {
-             int32_t i = 0;
-             // Only need to look up in table if have _, eg for de-de_phoneb type alternate sort.
-             bLookup = FALSE;
-             for (i = 0; i < UPRV_LENGTHOF(locName); i++)
deleted file mode 100644
--- a/intl/icu-patches/bug-1380083
+++ /dev/null
@@ -1,34 +0,0 @@
-Bug 1380083 Change backslaches to forward slashes. Upstream: http://bugs.icu-project.org/trac/changeset/40102
-
-diff --git a/intl/icu/source/common/putil.cpp b/intl/icu/source/common/putil.cpp
---- a/intl/icu/source/common/putil.cpp
-+++ b/intl/icu/source/common/putil.cpp
-@@ -96,25 +96,25 @@
- #   define WIN32_LEAN_AND_MEAN
- #endif
- #   define VC_EXTRALEAN
- #   define NOUSER
- #   define NOSERVICE
- #   define NOIME
- #   define NOMCX
- #   include <windows.h>
--#   include "unicode\uloc.h"
-+#   include "unicode/uloc.h"
- #if U_PLATFORM_HAS_WINUWP_API == 0
- #   include "wintz.h"
- #else // U_PLATFORM_HAS_WINUWP_API
- typedef PVOID LPMSG; // TODO: figure out how to get rid of this typedef
- #include <Windows.Globalization.h>
- #include <windows.system.userprofile.h>
--#include <wrl\wrappers\corewrappers.h>
--#include <wrl\client.h>
-+#include <wrl/wrappers/corewrappers.h>
-+#include <wrl/client.h>
-
- using namespace ABI::Windows::Foundation;
- using namespace Microsoft::WRL;
- using namespace Microsoft::WRL::Wrappers;
- #endif
- #elif U_PLATFORM == U_PF_OS400
- #   include <float.h>
- #   include <qusec.h>       /* error code structure */
\ No newline at end of file
deleted file mode 100644
--- a/intl/icu-patches/bug-1387476-timezone-detection.diff
+++ /dev/null
@@ -1,67 +0,0 @@
-Update time detection for newer Linux distros and macOS 10.13
-
-https://ssl.icu-project.org/trac/ticket/12770
-https://ssl.icu-project.org/trac/changeset/40427
-https://ssl.icu-project.org/trac/changeset/40432
-https://ssl.icu-project.org/trac/changeset?old=40300&old_path=trunk%2Ficu4c%2Fsource%2Fcommon%2Fputil.cpp&new_path=trunk%2Ficu4c%2Fsource%2Fcommon%2Fputil.cpp&new=40432
-
-Index: /intl/icu/source/common/putil.cpp
-===================================================================
---- /intl/icu/source/common/putil.cpp	(revision 40300)
-+++ /intl/icu/source/common/putil.cpp	(revision 40432)
-@@ -676,4 +676,14 @@
- #if !UCONFIG_NO_FILE_IO && ((U_PLATFORM_IS_DARWIN_BASED && (U_PLATFORM != U_PF_IPHONE || defined(U_TIMEZONE))) || U_PLATFORM_IS_LINUX_BASED || U_PLATFORM == U_PF_BSD || U_PLATFORM == U_PF_SOLARIS)
- /* These platforms are likely to use Olson timezone IDs. */
-+/* common targets of the symbolic link at TZDEFAULT are:
-+ * "/usr/share/zoneinfo/<olsonID>" default, older Linus distros, macOS to 10.12
-+ * "../usr/share/zoneinfo/<olsonID>" newer Linux distros: Red Hat Enterprise Linux 7, Ubuntu, SuSe Linux
-+ * "/usr/share/lib/zoneinfo/<olsonID>" Solaris
-+ * "../usr/share/lib/zoneinfo/<olsonID>" Solaris
-+ * "/var/db/timezone/zoneinfo/<olsonID>" macOS 10.13
-+ * To avoid checking lots of paths, just check that the target path
-+ * before the <olsonID> ends with "/zoneinfo/", and the <olsonID> is valid.
-+ */
-+
- #define CHECK_LOCALTIME_LINK 1
- #if U_PLATFORM_IS_DARWIN_BASED
-@@ -683,5 +693,4 @@
- #define TZDEFAULT       "/etc/localtime"
- #define TZZONEINFO      "/usr/share/lib/zoneinfo/"
--#define TZZONEINFO2     "../usr/share/lib/zoneinfo/"
- #define TZ_ENV_CHECK    "localtime"
- #else
-@@ -689,4 +698,5 @@
- #define TZZONEINFO      "/usr/share/zoneinfo/"
- #endif
-+#define TZZONEINFOTAIL  "/zoneinfo/"
- #if U_HAVE_DIRENT_H
- #define TZFILE_SKIP     "posixrules" /* tz file to skip when searching. */
-@@ -1132,22 +1142,13 @@
-         int32_t ret = (int32_t)readlink(TZDEFAULT, gTimeZoneBuffer, sizeof(gTimeZoneBuffer)-1);
-         if (0 < ret) {
--            int32_t tzZoneInfoLen = uprv_strlen(TZZONEINFO);
-+            int32_t tzZoneInfoTailLen = uprv_strlen(TZZONEINFOTAIL);
-             gTimeZoneBuffer[ret] = 0;
--            if (uprv_strncmp(gTimeZoneBuffer, TZZONEINFO, tzZoneInfoLen) == 0
--                && isValidOlsonID(gTimeZoneBuffer + tzZoneInfoLen))
-+            char *  tzZoneInfoTailPtr = uprv_strstr(gTimeZoneBuffer, TZZONEINFOTAIL);
-+            
-+            if (tzZoneInfoTailPtr != NULL
-+                && isValidOlsonID(tzZoneInfoTailPtr + tzZoneInfoTailLen))
-             {
--                return (gTimeZoneBufferPtr = gTimeZoneBuffer + tzZoneInfoLen);
-+                return (gTimeZoneBufferPtr = tzZoneInfoTailPtr + tzZoneInfoTailLen);
-             }
--#if U_PLATFORM == U_PF_SOLARIS
--            else
--            {
--                tzZoneInfoLen = uprv_strlen(TZZONEINFO2);
--                if (uprv_strncmp(gTimeZoneBuffer, TZZONEINFO2, tzZoneInfoLen) == 0
--                                && isValidOlsonID(gTimeZoneBuffer + tzZoneInfoLen))
--                {
--                    return (gTimeZoneBufferPtr = gTimeZoneBuffer + tzZoneInfoLen);
--                }
--            }
--#endif
-         } else {
- #if defined(SEARCH_TZFILE)
deleted file mode 100644
--- a/intl/icu-patches/bug-1387937.diff
+++ /dev/null
@@ -1,23 +0,0 @@
-Bug 1387937 - Import changeset 40324.
-
-diff --git a/intl/icu/source/i18n/zonemeta.cpp b/intl/icu/source/i18n/zonemeta.cpp
---- a/intl/icu/source/i18n/zonemeta.cpp
-+++ b/intl/icu/source/i18n/zonemeta.cpp
-@@ -685,17 +685,16 @@ ZoneMeta::createMetazoneMappings(const U
-                 entry->mzid = mz_name;
-                 entry->from = from;
-                 entry->to = to;
- 
-                 if (mzMappings == NULL) {
-                     mzMappings = new UVector(deleteOlsonToMetaMappingEntry, NULL, status);
-                     if (U_FAILURE(status)) {
-                         delete mzMappings;
--                        deleteOlsonToMetaMappingEntry(entry);
-                         uprv_free(entry);
-                         break;
-                     }
-                 }
- 
-                 mzMappings->addElement(entry, status);
-                 if (U_FAILURE(status)) {
-                     break;
deleted file mode 100644
--- a/intl/icu-patches/u_setMemoryFunctions-callconvention-anachronism-msvc.diff
+++ /dev/null
@@ -1,33 +0,0 @@
-Don't annotate function parameters with call-convention modifier to work around a MSVC compiler warning.
-
-https://ssl.icu-project.org/trac/ticket/13030
-
-diff --git a/intl/icu/source/common/unicode/uclean.h b/intl/icu/source/common/unicode/uclean.h
---- a/intl/icu/source/common/unicode/uclean.h
-+++ b/intl/icu/source/common/unicode/uclean.h
-@@ -143,19 +143,25 @@ typedef void  U_CALLCONV UMemFreeFn (con
-  *                 are called.
-  *  @param a       Pointer to a user-supplied malloc function.
-  *  @param r       Pointer to a user-supplied realloc function.
-  *  @param f       Pointer to a user-supplied free function.
-  *  @param status  Receives error values.
-  *  @stable ICU 2.8
-  *  @system
-  */  
-+#ifndef _MSC_VER
- U_STABLE void U_EXPORT2 
- u_setMemoryFunctions(const void *context, UMemAllocFn * U_CALLCONV a, UMemReallocFn * U_CALLCONV r, UMemFreeFn * U_CALLCONV f, 
-                     UErrorCode *status);
-+#else
-+U_STABLE void U_EXPORT2 
-+u_setMemoryFunctions(const void *context, UMemAllocFn * a, UMemReallocFn * r, UMemFreeFn * f, 
-+                    UErrorCode *status);
-+#endif
- 
- U_CDECL_END
- 
- #ifndef U_HIDE_DEPRECATED_API
- /*********************************************************************************
-  *
-  * Deprecated Functions
-  *
--- a/intl/update-icu.sh
+++ b/intl/update-icu.sh
@@ -65,21 +65,16 @@ find ${icu_dir}/source/data/zone \
 # the tree.)
 svn info $1 | grep -v '^Revision: [[:digit:]]\+$' > ${icu_dir}/SVN-INFO
 
 for patch in \
  bug-915735 \
  suppress-warnings.diff \
  bug-1172609-timezone-recreateDefault.diff \
  bug-1198952-workaround-make-3.82-bug.diff \
- u_setMemoryFunctions-callconvention-anachronism-msvc.diff \
- bug-1373763-convertToPosix-stack-value-out-of-scope.diff \
- bug-1380083 \
- bug-1387937.diff \
- bug-1387476-timezone-detection.diff \
 ; do
   echo "Applying local patch $patch"
   patch -d ${icu_dir}/../../ -p1 --no-backup-if-mismatch < ${icu_dir}/../icu-patches/$patch
 done
 
 topsrcdir=`dirname $0`/../
 python ${topsrcdir}/js/src/tests/ecma_6/String/make-normalize-generateddata-input.py $topsrcdir