summaryrefslogtreecommitdiff
path: root/external/icu
diff options
context:
space:
mode:
authorCaolán McNamara <caolanm@redhat.com>2014-12-19 11:04:49 +0000
committerCaolán McNamara <caolanm@redhat.com>2014-12-19 13:02:53 +0000
commitf9d3e0f57c173494d250aadd0022abb738634f43 (patch)
tree301b27459d69f04ead997d98ba90270418158c72 /external/icu
parent28ff5d52c33e240f5afb2ab1547abe88f4ba7a4d (diff)
upgrade to icu 54
Change-Id: I4d32ac386ff8b69bee4319e673769917045d9450 Reviewed-on: https://gerrit.libreoffice.org/13547 Reviewed-by: Caolán McNamara <caolanm@redhat.com> Tested-by: Caolán McNamara <caolanm@redhat.com>
Diffstat (limited to 'external/icu')
-rw-r--r--external/icu/UnpackedTarball_icu.mk3
-rw-r--r--external/icu/icu-ubsan.patch.020
-rw-r--r--external/icu/icu4c-aix.patch9
-rw-r--r--external/icu/icu4c-buffer-overflow.patch30
-rw-r--r--external/icu/icu4c-build.patch43
-rw-r--r--external/icu/icu4c-icu11054.patch.144
-rw-r--r--external/icu/icu4c-icu11100.patch.12
-rw-r--r--external/icu/icu4c-icu11131.patch.168
-rw-r--r--external/icu/icu4c-mkdir.patch9
9 files changed, 30 insertions, 198 deletions
diff --git a/external/icu/UnpackedTarball_icu.mk b/external/icu/UnpackedTarball_icu.mk
index af9c7511e70b..e0d18b5d9ad0 100644
--- a/external/icu/UnpackedTarball_icu.mk
+++ b/external/icu/UnpackedTarball_icu.mk
@@ -19,12 +19,9 @@ $(eval $(call gb_UnpackedTarball_add_patches,icu,\
external/icu/icu4c-macosx.patch \
external/icu/icu4c-solarisgcc.patch \
external/icu/icu4c-mkdir.patch \
- external/icu/icu4c-buffer-overflow.patch \
external/icu/icu4c-$(if $(filter ANDROID,$(OS)),android,rpath).patch \
external/icu/icu-ubsan.patch.0 \
- external/icu/icu4c-icu11054.patch.1 \
external/icu/icu4c-icu11100.patch.1 \
- external/icu/icu4c-icu11131.patch.1 \
external/icu/icu4c-scriptrun.patch \
external/icu/icu4c-icu11451.patch.1 \
))
diff --git a/external/icu/icu-ubsan.patch.0 b/external/icu/icu-ubsan.patch.0
index 479007beabdc..c6baaede4b4e 100644
--- a/external/icu/icu-ubsan.patch.0
+++ b/external/icu/icu-ubsan.patch.0
@@ -138,23 +138,3 @@
}
/* INTERNAL: compares two entries */
---- source/common/ustring.cpp
-+++ source/common/ustring.cpp
-@@ -1486,7 +1486,7 @@
- */
-
- #define STRING_HASH(TYPE, STR, STRLEN, DEREF) \
-- int32_t hash = 0; \
-+ uint32_t hash = 0; \
- const TYPE *p = (const TYPE*) STR; \
- if (p != NULL) { \
- int32_t len = (int32_t)(STRLEN); \
-@@ -1497,7 +1497,7 @@
- p += inc; \
- } \
- } \
-- return hash
-+ return static_cast<int32_t>(hash)
-
- /* Used by UnicodeString to compute its hashcode - Not public API. */
- U_CAPI int32_t U_EXPORT2
diff --git a/external/icu/icu4c-aix.patch b/external/icu/icu4c-aix.patch
index 580a8fc8e004..f4a449f9b423 100644
--- a/external/icu/icu4c-aix.patch
+++ b/external/icu/icu4c-aix.patch
@@ -114,16 +114,16 @@
## BIR - bind with internal references [so app data and icu data doesn't collide]
--- misc/icu/source/tools/pkgdata/pkgdata.cpp 2013-04-06 20:56:00.935656635 +0100
+++ misc/build/icu/source/tools/pkgdata/pkgdata.cpp 2013-10-31 20:38:10.623984554 +0700
-@@ -888,7 +888,7 @@
+@@ -902,7 +902,7 @@
uprv_strcat(pkgDataFlags[SO_EXT], ".");
uprv_strcat(pkgDataFlags[SO_EXT], pkgDataFlags[A_EXT]);
-#elif U_PLATFORM == U_PF_OS400 || defined(_AIX)
+#elif U_PLATFORM == U_PF_OS400
- sprintf(libFileNames[LIB_FILE_VERSION_TMP], "%s.%s",
+ sprintf(libFileNames[LIB_FILE_VERSION_TMP], "%s%s%s",
libFileNames[LIB_FILE],
- pkgDataFlags[SOBJ_EXT]);
-@@ -1302,15 +1302,6 @@
+ FILE_EXTENSION_SEP,
+@@ -1375,15 +1375,6 @@
pkgDataFlags[LDICUDTFLAGS],
targetDir,
libFileNames[LIB_FILE_CYGWIN_VERSION],
@@ -139,4 +139,3 @@
#else
sprintf(cmd, "%s %s -o %s%s %s %s%s %s %s",
pkgDataFlags[GENLIB],
-
diff --git a/external/icu/icu4c-buffer-overflow.patch b/external/icu/icu4c-buffer-overflow.patch
deleted file mode 100644
index fb5f8abbaa58..000000000000
--- a/external/icu/icu4c-buffer-overflow.patch
+++ /dev/null
@@ -1,30 +0,0 @@
-I: Statement might be overflowing a buffer in strncat. Common mistake:
- BAD: strncat(buffer,charptr,sizeof(buffer)) is wrong, it takes the left over size as 3rd argument
- GOOD: strncat(buffer,charptr,sizeof(buffer)-strlen(buffer)-1)
-E: icu bufferoverflowstrncat pkgdata.cpp:299:87
-
----
- source/tools/pkgdata/pkgdata.cpp | 6 +++---
- 1 file changed, 3 insertions(+), 3 deletions(-)
-
-Index: icu/source/tools/pkgdata/pkgdata.cpp
-===================================================================
---- build/icu.orig/source/tools/pkgdata/pkgdata.cpp
-+++ build/icu/source/tools/pkgdata/pkgdata.cpp
-@@ -2060,12 +2060,12 @@
- const char cmd[] = "icu-config --incpkgdatafile";
-
- /* #1 try the same path where pkgdata was called from. */
-- findDirname(progname, cmdBuf, 1024, &status);
-+ findDirname(progname, cmdBuf, sizeof(cmdBuf), &status);
- if(U_SUCCESS(status)) {
- if (cmdBuf[0] != 0) {
-- uprv_strncat(cmdBuf, U_FILE_SEP_STRING, 1024);
-+ uprv_strncat(cmdBuf, U_FILE_SEP_STRING, sizeof(cmdBuf)-1-strlen(cmdBuf));
- }
-- uprv_strncat(cmdBuf, cmd, 1023);
-+ uprv_strncat(cmdBuf, cmd, sizeof(cmdBuf)-1-strlen(cmdBuf));
-
- if(verbose) {
- fprintf(stdout, "# Calling icu-config: %s\n", cmdBuf);
-
diff --git a/external/icu/icu4c-build.patch b/external/icu/icu4c-build.patch
index 8f4a7eefcff2..1f6010b4c9d2 100644
--- a/external/icu/icu4c-build.patch
+++ b/external/icu/icu4c-build.patch
@@ -16,31 +16,30 @@
".long ","",HEX_0X
},
+ {"gcc-android-arm",
-+ "\t.arch armv5te\n"
-+ "\t.fpu softvfp\n"
-+ "\t.eabi_attribute 20, 1\n"
-+ "\t.eabi_attribute 21, 1\n"
-+ "\t.eabi_attribute 23, 3\n"
-+ "\t.eabi_attribute 24, 1\n"
-+ "\t.eabi_attribute 25, 1\n"
-+ "\t.eabi_attribute 26, 2\n"
-+ "\t.eabi_attribute 30, 6\n"
-+ "\t.eabi_attribute 18, 4\n"
-+ "\t.file \"%s.s\"\n"
-+ "\t.global %s\n"
-+ "\t.section .rodata\n"
-+ "\t.align 2\n"
-+ "\t.type %s, %%object\n"
-+ "%s:\n",
++ "\t.arch armv5te\n"
++ "\t.fpu softvfp\n"
++ "\t.eabi_attribute 20, 1\n"
++ "\t.eabi_attribute 21, 1\n"
++ "\t.eabi_attribute 23, 3\n"
++ "\t.eabi_attribute 24, 1\n"
++ "\t.eabi_attribute 25, 1\n"
++ "\t.eabi_attribute 26, 2\n"
++ "\t.eabi_attribute 30, 6\n"
++ "\t.eabi_attribute 18, 4\n"
++ "\t.file \"%s.s\"\n"
++ "\t.global %s\n"
++ "\t.section .rodata\n"
++ "\t.align 2\n"
++ "\t.type %s, %%object\n"
++ "%s:\n",
+
-+ "\t.word ",
-+ "\t.section .note.GNU-stack,\"\",%%progbits\n",
-+ HEX_0X
++ "\t.word ",
++ "\t.section .note.GNU-stack,\"\",%%progbits\n",
++ HEX_0X
+ },
- // 16 bytes alignment.
- // http://docs.oracle.com/cd/E19641-01/802-1947/802-1947.pdf
+ /* 16 bytes alignment. */
+ /* http://docs.oracle.com/cd/E19641-01/802-1947/802-1947.pdf */
{"sun",
-
--- misc/icu/source/config/mh-darwin 2010-09-29 20:37:36.000000000 +0200
+++ misc/build/icu/source/config/mh-darwin 2011-03-15 10:56:26.653056004 +0100
@@ -28,11 +28,7 @@
diff --git a/external/icu/icu4c-icu11054.patch.1 b/external/icu/icu4c-icu11054.patch.1
deleted file mode 100644
index 48d21f5507f5..000000000000
--- a/external/icu/icu4c-icu11054.patch.1
+++ /dev/null
@@ -1,44 +0,0 @@
---- icu/source/common/ubidi.c.orig 2014-08-09 20:54:39.338833533 +0100
-+++ icu/source/common/ubidi.c 2014-08-09 20:55:48.625469055 +0100
-@@ -679,10 +679,10 @@
- bd->isoRuns[0].contextPos=0;
- if(pBiDi->openingsMemory) {
- bd->openings=pBiDi->openingsMemory;
-- bd->openingsSize=pBiDi->openingsSize;
-+ bd->openingsCount=pBiDi->openingsSize / sizeof(Opening);
- } else {
- bd->openings=bd->simpleOpenings;
-- bd->openingsSize=SIMPLE_OPENINGS_SIZE;
-+ bd->openingsCount=SIMPLE_OPENINGS_SIZE;
- }
- bd->isNumbersSpecial=bd->pBiDi->reorderingMode==UBIDI_REORDER_NUMBERS_SPECIAL ||
- bd->pBiDi->reorderingMode==UBIDI_REORDER_INVERSE_FOR_NUMBERS_SPECIAL;
-@@ -743,7 +743,7 @@
- bracketAddOpening(BracketData *bd, UChar match, int32_t position) {
- IsoRun *pLastIsoRun=&bd->isoRuns[bd->isoRunLast];
- Opening *pOpening;
-- if(pLastIsoRun->limit>=bd->openingsSize) { /* no available new entry */
-+ if(pLastIsoRun->limit>=bd->openingsCount) { /* no available new entry */
- UBiDi *pBiDi=bd->pBiDi;
- if(!getInitialOpeningsMemory(pBiDi, pLastIsoRun->limit * 2))
- return FALSE;
-@@ -751,7 +751,7 @@
- uprv_memcpy(pBiDi->openingsMemory, bd->simpleOpenings,
- SIMPLE_OPENINGS_SIZE * sizeof(Opening));
- bd->openings=pBiDi->openingsMemory; /* may have changed */
-- bd->openingsSize=pBiDi->openingsSize;
-+ bd->openingsCount=pBiDi->openingsSize / sizeof(Opening);
- }
- pOpening=&bd->openings[pLastIsoRun->limit];
- pOpening->position=position;
---- icu/source/common/ubidiimp.h.orig 2014-08-09 20:55:15.053161192 +0100
-+++ icu/source/common/ubidiimp.h 2014-08-09 20:56:07.028637725 +0100
-@@ -173,7 +173,7 @@
- /* array of opening entries which should be enough in most cases; no malloc() */
- Opening simpleOpenings[SIMPLE_OPENINGS_SIZE];
- Opening *openings; /* pointer to current array of entries */
-- int32_t openingsSize; /* number of allocated entries */
-+ int32_t openingsCount; /* number of allocated entries */
- int32_t isoRunLast; /* index of last used entry */
- /* array of nested isolated sequence entries; can never excess UBIDI_MAX_EXPLICIT_LEVEL
- + 1 for index 0, + 1 for before the first isolated sequence */
diff --git a/external/icu/icu4c-icu11100.patch.1 b/external/icu/icu4c-icu11100.patch.1
index f63a79f41046..18bfe4f1c9c2 100644
--- a/external/icu/icu4c-icu11100.patch.1
+++ b/external/icu/icu4c-icu11100.patch.1
@@ -7,7 +7,7 @@
+static int
+isolatesavailable(UBiDi *pBiDi) {
+ if (pBiDi->isolates == pBiDi->simpleIsolates) {
-+ return pBiDi->isolateCount < SIMPLE_ISOLATES_SIZE-1;
++ return pBiDi->isolateCount < SIMPLE_ISOLATES_COUNT-1;
+ }
+ return pBiDi->isolateCount < pBiDi->isolatesSize/sizeof(Isolate)-1;
+}
diff --git a/external/icu/icu4c-icu11131.patch.1 b/external/icu/icu4c-icu11131.patch.1
deleted file mode 100644
index e9978aba7a8e..000000000000
--- a/external/icu/icu4c-icu11131.patch.1
+++ /dev/null
@@ -1,68 +0,0 @@
---- icu/source/i18n/smpdtfmt.cpp.orig 2014-08-27 10:29:29.849821672 +0530
-+++ icu/source/i18n/smpdtfmt.cpp 2014-08-27 10:29:49.323821401 +0530
-@@ -1082,6 +1082,7 @@
- }
- } else {
- status = U_MEMORY_ALLOCATION_ERROR;
-+ return;
- }
- }
- umtx_unlock(&LOCK);
---- icu/source/common/usprep.cpp.orig 2014-08-27 10:38:24.360821077 +0530
-+++ icu/source/common/usprep.cpp 2014-08-27 10:38:38.696821312 +0530
-@@ -796,16 +796,23 @@ usprep_prepare( const UStringPrepProfi
- }
-
- CLEANUP:
-- if(b1!=b1Stack){
-- uprv_free(b1);
-- b1=NULL;
-- }
--
-- if(b2!=b1Stack && b2!=b2Stack && b2!=b1 /* b1 should not be freed twice */){
-- uprv_free(b2);
-- b2=NULL;
-- }
-- return u_terminateUChars(dest, destCapacity, b2Len, status);
-+ if(b2==b1 && b1!=b1Stack){
-+ uprv_free(b1);
-+ b1=NULL;
-+ b2=NULL;
-+ }
-+ else
-+ {
-+ if(b1!=b1Stack){
-+ uprv_free(b1);
-+ b1=NULL;
-+ }
-+ if(b2!=b1Stack && b2!=b2Stack && b2!=b1 /* b1 should not be freed twice */){
-+ uprv_free(b2);
-+ b2=NULL;
-+ }
-+ }
-+ return u_terminateUChars(dest, destCapacity, b2Len, status);
- }
-
-
---- icu/source/common/ubidi.c.orig 2014-08-29 14:32:24.007259924 +0100
-+++ icu/source/common/ubidi.c 2014-08-29 14:33:21.555833532 +0100
-@@ -2521,11 +2521,18 @@
- pBiDi->trailingWSStart=saveTrailingWSStart;
- /* free memory for mapping table and visual text */
- uprv_free(runsOnlyMemory);
-+ runsOnlyMemory=NULL;
- if(pBiDi->runCount>1) {
- pBiDi->direction=UBIDI_MIXED;
- }
- cleanup3:
-- pBiDi->reorderingMode=UBIDI_REORDER_RUNS_ONLY;
-+ if(runsOnlyMemory != NULL)
-+ {
-+ pBiDi->reorderingMode=UBIDI_REORDER_RUNS_ONLY;
-+ uprv_free(runsOnlyMemory);
-+ }
-+ else
-+ pBiDi->reorderingMode=UBIDI_REORDER_RUNS_ONLY;
- }
-
- /* ubidi_setPara ------------------------------------------------------------ */
diff --git a/external/icu/icu4c-mkdir.patch b/external/icu/icu4c-mkdir.patch
index c9758a306464..094ddd5abca4 100644
--- a/external/icu/icu4c-mkdir.patch
+++ b/external/icu/icu4c-mkdir.patch
@@ -1,11 +1,10 @@
--- misc/icu/source/dataMakefile.in.sav 2012-04-05 22:49:20.000000000 +0200
+++ build/icu/source/data/Makefile.in 2012-12-04 14:24:40.548026700 +0100
-@@ -350,6 +350,7 @@
+@@ -363,6 +363,7 @@
ifeq ($(PKGDATA_MODE),dll)
SO_VERSION_DATA = $(OUTTMPDIR)/icudata.res
$(SO_VERSION_DATA) : $(MISCSRCDIR)/icudata.rc
+ mkdir -p $(OUTTMPDIR)
- rc.exe /i$(srcdir)/../common /i$(top_builddir)/common /fo$@ $(CPPFLAGS) $(SOURCE_FILE)
- endif
- endif
-
+ ifeq ($(MSYS_RC_MODE),1)
+ rc.exe -i$(srcdir)/../common -i$(top_builddir)/common -fo$@ $(CPPFLAGS) $<
+ else