зеркало из https://github.com/mozilla/gecko-dev.git
Bug 1405993 - Part 2: Remove no longer used ICU patches. r=Waldo
--HG-- extra : rebase_source : ef32ed7d42c283997ae0dac0db274f35fb5431f5
This commit is contained in:
Родитель
a83f81a2c5
Коммит
db02e51a31
|
@ -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++)
|
|
@ -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 */
|
|
@ -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)
|
|
@ -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;
|
|
@ -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
|
||||
*
|
|
@ -70,11 +70,6 @@ for patch in \
|
|||
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
|
||||
|
|
Загрузка…
Ссылка в новой задаче