core.git: external/icu

2024-04-23 Thread Stephan Bergmann (via logerrit)
 external/icu/UnpackedTarball_icu.mk |1 +
 external/icu/no-python.patch|   11 +++
 2 files changed, 12 insertions(+)

New commits:
commit 5d8e29c94edeed564df4b68aed01f695d5ece070
Author: Stephan Bergmann 
AuthorDate: Mon Apr 22 22:02:28 2024 +0200
Commit: Stephan Bergmann 
CommitDate: Tue Apr 23 11:32:51 2024 +0200

external/icu: Drop hidden dependency on Python

...which was always satisfied directly from the system, regardless of our
--enable-python=... setting.  (And which was a problem for my Git Bash and 
WSL
based Windows build attempt, where it happened to find a dysfunctional 
Python
wrapper at C:/Users/steph/AppData/Local/Microsoft/WindowsApps/python3 which
caused a

[...]
> Not rebuilding data/rules.mk, assuming prebuilt data in data/in
> Spawning Python to generate test/testdata/rules.mk...
> Python was not found; run without arguments to install from the Microsoft 
Store, or disable this shortcut from Settings > Manage App Execution Aliases.
> configure: error: Python failed to run; see above error.

error when building ExternalProject_icu.)

There are three uses of that PYTHON setting across 
workdir/UnpackedTarget/icu:

1  In source/configure.ac to generate source/data/rules.mk if
source/data/locales/root.txt would exist---but which doesn't, so we don't
actually need PYTHON there.

2  In source/configure.ac to generate source/test/testdata/rules.mk, but 
which
our (non-check) build apparently doesn't need anyway.

3  In source/data/Makefile.in for target check-local, which is a sub-target 
of
check (which we don't build).

Change-Id: I7455cc91fc67f36582bf54851c07030830cd3b8d
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/166500
Reviewed-by: Stephan Bergmann 
Tested-by: Jenkins

diff --git a/external/icu/UnpackedTarball_icu.mk 
b/external/icu/UnpackedTarball_icu.mk
index 655614447d53..019bec6546ce 100644
--- a/external/icu/UnpackedTarball_icu.mk
+++ b/external/icu/UnpackedTarball_icu.mk
@@ -40,6 +40,7 @@ $(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/no-python.patch \
 ))
 
 $(eval $(call 
gb_UnpackedTarball_add_file,icu,source/data/brkitr/khmerdict.dict,external/icu/khmerdict.dict))
diff --git a/external/icu/no-python.patch b/external/icu/no-python.patch
new file mode 100644
index ..33960fcae321
--- /dev/null
+++ b/external/icu/no-python.patch
@@ -0,0 +1,11 @@
+--- source/configure.ac
 source/configure.ac
+@@ -202,7 +202,7 @@
+ m4_ifndef([AX_CHECK_COMPILE_FLAG], [AC_MSG_ERROR(['autoconf-archive' is 
missing])])
+ 
+ # TODO(ICU-20301): Remove fallback to Python 2.
+-AC_CHECK_PROGS(PYTHON, python3 "py -3" python "py")
++PYTHON=
+ AC_SUBST(PYTHON)
+ 
+ # Check for the platform make


[Libreoffice-commits] core.git: external/icu

2023-01-05 Thread Michael Weghorn (via logerrit)
 external/icu/ExternalProject_icu.mk |4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)

New commits:
commit 8ecc8ebf2b94615928449f431884525b605fbfa5
Author: Michael Weghorn 
AuthorDate: Wed Jan 4 16:23:16 2023 +0100
Commit: Michael Weghorn 
CommitDate: Thu Jan 5 09:26:59 2023 +

external/icu: Fix intermittent cross build failure

The ICU build for Android sometimes failed
as follows:

> ICU for C/C++ 72.1 is ready to be built.
> === Important Notes: ===
> Data Packaging: static
>  This means: ICU data will be stored in a static library.
>  To locate data: ICU will use the linked data library. If linked with the 
stub library located in stubdata/, the application can use 
udata_setCommonData() or set a data path to override.
> Building ICU: Use a GNU make such as /usr/bin/gmake to build ICU.
> checking the version of "/usr/bin/gmake"... gmake[2]: Entering directory 
'/home/michi/development/git/libreoffice-WORKTREE-for-android-x86/workdir/UnpackedTarball/icu/source'
> 4.3 (we wanted at least 3.80)
> gmake[2]: Leaving directory 
'/home/michi/development/git/libreoffice-WORKTREE-for-android-x86/workdir/UnpackedTarball/icu/source'
> ok
> ## Note: you have disabled ICU's tools. This ICU cannot build its own 
data or tests.
> ## Expect build failures in the 'data', 'test', and other directories.
> icudefs.mk:328: @cross_mixed_buildroot@/config/icucross.mk: No such file 
or directory
> make[2]: *** No rule to make target 
'@cross_mixed_buildroot@/config/icucross.mk'.  Stop.
> make[1]: *** 
[/home/michi/development/git/libreoffice-WORKTREE-for-android-x86/external/icu/ExternalProject_icu.mk:68:
 
/home/michi/development/git/libreoffice-WORKTREE-for-android-x86/workdir/ExternalProject/icu/build]
 Error 1
> make: *** [Makefile:289: build] Error 2

config.log showed that instead of the
`cross_mixed_buildroot` and `cross_unix_buildroot`
configure variables introduced instead of
`cross_buildroot` in

commit 7f16cabf00daa30e9284d2fb2494bd341352c25e
Date:   Thu Oct 1 11:20:50 2020 +0200

icu: fix Windows Cygwin cross build

, only the latter was set.

While that commit also added a call to autoconf
to update `configure` from the patched `configure.ac`,
autoconf would leave the old version in place if
the timestamp of `configure` was newer than that of
`configure.ac` after unpacking the tarball.

Call autoconf with the `-f` param to force the update.

Do the same for another autoconf invocation that was
added in

commit 6c94958e56fcbacb8e1f689550a60034b074857c
Date:   Fri Jul 17 22:25:01 2020 +0200

icu: fix Windows Arm64 build

Change-Id: I5685ebce13e2950a4dc8f1dec75c4aed18d584f6
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/145043
Tested-by: Jenkins
Reviewed-by: Michael Weghorn 

diff --git a/external/icu/ExternalProject_icu.mk 
b/external/icu/ExternalProject_icu.mk
index d677016f9677..1fd0600fe5c6 100644
--- a/external/icu/ExternalProject_icu.mk
+++ b/external/icu/ExternalProject_icu.mk
@@ -20,7 +20,7 @@ ifeq ($(OS),WNT)
 $(call gb_ExternalProject_get_state_target,icu,build) :
$(call gb_Trace_StartRange,icu,EXTERNAL)
$(call gb_ExternalProject_run,build,\
-   autoconf \
+   autoconf -f \
&& export LIB="$(ILIB)" PYTHONWARNINGS="default" \
gb_ICU_XFLAGS="-FS $(SOLARINC) $(gb_DEBUGINFO_FLAGS) 
$(if $(MSVC_USE_DEBUG_RUNTIME),-MDd,-MD -Gy)" \
&& CFLAGS="$${gb_ICU_XFLAGS}" CPPFLAGS="$(SOLARINC)" 
CXXFLAGS="$${gb_ICU_XFLAGS}" \
@@ -66,7 +66,7 @@ icu_LDFLAGS:=" \
 $(call gb_ExternalProject_get_state_target,icu,build) :
$(call gb_Trace_StartRange,icu,EXTERNAL)
$(call gb_ExternalProject_run,build,\
-   autoconf && \
+   autoconf -f && \
CPPFLAGS=$(icu_CPPFLAGS) CFLAGS=$(icu_CFLAGS) \
CXXFLAGS=$(icu_CXXFLAGS) LDFLAGS=$(icu_LDFLAGS) \
PYTHONWARNINGS="default" \


[Libreoffice-commits] core.git: external/icu

2022-04-07 Thread Luboš Luňák (via logerrit)
 external/icu/UnpackedTarball_icu.mk |1 
 external/icu/do-not-reset-useful-cache-to-empty-in-populateNear.patch.2 |   37 
++
 2 files changed, 38 insertions(+)

New commits:
commit c5199abfc1a468b28c680faf41e2f11bc1729c47
Author: Luboš Luňák 
AuthorDate: Thu Apr 7 17:01:16 2022 +0200
Commit: Luboš Luňák 
CommitDate: Thu Apr 7 23:14:53 2022 +0200

work around ICU performance problem in text breaking (tdf#116400)

Reported upstream at https://unicode-org.atlassian.net/browse/ICU-21946 ,
they've confirmed the problem, but so far no actual code change. So
let's push my patch for now.

Change-Id: Idd92ca66eea9b28103ad890aec66c40029ec7ebd
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/132676
Tested-by: Jenkins
Reviewed-by: Luboš Luňák 

diff --git a/external/icu/UnpackedTarball_icu.mk 
b/external/icu/UnpackedTarball_icu.mk
index 58a05f1ee39b..25b4f1defa26 100644
--- a/external/icu/UnpackedTarball_icu.mk
+++ b/external/icu/UnpackedTarball_icu.mk
@@ -43,6 +43,7 @@ $(eval $(call gb_UnpackedTarball_add_patches,icu,\
external/icu/icu4c-use-pkgdata-single-ccode-file-mode.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/do-not-reset-useful-cache-to-empty-in-populateNear.patch.2 
\
 ))
 
 $(eval $(call 
gb_UnpackedTarball_add_file,icu,source/data/brkitr/khmerdict.dict,external/icu/khmerdict.dict))
diff --git 
a/external/icu/do-not-reset-useful-cache-to-empty-in-populateNear.patch.2 
b/external/icu/do-not-reset-useful-cache-to-empty-in-populateNear.patch.2
new file mode 100644
index ..bd7fe74fb42a
--- /dev/null
+++ b/external/icu/do-not-reset-useful-cache-to-empty-in-populateNear.patch.2
@@ -0,0 +1,37 @@
+From 34b2f7174ba187d99dfb8704b9cf19d369accc13 Mon Sep 17 00:00:00 2001
+From: =?UTF-8?q?Lubo=C5=A1=20Lu=C5=88=C3=A1k?= 
+Date: Wed, 16 Mar 2022 10:54:03 +0100
+Subject: [PATCH] do not reset useful cache to empty in populateNear()
+
+---
+ icu4c/source/common/rbbi_cache.cpp | 5 -
+ 1 file changed, 4 insertions(+), 1 deletion(-)
+
+diff --git a/icu4c/source/common/rbbi_cache.cpp 
b/icu4c/source/common/rbbi_cache.cpp
+index 26d82df781..54a77c97c6 100644
+--- a/icu/source/common/rbbi_cache.cpp
 b/icu/source/common/rbbi_cache.cpp
+@@ -352,7 +352,7 @@ UBool RuleBasedBreakIterator::BreakCache
+ if ((position < fBoundaries[fStartBufIdx] - 15) || position > 
(fBoundaries[fEndBufIdx] + 15)) {
+ int32_t aBoundary = 0;
+ int32_t ruleStatusIndex = 0;
+-if (position > 20) {
++if (position > 20 && false) { // handleSafePrevious() is broken and 
always returns 0
+ int32_t backupPos = fBI->handleSafePrevious(position);
+ 
+ if (backupPos > 0) {
+@@ -376,7 +376,10 @@ UBool 
RuleBasedBreakIterator::BreakCache::populateNear(int32_t position, UErrorC
+ ruleStatusIndex = fBI->fRuleStatusIndex;
+ }
+ }
+-reset(aBoundary, ruleStatusIndex);// Reset cache to hold 
aBoundary as a single starting point.
++// Reset cache to hold aBoundary as a single starting point.
++// Do not do so if what's in the cache is still more useful than an 
empty cache.
++if (!(aBoundary == 0 && position > fBoundaries[fEndBufIdx]))
++reset(aBoundary, ruleStatusIndex);
+ }
+ 
+ // Fill in boundaries between existing cache content and the new 
requested position.
+-- 
+2.34.1
+


[Libreoffice-commits] core.git: external/icu

2022-01-10 Thread Jan-Marek Glogowski (via logerrit)
 external/icu/UnpackedTarball_icu.mk   |1 
 external/icu/icu4c-use-pkgdata-single-ccode-file-mode.patch.1 |   12 ++
 2 files changed, 13 insertions(+)

New commits:
commit a8bbd66011da4d9996f28a6ed06db10ed026312b
Author: Jan-Marek Glogowski 
AuthorDate: Tue Jan 11 06:11:10 2022 +0100
Commit: Thorsten Behrens 
CommitDate: Tue Jan 11 08:16:18 2022 +0100

icu: always use USE_SINGLE_CCODE_FILE pkgdata mode

The pkgdata tool basically not only generates the data, but
forces a non-parallel build for all data files for platforms,
which can't use the (single file) assembler mode. This hits
the WASM build, bringing down the parallel build to a crawl.

But there is already the "hidden" optimization implemented in
pkgdata to just write a single C source file, instead of one
per locale. For some reason, that is just enabled on OS400.

I don't think we have a platform, which would have a memory
restriction doing this, so just uncondition this pkgdata
build mode for everyone.
Feel free to otherwise condition this patch for your platform
in external/icu/UnpackedTarball_icu.mk.

Change-Id: I482d80e853128d00faa43687e38f5b88fbf6958c
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/128266
Tested-by: Jenkins
Reviewed-by: Thorsten Behrens 

diff --git a/external/icu/UnpackedTarball_icu.mk 
b/external/icu/UnpackedTarball_icu.mk
index c0ffe47dad3e..58a05f1ee39b 100644
--- a/external/icu/UnpackedTarball_icu.mk
+++ b/external/icu/UnpackedTarball_icu.mk
@@ -40,6 +40,7 @@ $(eval $(call gb_UnpackedTarball_add_patches,icu,\
external/icu/icu4c-windows-cygwin-cross.patch.1 \
external/icu/icu4c-emscripten-cross.patch.1 \
external/icu/icu4c-khmerbreakengine.patch.1 \
+   external/icu/icu4c-use-pkgdata-single-ccode-file-mode.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) \
 ))
diff --git a/external/icu/icu4c-use-pkgdata-single-ccode-file-mode.patch.1 
b/external/icu/icu4c-use-pkgdata-single-ccode-file-mode.patch.1
new file mode 100644
index ..237e554b8a4b
--- /dev/null
+++ b/external/icu/icu4c-use-pkgdata-single-ccode-file-mode.patch.1
@@ -0,0 +1,12 @@
+--- icu/source/tools/toolutil/pkg_genc.h.orig  2022-01-11 06:02:29.694678787 
+0100
 icu/source/tools/toolutil/pkg_genc.h   2022-01-11 06:02:41.602640965 
+0100
+@@ -48,9 +48,7 @@
+  * the data to generate the final data library. This can
+  * increase the performance of the pkdata tool.
+  */
+-#if U_PLATFORM == U_PF_OS400
+ #define USE_SINGLE_CCODE_FILE
+-#endif
+ 
+ /* Need to fix the file seperator character when using MinGW. */
+ #if defined(WINDOWS_WITH_GNUC) || defined(USING_CYGWIN)


[Libreoffice-commits] core.git: external/icu

2021-12-06 Thread Caolán McNamara (via logerrit)
 external/icu/icu4c-khmerbreakengine.patch.1 |2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

New commits:
commit d4b6c35eeba661f721d0204d4a2c581913fc38b7
Author: Caolán McNamara 
AuthorDate: Mon Dec 6 11:26:02 2021 +
Commit: Caolán McNamara 
CommitDate: Mon Dec 6 14:33:44 2021 +0100

tdf#145892 disable failing assert in additional icu khmer patch

Change-Id: I8507c101544fcdcdc6e75c853c44e04e97a96d91
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/126411
Tested-by: Jenkins
Reviewed-by: Caolán McNamara 

diff --git a/external/icu/icu4c-khmerbreakengine.patch.1 
b/external/icu/icu4c-khmerbreakengine.patch.1
index 719fdd846114..78cce146c2bf 100644
--- a/external/icu/icu4c-khmerbreakengine.patch.1
+++ b/external/icu/icu4c-khmerbreakengine.patch.1
@@ -560,7 +560,7 @@ diff -ur icu.org/source/common/dictbe.cpp 
icu/source/common/dictbe.cpp
 +t_boundary.addElement(i, status);
 +numBreaks++;
  }
-+U_ASSERT(prev.elementAti(t_boundary.elementAti(numBreaks - 1)) == 0);
++// U_ASSERT(prev.elementAti(t_boundary.elementAti(numBreaks - 1)) == 
0);
 +}
  
 -// Look ahead for possible suffixes if a dictionary word does not 
follow.


[Libreoffice-commits] core.git: external/icu

2021-11-05 Thread Michael Stahl (via logerrit)
 external/icu/UnpackedTarball_icu.mk   |1 
 external/icu/e450fa50fc242282551f56b941dc93b9a8a0bcbb.patch.2 |  106 ++
 2 files changed, 107 insertions(+)

New commits:
commit 35eef8ec9b122a761400f3c6590ca1f9a187d772
Author: Michael Stahl 
AuthorDate: Fri Nov 5 18:33:07 2021 +0100
Commit: Michael Stahl 
CommitDate: Fri Nov 5 20:43:18 2021 +0100

icu: add patch for CVE-2021-30535

Change-Id: I398596f77aa47ab6d4db01b94422262048cffd3e
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/124779
Tested-by: Jenkins
Reviewed-by: Michael Stahl 

diff --git a/external/icu/UnpackedTarball_icu.mk 
b/external/icu/UnpackedTarball_icu.mk
index 2e455a7dcc24..b47d519b1ae2 100644
--- a/external/icu/UnpackedTarball_icu.mk
+++ b/external/icu/UnpackedTarball_icu.mk
@@ -42,6 +42,7 @@ $(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/e450fa50fc242282551f56b941dc93b9a8a0bcbb.patch.2 
b/external/icu/e450fa50fc242282551f56b941dc93b9a8a0bcbb.patch.2
new file mode 100644
index ..d23605807f14
--- /dev/null
+++ b/external/icu/e450fa50fc242282551f56b941dc93b9a8a0bcbb.patch.2
@@ -0,0 +1,106 @@
+From e450fa50fc242282551f56b941dc93b9a8a0bcbb Mon Sep 17 00:00:00 2001
+From: Frank Tang 
+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* , 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_AAA1_AAA2_AAA3_AAA4_AAA5_AAA6_"
++  "AAA7_AAA8_AAA9_AA10_AA11_AA12_"
++  "AA13_AA14_AA15_AA16_AA17_AA18");
++Locale l2;
++l.setUnicodeKeywordValue("co", "12", status); // Cause an error
++status.reset();
++l2 = l; // copy operator on such bogus 

[Libreoffice-commits] core.git: external/icu

2020-11-18 Thread Stephan Bergmann (via logerrit)
 external/icu/ubsan.patch.1 |   38 ++
 1 file changed, 38 insertions(+)

New commits:
commit 904fb08b1ee9a632bbacd80439ef5919468c9464
Author: Stephan Bergmann 
AuthorDate: Wed Nov 18 07:36:06 2020 +0100
Commit: Stephan Bergmann 
CommitDate: Wed Nov 18 09:42:38 2020 +0100

external/icu: Silence UBSan misaligned-pointer-use

...seen when e.g. building CustomTarget/i18npool/breakiterator/char_in.brk:

> rbbitblb.cpp:1405:18: runtime error: member access within misaligned 
address 0x62726987 for type 'icu_68::RBBIStateTableRow', which requires 2 
byte alignment
> 0x62726987: note: pointer points here
>  00 00 00 00 00  00 00 00 00 00 00 00 00  00 00 00 00 00 00 00 00  00 00 
00 00 00 00 00 00  00 00 00
>  ^

and

> rbbitblb.cpp:1607:18: runtime error: member access within misaligned 
address 0x62726ecf for type 'icu_68::RBBIStateTableRow', which requires 2 
byte alignment
> 0x62726ecf: note: pointer points here
>  00 00 00 00 00  00 00 00 00 00 00 00 00  00 00 00 00 00 00 00 00  00 00 
00 00 00 00 00 00  00 00 00
>  ^

(i.e., even though those code branches only access the byte-sized
RBBIStateTableRow8 data, they did so through a RBBIStateTableRow union 
pointer,
which has stronger alignment requirements)

Change-Id: I0abe5bd756758e33e495538f548e80f99460f43c
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/106038
Tested-by: Jenkins
Reviewed-by: Stephan Bergmann 

diff --git a/external/icu/ubsan.patch.1 b/external/icu/ubsan.patch.1
index 1c10f8cefcc2..1d7006347bd3 100644
--- a/external/icu/ubsan.patch.1
+++ b/external/icu/ubsan.patch.1
@@ -1,3 +1,41 @@
+--- a/source/common/rbbitblb.cpp
 a/source/common/rbbitblb.cpp
+@@ -1402,12 +1402,13 @@
+ U_ASSERT (sd->fAccepting <= 255);
+ U_ASSERT (sd->fLookAhead <= 255);
+ U_ASSERT (0 <= sd->fTagsIdx && sd->fTagsIdx <= 255);
+-row->r8.fAccepting = sd->fAccepting;
+-row->r8.fLookAhead = sd->fLookAhead;
+-row->r8.fTagsIdx   = sd->fTagsIdx;
++RBBIStateTableRow8 *row8 = reinterpret_cast(row);
++row8->fAccepting = sd->fAccepting;
++row8->fLookAhead = sd->fLookAhead;
++row8->fTagsIdx   = sd->fTagsIdx;
+ for (col=0; colfDtran->elementAti(col) <= 
kMaxStateFor8BitsTable);
+-row->r8.fNextState[col] = sd->fDtran->elementAti(col);
++row8->fNextState[col] = sd->fDtran->elementAti(col);
+ }
+ } else {
+ U_ASSERT (sd->fAccepting <= 0x);
+@@ -1603,12 +1603,13 @@
+ UnicodeString *rowString = (UnicodeString 
*)fSafeTable->elementAt(state);
+ RBBIStateTableRow   *row = (RBBIStateTableRow *)(table->fTableData + 
state*table->fRowLen);
+ if (use8BitsForSafeTable()) {
+-row->r8.fAccepting = 0;
+-row->r8.fLookAhead = 0;
+-row->r8.fTagsIdx= 0;
++RBBIStateTableRow8 *row8 = reinterpret_cast(row);
++row8->fAccepting = 0;
++row8->fLookAhead = 0;
++row8->fTagsIdx= 0;
+ for (col=0; colcharAt(col) <= kMaxStateFor8BitsTable);
+-row->r8.fNextState[col] = 
static_cast(rowString->charAt(col));
++row8->fNextState[col] = 
static_cast(rowString->charAt(col));
+ }
+ } else {
+ row->r16.fAccepting = 0;
 diff -ur icu.org/source/tools/genrb/rbutil.c icu/source/tools/genrb/rbutil.c
 --- icu.org/source/tools/genrb/rbutil.c2020-10-28 22:21:12.0 
+0100
 +++ icu/source/tools/genrb/rbutil.c2020-11-16 19:50:44.005119253 +0100
___
Libreoffice-commits mailing list
libreoffice-comm...@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/libreoffice-commits


[Libreoffice-commits] core.git: external/icu

2020-10-01 Thread Jan-Marek Glogowski (via logerrit)
 external/icu/ExternalProject_icu.mk |2 
 external/icu/UnpackedTarball_icu.mk |4 
 external/icu/icu4c-win-arm64.patch.1|   76 -
 external/icu/icu4c-windows-cygwin-cross.patch.1 |  131 
 4 files changed, 133 insertions(+), 80 deletions(-)

New commits:
commit 7f16cabf00daa30e9284d2fb2494bd341352c25e
Author: Jan-Marek Glogowski 
AuthorDate: Thu Oct 1 11:20:50 2020 +0200
Commit: Jan-Marek Glogowski 
CommitDate: Thu Oct 1 21:09:24 2020 +0200

icu: fix Windows Cygwin cross build

This replaces the previous, broken Windows ARM64 solution with a
general fix for Cygwin cross-building. The main problem is the
PATH environment, because that is colon-seperated on Cygwin, like
on Unix, so won't work with any absolute "Windows" path, which is
needed for the --with-cross-build option.

One general change is the adoption of icucross.inc. I don't know,
why that should prefer the general CURR_FULL_DIR from icudefs.mk
over the specific one in @platform_make_fragment@. That breaks
here, because it returns a cygwin unix path, which is used as
an option to compiled tools, which these won't be able to handle.

Change-Id: Ic2cf15b48801ac57ea5a8a2876ce59f2a84edfb3
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/103759
Tested-by: Jenkins
Reviewed-by: Jan-Marek Glogowski 

diff --git a/external/icu/ExternalProject_icu.mk 
b/external/icu/ExternalProject_icu.mk
index 855534f0a405..3ded08562211 100644
--- a/external/icu/ExternalProject_icu.mk
+++ b/external/icu/ExternalProject_icu.mk
@@ -29,7 +29,6 @@ $(call gb_ExternalProject_get_state_target,icu,build) :
$(if $(MSVC_USE_DEBUG_RUNTIME),--enable-debug 
--disable-release) \
$(if 
$(CROSS_COMPILING),--build=$(BUILD_PLATFORM) --host=$(HOST_PLATFORM) \

--with-cross-build=$(WORKDIR_FOR_BUILD)/UnpackedTarball/icu/source \
-   $(if 
$(GNUMAKE_WIN_NATIVE),--enable-native-make) \
--disable-tools --disable-extras) \
&& $(MAKE) $(if $(CROSS_COMPILING),DATASUBDIR=data) $(if 
$(verbose),VERBOSE=1) \
,source)
@@ -67,6 +66,7 @@ icu_LDFLAGS:=" \
 $(call gb_ExternalProject_get_state_target,icu,build) :
$(call gb_Trace_StartRange,icu,EXTERNAL)
$(call gb_ExternalProject_run,build,\
+   autoconf && \
CPPFLAGS=$(icu_CPPFLAGS) CFLAGS=$(icu_CFLAGS) \
CXXFLAGS=$(icu_CXXFLAGS) LDFLAGS=$(icu_LDFLAGS) \
PYTHONWARNINGS="default" \
diff --git a/external/icu/UnpackedTarball_icu.mk 
b/external/icu/UnpackedTarball_icu.mk
index 552c578ae6cf..002b7d28cab5 100644
--- a/external/icu/UnpackedTarball_icu.mk
+++ b/external/icu/UnpackedTarball_icu.mk
@@ -41,9 +41,7 @@ $(eval $(call gb_UnpackedTarball_add_patches,icu,\
external/icu/icu4c-khmerbreakengine.patch.1 \
external/icu/strict_ansi.patch \
external/icu/icu4c-link-scrptrun.patch.2 \
-   $(if $(CROSS_COMPILING),\
-   $(if $(filter 
WNT_ARM64,$(OS)_$(CPUNAME)),external/icu/icu4c-win-arm64.patch.1) \
-   )\
+   external/icu/icu4c-windows-cygwin-cross.patch.1 \
 ))
 
 $(eval $(call 
gb_UnpackedTarball_add_file,icu,source/data/brkitr/khmerdict.dict,external/icu/khmerdict.dict))
diff --git a/external/icu/icu4c-win-arm64.patch.1 
b/external/icu/icu4c-win-arm64.patch.1
deleted file mode 100644
index 272310fed845..
--- a/external/icu/icu4c-win-arm64.patch.1
+++ /dev/null
@@ -1,76 +0,0 @@
-diff -ur icu.org/source/acinclude.m4 icu/source/acinclude.m4
 icu.org/source/acinclude.m4 2020-04-10 16:22:16.0 +0200
-+++ icu/source/acinclude.m4 2020-04-21 22:14:09.940217733 +0200
-@@ -52,6 +52,12 @@
-   else
-   icu_cv_host_frag=mh-cygwin-msvc
-   fi ;;
-+aarch64-*-cygwin)
-+  if test "$GCC" = yes; then
-+  icu_cv_host_frag=mh-cygwin64
-+  else
-+  icu_cv_host_frag=mh-cygwin-msvc
-+  fi ;;
- *-*-mingw*)
-   if test "$GCC" = yes; then
- AC_COMPILE_IFELSE([AC_LANG_PROGRAM([[
-diff -ur icu.org/source/configure.ac icu/source/configure.ac
 icu.org/source/configure.ac 2020-04-10 16:22:16.0 +0200
-+++ icu/source/configure.ac 2020-04-21 22:14:09.940217733 +0200
-@@ -252,6 +252,23 @@
- fi
- fi
- AC_SUBST(cross_buildroot)
-+
-+native_make="no"
-+ENABLE_RELEASE=1
-+AC_ARG_ENABLE(native-make,
-+[  --enable-native-makebuild with naive make (Cygwin only) 
[default=no]],
-+[ case "${enableval}" in
-+  yes|"") native_make="yes" ;;
-+  esac ],
-+)
-+
-+cross_path_buildroot="$cross_buildroot"
-+if test "x$native_make" = "xyes"; then
-+case "${host}" in
-+*-*-cygwin*) cross_path_buildroot=$(cygpath -u "$cross_buildroot") ;;
-+esac
-+fi

[Libreoffice-commits] core.git: external/icu

2020-10-01 Thread Jan-Marek Glogowski (via logerrit)
 external/icu/ExternalProject_icu.mk  |8 ++---
 external/icu/UnpackedTarball_icu.mk  |1 
 external/icu/icu4c-link-scrptrun.patch.2 |   43 +++
 3 files changed, 48 insertions(+), 4 deletions(-)

New commits:
commit 695c2b5cba265a58232fbda23f8284fc320ce8b6
Author: Jan-Marek Glogowski 
AuthorDate: Thu Oct 1 11:19:25 2020 +0200
Commit: Jan-Marek Glogowski 
CommitDate: Thu Oct 1 19:56:29 2020 +0200

icu: fix Windows extras build

Based on an upstream patch, with an additional hunk to fix the
debug build. Gets rid of a difference between Windows and other
builds.

Change-Id: I597a5cb429fb3257535d8a2ce1142f5f9f34cebe
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/103758
Tested-by: Jenkins
Reviewed-by: Jan-Marek Glogowski 

diff --git a/external/icu/ExternalProject_icu.mk 
b/external/icu/ExternalProject_icu.mk
index b9fb3f497971..855534f0a405 100644
--- a/external/icu/ExternalProject_icu.mk
+++ b/external/icu/ExternalProject_icu.mk
@@ -29,8 +29,8 @@ $(call gb_ExternalProject_get_state_target,icu,build) :
$(if $(MSVC_USE_DEBUG_RUNTIME),--enable-debug 
--disable-release) \
$(if 
$(CROSS_COMPILING),--build=$(BUILD_PLATFORM) --host=$(HOST_PLATFORM) \

--with-cross-build=$(WORKDIR_FOR_BUILD)/UnpackedTarball/icu/source \
-   $(if 
$(GNUMAKE_WIN_NATIVE),--enable-native-make)) \
-   --disable-extras \
+   $(if 
$(GNUMAKE_WIN_NATIVE),--enable-native-make) \
+   --disable-tools --disable-extras) \
&& $(MAKE) $(if $(CROSS_COMPILING),DATASUBDIR=data) $(if 
$(verbose),VERBOSE=1) \
,source)
$(call gb_Trace_EndRange,icu,EXTERNAL)
@@ -73,7 +73,6 @@ $(call gb_ExternalProject_get_state_target,icu,build) :
./configure \
--disable-layout --disable-samples \
$(if $(filter FUZZERS,$(BUILD_TYPE)),--disable-release) 
\
-   $(if $(CROSS_COMPILING),--disable-tools 
--disable-extras) \
$(if $(filter iOS ANDROID,$(OS)),--disable-dyload) \
$(if $(filter ANDROID,$(OS)),--disable-strict 
ac_cv_c_bigendian=no) \
$(if $(filter SOLARIS AIX,$(OS)),--disable-64bit-libs) \
@@ -81,7 +80,8 @@ $(call gb_ExternalProject_get_state_target,icu,build) :
--with-data-packaging=static --enable-static 
--disable-shared --disable-dyload,\
--disable-static --enable-shared $(if $(filter 
ANDROID,$(OS)),--with-library-suffix=lo)) \
$(if $(CROSS_COMPILING),--build=$(BUILD_PLATFORM) 
--host=$(HOST_PLATFORM)\
-   
--with-cross-build=$(WORKDIR_FOR_BUILD)/UnpackedTarball/icu/source) \
+   
--with-cross-build=$(WORKDIR_FOR_BUILD)/UnpackedTarball/icu/source \
+   --disable-tools --disable-extras) \
&& $(MAKE) $(if $(CROSS_COMPILING),DATASUBDIR=data) $(if 
$(verbose),VERBOSE=1) \
$(if $(filter MACOSX,$(OS)), \
&& $(PERL) 
$(SRCDIR)/solenv/bin/macosx-change-install-names.pl shl \
diff --git a/external/icu/UnpackedTarball_icu.mk 
b/external/icu/UnpackedTarball_icu.mk
index 9638f4fb9b0e..552c578ae6cf 100644
--- a/external/icu/UnpackedTarball_icu.mk
+++ b/external/icu/UnpackedTarball_icu.mk
@@ -40,6 +40,7 @@ $(eval $(call gb_UnpackedTarball_add_patches,icu,\
external/icu/Wdeprecated-copy-dtor.patch \
external/icu/icu4c-khmerbreakengine.patch.1 \
external/icu/strict_ansi.patch \
+   external/icu/icu4c-link-scrptrun.patch.2 \
$(if $(CROSS_COMPILING),\
$(if $(filter 
WNT_ARM64,$(OS)_$(CPUNAME)),external/icu/icu4c-win-arm64.patch.1) \
)\
diff --git a/external/icu/icu4c-link-scrptrun.patch.2 
b/external/icu/icu4c-link-scrptrun.patch.2
new file mode 100644
index ..8c94361a163c
--- /dev/null
+++ b/external/icu/icu4c-link-scrptrun.patch.2
@@ -0,0 +1,43 @@
+Based on: 
https://github.com/unicode-org/icu/commit/e3f2c0dd70018d924bf22a9b3f0cbf387316b50b.patch
+
+From e3f2c0dd70018d924bf22a9b3f0cbf387316b50b Mon Sep 17 00:00:00 2001
+From: Paul Smith 
+Date: Wed, 5 Aug 2020 13:18:30 -0400
+Subject: [PATCH] ICU-21217 Windows: Fix link command for extra/scrptrun
+
+---
+ icu4c/source/extra/scrptrun/Makefile.in | 4 ++--
+ 1 file changed, 2 insertions(+), 2 deletions(-)
+
+diff --git a/icu4c/source/extra/scrptrun/Makefile.in 
b/icu4c/source/extra/scrptrun/Makefile.in
+index f6e47735631..d951f66a4bd 100644
+--- a/icu4c/source/extra/scrptrun/Makefile.in
 b/icu4c/source/extra/scrptrun/Makefile.in
+@@ -12,9 +12,6 @@
+ 
+ include $(top_builddir)/icudefs.mk
+ 
+-## Platform-specific setup

[Libreoffice-commits] core.git: external/icu

2020-09-29 Thread Jan-Marek Glogowski (via logerrit)
 external/icu/ExternalProject_icu.mk  |   20 +
 external/icu/UnpackedTarball_icu.mk  |3 +
 external/icu/icu4c-win-arm64.patch.1 |   76 +++
 3 files changed, 91 insertions(+), 8 deletions(-)

New commits:
commit 6c94958e56fcbacb8e1f689550a60034b074857c
Author: Jan-Marek Glogowski 
AuthorDate: Fri Jul 17 22:25:01 2020 +0200
Commit: Jan-Marek Glogowski 
CommitDate: Wed Sep 30 04:45:07 2020 +0200

icu: fix Windows Arm64 build

I couldn't find a general solution to select the correct build path
when cross compiling for Windows Arm64, so this just adds the patch
in exactly this case, which WFM.

Change-Id: I6e53e1531048404b70dcf61eab0a7f4021076868
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/102852
Tested-by: Jenkins
Reviewed-by: Jan-Marek Glogowski 

diff --git a/external/icu/ExternalProject_icu.mk 
b/external/icu/ExternalProject_icu.mk
index 8913ebdfdf6f..b9fb3f497971 100644
--- a/external/icu/ExternalProject_icu.mk
+++ b/external/icu/ExternalProject_icu.mk
@@ -17,17 +17,21 @@ icu_CPPFLAGS:="-DHAVE_GCC_ATOMICS=$(if $(filter 
TRUE,$(GCC_HAVE_BUILTIN_ATOMIC))
 
 ifeq ($(OS),WNT)
 
-# Note: runConfigureICU ignores everything following the platform name!
 $(call gb_ExternalProject_get_state_target,icu,build) :
$(call gb_Trace_StartRange,icu,EXTERNAL)
$(call gb_ExternalProject_run,build,\
-   export LIB="$(ILIB)" PYTHONWARNINGS="default" \
-   && CFLAGS="-FS $(SOLARINC) $(gb_DEBUGINFO_FLAGS)" 
CPPFLAGS="$(SOLARINC)" CXXFLAGS="-FS $(SOLARINC) $(gb_DEBUGINFO_FLAGS)" \
-   INSTALL=`cygpath -m /usr/bin/install` \
-   ./runConfigureICU \
-   $(if $(MSVC_USE_DEBUG_RUNTIME),--enable-debug 
--disable-release) \
-   Cygwin/MSVC --disable-extras \
-   && $(MAKE) $(if $(verbose),VERBOSE=1) \
+   autoconf \
+   && export LIB="$(ILIB)" PYTHONWARNINGS="default" \
+   gb_ICU_XFLAGS="-FS $(SOLARINC) $(gb_DEBUGINFO_FLAGS) 
$(if $(MSVC_USE_DEBUG_RUNTIME),-MDd,-MD -Gy)" \
+   && CFLAGS="$${gb_ICU_XFLAGS}" CPPFLAGS="$(SOLARINC)" 
CXXFLAGS="$${gb_ICU_XFLAGS}" \
+   INSTALL=`cygpath -m /usr/bin/install` $(if 
$(MSVC_USE_DEBUG_RUNTIME),LDFLAGS="-DEBUG") \
+   ./configure \
+   $(if $(MSVC_USE_DEBUG_RUNTIME),--enable-debug 
--disable-release) \
+   $(if 
$(CROSS_COMPILING),--build=$(BUILD_PLATFORM) --host=$(HOST_PLATFORM) \
+   
--with-cross-build=$(WORKDIR_FOR_BUILD)/UnpackedTarball/icu/source \
+   $(if 
$(GNUMAKE_WIN_NATIVE),--enable-native-make)) \
+   --disable-extras \
+   && $(MAKE) $(if $(CROSS_COMPILING),DATASUBDIR=data) $(if 
$(verbose),VERBOSE=1) \
,source)
$(call gb_Trace_EndRange,icu,EXTERNAL)
 
diff --git a/external/icu/UnpackedTarball_icu.mk 
b/external/icu/UnpackedTarball_icu.mk
index a602a1e77d4c..9638f4fb9b0e 100644
--- a/external/icu/UnpackedTarball_icu.mk
+++ b/external/icu/UnpackedTarball_icu.mk
@@ -40,6 +40,9 @@ $(eval $(call gb_UnpackedTarball_add_patches,icu,\
external/icu/Wdeprecated-copy-dtor.patch \
external/icu/icu4c-khmerbreakengine.patch.1 \
external/icu/strict_ansi.patch \
+   $(if $(CROSS_COMPILING),\
+   $(if $(filter 
WNT_ARM64,$(OS)_$(CPUNAME)),external/icu/icu4c-win-arm64.patch.1) \
+   )\
 ))
 
 $(eval $(call 
gb_UnpackedTarball_add_file,icu,source/data/brkitr/khmerdict.dict,external/icu/khmerdict.dict))
diff --git a/external/icu/icu4c-win-arm64.patch.1 
b/external/icu/icu4c-win-arm64.patch.1
new file mode 100644
index ..272310fed845
--- /dev/null
+++ b/external/icu/icu4c-win-arm64.patch.1
@@ -0,0 +1,76 @@
+diff -ur icu.org/source/acinclude.m4 icu/source/acinclude.m4
+--- icu.org/source/acinclude.m4 2020-04-10 16:22:16.0 +0200
 icu/source/acinclude.m4 2020-04-21 22:14:09.940217733 +0200
+@@ -52,6 +52,12 @@
+   else
+   icu_cv_host_frag=mh-cygwin-msvc
+   fi ;;
++aarch64-*-cygwin)
++  if test "$GCC" = yes; then
++  icu_cv_host_frag=mh-cygwin64
++  else
++  icu_cv_host_frag=mh-cygwin-msvc
++  fi ;;
+ *-*-mingw*)
+   if test "$GCC" = yes; then
+ AC_COMPILE_IFELSE([AC_LANG_PROGRAM([[
+diff -ur icu.org/source/configure.ac icu/source/configure.ac
+--- icu.org/source/configure.ac 2020-04-10 16:22:16.0 +0200
 icu/source/configure.ac 2020-04-21 22:14:09.940217733 +0200
+@@ -252,6 +252,23 @@
+ fi
+ fi
+ AC_SUBST(cross_buildroot)
++
++native_make="no"
++ENABLE_RELEASE=1
++AC_ARG_ENABLE(native-make,
++[  --enable-native-makebuild with naive make (Cygwin only) 
[default=no]],
++[ case "${enableval}" in
++  yes|"") native_make="yes" 

[Libreoffice-commits] core.git: external/icu

2020-09-25 Thread Stephan Bergmann (via logerrit)
 external/icu/UnpackedTarball_icu.mk |1 +
 external/icu/strict_ansi.patch  |   15 +++
 2 files changed, 16 insertions(+)

New commits:
commit 40c731726b583cdb3a8884e90f17637f35aa3ef8
Author: Stephan Bergmann 
AuthorDate: Fri Sep 25 10:01:11 2020 +0200
Commit: Stephan Bergmann 
CommitDate: Fri Sep 25 11:36:39 2020 +0200

external/icu: Fix #include  under --with-latest-c++ -std=c++20

Not sure why I started to get that failure exactly now, but with
--with-latest-c++ enabling -std=c++20, builds with GCC (at least GCC 11 
trunk)
on Fedora 32 now failed with

> In file included from 
~/gcc/trunk/inst/include/c++/11.0.0/bits/max_size_type.h:37,
>  from 
~/gcc/trunk/inst/include/c++/11.0.0/bits/ranges_base.h:38,
>  from ~/gcc/trunk/inst/include/c++/11.0.0/string_view:44,
>  from 
~/gcc/trunk/inst/include/c++/11.0.0/bits/basic_string.h:48,
>  from ~/gcc/trunk/inst/include/c++/11.0.0/string:55,
>  from 
~/gcc/trunk/inst/include/c++/11.0.0/bits/locale_classes.h:40,
>  from 
~/gcc/trunk/inst/include/c++/11.0.0/bits/ios_base.h:41,
>  from ~/gcc/trunk/inst/include/c++/11.0.0/streambuf:41,
>  from 
~/gcc/trunk/inst/include/c++/11.0.0/bits/streambuf_iterator.h:35,
>  from ~/gcc/trunk/inst/include/c++/11.0.0/iterator:66,
>  from 
~/gcc/trunk/inst/include/c++/11.0.0/bits/ranges_algobase.h:36,
>  from 
~/gcc/trunk/inst/include/c++/11.0.0/bits/ranges_uninitialized.h:36,
>  from ~/gcc/trunk/inst/include/c++/11.0.0/memory:69,
>  from ../common/unicode/localpointer.h:45,
>  from ../common/unicode/uenum.h:23,
>  from ../common/unicode/ucnv.h:53,
>  from unicode/ustdio.h:31,
>  from ufile.cpp:32:
> ~/gcc/trunk/inst/include/c++/11.0.0/numbers:139:9: error: unable to find 
numeric literal operator ‘operator""Q’
>   139 |   = 2.718281828459045235360287471352662498Q;
>   | ^~~
> ~/gcc/trunk/inst/include/c++/11.0.0/numbers:139:9: note: use 
‘-fext-numeric-literals’ to enable more built-in suffixes

etc.  But the reason to #undef __STRICT_ANSI__ (which is set by -std=c++... 
vs.
-std=gnu++...) in workdir/UnpackedTarball/icu/source/io/ufile.cpp appears 
to be
obsolete, at least on Fedora 32  does declare fileno (which is a 
POSIX
extension) under -std=c++... just fine.

Change-Id: I3707418db56d7fe9946655ab27bf1bf8eb479a1b
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/103371
Tested-by: Jenkins
Reviewed-by: Stephan Bergmann 

diff --git a/external/icu/UnpackedTarball_icu.mk 
b/external/icu/UnpackedTarball_icu.mk
index 72fae09b1625..a602a1e77d4c 100644
--- a/external/icu/UnpackedTarball_icu.mk
+++ b/external/icu/UnpackedTarball_icu.mk
@@ -39,6 +39,7 @@ $(eval $(call gb_UnpackedTarball_add_patches,icu,\
external/icu/ubsan.patch \
external/icu/Wdeprecated-copy-dtor.patch \
external/icu/icu4c-khmerbreakengine.patch.1 \
+   external/icu/strict_ansi.patch \
 ))
 
 $(eval $(call 
gb_UnpackedTarball_add_file,icu,source/data/brkitr/khmerdict.dict,external/icu/khmerdict.dict))
diff --git a/external/icu/strict_ansi.patch b/external/icu/strict_ansi.patch
new file mode 100644
index ..972f0e65b1f1
--- /dev/null
+++ b/external/icu/strict_ansi.patch
@@ -0,0 +1,15 @@
+--- source/io/ufile.cpp
 source/io/ufile.cpp
+@@ -21,12 +21,6 @@
+ */
+ 
+ #include "unicode/platform.h"
+-#if defined(__GNUC__) && !defined(__clang__) && defined(__STRICT_ANSI__)
+-// g++, fileno isn't defined  if __STRICT_ANSI__ is 
defined.
+-// clang fails to compile the  header unless __STRICT_ANSI__ is 
defined.
+-// __GNUC__ is set by both gcc and clang.
+-#undef __STRICT_ANSI__
+-#endif
+ 
+ #include "locmap.h"
+ #include "unicode/ustdio.h"
___
Libreoffice-commits mailing list
libreoffice-comm...@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/libreoffice-commits


[Libreoffice-commits] core.git: external/icu

2020-08-16 Thread Stephan Bergmann (via logerrit)
 external/icu/ExternalProject_icu.mk |4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)

New commits:
commit 69e3c28ff216f560ac323413d0b07d7d3c41d357
Author: Stephan Bergmann 
AuthorDate: Sun Aug 16 19:24:55 2020 +0200
Commit: Stephan Bergmann 
CommitDate: Sun Aug 16 20:54:38 2020 +0200

Pass $(verbose) into ExternalProject_icu

Change-Id: I4c93d4c4207645795812a0cafb64cbe32a7a520a
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/100823
Tested-by: Jenkins
Reviewed-by: Stephan Bergmann 

diff --git a/external/icu/ExternalProject_icu.mk 
b/external/icu/ExternalProject_icu.mk
index f62d8528cd8d..3c0a22ec9f37 100644
--- a/external/icu/ExternalProject_icu.mk
+++ b/external/icu/ExternalProject_icu.mk
@@ -27,7 +27,7 @@ $(call gb_ExternalProject_get_state_target,icu,build) :
./runConfigureICU \
$(if $(MSVC_USE_DEBUG_RUNTIME),--enable-debug 
--disable-release) \
Cygwin/MSVC --disable-extras \
-   && $(MAKE) \
+   && $(MAKE) $(if $(verbose),VERBOSE=1) \
,source)
$(call gb_Trace_EndRange,icu,EXTERNAL)
 
@@ -77,7 +77,7 @@ $(call gb_ExternalProject_get_state_target,icu,build) :
--disable-static --enable-shared $(if $(filter 
ANDROID,$(OS)),--with-library-suffix=lo)) \
$(if $(CROSS_COMPILING),--build=$(BUILD_PLATFORM) 
--host=$(HOST_PLATFORM)\

--with-cross-build=$(WORKDIR_FOR_BUILD)/UnpackedTarball/icu/source) \
-   && $(MAKE) $(if $(CROSS_COMPILING),DATASUBDIR=data) \
+   && $(MAKE) $(if $(CROSS_COMPILING),DATASUBDIR=data) $(if 
$(verbose),VERBOSE=1) \
$(if $(filter MACOSX,$(OS)), \
&& $(PERL) 
$(SRCDIR)/solenv/bin/macosx-change-install-names.pl shl \
URELIB \
___
Libreoffice-commits mailing list
libreoffice-comm...@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/libreoffice-commits


[Libreoffice-commits] core.git: external/icu

2020-05-16 Thread Thorsten Behrens (via logerrit)
 external/icu/icu4c-android.patch.1 |   12 
 1 file changed, 12 deletions(-)

New commits:
commit 1125ee2f8d3851752e34343e81c11f019f23bb3a
Author: Thorsten Behrens 
AuthorDate: Sun May 17 01:48:51 2020 +0200
Commit: Thorsten Behrens 
CommitDate: Sun May 17 03:07:58 2020 +0200

Update icu4c-android.patch.1 to recent ICU 67 upgrade

Looks fixed upstream (if slightly differently)

Change-Id: If53722b867346d390866d9502fe36f976d702c31
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/94372
Tested-by: Jenkins
Reviewed-by: Thorsten Behrens 

diff --git a/external/icu/icu4c-android.patch.1 
b/external/icu/icu4c-android.patch.1
index 79b648615116..602d225d7812 100644
--- a/external/icu/icu4c-android.patch.1
+++ b/external/icu/icu4c-android.patch.1
@@ -73,15 +73,3 @@ diff -ur icu.org/source/i18n/decimfmt.cpp 
icu/source/i18n/decimfmt.cpp
  #include 
  #include 
  #include 
-diff -ur icu.org/source/i18n/number_decimalquantity.cpp 
icu/source/i18n/number_decimalquantity.cpp
 icu.org/source/i18n/number_decimalquantity.cpp 2018-10-02 
00:39:56.0 +0200
-+++ icu/source/i18n/number_decimalquantity.cpp 2018-10-20 00:33:36.560130873 
+0200
-@@ -432,7 +432,7 @@
- for (; i <= -22; i += 22) n /= 1e22;
- n /= DOUBLE_MULTIPLIERS[-i];
- }
--auto result = static_cast(std::round(n));
-+auto result = static_cast(round(n));
- if (result != 0) {
- _setToLong(result);
- scale -= fracLength;
___
Libreoffice-commits mailing list
libreoffice-comm...@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/libreoffice-commits


[Libreoffice-commits] core.git: external/icu

2020-05-12 Thread Stephan Bergmann (via logerrit)
 external/icu/ubsan.patch |   22 ++
 1 file changed, 22 insertions(+)

New commits:
commit fdf5bb5001422941e9d43e34ce88243e0e52109c
Author: Stephan Bergmann 
AuthorDate: Tue May 12 12:11:59 2020 +0200
Commit: Stephan Bergmann 
CommitDate: Tue May 12 16:37:47 2020 +0200

external/icu: Silence UBSan invalid-null-argument

...as seen during CppunitTest_i18npool_test_ordinalsuffix:

> uloc.cpp:1206:5: runtime error: null pointer passed as argument 1, which 
is declared to never be null
> /usr/include/string.h:44:28: note: nonnull attribute specified here
>  #0 in ulocimp_getLanguage_67 at 
workdir/UnpackedTarball/icu/source/common/uloc.cpp:1206:5
>  #1 in uloc_getCountry_67 at 
workdir/UnpackedTarball/icu/source/common/uloc.cpp:1803:5
>  #2 in ulocimp_getRegionForSupplementalData_67 at 
workdir/UnpackedTarball/icu/source/common/loclikely.cpp:1334:17
>  #3 in idForLocale(char const*, char*, int, UErrorCode*) at 
workdir/UnpackedTarball/icu/source/common/ucurr.cpp:350:5
>  #4 in ucurr_forLocale_67 at 
workdir/UnpackedTarball/icu/source/common/ucurr.cpp:535:5
>  #5 in icu_67::DecimalFormatSymbols::initialize(icu_67::Locale const&, 
UErrorCode&, signed char, icu_67::NumberingSystem const*) at 
workdir/UnpackedTarball/icu/source/i18n/dcfmtsym.cpp:461:29
>  #6 in icu_67::DecimalFormatSymbols::DecimalFormatSymbols(icu_67::Locale 
const&, UErrorCode&) at 
workdir/UnpackedTarball/icu/source/i18n/dcfmtsym.cpp:110:5
>  #7 in 
icu_67::RuleBasedNumberFormat::initializeDecimalFormatSymbols(UErrorCode&) at 
workdir/UnpackedTarball/icu/source/i18n/rbnf.cpp:1854:53
>  #8 in icu_67::RuleBasedNumberFormat::init(icu_67::UnicodeString const&, 
icu_67::LocalizationInfo*, UParseError&, UErrorCode&) at 
workdir/UnpackedTarball/icu/source/i18n/rbnf.cpp:1488:5
>  #9 in 
icu_67::RuleBasedNumberFormat::RuleBasedNumberFormat(icu_67::URBNFRuleSetTag, 
icu_67::Locale const&, UErrorCode&) at 
workdir/UnpackedTarball/icu/source/i18n/rbnf.cpp:867:9
>  #10 in i18npool::OrdinalSuffixService::getOrdinalSuffix(int, 
com::sun::star::lang::Locale const&) at 
i18npool/source/ordinalsuffix/ordinalsuffix.cxx:79:32
>  #11 in non-virtual thunk to 
i18npool::OrdinalSuffixService::getOrdinalSuffix(int, 
com::sun::star::lang::Locale const&) at 
i18npool/source/ordinalsuffix/ordinalsuffix.cxx
>  #12 in TestOrdinalSuffix::testFrench() at 
i18npool/qa/cppunit/test_ordinalsuffix.cxx:53:29

etc.

Change-Id: I4a87ee36fd33791c3906d6b6adc72ec824c4b3ae
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/94047
Tested-by: Jenkins
Reviewed-by: Stephan Bergmann 

diff --git a/external/icu/ubsan.patch b/external/icu/ubsan.patch
index 9acae66465d4..762bd6e5ae15 100644
--- a/external/icu/ubsan.patch
+++ b/external/icu/ubsan.patch
@@ -1,3 +1,25 @@
+--- source/common/uloc.cpp
 source/common/uloc.cpp
+@@ -1203,7 +1203,8 @@
+ return 0;
+ }
+ int32_t reslen = result.length();
+-uprv_memcpy(language, result.data(), std::min(reslen, languageCapacity));
++auto const n = std::min(reslen, languageCapacity);
++if (n != 0) uprv_memcpy(language, result.data(), n);
+ return reslen;
+ }
+ 
+@@ -1251,7 +1252,8 @@
+ return 0;
+ }
+ int32_t reslen = result.length();
+-uprv_memcpy(script, result.data(), std::min(reslen, scriptCapacity));
++auto const n = std::min(reslen, scriptCapacity);
++if (n != 0) uprv_memcpy(script, result.data(), n);
+ return reslen;
+ }
+ 
 --- source/tools/genrb/rbutil.c
 +++ source/tools/genrb/rbutil.c
 @@ -30,7 +30,12 @@
___
Libreoffice-commits mailing list
libreoffice-comm...@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/libreoffice-commits


[Libreoffice-commits] core.git: external/icu

2020-03-24 Thread Michael Stahl (via logerrit)
 external/icu/UnpackedTarball_icu.mk   |1 
 external/icu/b7d08bc04a4296982fcef8b6b8a354a9e4e7afca.patch.2 |  118 ++
 2 files changed, 119 insertions(+)

New commits:
commit 002d1152dc418f7d624409e76cd9d4ac0b42c7f8
Author: Michael Stahl 
AuthorDate: Tue Mar 24 10:48:04 2020 +0100
Commit: Michael Stahl 
CommitDate: Tue Mar 24 11:30:27 2020 +0100

icu: add patch to fix CVE-2020-10531

Change-Id: I0aca4af1bd79f28bf1c920a4d05e80948106aaac
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/90971
Tested-by: Jenkins
Reviewed-by: Michael Stahl 

diff --git a/external/icu/UnpackedTarball_icu.mk 
b/external/icu/UnpackedTarball_icu.mk
index 2a07900f8d38..96dcd45c30a4 100644
--- a/external/icu/UnpackedTarball_icu.mk
+++ b/external/icu/UnpackedTarball_icu.mk
@@ -40,6 +40,7 @@ $(eval $(call gb_UnpackedTarball_add_patches,icu,\
external/icu/c++20-comparison.patch \
external/icu/ubsan.patch \
external/icu/Wdeprecated-copy-dtor.patch \
+   external/icu/b7d08bc04a4296982fcef8b6b8a354a9e4e7afca.patch.2 \
 ))
 
 $(eval $(call 
gb_UnpackedTarball_add_file,icu,source/data/brkitr/khmerdict.dict,external/icu/khmerdict.dict))
diff --git a/external/icu/b7d08bc04a4296982fcef8b6b8a354a9e4e7afca.patch.2 
b/external/icu/b7d08bc04a4296982fcef8b6b8a354a9e4e7afca.patch.2
new file mode 100644
index ..07b3db6774be
--- /dev/null
+++ b/external/icu/b7d08bc04a4296982fcef8b6b8a354a9e4e7afca.patch.2
@@ -0,0 +1,118 @@
+From b7d08bc04a4296982fcef8b6b8a354a9e4e7afca Mon Sep 17 00:00:00 2001
+From: Frank Tang 
+Date: Sat, 1 Feb 2020 02:39:04 +
+Subject: [PATCH] ICU-20958 Prevent SEGV_MAPERR in append
+
+See #971
+---
+ icu4c/source/common/unistr.cpp  |  6 ++-
+ icu4c/source/test/intltest/ustrtest.cpp | 62 +
+ icu4c/source/test/intltest/ustrtest.h   |  1 +
+ 3 files changed, 68 insertions(+), 1 deletion(-)
+
+diff --git a/icu4c/source/common/unistr.cpp b/icu4c/source/common/unistr.cpp
+index 901bb3358ba..077b4d6ef20 100644
+--- a/icu4c/source/common/unistr.cpp
 b/icu4c/source/common/unistr.cpp
+@@ -1563,7 +1563,11 @@ UnicodeString::doAppend(const UChar *srcChars, int32_t 
srcStart, int32_t srcLeng
+   }
+ 
+   int32_t oldLength = length();
+-  int32_t newLength = oldLength + srcLength;
++  int32_t newLength;
++  if (uprv_add32_overflow(oldLength, srcLength, )) {
++setToBogus();
++return *this;
++  }
+ 
+   // Check for append onto ourself
+   const UChar* oldArray = getArrayStart();
+diff --git a/icu4c/source/test/intltest/ustrtest.cpp 
b/icu4c/source/test/intltest/ustrtest.cpp
+index b6515ea813c..ad38bdf53a3 100644
+--- a/icu4c/source/test/intltest/ustrtest.cpp
 b/icu4c/source/test/intltest/ustrtest.cpp
+@@ -67,6 +67,7 @@ void UnicodeStringTest::runIndexedTest( int32_t index, UBool 
exec, const char* &
+ TESTCASE_AUTO(TestWCharPointers);
+ TESTCASE_AUTO(TestNullPointers);
+ TESTCASE_AUTO(TestUnicodeStringInsertAppendToSelf);
++TESTCASE_AUTO(TestLargeAppend);
+ TESTCASE_AUTO_END;
+ }
+ 
+@@ -2310,3 +2311,64 @@ void 
UnicodeStringTest::TestUnicodeStringInsertAppendToSelf() {
+ str.insert(2, sub);
+ assertEquals("", u"abbcdcde", str);
+ }
++
++void UnicodeStringTest::TestLargeAppend() {
++if(quick) return;
++
++IcuTestErrorCode status(*this, "TestLargeAppend");
++// Make a large UnicodeString
++int32_t len = 0xAFF;
++UnicodeString str;
++char16_t *buf = str.getBuffer(len);
++// A fast way to set buffer to valid Unicode.
++// 4E4E is a valid unicode character
++uprv_memset(buf, 0x4e, len * 2);
++str.releaseBuffer(len);
++UnicodeString dest;
++// Append it 16 times
++// 0xAFF times 16 is 0xA4F1,
++// which is greater than INT32_MAX, which is 0x7FFF.
++int64_t total = 0;
++for (int32_t i = 0; i < 16; i++) {
++dest.append(str);
++total += len;
++if (total <= INT32_MAX) {
++assertFalse("dest is not bogus", dest.isBogus());
++} else {
++assertTrue("dest should be bogus", dest.isBogus());
++}
++}
++dest.remove();
++total = 0;
++for (int32_t i = 0; i < 16; i++) {
++dest.append(str);
++total += len;
++if (total + len <= INT32_MAX) {
++assertFalse("dest is not bogus", dest.isBogus());
++} else if (total <= INT32_MAX) {
++// Check that a string of exactly the maximum size works
++UnicodeString str2;
++int32_t remain = INT32_MAX - total;
++char16_t *buf2 = str2.getBuffer(remain);
++if (buf2 == nullptr) {
++// if somehow memory allocation fail, return the test
++return;
++}
++uprv_memset(buf2, 0x4e, remain * 2);
++str2.releaseBuffer(remain);
++dest.append(str2);
++total += remain;
++assertEquals("When a string of 

[Libreoffice-commits] core.git: external/icu

2019-12-04 Thread Stephan Bergmann (via logerrit)
 external/icu/UnpackedTarball_icu.mk  |1 +
 external/icu/Wdeprecated-copy-dtor.patch |   25 +
 2 files changed, 26 insertions(+)

New commits:
commit 02b0369d4fa8a55d2f8e1cfae3fc9b90ad3aab83
Author: Stephan Bergmann 
AuthorDate: Wed Dec 4 17:10:48 2019 +0100
Commit: Stephan Bergmann 
CommitDate: Wed Dec 4 18:47:40 2019 +0100

external/icu: Fix -Werror=deprecated-copy-dtor

...happening when LO code includes skia files:

> In file included from 
workdir/UnpackedTarball/icu/source/i18n/unicode/format.h:47,
>  from 
workdir/UnpackedTarball/icu/source/i18n/unicode/numfmt.h:39,
>  from i18nutil/source/utility/unicode.cxx:26:
> workdir/UnpackedTarball/icu/source/i18n/unicode/fieldpos.h: In copy 
constructor ‘icu_65::FieldPosition::FieldPosition(const 
icu_65::FieldPosition&)’:
> workdir/UnpackedTarball/icu/source/i18n/unicode/fieldpos.h:146:102: 
error: implicitly-declared ‘constexpr icu_65::UObject::UObject(const 
icu_65::UObject&)’ is deprecated [-Werror=deprecated-copy-dtor]
>   146 | : UObject(copy), fField(copy.fField), 
fBeginIndex(copy.fBeginIndex), fEndIndex(copy.fEndIndex) {}
>   |   
   ^
> In file included from 
workdir/UnpackedTarball/icu/source/common/unicode/bytestream.h:44,
>  from 
workdir/UnpackedTarball/icu/source/common/unicode/locid.h:38,
>  from include/i18nlangtag/languagetagicu.hxx:16,
>  from i18nutil/source/utility/unicode.cxx:23:
> 
/data/sbergman/lo-gcc/core/workdir/UnpackedTarball/icu/source/common/unicode/uobject.h:230:13:
 note: because ‘icu_65::UObject’ has user-provided ‘virtual 
icu_65::UObject::~UObject()’
>   230 | virtual ~UObject();
>   | ^

See e9e4eb0736d5582fa37dcad20bf5826c50029249 "Fix some
-Werror=deprecated-copy-dtor" for details about -Wdeprecated-copy-dtor.

Change-Id: I89b94047af30452dd4e316b33877dd0775a851aa
Reviewed-on: https://gerrit.libreoffice.org/84426
Tested-by: Jenkins
Reviewed-by: Stephan Bergmann 

diff --git a/external/icu/UnpackedTarball_icu.mk 
b/external/icu/UnpackedTarball_icu.mk
index d615a1fe855e..2a07900f8d38 100644
--- a/external/icu/UnpackedTarball_icu.mk
+++ b/external/icu/UnpackedTarball_icu.mk
@@ -39,6 +39,7 @@ $(eval $(call gb_UnpackedTarball_add_patches,icu,\
external/icu/char8_t.patch \
external/icu/c++20-comparison.patch \
external/icu/ubsan.patch \
+   external/icu/Wdeprecated-copy-dtor.patch \
 ))
 
 $(eval $(call 
gb_UnpackedTarball_add_file,icu,source/data/brkitr/khmerdict.dict,external/icu/khmerdict.dict))
diff --git a/external/icu/Wdeprecated-copy-dtor.patch 
b/external/icu/Wdeprecated-copy-dtor.patch
new file mode 100644
index ..67078ef1bb59
--- /dev/null
+++ b/external/icu/Wdeprecated-copy-dtor.patch
@@ -0,0 +1,25 @@
+--- source/common/unicode/uobject.h
 source/common/unicode/uobject.h
+@@ -245,10 +245,10 @@
+ // direct use of UObject itself
+ 
+ // default constructor
+-// inline UObject() {}
++UObject() = default;
+ 
+ // copy constructor
+-// inline UObject(const UObject ) {}
++UObject(const UObject ) = default;
+ 
+ #if 0
+ // TODO Sometime in the future. Implement operator==().
+@@ -280,8 +280,8 @@
+  * Subclasses need this assignment operator if they use compiler-provided
+  * assignment operators of their own. An alternative to not declaring one
+  * here would be to declare and empty-implement a protected or public one.
+-UObject ::operator=(const UObject &);
+  */
++UObject =(const UObject &) = default;
+ };
+ 
+ #ifndef U_HIDE_INTERNAL_API
___
Libreoffice-commits mailing list
libreoffice-comm...@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/libreoffice-commits

[Libreoffice-commits] core.git: external/icu

2019-10-29 Thread Stephan Bergmann (via logerrit)
 external/icu/UnpackedTarball_icu.mk |3 ---
 1 file changed, 3 deletions(-)

New commits:
commit 4e7d4eac01f180b19aea98e1f40b4cffe3fd2aac
Author: Stephan Bergmann 
AuthorDate: Tue Oct 29 07:47:19 2019 +0100
Commit: Stephan Bergmann 
CommitDate: Tue Oct 29 08:38:12 2019 +0100

Adapt comment

external/icu/clang-cl.patch has been dropped by
398e1e6ae83999eea8fb8c845190667695ac115f "Upgrade to ICU 64.2"

Change-Id: Ic1ab2b02820cc15f9b14bdaab4554e1da5234623
Reviewed-on: https://gerrit.libreoffice.org/81638
Tested-by: Jenkins
Reviewed-by: Stephan Bergmann 

diff --git a/external/icu/UnpackedTarball_icu.mk 
b/external/icu/UnpackedTarball_icu.mk
index 388b7305bc2d..dfa7a28d4994 100644
--- a/external/icu/UnpackedTarball_icu.mk
+++ b/external/icu/UnpackedTarball_icu.mk
@@ -21,9 +21,6 @@ $(eval $(call gb_UnpackedTarball_set_pre_action,icu,\
 
 $(eval $(call gb_UnpackedTarball_set_patchlevel,icu,0))
 
-# * external/icu/clang-cl.patch is covered by upstream
-#   

 "ICU-20209
-#   Fix build failures on Windows with std::atomic not in enclo…":
 $(eval $(call gb_UnpackedTarball_add_patches,icu,\
external/icu/icu4c-build.patch.1 \
external/icu/icu4c-aix.patch.1 \
___
Libreoffice-commits mailing list
libreoffice-comm...@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/libreoffice-commits

[Libreoffice-commits] core.git: external/icu

2019-10-29 Thread Stephan Bergmann (via logerrit)
 external/icu/UnpackedTarball_icu.mk |1 +
 external/icu/ubsan.patch|   30 ++
 2 files changed, 31 insertions(+)

New commits:
commit 78fbbc77d0e3318c6490470f8050a5b1e3cae28d
Author: Stephan Bergmann 
AuthorDate: Mon Oct 28 16:43:23 2019 +0100
Commit: Stephan Bergmann 
CommitDate: Tue Oct 29 07:42:31 2019 +0100

external/icu: Fix UBSan nullptr-with-nonzero-offset

...(new with Clang 10 trunk), as seen during ExternalProject_icu:

> rbutil.c:49:67: runtime error: applying non-zero offset 1 to null pointer
>  #0 in get_basename at 
workdir/UnpackedTarball/icu/source/tools/genrb/rbutil.c:49:67
>  #1 in make_res_filename(char const*, char const*, char const*, 
UErrorCode&) at workdir/UnpackedTarball/icu/source/tools/genrb/genrb.cpp:768:5
>  #2 in processFile(char const*, char const*, char const*, char const*, 
char const*, SRBRoot*, signed char, UErrorCode&) at 
workdir/UnpackedTarball/icu/source/tools/genrb/genrb.cpp:695:14
>  #3 in main at 
workdir/UnpackedTarball/icu/source/tools/genrb/genrb.cpp:527:9

> rbutil.c:54:67: runtime error: applying non-zero offset 1 to null pointer
>  #0 in get_basename at 
workdir/UnpackedTarball/icu/source/tools/genrb/rbutil.c:54:67
>  #1 in make_res_filename(char const*, char const*, char const*, 
UErrorCode&) at workdir/UnpackedTarball/icu/source/tools/genrb/genrb.cpp:768:5
>  #2 in processFile(char const*, char const*, char const*, char const*, 
char const*, SRBRoot*, signed char, UErrorCode&) at 
workdir/UnpackedTarball/icu/source/tools/genrb/genrb.cpp:695:14
>  #3 in main at 
workdir/UnpackedTarball/icu/source/tools/genrb/genrb.cpp:527:9

(uprv_strrchr appears to be plain strrchr, see
workdir/UnpackedTarball/icu/source/common/cstring.h, so returns null for 
"not
found", and in both of the fixed places, the following

  if(lastSlash>filename)

was apparently meant to filter out cases where uprv_strrchr returned null.)

Change-Id: I32b3a72955d33d73fa4295cf5f91a69fd270efeb
Reviewed-on: https://gerrit.libreoffice.org/81613
Tested-by: Jenkins
Reviewed-by: Stephan Bergmann 

diff --git a/external/icu/UnpackedTarball_icu.mk 
b/external/icu/UnpackedTarball_icu.mk
index 4e23ba2686be..388b7305bc2d 100644
--- a/external/icu/UnpackedTarball_icu.mk
+++ b/external/icu/UnpackedTarball_icu.mk
@@ -43,6 +43,7 @@ $(eval $(call gb_UnpackedTarball_add_patches,icu,\
external/icu/char8_t.patch \
external/icu/c++20-comparison.patch \
external/icu/icu4c-64-54558d1dd01b29c763ca12b6327108fe3ac66637.patch.2 \
+   external/icu/ubsan.patch \
 ))
 
 $(eval $(call 
gb_UnpackedTarball_add_file,icu,source/data/brkitr/khmerdict.dict,external/icu/khmerdict.dict))
diff --git a/external/icu/ubsan.patch b/external/icu/ubsan.patch
new file mode 100644
index ..9acae66465d4
--- /dev/null
+++ b/external/icu/ubsan.patch
@@ -0,0 +1,30 @@
+--- source/tools/genrb/rbutil.c
 source/tools/genrb/rbutil.c
+@@ -30,7 +30,12 @@
+ get_dirname(char *dirname,
+ const char *filename)
+ {
+-  const char *lastSlash = uprv_strrchr(filename, U_FILE_SEP_CHAR) + 1;
++  const char *lastSlash = uprv_strrchr(filename, U_FILE_SEP_CHAR);
++  if(lastSlash == NULL) {
++lastSlash = filename;
++  } else {
++ ++lastSlash;
++  }
+ 
+   if(lastSlash>filename) {
+ uprv_strncpy(dirname, filename, (lastSlash - filename));
+@@ -46,7 +51,12 @@
+  const char *filename)
+ {
+   /* strip off any leading directory portions */
+-  const char *lastSlash = uprv_strrchr(filename, U_FILE_SEP_CHAR) + 1;
++  const char *lastSlash = uprv_strrchr(filename, U_FILE_SEP_CHAR);
++  if(lastSlash == NULL) {
++lastSlash = filename;
++  } else {
++ ++lastSlash;
++  }
+   char *lastDot;
+ 
+   if(lastSlash>filename) {
___
Libreoffice-commits mailing list
libreoffice-comm...@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/libreoffice-commits

[Libreoffice-commits] core.git: external/icu

2019-10-22 Thread Stephan Bergmann (via logerrit)
 external/icu/UnpackedTarball_icu.mk |1 
 external/icu/c++20-comparison.patch |  171 
 2 files changed, 172 insertions(+)

New commits:
commit cde9b22a9225801d58ed0ab56fbd065f4e51eb92
Author: Stephan Bergmann 
AuthorDate: Tue Oct 22 09:19:17 2019 +0200
Commit: Stephan Bergmann 
CommitDate: Tue Oct 22 12:13:34 2019 +0200

exernal/icu: Various C++20 comparison operator fixes

There are three patterns here:

* Missing const (source/common/uvector.cpp, source/common/uvector.h):  
Overload
  resolution ambiguities when a synthesized canditate of operator == for a
  reversed-argument rewrite conflicts with the actual operator ==, due to 
the
  asymmetric const-ness of the implicit object parameter and the RHS 
parameter:

> uniset.cpp:360:18: error: use of overloaded operator '!=' is ambiguous 
(with operand types 'icu_63::UVector' and 'icu_63::UVector')
> if (*strings != *o.strings) return FALSE;
>  ^  ~~
> ./uvector.h:385:23: note: candidate function
> inline UBool UVector::operator!=(const UVector& other) {
>   ^
> ./uvector.h:116:11: note: candidate function
> UBool operator==(const UVector& other);
>   ^
> ./uvector.h:116:11: note: candidate function (with reversed parameter 
order)

* UBool -> bool (source/i18n/tzrule.cpp, source/i18n/unicode/tzrule.h):
  [over.match.oper]/9 (of the current C++20 draft) states:  "If a rewritten
  operator== candidate is selected [...], its return type shall be cv bool":

> basictz.cpp:411:37: error: return type 'UBool' (aka 'signed char') of 
selected 'operator==' function for rewritten '==' comparison is not 'bool'
> if (*(tzt0.getTo()) == *tar) {
> ~~~ ^  
> ./unicode/tzrule.h:675:19: note: declared here
> virtual UBool operator==(const TimeZoneRule& that) const;
>   ^

* Additional operator != (source/i18n/unicode/rbtz.h,
  source/i18n/unicode/simpletz.h, source/i18n/unicode/smpdtfmt.h,
  source/i18n/unicode/stsearch.h, source/i18n/unicode/tzrule.h,
  source/i18n/unicode/vtzone.h):  Similar to the previous pattern, but here 
the
  original operator used was !=, so an alternative fix (that reqires fewer
  changes to the code overall) is to add specific operator != overloads:

> rbtz.cpp:79:15: error: use of overloaded operator '!=' is ambiguous (with 
operand types 'icu_63::RuleBasedTimeZone' and 'const icu_63::RuleBasedTimeZone')
> if (*this != right) {
> ~ ^  ~
> ./unicode/rbtz.h:87:19: note: candidate function
> virtual UBool operator!=(const TimeZone& that) const;
>   ^
> ./unicode/rbtz.h:77:19: note: candidate function
> virtual UBool operator==(const TimeZone& that) const;
>   ^
> ./unicode/rbtz.h:77:19: note: candidate function (with reversed parameter 
order)
> rbtz.cpp:101:23: error: use of overloaded operator '!=' is ambiguous 
(with operand types 'icu_63::InitialTimeZoneRule' and 
'icu_63::InitialTimeZoneRule')
> if (*fInitialRule != *(rbtz->fInitialRule)) {
> ~ ^  ~
> ./unicode/tzrule.h:257:19: note: candidate function
> virtual UBool operator!=(const TimeZoneRule& that) const;
>   ^
> ./unicode/tzrule.h:248:18: note: candidate function
> virtual bool operator==(const TimeZoneRule& that) const;
>  ^
> ./unicode/tzrule.h:248:18: note: candidate function (with reversed 
parameter order)
> rbtz.cpp:535:23: error: use of overloaded operator '!=' is ambiguous 
(with operand types 'icu_63::InitialTimeZoneRule' and 
'icu_63::InitialTimeZoneRule')
> if (*fInitialRule != *(that.fInitialRule)) {
> ~ ^  
> ./unicode/tzrule.h:257:19: note: candidate function
> virtual UBool operator!=(const TimeZoneRule& that) const;
>   ^
> ./unicode/tzrule.h:248:18: note: candidate function
> virtual bool operator==(const TimeZoneRule& that) const;
>  ^
> ./unicode/tzrule.h:248:18: note: candidate function (with reversed 
parameter order)
>
> olsontz.cpp:630:69: error: return type 'UBool' (aka 'signed char') of 
selected 'operator==' function for rewritten '!=' comparison is not 'bool'
> || (finalZone != NULL && z->finalZone != NULL && *finalZone != 
*z->finalZone)) {
>  ~~ ^  
~
> ./unicode/simpletz.h:112:19: note: declared here
> virtual UBool operator==(const TimeZone& that) const;
>   ^

> dtitvfmt.cpp:223:62: error: return type 'UBool' (aka 'signed char') of 
selected 

[Libreoffice-commits] core.git: external/icu

2019-10-02 Thread Stephan Bergmann (via logerrit)
 external/icu/UnpackedTarball_icu.mk |4 +++
 external/icu/clang-cl.patch |   37 
 2 files changed, 41 insertions(+)

New commits:
commit 4d45df2632e3d8e34315c8ee76575587a62a
Author: Stephan Bergmann 
AuthorDate: Tue Oct 1 13:26:38 2019 +0200
Commit: Stephan Bergmann 
CommitDate: Wed Oct 2 08:18:41 2019 +0200

external/icu: Fix "error: explicit instantiation of 'atomic' not in...

...a namespace enclosing 'std'" (clang-cl).  (Upstream  "ICU-20209 
Fix
build failures on Windows with std::atomic not in enclo…" covers more 
things, so
just include here what is absolutely necessary for our needs.

Change-Id: I10e61b24a5d73b372bfd719d97fc9678029dc205
Reviewed-on: https://gerrit.libreoffice.org/79953
Tested-by: Jenkins
Reviewed-by: Stephan Bergmann 

diff --git a/external/icu/UnpackedTarball_icu.mk 
b/external/icu/UnpackedTarball_icu.mk
index 9e5f7974a700..d8a16e0e3777 100644
--- a/external/icu/UnpackedTarball_icu.mk
+++ b/external/icu/UnpackedTarball_icu.mk
@@ -21,6 +21,9 @@ $(eval $(call gb_UnpackedTarball_set_pre_action,icu,\
 
 $(eval $(call gb_UnpackedTarball_set_patchlevel,icu,0))
 
+# * external/icu/clang-cl.patch is covered by upstream
+#   

 "ICU-20209
+#   Fix build failures on Windows with std::atomic not in enclo…":
 $(eval $(call gb_UnpackedTarball_add_patches,icu,\
external/icu/icu4c-build.patch.1 \
external/icu/icu4c-aix.patch.1 \
@@ -39,6 +42,7 @@ $(eval $(call gb_UnpackedTarball_add_patches,icu,\
external/icu/gcc9.patch \
external/icu/char8_t.patch \
external/icu/CVE-2018-18928.patch.2 \
+   external/icu/clang-cl.patch \
 ))
 
 $(eval $(call 
gb_UnpackedTarball_add_file,icu,source/data/brkitr/khmerdict.dict,external/icu/khmerdict.dict))
diff --git a/external/icu/clang-cl.patch b/external/icu/clang-cl.patch
new file mode 100644
index ..83e7baecf266
--- /dev/null
+++ b/external/icu/clang-cl.patch
@@ -0,0 +1,37 @@
+--- source/common/umutex.h
 source/common/umutex.h
+@@ -54,15 +54,15 @@
+ 
+ #include 
+ 
+-U_NAMESPACE_BEGIN
+-
+ // Export an explicit template instantiation of std::atomic. 
+ // When building DLLs for Windows this is required as it is used as a data 
member of the exported SharedObject class.
+ // See digitlst.h, pluralaffix.h, datefmt.h, and others for similar examples.
+ #if U_PF_WINDOWS <= U_PLATFORM && U_PLATFORM <= U_PF_CYGWIN
+ template struct U_COMMON_API std::atomic;
+ #endif
+ 
++U_NAMESPACE_BEGIN
++
+ typedef std::atomic u_atomic_int32_t;
+ #define ATOMIC_INT32_T_INITIALIZER(val) ATOMIC_VAR_INIT(val)
+ 
+--- source/i18n/unicode/numberrangeformatter.h
 source/i18n/unicode/numberrangeformatter.h
+@@ -186,7 +186,13 @@
+  * (When building DLLs for Windows this is required.)
+  */
+ #if U_PF_WINDOWS <= U_PLATFORM && U_PLATFORM <= U_PF_CYGWIN && 
!defined(U_IN_DOXYGEN)
+-template struct U_I18N_API std::atomic;
++} // namespace number
++U_NAMESPACE_END
++
++template struct U_I18N_API std::atomic< U_NAMESPACE_QUALIFIER 
number::impl::NumberRangeFormatterImpl*>;
++
++U_NAMESPACE_BEGIN
++namespace number {  // icu::number
+ #endif
+ /** \endcond */
+ 
___
Libreoffice-commits mailing list
libreoffice-comm...@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/libreoffice-commits

[Libreoffice-commits] core.git: external/icu

2019-02-20 Thread Libreoffice Gerrit user
 external/icu/CVE-2018-18928.patch.2 |   63 
 external/icu/UnpackedTarball_icu.mk |1 
 2 files changed, 64 insertions(+)

New commits:
commit 5f04bdfcf95b0d8ff9c115f604f3f815b9018271
Author: Michael Stahl 
AuthorDate: Wed Feb 20 16:28:15 2019 +0100
Commit: Michael Stahl 
CommitDate: Wed Feb 20 19:03:25 2019 +0100

icu: fix CVE-2018-18928

Eike says that no LO code should use ICU number parser/formatter, but
meanwhile ICU is also used in the externals firebird, harfbuzz,
hunspell, libcdr, libebook, libfreehand, libmspub, libqxp, libivsio,
libxml2, libzmf, pdfium, xmlsec, so let's just patch it to be sure.

Change-Id: I3e1a76d7ceefadbe3c514ad7f1384a4daa196f36
Reviewed-on: https://gerrit.libreoffice.org/68098
Reviewed-by: Michael Stahl 
Tested-by: Michael Stahl 

diff --git a/external/icu/CVE-2018-18928.patch.2 
b/external/icu/CVE-2018-18928.patch.2
new file mode 100644
index ..f92cee05ceed
--- /dev/null
+++ b/external/icu/CVE-2018-18928.patch.2
@@ -0,0 +1,63 @@
+From 6cbd62e59e30f73b444be89ea71fd74275ac53a4 Mon Sep 17 00:00:00 2001
+From: Shane Carr 
+Date: Mon, 29 Oct 2018 23:52:44 -0700
+Subject: [PATCH] ICU-20246 Fixing another integer overflow in number parsing.
+
+(cherry picked from commit 53d8c8f3d181d87a6aa925b449b51c4a2c922a51)
+---
+ icu4c/source/i18n/fmtable.cpp  |  2 +-
+ icu4c/source/i18n/number_decimalquantity.cpp   |  5 -
+ icu4c/source/test/intltest/numfmtst.cpp|  8 
+ .../icu/impl/number/DecimalQuantity_AbstractBCD.java   |  5 -
+ .../impl/number/DecimalQuantity_DualStorageBCD.java| 10 +-
+ .../com/ibm/icu/dev/test/format/NumberFormatTest.java  |  5 +
+ 6 files changed, 31 insertions(+), 4 deletions(-)
+
+diff --git a/icu4c/source/i18n/fmtable.cpp b/icu4c/source/i18n/fmtable.cpp
+index 45c7024fc29..8601d95f4a6 100644
+--- a/icu4c/source/i18n/fmtable.cpp
 b/icu4c/source/i18n/fmtable.cpp
+@@ -734,7 +734,7 @@ CharString *Formattable::internalGetCharString(UErrorCode 
) {
+   // not print scientific notation for magnitudes greater than -5 and 
smaller than some amount (+5?).
+   if (fDecimalQuantity->isZero()) {
+ fDecimalStr->append("0", -1, status);
+-  } else if (std::abs(fDecimalQuantity->getMagnitude()) < 5) {
++  } else if (fDecimalQuantity->getMagnitude() != INT32_MIN && 
std::abs(fDecimalQuantity->getMagnitude()) < 5) {
+ fDecimalStr->appendInvariantChars(fDecimalQuantity->toPlainString(), 
status);
+   } else {
+ 
fDecimalStr->appendInvariantChars(fDecimalQuantity->toScientificString(), 
status);
+diff --git a/icu4c/source/i18n/number_decimalquantity.cpp 
b/icu4c/source/i18n/number_decimalquantity.cpp
+index 2c4182b1c6e..f6f2b20fab0 100644
+--- a/icu4c/source/i18n/number_decimalquantity.cpp
 b/icu4c/source/i18n/number_decimalquantity.cpp
+@@ -820,7 +820,10 @@ UnicodeString DecimalQuantity::toScientificString() const 
{
+ }
+ result.append(u'E');
+ int32_t _scale = upperPos + scale;
+-if (_scale < 0) {
++if (_scale == INT32_MIN) {
++result.append({u"-2147483648", -1});
++return result;
++} else if (_scale < 0) {
+ _scale *= -1;
+ result.append(u'-');
+ } else {
+diff --git a/icu4c/source/test/intltest/numfmtst.cpp 
b/icu4c/source/test/intltest/numfmtst.cpp
+index 34355939113..8d52dc122bf 100644
+--- a/icu4c/source/test/intltest/numfmtst.cpp
 b/icu4c/source/test/intltest/numfmtst.cpp
+@@ -9226,6 +9226,14 @@ void 
NumberFormatTest::Test20037_ScientificIntegerOverflow() {
+ assertEquals(u"Should not overflow and should parse only the first 
exponent",
+  u"1E-2147483647",
+  {sp.data(), sp.length(), US_INV});
++
++// Test edge case overflow of exponent
++result = Formattable();
++nf->parse(u".0003e-2147483644", result, status);
++sp = result.getDecimalNumber(status);
++assertEquals(u"Should not overflow",
++ u"3E-2147483648",
++ {sp.data(), sp.length(), US_INV});
+ }
+ 
+ void NumberFormatTest::Test13840_ParseLongStringCrash() {
diff --git a/external/icu/UnpackedTarball_icu.mk 
b/external/icu/UnpackedTarball_icu.mk
index b241e8db7c13..9e5f7974a700 100644
--- a/external/icu/UnpackedTarball_icu.mk
+++ b/external/icu/UnpackedTarball_icu.mk
@@ -38,6 +38,7 @@ $(eval $(call gb_UnpackedTarball_add_patches,icu,\
external/icu/icu4c-61-werror-shadow.patch.1 \
external/icu/gcc9.patch \
external/icu/char8_t.patch \
+   external/icu/CVE-2018-18928.patch.2 \
 ))
 
 $(eval $(call 
gb_UnpackedTarball_add_file,icu,source/data/brkitr/khmerdict.dict,external/icu/khmerdict.dict))
___
Libreoffice-commits mailing list
libreoffice-comm...@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/libreoffice-commits

[Libreoffice-commits] core.git: external/icu

2018-09-09 Thread Libreoffice Gerrit user
 external/icu/ExternalProject_icu.mk |4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)

New commits:
commit f09836cae28eaf43b895d9ee14f071f5e1248623
Author: Caolán McNamara 
AuthorDate: Sun Sep 9 14:48:07 2018 +0100
Commit: Caolán McNamara 
CommitDate: Sun Sep 9 16:56:10 2018 +0200

ofz#10100 use --disable-release to avoid icu adding extra link flags

so only use our passed in link flags, and so avoid failing under oss-fuzz 
with
linker problem

https://github.com/google/oss-fuzz/issues/1789

and revert the interim hackery to narrow down the problem

Change-Id: Ic92f65ac3895d36a2917281c260e177caf2d31f5
Reviewed-on: https://gerrit.libreoffice.org/60216
Tested-by: Jenkins
Reviewed-by: Caolán McNamara 
Tested-by: Caolán McNamara 

diff --git a/external/icu/ExternalProject_icu.mk 
b/external/icu/ExternalProject_icu.mk
index f0ce0d3b4c62..052a7c3c3dd9 100644
--- a/external/icu/ExternalProject_icu.mk
+++ b/external/icu/ExternalProject_icu.mk
@@ -65,8 +65,8 @@ $(call gb_ExternalProject_get_state_target,icu,build) :
CPPFLAGS=$(icu_CPPFLAGS) CFLAGS=$(icu_CFLAGS) \
CXXFLAGS=$(icu_CXXFLAGS) LDFLAGS=$(icu_LDFLAGS) \
./configure \
-   ac_cv_namespace_ok=yes \
--disable-layout --disable-samples \
+   $(if $(filter FUZZERS,$(BUILD_TYPE)),--disable-release) 
\
$(if $(CROSS_COMPILING),--disable-tools 
--disable-extras) \
$(if $(filter IOS ANDROID,$(OS)),--disable-dyload) \
$(if $(filter ANDROID,$(OS)),--disable-strict 
ac_cv_c_bigendian=no) \
@@ -75,7 +75,7 @@ $(call gb_ExternalProject_get_state_target,icu,build) :
--with-data-packaging=static --enable-static 
--disable-shared --disable-dyload,\
--disable-static --enable-shared $(if $(filter 
ANDROID,$(OS)),--with-library-suffix=lo)) \
$(if $(CROSS_COMPILING),--build=$(BUILD_PLATFORM) 
--host=$(HOST_PLATFORM)\
-   
--with-cross-build=$(WORKDIR_FOR_BUILD)/UnpackedTarball/icu/source) || cat 
config.log \
+   
--with-cross-build=$(WORKDIR_FOR_BUILD)/UnpackedTarball/icu/source) \
&& $(MAKE) $(if $(CROSS_COMPILING),DATASUBDIR=data) \
$(if $(filter MACOSX,$(OS)), \
&& $(PERL) 
$(SRCDIR)/solenv/bin/macosx-change-install-names.pl shl \
___
Libreoffice-commits mailing list
libreoffice-comm...@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/libreoffice-commits


[Libreoffice-commits] core.git: external/icu

2018-09-06 Thread Libreoffice Gerrit user
 external/icu/ExternalProject_icu.mk |2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

New commits:
commit b603c7629143b99f19f7ac6c4da2ab67d5ba20df
Author: Caolán McNamara 
AuthorDate: Thu Sep 6 10:55:39 2018 +0100
Commit: Caolán McNamara 
CommitDate: Thu Sep 6 13:56:21 2018 +0200

ofz#10100 dump failed icu config.log on failure

Change-Id: I53059b6be263b2abc00e8818a9aeae74b9902a1c
Reviewed-on: https://gerrit.libreoffice.org/60082
Tested-by: Jenkins
Reviewed-by: Caolán McNamara 
Tested-by: Caolán McNamara 

diff --git a/external/icu/ExternalProject_icu.mk 
b/external/icu/ExternalProject_icu.mk
index d4a3e9e7a9cb..d52f3e5d3036 100644
--- a/external/icu/ExternalProject_icu.mk
+++ b/external/icu/ExternalProject_icu.mk
@@ -74,7 +74,7 @@ $(call gb_ExternalProject_get_state_target,icu,build) :
--with-data-packaging=static --enable-static 
--disable-shared --disable-dyload,\
--disable-static --enable-shared $(if $(filter 
ANDROID,$(OS)),--with-library-suffix=lo)) \
$(if $(CROSS_COMPILING),--build=$(BUILD_PLATFORM) 
--host=$(HOST_PLATFORM)\
-   
--with-cross-build=$(WORKDIR_FOR_BUILD)/UnpackedTarball/icu/source) \
+   
--with-cross-build=$(WORKDIR_FOR_BUILD)/UnpackedTarball/icu/source) || cat 
config.log \
&& $(MAKE) $(if $(CROSS_COMPILING),DATASUBDIR=data) \
$(if $(filter MACOSX,$(OS)), \
&& $(PERL) 
$(SRCDIR)/solenv/bin/macosx-change-install-names.pl shl \
___
Libreoffice-commits mailing list
libreoffice-comm...@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/libreoffice-commits


[Libreoffice-commits] core.git: external/icu

2018-08-03 Thread Libreoffice Gerrit user
 external/icu/ExternalProject_icu.mk |2 +-
 external/icu/icu4c-android.patch.1  |   16 
 2 files changed, 17 insertions(+), 1 deletion(-)

New commits:
commit 03e0d86fe221ee3d8a8595fcd4ccf682101255f1
Author: Miklos Vajna 
AuthorDate: Fri Aug 3 09:27:12 2018 +0200
Commit: Miklos Vajna 
CommitDate: Fri Aug 3 11:56:57 2018 +0200

icu: fix Android build

Change-Id: I9c2f508098610ff97f059bb325401de052a35e3c
Reviewed-on: https://gerrit.libreoffice.org/58549
Reviewed-by: Miklos Vajna 
Tested-by: Jenkins

diff --git a/external/icu/ExternalProject_icu.mk 
b/external/icu/ExternalProject_icu.mk
index 1e94eef0fd5e..d4a3e9e7a9cb 100644
--- a/external/icu/ExternalProject_icu.mk
+++ b/external/icu/ExternalProject_icu.mk
@@ -49,7 +49,7 @@ icu_CXXFLAGS:="$(CXXFLAGS) $(CXXFLAGS_CXX11) \
$(if $(filter GCC,$(COM)),-fno-strict-aliasing) \
$(if $(filter $(true),$(gb_SYMBOL)),$(gb_DEBUGINFO_FLAGS)) \
$(if $(filter FUZZERS,$(BUILD_TYPE)),-DU_USE_STRTOD_L=0) \
-   $(if $(filter ANDROID,$(OS)),-fvisibility=hidden 
-fno-omit-frame-pointer)"
+   $(if $(filter ANDROID,$(OS)),-fvisibility=hidden 
-fno-omit-frame-pointer $(SOLARINC))"
 icu_LDFLAGS:=" \
$(if $(ENABLE_LTO),$(gb_LTOFLAGS)) \
$(if $(filter 
TRUE,$(HAVE_LD_HASH_STYLE)),-Wl$(COMMA)--hash-style=$(WITH_LINKER_HASH_STYLE)) \
diff --git a/external/icu/icu4c-android.patch.1 
b/external/icu/icu4c-android.patch.1
index 9c87a436055c..1f1fdcff2fb9 100644
--- a/external/icu/icu4c-android.patch.1
+++ b/external/icu/icu4c-android.patch.1
@@ -68,3 +68,19 @@ diff -ur icu.org/source/i18n/number_decimalquantity.cpp 
icu/source/i18n/number_d
  if (result != 0) {
  _setToLong(result);
  scale -= fracLength;
+--- icu/source/i18n/decimfmt.cpp.orig  2018-08-03 09:26:22.036924562 +0200
 icu/source/i18n/decimfmt.cpp   2018-08-03 09:25:14.169399374 +0200
+@@ -9,6 +9,13 @@
+ // Helpful in toString methods and elsewhere.
+ #define UNISTR_FROM_STRING_EXPLICIT
+ 
++#ifdef __ANDROID__
++#ifndef ARM
++#define ARM
++#endif
++#include 
++#endif
++
+ #include 
+ #include 
+ #include 
___
Libreoffice-commits mailing list
libreoffice-comm...@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/libreoffice-commits


[Libreoffice-commits] core.git: external/icu

2018-07-26 Thread Libreoffice Gerrit user
 external/icu/UnpackedTarball_icu.mk |3 +++
 external/icu/gcc9.patch |   27 +++
 2 files changed, 30 insertions(+)

New commits:
commit cec34c9862ebcc2cb60951b690bbdd09d0c6989d
Author: Stephan Bergmann 
AuthorDate: Thu Jul 26 10:29:18 2018 +0200
Commit: Stephan Bergmann 
CommitDate: Thu Jul 26 14:43:49 2018 +0200

external/icu: silence -Werror=deprecated-copy (GCC trunk towards GCC 9)

Change-Id: I43ecb3c0daac421e48433af04b1109bac02cc9aa
Reviewed-on: https://gerrit.libreoffice.org/58044
Tested-by: Jenkins
Reviewed-by: Stephan Bergmann 

diff --git a/external/icu/UnpackedTarball_icu.mk 
b/external/icu/UnpackedTarball_icu.mk
index 0abba05b5bbe..83a2968eb3fd 100644
--- a/external/icu/UnpackedTarball_icu.mk
+++ b/external/icu/UnpackedTarball_icu.mk
@@ -19,6 +19,8 @@ $(eval $(call gb_UnpackedTarball_set_pre_action,icu,\
unzip -q -d source -o 
$(gb_UnpackedTarget_TARFILE_LOCATION)/$(ICU_DATA_TARBALL) data/misc/icudata.rc \
 ))
 
+$(eval $(call gb_UnpackedTarball_set_patchlevel,icu,0))
+
 $(eval $(call gb_UnpackedTarball_add_patches,icu,\
external/icu/icu4c-build.patch.1 \
external/icu/icu4c-aix.patch.1 \
@@ -34,6 +36,7 @@ $(eval $(call gb_UnpackedTarball_add_patches,icu,\
$(if $(filter-out 
ANDROID,$(OS)),external/icu/icu4c-icudata-stdlibs.patch.1) \
external/icu/icu4c-khmerbreakengine.patch.1 \
external/icu/icu4c-61-werror-shadow.patch.1 \
+   external/icu/gcc9.patch \
 ))
 
 $(eval $(call 
gb_UnpackedTarball_add_file,icu,source/data/brkitr/khmerdict.dict,external/icu/khmerdict.dict))
diff --git a/external/icu/gcc9.patch b/external/icu/gcc9.patch
new file mode 100644
index ..5bacd203586f
--- /dev/null
+++ b/external/icu/gcc9.patch
@@ -0,0 +1,27 @@
+--- source/i18n/unicode/format.h
 source/i18n/unicode/format.h
+@@ -22,6 +22,13 @@
+ 
+ #ifndef FORMAT_H
+ #define FORMAT_H
++
++#ifdef __GNUC__
++#pragma GCC diagnostic push
++#pragma GCC diagnostic ignored "-Wpragmas" // for old GCC
++#pragma GCC diagnostic ignored "-Wunknown-warning-option" // for Clang
++#pragma GCC diagnostic ignored "-Wdeprecated-copy"
++#endif
+ 
+ 
+ #include "unicode/utypes.h"
+@@ -302,6 +309,10 @@
+ U_NAMESPACE_END
+ 
+ #endif /* #if !UCONFIG_NO_FORMATTING */
++
++#ifdef __GNUC__
++#pragma GCC diagnostic pop
++#endif
+ 
+ #endif // _FORMAT
+ //eof
___
Libreoffice-commits mailing list
libreoffice-comm...@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/libreoffice-commits


[Libreoffice-commits] core.git: external/icu

2018-07-24 Thread Libreoffice Gerrit user
 external/icu/UnpackedTarball_icu.mk |1 -
 external/icu/icu4c-icu11100.patch.1 |   27 ---
 2 files changed, 28 deletions(-)

New commits:
commit d0f44c46c678837f0b30928595d82443f3d53abe
Author: Michael Stahl 
AuthorDate: Fri Jul 13 14:41:39 2018 +0200
Commit: Caolán McNamara 
CommitDate: Tue Jul 24 17:33:12 2018 +0200

icu: icu4c-icu11100.patch.1 presumed obsolete

According to http://bugs.icu-project.org/trac/ticket/11100
the bug was fixed upstream in a different way so hopefully
this patch can be removed (but i don't know how to verify this).

Change-Id: I815c17dae3de2d57d2e0e247cf5823dfc1cc7109
Reviewed-on: https://gerrit.libreoffice.org/57391
Tested-by: Jenkins
Reviewed-by: Caolán McNamara 
Tested-by: Caolán McNamara 

diff --git a/external/icu/UnpackedTarball_icu.mk 
b/external/icu/UnpackedTarball_icu.mk
index 6800c1fb5ea8..0abba05b5bbe 100644
--- a/external/icu/UnpackedTarball_icu.mk
+++ b/external/icu/UnpackedTarball_icu.mk
@@ -28,7 +28,6 @@ $(eval $(call gb_UnpackedTarball_add_patches,icu,\
external/icu/icu4c-mkdir.patch.1 \
external/icu/icu4c-$(if $(filter ANDROID,$(OS)),android,rpath).patch.1 \
external/icu/icu4c-ubsan.patch.1 \
-   external/icu/icu4c-icu11100.patch.1 \
external/icu/icu4c-scriptrun.patch.1 \
external/icu/icu4c-rtti.patch.1 \
external/icu/icu4c-clang-cl.patch.1 \
diff --git a/external/icu/icu4c-icu11100.patch.1 
b/external/icu/icu4c-icu11100.patch.1
deleted file mode 100644
index 2f0e390961c1..
--- a/external/icu/icu4c-icu11100.patch.1
+++ /dev/null
@@ -1,27 +0,0 @@
-diff -ur icu.org/source/common/ubidi.cpp icu/source/common/ubidi.cpp
 icu.org/source/common/ubidi.cpp2017-03-07 23:57:46.0 +0100
-+++ icu/source/common/ubidi.cpp2017-04-21 22:55:11.352659142 +0200
-@@ -2125,6 +2125,14 @@
- return DirProp_ON;
- }
- 
-+static int
-+isolatesavailable(UBiDi *pBiDi) {
-+if (pBiDi->isolates == pBiDi->simpleIsolates) {
-+return pBiDi->isolateCount < SIMPLE_ISOLATES_COUNT-1;
-+}
-+return pBiDi->isolateCount < pBiDi->isolatesSize/sizeof(Isolate)-1;
-+}
-+
- static void
- resolveImplicitLevels(UBiDi *pBiDi,
-   int32_t start, int32_t limit,
-@@ -2271,7 +2279,7 @@
- /* look for the last char not a BN or LRE/RLE/LRO/RLO/PDF */
- for(i=limit-1; i>start&&(DIRPROP_FLAG(dirProps[i])_BN_EXPLICIT); 
i--);
- dirProp=dirProps[i];
--if((dirProp==LRI || dirProp==RLI) && limitlength) {
-+if((dirProp==LRI || dirProp==RLI) && limitlength && 
isolatesavailable(pBiDi)) {
- pBiDi->isolateCount++;
- pBiDi->isolates[pBiDi->isolateCount].stateImp=stateImp;
- pBiDi->isolates[pBiDi->isolateCount].state=levState.state;
___
Libreoffice-commits mailing list
libreoffice-comm...@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/libreoffice-commits


[Libreoffice-commits] core.git: external/icu

2018-04-18 Thread Stephan Bergmann
 external/icu/UnpackedTarball_icu.mk |1 +
 external/icu/icu4c-ubsan.patch.1|   14 ++
 2 files changed, 15 insertions(+)

New commits:
commit 811575c105b0a2bc597afda2f84a087199447ae5
Author: Stephan Bergmann 
Date:   Wed Apr 18 16:35:55 2018 +0200

Keep the still relevant part of external/icu/icu4c-ubsan.patch.1

...which f247f08e370626bbb427acd8f4a400fd875350a3 "Upgrade to ICU 61.1" had
removed completely, in error.

Change-Id: I7239011561851333cac58e54e4e7d590b8529dbc

diff --git a/external/icu/UnpackedTarball_icu.mk 
b/external/icu/UnpackedTarball_icu.mk
index b81cdaab6242..c789e6eb8d84 100644
--- a/external/icu/UnpackedTarball_icu.mk
+++ b/external/icu/UnpackedTarball_icu.mk
@@ -27,6 +27,7 @@ $(eval $(call gb_UnpackedTarball_add_patches,icu,\
external/icu/icu4c-solarisgcc.patch.1 \
external/icu/icu4c-mkdir.patch.1 \
external/icu/icu4c-$(if $(filter ANDROID,$(OS)),android,rpath).patch.1 \
+   external/icu/icu4c-ubsan.patch.1 \
external/icu/icu4c-icu11100.patch.1 \
external/icu/icu4c-scriptrun.patch.1 \
external/icu/icu4c-rtti.patch.1 \
diff --git a/external/icu/icu4c-ubsan.patch.1 b/external/icu/icu4c-ubsan.patch.1
new file mode 100644
index ..ea9f13fd85cd
--- /dev/null
+++ b/external/icu/icu4c-ubsan.patch.1
@@ -0,0 +1,14 @@
+diff -ur icu.org/source/common/ubidiimp.h icu/source/common/ubidiimp.h
+--- icu.org/source/common/ubidiimp.h   2017-02-03 19:57:23.0 +0100
 icu/source/common/ubidiimp.h   2017-04-21 22:46:25.374651159 +0200
+@@ -198,8 +198,8 @@
+ /* in a Run, logicalStart will get this bit set if the run level is odd */
+ #define INDEX_ODD_BIT (1UL<<31)
+ 
+-#define MAKE_INDEX_ODD_PAIR(index, level) ((index)|((int32_t)(level)<<31))
+-#define ADD_ODD_BIT_FROM_LEVEL(x, level)  ((x)|=((int32_t)(level)<<31))
++#define MAKE_INDEX_ODD_PAIR(index, level) ((index)|((uint32_t)(level)<<31))
++#define ADD_ODD_BIT_FROM_LEVEL(x, level)  ((x)|=((uint32_t)(level)<<31))
+ #define REMOVE_ODD_BIT(x) ((x)&=~INDEX_ODD_BIT)
+ 
+ #define GET_INDEX(x)   ((x)&~INDEX_ODD_BIT)
___
Libreoffice-commits mailing list
libreoffice-comm...@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/libreoffice-commits


[Libreoffice-commits] core.git: external/icu

2018-03-06 Thread David Tardon
 external/icu/UnpackedTarball_icu.mk |1 +
 external/icu/ofz4860.patch.2|   25 +
 2 files changed, 26 insertions(+)

New commits:
commit 2b69156c43261ceae55eb4d3b644c4c2d73231ba
Author: David Tardon 
Date:   Tue Mar 6 15:17:13 2018 +0100

forcepoint: fix out-of-bounds read in ICU

Change-Id: I5061d38d0e7df0de9a5c7574d522ce69934e4a24

diff --git a/external/icu/UnpackedTarball_icu.mk 
b/external/icu/UnpackedTarball_icu.mk
index 499650976a55..a4d0b16ecb36 100644
--- a/external/icu/UnpackedTarball_icu.mk
+++ b/external/icu/UnpackedTarball_icu.mk
@@ -35,6 +35,7 @@ $(eval $(call gb_UnpackedTarball_add_patches,icu,\
$(if $(filter-out 
ANDROID,$(OS)),external/icu/icu4c-icudata-stdlibs.patch.1) \
external/icu/icu4c-khmerbreakengine.patch.1 \
external/icu/icu4c-59-werror-shadow.patch.1 \
+   external/icu/ofz4860.patch.2 \
 ))
 
 $(eval $(call 
gb_UnpackedTarball_add_file,icu,source/data/brkitr/khmerdict.dict,external/icu/khmerdict.dict))
diff --git a/external/icu/ofz4860.patch.2 b/external/icu/ofz4860.patch.2
new file mode 100644
index ..14114d52878b
--- /dev/null
+++ b/external/icu/ofz4860.patch.2
@@ -0,0 +1,25 @@
+From 529ba01ee606940ca273b187be8ce9ba31cf2d90 Mon Sep 17 00:00:00 2001
+From: David Tardon 
+Date: Fri, 19 Jan 2018 10:41:02 +0100
+Subject: [PATCH] ofz#4860 fix past-the-end read from array
+
+---
+ icu4c/source/common/locmap.cpp | 2 +-
+ 1 file changed, 1 insertion(+), 1 deletion(-)
+
+diff --git a/icu4c/source/common/locmap.cpp b/icu4c/source/common/locmap.cpp
+index cbb2b810a..6d62d8310 100644
+--- a/icu4c/source/common/locmap.cpp
 b/icu4c/source/common/locmap.cpp
+@@ -1015,7 +1015,7 @@ static const char*
+ getPosixID(const ILcidPosixMap *this_0, uint32_t hostID)
+ {
+ uint32_t i;
+-for (i = 0; i <= this_0->numRegions; i++)
++for (i = 0; i < this_0->numRegions; i++)
+ {
+ if (this_0->regionMaps[i].hostID == hostID)
+ {
+-- 
+2.14.3
+
___
Libreoffice-commits mailing list
libreoffice-comm...@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/libreoffice-commits


[Libreoffice-commits] core.git: external/icu

2017-11-28 Thread Christian Lohmaier
 external/icu/ExternalProject_icu.mk |5 -
 1 file changed, 4 insertions(+), 1 deletion(-)

New commits:
commit 5030bde7975746df79f11bd569e75ad449dfd4d0
Author: Christian Lohmaier 
Date:   Wed Nov 22 20:22:00 2017 +0100

icu: don't skip building the data just because tools were disabled

building for e.g. android disables the tests and requests data in a
static library, but icu completely skips building the data directory in
case --disable-tools was specified:
icu/source/Makefile.in
@TOOLS_TRUE@DATASUBDIR = data
will become
#DATASUBDIR = data
and then
SUBDIRS =  stubdata common i18n $(LAYOUTEX) $(ICUIO) $(TOOLS) 
$(DATASUBDIR) $(EXTRA) $(SAMPLE) $(TEST)
will not have the data dir and make will ignore it.  Add it back by
specifying it when invoking make and all is fine.

Change-Id: I0af693f22938ebabdc189a97f1cfc3f8b1c042ee
Reviewed-on: https://gerrit.libreoffice.org/45107
Reviewed-by: Christian Lohmaier 
Tested-by: Jenkins 

diff --git a/external/icu/ExternalProject_icu.mk 
b/external/icu/ExternalProject_icu.mk
index 1a9c5ff90602..5bceb14e373b 100644
--- a/external/icu/ExternalProject_icu.mk
+++ b/external/icu/ExternalProject_icu.mk
@@ -58,6 +58,9 @@ icu_LDFLAGS:=" \
-Wl$(COMMA)-Bsymbolic-functions -Wl$(COMMA)--dynamic-list-cpp-new 
-Wl$(COMMA)--dynamic-list-cpp-typeinfo) \
 $(if $(filter ANDROID,$(OS)),-lgnustl_shared -lm)"
 
+# DATASUBDIR=data in cross-compiling case, because --disable-tools completely 
skips the
+# data directory/doesn't build the requested library in that case 
(icu/source/Makefile.in)
+# so we need to add it back to the list of subdirectories to build
 $(call gb_ExternalProject_get_state_target,icu,build) :
$(call gb_ExternalProject_run,build,\
CPPFLAGS=$(icu_CPPFLAGS) CFLAGS=$(icu_CFLAGS) \
@@ -73,7 +76,7 @@ $(call gb_ExternalProject_get_state_target,icu,build) :
--disable-static --enable-shared $(if $(filter 
ANDROID,$(OS)),--with-library-suffix=lo)) \
$(if $(CROSS_COMPILING),--build=$(BUILD_PLATFORM) 
--host=$(HOST_PLATFORM)\

--with-cross-build=$(WORKDIR_FOR_BUILD)/UnpackedTarball/icu/source) \
-   && $(MAKE) \
+   && $(MAKE) $(if $(CROSS_COMPILING),DATASUBDIR=data) \
$(if $(filter MACOSX,$(OS)), \
&& $(PERL) 
$(SRCDIR)/solenv/bin/macosx-change-install-names.pl shl \
URELIB \
___
Libreoffice-commits mailing list
libreoffice-comm...@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/libreoffice-commits


[Libreoffice-commits] core.git: external/icu

2017-11-21 Thread Christian Lohmaier
 external/icu/icu4c-android.patch.1 |   12 
 1 file changed, 12 insertions(+)

New commits:
commit cf39dec92d7c757c9bb5c0d95c0929d9f4e7ceb7
Author: Christian Lohmaier 
Date:   Tue Nov 21 12:47:29 2017 +0100

buildfix for icu/android – no member named 'round' in namespace 'std'

"number_decimalquantity.cpp:387:40: error: no member named 'round' in 
namespace 'std'; did you mean simply 'round'?"
auto result = static_cast(std::round(n));
   ^~
   round

/home/cl/Android/Sdk/ndk-bundle/platforms/android-14/arch-x86/usr/include/math.h:279:8:
 note: 'round' declared here
double  round(double);
^

Change-Id: If4dc1054469f234bfa9713eded1d325c71f9f79c

diff --git a/external/icu/icu4c-android.patch.1 
b/external/icu/icu4c-android.patch.1
index c62cf54e5936..9c87a436055c 100644
--- a/external/icu/icu4c-android.patch.1
+++ b/external/icu/icu4c-android.patch.1
@@ -56,3 +56,15 @@ diff -ur icu.org/source/configure icu/source/configure
  *)
  ;;
  esac
+diff -ur icu.org/source/i18n/number_decimalquantity.cpp 
icu/source/i18n/number_decimalquantity.cpp
+--- icu.org/source/i18n/number_decimalquantity.cpp 2017-11-21 
12:39:25.068592814 +0100
 icu/source/i18n/number_decimalquantity.cpp 2017-11-21 12:39:53.988590886 
+0100
+@@ -384,7 +384,7 @@
+ for (; i <= -22; i += 22) n /= 1e22;
+ n /= DOUBLE_MULTIPLIERS[-i];
+ }
+-auto result = static_cast(std::round(n));
++auto result = static_cast(round(n));
+ if (result != 0) {
+ _setToLong(result);
+ scale -= fracLength;
___
Libreoffice-commits mailing list
libreoffice-comm...@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/libreoffice-commits


[Libreoffice-commits] core.git: external/icu

2017-11-08 Thread Eike Rathke
 external/icu/UnpackedTarball_icu.mk|1 +
 external/icu/icu4c-changeset-40324.patch.1 |   11 +++
 2 files changed, 12 insertions(+)

New commits:
commit cebe1279665960b732c9cb05c18e481c33e778bb
Author: Eike Rathke 
Date:   Wed Nov 8 17:17:44 2017 +0100

Add ICU changeset-40324 fix for CVE-2017-14952

Change-Id: Ia457669c5ec6ef5c568f4550c44ef5df32a4be66

diff --git a/external/icu/UnpackedTarball_icu.mk 
b/external/icu/UnpackedTarball_icu.mk
index ca523006307c..7bf2926e5a83 100644
--- a/external/icu/UnpackedTarball_icu.mk
+++ b/external/icu/UnpackedTarball_icu.mk
@@ -37,6 +37,7 @@ $(eval $(call gb_UnpackedTarball_add_patches,icu,\
external/icu/icu4c-59-werror-undef.patch.1 \
external/icu/icu4c-59-werror-shadow.patch.1 \
external/icu/icu4c-59-icu13329-xlocale.patch.1 \
+   external/icu/icu4c-changeset-40324.patch.1 \
 ))
 
 $(eval $(call 
gb_UnpackedTarball_add_file,icu,source/data/brkitr/khmerdict.dict,external/icu/khmerdict.dict))
diff --git a/external/icu/icu4c-changeset-40324.patch.1 
b/external/icu/icu4c-changeset-40324.patch.1
new file mode 100644
index ..a651eb19415d
--- /dev/null
+++ b/external/icu/icu4c-changeset-40324.patch.1
@@ -0,0 +1,11 @@
+# 
https://ssl.icu-project.org/trac/changeset/40324/trunk/icu4c/source/i18n/zonemeta.cpp
+Index: trunk/icu4c/source/i18n/zonemeta.cpp
+===
+--- icu.orig/source/i18n/zonemeta.cpp
 icu/source/i18n/zonemeta.cpp
+@@ -691,5 +691,4 @@
+ if (U_FAILURE(status)) {
+ delete mzMappings;
+-deleteOlsonToMetaMappingEntry(entry);
+ uprv_free(entry);
+ break;
___
Libreoffice-commits mailing list
libreoffice-comm...@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/libreoffice-commits


[Libreoffice-commits] core.git: external/icu

2017-09-13 Thread Eike Rathke
 external/icu/UnpackedTarball_icu.mk|1 +
 external/icu/icu4c-59-icu13329-xlocale.patch.1 |   14 ++
 2 files changed, 15 insertions(+)

New commits:
commit 9e399bc613bb4ea1470bd52c64af920d4e9bc39b
Author: Eike Rathke 
Date:   Wed Sep 13 13:42:29 2017 +0200

icu: do not include non-standardized xlocale.h if U_PLATFORM_IS_LINUX_BASED

... should be more platforms ... but be conservative.
U_PLATFORM_IMPLEMENTS_POSIX does not hold what it promises.

"The file and this data structure is not standardized.  Don't rely on it.  
It
can go away without warning."

...

And since glibc 2.26 it's gone.

https://ssl.icu-project.org/trac/ticket/13329

Change-Id: I4c1f6130571f5d094cb35ce70e4d333763cee32a

diff --git a/external/icu/UnpackedTarball_icu.mk 
b/external/icu/UnpackedTarball_icu.mk
index 1ba15a448c75..7fa891f07d6d 100644
--- a/external/icu/UnpackedTarball_icu.mk
+++ b/external/icu/UnpackedTarball_icu.mk
@@ -35,6 +35,7 @@ $(eval $(call gb_UnpackedTarball_add_patches,icu,\
external/icu/icu4c-59-werror-undef.patch.1 \
external/icu/icu4c-59-werror-shadow.patch.1 \
external/icu/icu4c-iOS.patch.1 \
+   external/icu/icu4c-59-icu13329-xlocale.patch.1 \
 ))
 
 $(eval $(call 
gb_UnpackedTarball_add_file,icu,source/data/brkitr/khmerdict.dict,external/icu/khmerdict.dict))
diff --git a/external/icu/icu4c-59-icu13329-xlocale.patch.1 
b/external/icu/icu4c-59-icu13329-xlocale.patch.1
new file mode 100644
index ..93e14d23fa5a
--- /dev/null
+++ b/external/icu/icu4c-59-icu13329-xlocale.patch.1
@@ -0,0 +1,14 @@
+# xlocale.h is gone with glibc 2.26 and should never had been included.
+# https://ssl.icu-project.org/trac/ticket/13329
+diff -ur icu.org/source/i18n/digitlst.cpp icu/source/i18n/digitlst.cpp
+--- icu.org/source/i18n/digitlst.cpp   2017-01-20 01:20:31.0 +0100
 icu/source/i18n/digitlst.cpp   2017-09-13 13:25:59.980160603 +0200
+@@ -63,6 +63,8 @@
+ #if U_USE_STRTOD_L
+ # if U_PLATFORM_USES_ONLY_WIN32_API || U_PLATFORM == U_PF_CYGWIN
+ #   include 
++# elif U_PLATFORM_IS_LINUX_BASED
++#   include// should be for all POSIX.2008 compliant platforms, 
but..
+ # else
+ #   include 
+ # endif
___
Libreoffice-commits mailing list
libreoffice-comm...@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/libreoffice-commits


[Libreoffice-commits] core.git: external/icu

2017-09-13 Thread Stephan Bergmann
 external/icu/UnpackedTarball_icu.mk|1 -
 external/icu/icu4c-59-icu13329-xlocale.patch.1 |   14 --
 2 files changed, 15 deletions(-)

New commits:
commit f7d01f3ea5b472878255345ac6ddc113b0de9e2e
Author: Stephan Bergmann 
Date:   Wed Sep 13 09:04:50 2017 +0200

Revert "Do not include non-standardized xlocale.h, include locale.h instead"

This reverts commit 274b2aee3bf65f139292d08a46d86f90d5ac8acb, which breaks 
in
external/icu on macOS, 
:

> digitlst.cpp:497:8: error: unknown type name 'locale_t'
> static locale_t gCLocale = (locale_t)0;
>^

diff --git a/external/icu/UnpackedTarball_icu.mk 
b/external/icu/UnpackedTarball_icu.mk
index 7fa891f07d6d..1ba15a448c75 100644
--- a/external/icu/UnpackedTarball_icu.mk
+++ b/external/icu/UnpackedTarball_icu.mk
@@ -35,7 +35,6 @@ $(eval $(call gb_UnpackedTarball_add_patches,icu,\
external/icu/icu4c-59-werror-undef.patch.1 \
external/icu/icu4c-59-werror-shadow.patch.1 \
external/icu/icu4c-iOS.patch.1 \
-   external/icu/icu4c-59-icu13329-xlocale.patch.1 \
 ))
 
 $(eval $(call 
gb_UnpackedTarball_add_file,icu,source/data/brkitr/khmerdict.dict,external/icu/khmerdict.dict))
diff --git a/external/icu/icu4c-59-icu13329-xlocale.patch.1 
b/external/icu/icu4c-59-icu13329-xlocale.patch.1
deleted file mode 100644
index f57ec61e3ca6..
--- a/external/icu/icu4c-59-icu13329-xlocale.patch.1
+++ /dev/null
@@ -1,14 +0,0 @@
-# xlocale.h is gone with glibc 2.26 and should never had been included.
-# https://ssl.icu-project.org/trac/ticket/13329
-diff -ur icu.org/source/i18n/digitlst.cpp icu/source/i18n/digitlst.cpp
 icu.org/source/i18n/digitlst.cpp   2017-01-20 01:20:31.0 +0100
-+++ icu/source/i18n/digitlst.cpp   2017-09-12 22:03:15.019034749 +0200
-@@ -64,7 +64,7 @@
- # if U_PLATFORM_USES_ONLY_WIN32_API || U_PLATFORM == U_PF_CYGWIN
- #   include 
- # else
--#   include 
-+#   include 
- # endif
- #endif
- 
___
Libreoffice-commits mailing list
libreoffice-comm...@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/libreoffice-commits


[Libreoffice-commits] core.git: external/icu

2017-09-12 Thread Eike Rathke
 external/icu/UnpackedTarball_icu.mk|1 +
 external/icu/icu4c-59-icu13329-xlocale.patch.1 |   14 ++
 2 files changed, 15 insertions(+)

New commits:
commit 274b2aee3bf65f139292d08a46d86f90d5ac8acb
Author: Eike Rathke 
Date:   Tue Sep 12 22:14:07 2017 +0200

Do not include non-standardized xlocale.h, include locale.h instead

"The file and this data structure is not standardized.  Don't rely on it.  
It
can go away without warning."

...

And since glibc 2.26 it's gone.

https://ssl.icu-project.org/trac/ticket/13329

Change-Id: Iaf595b9c1be4eaab4306acb2c63c5a13dcb7a4e3
Reviewed-on: https://gerrit.libreoffice.org/42219
Reviewed-by: Eike Rathke 
Tested-by: Jenkins 

diff --git a/external/icu/UnpackedTarball_icu.mk 
b/external/icu/UnpackedTarball_icu.mk
index 1ba15a448c75..7fa891f07d6d 100644
--- a/external/icu/UnpackedTarball_icu.mk
+++ b/external/icu/UnpackedTarball_icu.mk
@@ -35,6 +35,7 @@ $(eval $(call gb_UnpackedTarball_add_patches,icu,\
external/icu/icu4c-59-werror-undef.patch.1 \
external/icu/icu4c-59-werror-shadow.patch.1 \
external/icu/icu4c-iOS.patch.1 \
+   external/icu/icu4c-59-icu13329-xlocale.patch.1 \
 ))
 
 $(eval $(call 
gb_UnpackedTarball_add_file,icu,source/data/brkitr/khmerdict.dict,external/icu/khmerdict.dict))
diff --git a/external/icu/icu4c-59-icu13329-xlocale.patch.1 
b/external/icu/icu4c-59-icu13329-xlocale.patch.1
new file mode 100644
index ..f57ec61e3ca6
--- /dev/null
+++ b/external/icu/icu4c-59-icu13329-xlocale.patch.1
@@ -0,0 +1,14 @@
+# xlocale.h is gone with glibc 2.26 and should never had been included.
+# https://ssl.icu-project.org/trac/ticket/13329
+diff -ur icu.org/source/i18n/digitlst.cpp icu/source/i18n/digitlst.cpp
+--- icu.org/source/i18n/digitlst.cpp   2017-01-20 01:20:31.0 +0100
 icu/source/i18n/digitlst.cpp   2017-09-12 22:03:15.019034749 +0200
+@@ -64,7 +64,7 @@
+ # if U_PLATFORM_USES_ONLY_WIN32_API || U_PLATFORM == U_PF_CYGWIN
+ #   include 
+ # else
+-#   include 
++#   include 
+ # endif
+ #endif
+ 
___
Libreoffice-commits mailing list
libreoffice-comm...@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/libreoffice-commits


[Libreoffice-commits] core.git: external/icu

2017-06-10 Thread jan Iversen
 external/icu/UnpackedTarball_icu.mk |1 +
 external/icu/icu4c-iOS.patch.1  |   21 +
 2 files changed, 22 insertions(+)

New commits:
commit fb61026d41fd4d4fc24c151e833e2a8ae2a78d9f
Author: jan Iversen 
Date:   Sat Jun 10 20:18:43 2017 +0200

iOS icu4c patch file added

Added support for arm64 in the icu4c configuration
(done in form of a patch to the original)

Change-Id: I96508c29261531a24ae946b247b18c55d6259f51

diff --git a/external/icu/UnpackedTarball_icu.mk 
b/external/icu/UnpackedTarball_icu.mk
index 1047fdebfeaf..1ba15a448c75 100644
--- a/external/icu/UnpackedTarball_icu.mk
+++ b/external/icu/UnpackedTarball_icu.mk
@@ -34,6 +34,7 @@ $(eval $(call gb_UnpackedTarball_add_patches,icu,\
external/icu/icu4c-khmerbreakengine.patch.1 \
external/icu/icu4c-59-werror-undef.patch.1 \
external/icu/icu4c-59-werror-shadow.patch.1 \
+   external/icu/icu4c-iOS.patch.1 \
 ))
 
 $(eval $(call 
gb_UnpackedTarball_add_file,icu,source/data/brkitr/khmerdict.dict,external/icu/khmerdict.dict))
diff --git a/external/icu/icu4c-iOS.patch.1 b/external/icu/icu4c-iOS.patch.1
new file mode 100644
index ..7661c7fe4915
--- /dev/null
+++ b/external/icu/icu4c-iOS.patch.1
@@ -0,0 +1,21 @@
+diff -ur icu.org/source/config.sub icu/source/config.sub
+--- icu.org/source/config.sub  2017-01-19 19:12:50.0 +0100
 icu/source/config.sub  2017-06-10 20:07:19.0 +0200
+@@ -253,7 +253,7 @@
+   | alpha64 | alpha64ev[4-8] | alpha64ev56 | alpha64ev6[78] | 
alpha64pca5[67] \
+   | am33_2.0 \
+   | arc | arceb \
+-  | arm | arm[bl]e | arme[lb] | armv[2-8] | armv[3-8][lb] | armv7[arm] \
++  | arm | arm[bl]e | arme[lb] | armv[2-8] | armv[3-8][lb] | armv7[arm] | 
arm64 \
+   | avr | avr32 \
+   | be32 | be64 \
+   | bfin \
+@@ -368,7 +368,7 @@
+   | alpha-* | alphaev[4-8]-* | alphaev56-* | alphaev6[78]-* \
+   | alpha64-* | alpha64ev[4-8]-* | alpha64ev56-* | alpha64ev6[78]-* \
+   | alphapca5[67]-* | alpha64pca5[67]-* | arc-* | arceb-* \
+-  | arm-*  | armbe-* | armle-* | armeb-* | armv*-* \
++  | arm-*  | armbe-* | armle-* | armeb-* | armv*-* | arm64-* \
+   | avr-* | avr32-* \
+   | be32-* | be64-* \
+   | bfin-* | bs2000-* \
___
Libreoffice-commits mailing list
libreoffice-comm...@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/libreoffice-commits


[Libreoffice-commits] core.git: external/icu

2017-04-27 Thread Eike Rathke
 external/icu/icu4c-59-werror-shadow.patch.1 |1 +
 1 file changed, 1 insertion(+)

New commits:
commit e24cd3818821971fe3c52820dafe0f5ccb4b023a
Author: Eike Rathke 
Date:   Thu Apr 27 15:17:40 2017 +0200

Add ICU ticket number for this patch

https://ssl.icu-project.org/trac/ticket/13176

Change-Id: I1bf7a0787f46186895e7ee9144d5f219ea59e2df

diff --git a/external/icu/icu4c-59-werror-shadow.patch.1 
b/external/icu/icu4c-59-werror-shadow.patch.1
index 8d09e44025e3..2031f80cb908 100644
--- a/external/icu/icu4c-59-werror-shadow.patch.1
+++ b/external/icu/icu4c-59-werror-shadow.patch.1
@@ -1,4 +1,5 @@
 diff -ur icu.org/source/common/unicode/char16ptr.h 
icu/source/common/unicode/char16ptr.h
+# https://ssl.icu-project.org/trac/ticket/13176
 --- icu.org/source/common/unicode/char16ptr.h  2017-03-29 06:44:37.0 
+0200
 +++ icu/source/common/unicode/char16ptr.h  2017-04-24 11:56:47.707572355 
+0200
 @@ -107,14 +107,14 @@
___
Libreoffice-commits mailing list
libreoffice-comm...@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/libreoffice-commits


[Libreoffice-commits] core.git: external/icu

2017-04-27 Thread Eike Rathke
 external/icu/icu4c-59-werror-undef.patch.1 |1 +
 1 file changed, 1 insertion(+)

New commits:
commit 8720877b8b6bc96e330842f7391ae49a21ec2f63
Author: Eike Rathke 
Date:   Thu Apr 27 14:42:38 2017 +0200

Add ICU ticket number for this patch

https://ssl.icu-project.org/trac/ticket/13175

Change-Id: Ib7756f3c41d2395f65d898e39808616c04ee58ee

diff --git a/external/icu/icu4c-59-werror-undef.patch.1 
b/external/icu/icu4c-59-werror-undef.patch.1
index 196d78984a18..0792e7357257 100644
--- a/external/icu/icu4c-59-werror-undef.patch.1
+++ b/external/icu/icu4c-59-werror-undef.patch.1
@@ -1,4 +1,5 @@
 diff -ur icu.org/source/common/unicode/uvernum.h 
icu/source/common/unicode/uvernum.h
+# https://ssl.icu-project.org/trac/ticket/13175
 --- icu.org/source/common/unicode/uvernum.h2017-03-21 02:03:49.0 
+0100
 +++ icu/source/common/unicode/uvernum.h2017-04-21 23:44:55.123597927 
+0200
 @@ -125,7 +125,7 @@
___
Libreoffice-commits mailing list
libreoffice-comm...@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/libreoffice-commits


[Libreoffice-commits] core.git: external/icu

2017-04-26 Thread Eike Rathke
 external/icu/UnpackedTarball_icu.mk |6 ++
 1 file changed, 2 insertions(+), 4 deletions(-)

New commits:
commit 89de6f62ae1e96d2c492cb5cd8f7d313b51e2f98
Author: Eike Rathke 
Date:   Wed Apr 26 20:08:42 2017 +0200

Upgrade to ICU 59.1 follow-up: only add icu/source/data/misc/icudata.rc

... instead of the entire icu4c-59_1-data.zip content.

Change-Id: Icfbf7d4103059f525b303b194212b78935fb00b1
Reviewed-on: https://gerrit.libreoffice.org/37001
Tested-by: Jenkins 
Reviewed-by: Eike Rathke 

diff --git a/external/icu/UnpackedTarball_icu.mk 
b/external/icu/UnpackedTarball_icu.mk
index 992001186d5f..1047fdebfeaf 100644
--- a/external/icu/UnpackedTarball_icu.mk
+++ b/external/icu/UnpackedTarball_icu.mk
@@ -12,11 +12,9 @@ $(eval $(call gb_UnpackedTarball_UnpackedTarball,icu))
 $(eval $(call gb_UnpackedTarball_set_tarball,icu,$(ICU_TARBALL)))
 
 # Data zip contains data/... and needs to end up in icu/source/data/...
-# Some files are overwritten with identical content.
-# -a to convert line endings from CrLf to LF (hopefully no binary identified as
-# text ...) so existing patches still apply and can be generated.
+# Only data/misc/icudata.rc is needed for a Cygwin/MSVC build.
 $(eval $(call gb_UnpackedTarball_set_pre_action,icu,\
-   unzip -q -a -d source -o 
$(gb_UnpackedTarget_TARFILE_LOCATION)/$(ICU_DATA_TARBALL) \
+   unzip -q -d source -o 
$(gb_UnpackedTarget_TARFILE_LOCATION)/$(ICU_DATA_TARBALL) data/misc/icudata.rc \
 ))
 
 $(eval $(call gb_UnpackedTarball_add_patches,icu,\
___
Libreoffice-commits mailing list
libreoffice-comm...@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/libreoffice-commits


[Libreoffice-commits] core.git: external/icu

2017-04-21 Thread Eike Rathke
 external/icu/UnpackedTarball_icu.mk|1 
 external/icu/icu4c-changeset-39671.patch.1 |  155 +
 2 files changed, 156 insertions(+)

New commits:
commit c7de8233d15ed0c90fef6c49a54d60cf10119f58
Author: Eike Rathke 
Date:   Thu Apr 20 22:06:23 2017 +0200

add ICU changeset-39671 fix for CVE-2017-7867 CVE-2017-7868

http://bugs.icu-project.org/trac/changeset/39671
https://bugs.chromium.org/p/oss-fuzz/issues/detail?id=213
https://bugzilla.redhat.com/show_bug.cgi?id=1444101

Change-Id: I4e776ad4fe63c77057b0c823f8672a2b6703346f
Reviewed-on: https://gerrit.libreoffice.org/36754
Reviewed-by: Eike Rathke 
Tested-by: Jenkins 

diff --git a/external/icu/UnpackedTarball_icu.mk 
b/external/icu/UnpackedTarball_icu.mk
index 194c8eb563c2..fae37f5dd922 100644
--- a/external/icu/UnpackedTarball_icu.mk
+++ b/external/icu/UnpackedTarball_icu.mk
@@ -26,6 +26,7 @@ $(eval $(call gb_UnpackedTarball_add_patches,icu,\
external/icu/clang-cl.patch.0 \
$(if $(filter-out 
ANDROID,$(OS)),external/icu/icu4c-icudata-stdlibs.diff) \
external/icu/khmerbreakengine.patch \
+   external/icu/icu4c-changeset-39671.patch.1 \
 ))
 
 $(eval $(call 
gb_UnpackedTarball_add_file,icu,source/data/brkitr/khmerdict.dict,external/icu/khmerdict.dict))
diff --git a/external/icu/icu4c-changeset-39671.patch.1 
b/external/icu/icu4c-changeset-39671.patch.1
new file mode 100644
index ..fa8d3679ebff
--- /dev/null
+++ b/external/icu/icu4c-changeset-39671.patch.1
@@ -0,0 +1,155 @@
+Index: /trunk/icu4c/source/common/utext.cpp
+===
+--- icu.orig/source/common/utext.cpp
 icu/source/common/utext.cpp
+@@ -848,7 +848,13 @@
+ 
+ // Chunk size.
+-// Must be less than 85, because of byte mapping from UChar indexes to 
native indexes.
+-// Worst case is three native bytes to one UChar.  (Supplemenaries are 4 
native bytes
+-// to two UChars.)
++// Must be less than 42  (256/6), because of byte mapping from UChar 
indexes to native indexes.
++// Worst case there are six UTF-8 bytes per UChar.
++// obsolete 6 byte form fd + 5 trails maps to fffd
++// obsolete 5 byte form fc + 4 trails maps to fffd
++// non-shortest 4 byte forms maps to fffd
++// normal supplementaries map to a pair of utf-16, two utf8 bytes per 
utf-16 unit
++// mapToUChars array size must allow for the worst case, 6.
++// This could be brought down to 4, by treating fd and fc as pure illegal,
++// rather than obsolete lead bytes. But that is not compatible with the 
utf-8 access macros.
+ //
+ enum { UTF8_TEXT_CHUNK_SIZE=32 };
+@@ -890,5 +896,5 @@
+  //one for a 
supplementary starting in the last normal position,
+  //and one for an 
entry for the buffer limit position.
+-uint8_t   mapToUChars[UTF8_TEXT_CHUNK_SIZE*3+6]; // Map native offset 
from bufNativeStart to
++uint8_t   mapToUChars[UTF8_TEXT_CHUNK_SIZE*6+6]; // Map native offset 
from bufNativeStart to
+  //   correspoding offset 
in filled part of buf.
+ int32_t   align;
+@@ -1033,4 +1039,5 @@
+ u8b = (UTF8Buf *)ut->p;   // the current buffer
+ mapIndex = ix - u8b->toUCharsMapStart;
++U_ASSERT(mapIndex < (int32_t)sizeof(UTF8Buf::mapToUChars));
+ ut->chunkOffset = u8b->mapToUChars[mapIndex] - u8b->bufStartIdx;
+ return TRUE;
+@@ -1299,4 +1306,8 @@
+ //   If index is at the end, there is no character there to look at.
+ if (ix != ut->b) {
++// Note: this function will only move the index back if it is on 
a trail byte
++//   and there is a preceding lead byte and the sequence from 
the lead 
++//   through this trail could be part of a valid UTF-8 
sequence
++//   Otherwise the index remains unchanged.
+ U8_SET_CP_START(s8, 0, ix);
+ }
+@@ -1312,5 +1323,8 @@
+ uint8_t *mapToNative = u8b->mapToNative;
+ uint8_t *mapToUChars = u8b->mapToUChars;
+-int32_t  toUCharsMapStart = ix - (UTF8_TEXT_CHUNK_SIZE*3 + 1);
++int32_t  toUCharsMapStart = ix - sizeof(UTF8Buf::mapToUChars) + 1;
++// Note that toUCharsMapStart can be negative. Happens when the 
remaining
++// text from current position to the beginning is less than the 
buffer size.
++// + 1 because mapToUChars must have a slot at the end for the 
bufNativeLimit entry.
+ int32_t  destIx = UTF8_TEXT_CHUNK_SIZE+2;   // Start in the overflow 
region
+ //   at end of buffer to 
leave room
+@@ -1339,4 +1353,5 @@
+ // Special case ASCII range for speed.
+   

[Libreoffice-commits] core.git: external/icu

2016-12-21 Thread Caolán McNamara
 external/icu/ExternalProject_icu.mk |2 ++
 1 file changed, 2 insertions(+)

New commits:
commit 528ddb973299d6e626b65cb3d247e25d0f1c4a67
Author: Caolán McNamara 
Date:   Wed Dec 21 12:05:46 2016 +

add the same build fix that oss-fuzz contains for icu for our icu

cause it doesn't build otherwise

see oss-fuzz/projects/icu/build.sh

Change-Id: I7e143aa58ec2a00f480496a908e07988a3bde869

diff --git a/external/icu/ExternalProject_icu.mk 
b/external/icu/ExternalProject_icu.mk
index 97f3975..4ff3b9f 100644
--- a/external/icu/ExternalProject_icu.mk
+++ b/external/icu/ExternalProject_icu.mk
@@ -56,6 +56,7 @@ icu_CFLAGS:=" \
$(if $(ENABLE_LTO),$(gb_LTOFLAGS)) \
$(if $(filter GCC,$(COM)),-fno-strict-aliasing) \
$(if $(filter $(true),$(gb_SYMBOL)),$(gb_DEBUGINFO_FLAGS)) \
+   $(if $(filter FUZZERS,$(BUILD_TYPE)),-DU_USE_STRTOD_L=0) \
$(if $(filter ANDROID,$(OS)),-fvisibility=hidden 
-fno-omit-frame-pointer)"
 icu_CXXFLAGS:="$(CXXFLAGS) $(CXXFLAGS_CXX11) \
$(if $(filter IOS,$(OS)),-DUCONFIG_NO_FILE_IO) \
@@ -63,6 +64,7 @@ icu_CXXFLAGS:="$(CXXFLAGS) $(CXXFLAGS_CXX11) \
$(if $(ENABLE_LTO),$(gb_LTOFLAGS)) \
$(if $(filter GCC,$(COM)),-fno-strict-aliasing) \
$(if $(filter $(true),$(gb_SYMBOL)),$(gb_DEBUGINFO_FLAGS)) \
+   $(if $(filter FUZZERS,$(BUILD_TYPE)),-DU_USE_STRTOD_L=0) \
$(if $(filter ANDROID,$(OS)),-fvisibility=hidden 
-fno-omit-frame-pointer)"
 icu_LDFLAGS:=" \
$(if $(ENABLE_LTO),$(gb_LTOFLAGS)) \
___
Libreoffice-commits mailing list
libreoffice-comm...@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/libreoffice-commits


[Libreoffice-commits] core.git: external/icu

2016-12-20 Thread Caolán McNamara
 external/icu/ExternalProject_icu.mk |4 +---
 1 file changed, 1 insertion(+), 3 deletions(-)

New commits:
commit 91b34f1a57213c1806bef6cdbd8ca113b65fe671
Author: Caolán McNamara 
Date:   Mon Dec 19 21:25:30 2016 +

static icu tweaking

Change-Id: Ic882b4d1a5b5eaee9e8c38a0c8dbe7cd39590b9c
Reviewed-on: https://gerrit.libreoffice.org/32219
Tested-by: Jenkins 
Reviewed-by: Caolán McNamara 
Tested-by: Caolán McNamara 

diff --git a/external/icu/ExternalProject_icu.mk 
b/external/icu/ExternalProject_icu.mk
index d5d98ff..97f3975 100644
--- a/external/icu/ExternalProject_icu.mk
+++ b/external/icu/ExternalProject_icu.mk
@@ -83,12 +83,10 @@ $(call gb_ExternalProject_get_state_target,icu,build) :
$(if $(filter ANDROID 
EMSCRIPTEN,$(OS)),--disable-strict ac_cv_c_bigendian=no) \
$(if $(filter SOLARIS AIX,$(OS)),--disable-64bit-libs) \
$(if $(filter TRUE,$(DISABLE_DYNLOADING)),\
-   --enable-static --disable-shared,\
+   --with-data-packaging=static --enable-static 
--disable-shared --disable-dyload,\
--disable-static --enable-shared $(if $(filter 
ANDROID,$(OS)),--with-library-suffix=lo)) \
$(if $(CROSS_COMPILING),--build=$(BUILD_PLATFORM) 
--host=$(HOST_PLATFORM)\

--with-cross-build=$(WORKDIR_FOR_BUILD)/UnpackedTarball/icu/source) \
-   $(if $(filter IOS,$(OS)), \
-   --with-data-packaging=archive) \
&& $(MAKE) \
$(if $(filter MACOSX,$(OS)), \
&& $(PERL) 
$(SRCDIR)/solenv/bin/macosx-change-install-names.pl shl \
___
Libreoffice-commits mailing list
libreoffice-comm...@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/libreoffice-commits


[Libreoffice-commits] core.git: external/icu

2016-11-22 Thread Stephan Bergmann
 external/icu/icu-ubsan.patch.0 |   10 ++
 1 file changed, 10 insertions(+)

New commits:
commit a0ed1c9ad9b72347eff85c80ab85d49e7a414396
Author: Stephan Bergmann 
Date:   Tue Nov 22 15:33:21 2016 +0100

external/icu: Silence -fsanitize=null

...as seen during CppunitTest_sd_dialogs_test:

> collationdatareader.cpp:422:13: runtime error: null pointer passed as 
argument 1, which is declared to never be null
> /usr/include/string.h:66:33: note: nonnull attribute specified here
> #0 0x7fc3fc837f72 in 
icu_58::CollationDataReader::read(icu_58::CollationTailoring const*, unsigned 
char const*, int, icu_58::CollationTailoring&, UErrorCode&) 
workdir/UnpackedTarball/icu/source/i18n/collationdatareader.cpp:422:13
> #1 0x7fc3fc7fc0bb in 
icu_58::CollationLoader::loadFromData(UErrorCode&) 
workdir/UnpackedTarball/icu/source/i18n/ucol_res.cpp:395:5
> #2 0x7fc3fc7fad16 in 
icu_58::CollationLoader::loadFromCollations(UErrorCode&) 
workdir/UnpackedTarball/icu/source/i18n/ucol_res.cpp:376:16
> #3 0x7fc3fc7f0c74 in 
icu_58::CollationLoader::createCacheEntry(UErrorCode&) 
workdir/UnpackedTarball/icu/source/i18n/ucol_res.cpp:221:16
> #4 0x7fc3fc7f079e in 
icu_58::LocaleCacheKey::createObject(void const*, 
UErrorCode&) const workdir/UnpackedTarball/icu/source/i18n/ucol_res.cpp:144:20
> #5 0x7fc4262d558f in icu_58::UnifiedCache::_get(icu_58::CacheKeyBase 
const&, icu_58::SharedObject const*&, void const*, UErrorCode&) const 
workdir/UnpackedTarball/icu/source/common/unifiedcache.cpp:409:17
> #6 0x7fc3fc806774 in void 
icu_58::UnifiedCache::get(icu_58::CacheKey
 const&, void const*, icu_58::CollationCacheEntry const*&, UErrorCode&) const 
workdir/UnpackedTarball/icu/source/i18n/../common/unifiedcache.h:234:8
> #7 0x7fc3fc7f1c93 in 
icu_58::CollationLoader::getCacheEntry(UErrorCode&) 
workdir/UnpackedTarball/icu/source/i18n/ucol_res.cpp:466:12
> #8 0x7fc3fc7f76d4 in 
icu_58::CollationLoader::loadFromBundle(UErrorCode&) 
workdir/UnpackedTarball/icu/source/i18n/ucol_res.cpp:299:16
> #9 0x7fc3fc7f0ae5 in 
icu_58::CollationLoader::createCacheEntry(UErrorCode&) 
workdir/UnpackedTarball/icu/source/i18n/ucol_res.cpp:219:16
> #10 0x7fc3fc7f079e in 
icu_58::LocaleCacheKey::createObject(void const*, 
UErrorCode&) const workdir/UnpackedTarball/icu/source/i18n/ucol_res.cpp:144:20
> #11 0x7fc4262d558f in icu_58::UnifiedCache::_get(icu_58::CacheKeyBase 
const&, icu_58::SharedObject const*&, void const*, UErrorCode&) const 
workdir/UnpackedTarball/icu/source/common/unifiedcache.cpp:409:17
> #12 0x7fc3fc806774 in void 
icu_58::UnifiedCache::get(icu_58::CacheKey
 const&, void const*, icu_58::CollationCacheEntry const*&, UErrorCode&) const 
workdir/UnpackedTarball/icu/source/i18n/../common/unifiedcache.h:234:8
> #13 0x7fc3fc7f1c93 in 
icu_58::CollationLoader::getCacheEntry(UErrorCode&) 
workdir/UnpackedTarball/icu/source/i18n/ucol_res.cpp:466:12
> #14 0x7fc3fc7f5a19 in 
icu_58::CollationLoader::loadFromLocale(UErrorCode&) 
workdir/UnpackedTarball/icu/source/i18n/ucol_res.cpp:247:16
> #15 0x7fc3fc7f0956 in 
icu_58::CollationLoader::createCacheEntry(UErrorCode&) 
workdir/UnpackedTarball/icu/source/i18n/ucol_res.cpp:217:16
> #16 0x7fc3fc7f079e in 
icu_58::LocaleCacheKey::createObject(void const*, 
UErrorCode&) const workdir/UnpackedTarball/icu/source/i18n/ucol_res.cpp:144:20
> #17 0x7fc4262d558f in icu_58::UnifiedCache::_get(icu_58::CacheKeyBase 
const&, icu_58::SharedObject const*&, void const*, UErrorCode&) const 
workdir/UnpackedTarball/icu/source/common/unifiedcache.cpp:409:17
> #18 0x7fc3fc806774 in void 
icu_58::UnifiedCache::get(icu_58::CacheKey
 const&, void const*, icu_58::CollationCacheEntry const*&, UErrorCode&) const 
workdir/UnpackedTarball/icu/source/i18n/../common/unifiedcache.h:234:8
> #19 0x7fc3fc7f1c93 in 
icu_58::CollationLoader::getCacheEntry(UErrorCode&) 
workdir/UnpackedTarball/icu/source/i18n/ucol_res.cpp:466:12
> #20 0x7fc3fc7f1525 in 
icu_58::CollationLoader::loadTailoring(icu_58::Locale const&, UErrorCode&) 
workdir/UnpackedTarball/icu/source/i18n/ucol_res.cpp:164:19
> #21 0x7fc3fc7ba783 in icu_58::Collator::makeInstance(icu_58::Locale 
const&, UErrorCode&) workdir/UnpackedTarball/icu/source/i18n/coll.cpp:460:40
> #22 0x7fc3fc7bb891 in icu_58::Collator::createInstance(icu_58::Locale 
const&, UErrorCode&) workdir/UnpackedTarball/icu/source/i18n/coll.cpp:448:16
> #23 0x7fc3f196cf17 in 
com::sun::star::i18n::Collator_Unicode::loadCollatorAlgorithm(rtl::OUString 
const&, com::sun::star::lang::Locale const&, int) 
i18npool/source/collator/collator_unicode.cxx:375:57
> #24 0x7fc3f1945c22 in 
com::sun::star::i18n::CollatorImpl::loadCollatorAlgorithm(rtl::OUString const&, 
com::sun::star::lang::Locale const&, int) 
i18npool/source/collator/collatorImpl.cxx:93:25
> #25 

[Libreoffice-commits] core.git: external/icu external/liblangtag RepositoryExternal.mk Repository.mk

2016-10-25 Thread Stephan Bergmann
 Repository.mk  |2 +-
 RepositoryExternal.mk  |   12 
 external/icu/ExternalPackage_icu.mk|4 
 external/icu/ExternalPackage_icu_ure.mk|   17 -
 external/icu/ExternalProject_icu.mk|   13 -
 external/icu/icu4c-build.patch |2 +-
 external/liblangtag/ExternalProject_langtag.mk |4 ++--
 7 files changed, 36 insertions(+), 18 deletions(-)

New commits:
commit 475e4b477c6d7ae114c3ae51ba4872882af67a68
Author: Stephan Bergmann 
Date:   Tue Oct 25 16:46:35 2016 +0200

Move i18nlangtag lib to URELIB

...as stoc/Library_javavm.mk depends on it since
9b09a217c79e8a35fc4de54c89ef49fbf8f72752 "Resolves: #i86470# Wrong Java 
locale
when using 'nl' and 'fr'".  The i18nlangtag lib in turn depends on libs from
external/liblangtag and external/icu, so those needed to be moved to URELIB,
too.

On Windows, the external icu package was already split into icu and icu_ure
(because "libxml2 is in URE and depends on icuuc*.dll on Windows"), so use 
that
splitting on all platforms.  (However, the corresponding changes that were
necessary in RepositoryExternal.mk suggest that they had been missing for 
the
split Windows case until now, and things had happened to work by accident?)

On macOS, a library's install name reflects its (URELIB, OOO, ...) layer, 
and in
external/icu/icu4c-build.patch there is only a single place to set that for 
all
libs from external/icu.  This patch changes that from OOO to URELIB, but 
for the
icui18n lib that should stay at OOO.  The hack to make it URELIB nonetheless
works for now.  To clean this up again, either the whole of icu could go 
into
URE (dropping the icu vs. icu_ure package split completely), or the macOS 
layers
URELIB and OOO could be combined into one (as the libs end up in the same
directory anyway).

Change-Id: Idc262fa41481d06ba2cae86ad7629cdccb392c07
Reviewed-on: https://gerrit.libreoffice.org/30272
Tested-by: Jenkins 
Reviewed-by: Stephan Bergmann 

diff --git a/Repository.mk b/Repository.mk
index 7c85976..61c2127 100644
--- a/Repository.mk
+++ b/Repository.mk
@@ -506,6 +506,7 @@ $(eval $(call gb_Helper_register_libraries,PLAINLIBS_NONE, \
 $(eval $(call gb_Helper_register_libraries_for_install,PLAINLIBS_URE,ure, \
affine_uno_uno \
$(if $(filter MSC,$(COM)),cli_uno) \
+   i18nlangtag \
$(if $(ENABLE_JAVA), \
java_uno \
jpipe \
@@ -560,7 +561,6 @@ $(eval $(call 
gb_Helper_register_libraries_for_install,PLAINLIBS_OOO,ooo, \
dict_zh \
embobj \
$(if $(ENABLE_JAVA),hsqldb) \
-   i18nlangtag \
i18nutil \
index_data \
$(if $(and $(ENABLE_GTK3), $(filter LINUX %BSD SOLARIS,$(OS))), 
libreofficekitgtk) \
diff --git a/RepositoryExternal.mk b/RepositoryExternal.mk
index 16eb38a..e127aa2 100644
--- a/RepositoryExternal.mk
+++ b/RepositoryExternal.mk
@@ -998,7 +998,7 @@ gb_ExternalProject__use_liblangtag :=
 
 else # !SYSTEM_LIBLANGTAG
 
-$(eval $(call gb_Helper_register_packages_for_install,ooo,\
+$(eval $(call gb_Helper_register_packages_for_install,ure,\
liblangtag_data \
 ))
 
@@ -1016,7 +1016,7 @@ endef
 
 else
 
-$(eval $(call gb_Helper_register_packages_for_install,ooo,\
+$(eval $(call gb_Helper_register_packages_for_install,ure,\
liblangtag \
 ))
 
@@ -1442,7 +1442,7 @@ endef
 
 # icudata and icui18n is called icudt and icuin when built with MSVC :-/
 define gb_LinkTarget__use_icudata
-$(call gb_LinkTarget_use_package,$(1),icu)
+$(call gb_LinkTarget_use_package,$(1),icu_ure)
 
 ifeq ($(OS),WNT)
 $(call gb_LinkTarget_add_libs,$(1),\
@@ -1472,7 +1472,7 @@ endif
 endef
 
 define gb_LinkTarget__use_icuuc
-$(call gb_LinkTarget_use_package,$(1),icu)
+$(call gb_LinkTarget_use_package,$(1),icu_ure)
 
 ifeq ($(OS),WNT)
 $(call gb_LinkTarget_add_libs,$(1),\
@@ -3816,6 +3816,7 @@ ifeq ($(SYSTEM_ICU),)
 define gb_Executable__register_gendict
 $(call gb_Executable_add_runtime_dependencies,gendict,\
$(call gb_Package_get_target_for_build,icu) \
+   $(call gb_Package_get_target_for_build,icu_ure) \
 )
 endef
 
@@ -3958,6 +3959,7 @@ $(call 
gb_ExternalExecutable_set_internal,genbrk,$(WORKDIR_FOR_BUILD)/UnpackedTa
 $(call gb_ExternalExecutable_set_precommand,genbrk,$(subst 
$$,,$(gb_ICU_PRECOMMAND)))
 $(call gb_ExternalExecutable_add_dependencies,genbrk,\
$(call gb_Package_get_target_for_build,icu) \
+   $(call gb_Package_get_target_for_build,icu_ure) \
 )
 
 endef
@@ -3978,6 +3980,7 @@ $(call 
gb_ExternalExecutable_set_internal,genccode,$(WORKDIR_FOR_BUILD)/Unpacked
 $(call gb_ExternalExecutable_set_precommand,genccode,$(subst 
$$,,$(gb_ICU_PRECOMMAND)))
 $(call gb_ExternalExecutable_add_dependencies,genccode,\

[Libreoffice-commits] core.git: external/icu

2016-04-18 Thread Martin Hosken
 external/icu/UnpackedTarball_icu.mk |3 +++
 external/icu/khmerbreakengine.patch |   24 
 2 files changed, 15 insertions(+), 12 deletions(-)

New commits:
commit 4e066825d43400969041669c82d8a4e0bfd91adf
Author: Martin Hosken 
Date:   Fri Apr 15 20:26:08 2016 +0200

reactivate ICU Khmer patch

Patch has been upstreamed with
https://ssl.icu-project.org/trac/ticket/12504

Change-Id: I1f3ddad87a2a6568ced3f9d2b2df3e0af0ee18aa
Reviewed-on: https://gerrit.libreoffice.org/24117
Tested-by: Jenkins 
Reviewed-by: Martin Hosken 
Reviewed-by: Eike Rathke 
Tested-by: Eike Rathke 

diff --git a/external/icu/UnpackedTarball_icu.mk 
b/external/icu/UnpackedTarball_icu.mk
index c48d025..4a6a114 100644
--- a/external/icu/UnpackedTarball_icu.mk
+++ b/external/icu/UnpackedTarball_icu.mk
@@ -27,6 +27,9 @@ $(eval $(call gb_UnpackedTarball_add_patches,icu,\
external/icu/clang-cl.patch.0 \
$(if $(filter-out 
ANDROID,$(OS)),external/icu/icu4c-icudata-stdlibs.diff) \
$(if $(filter EMSCRIPTEN,$(OS)),external/icu/icu4c-emscripten.patch.1) \
+   external/icu/khmerbreakengine.patch \
 ))
 
+$(eval $(call 
gb_UnpackedTarball_add_file,icu,source/data/brkitr/khmerdict.dict,external/icu/khmerdict.dict))
+
 # vim: set noet sw=4 ts=4:
diff --git a/external/icu/khmerbreakengine.patch 
b/external/icu/khmerbreakengine.patch
index 0687645..8f81f31 100644
--- a/external/icu/khmerbreakengine.patch
+++ b/external/icu/khmerbreakengine.patch
@@ -478,9 +478,9 @@ index f1c874d..3ad1b3f 100644
 -UChar32 uc;
 -int32_t chars = 0;
 -for (;;) {
--int32_t pcIndex = utext_getNativeIndex(text);
+-int32_t pcIndex = (int32_t)utext_getNativeIndex(text);
 -pc = utext_next32(text);
--int32_t pcSize = utext_getNativeIndex(text) - pcIndex;
+-int32_t pcSize = (int32_t)utext_getNativeIndex(text) - 
pcIndex;
 -chars += pcSize;
 -remaining -= pcSize;
 -if (remaining <= 0) {
@@ -1000,10 +1000,10 @@ index cb594c6..82f2e77 100644
 +int32_t *prefix, UnicodeSet const* ignoreSet, 
int32_t minLength) const {
  
  UCharsTrie uct(characters);
- int32_t startingTextIndex = utext_getNativeIndex(text);
+ int32_t startingTextIndex = (int32_t)utext_getNativeIndex(text);
 @@ -53,7 +53,13 @@ int32_t UCharsDictionaryMatcher::matches(UText *text, 
int32_t maxLength, int32_t
  UStringTrieResult result = (codePointsMatched == 0) ? uct.first(c) : 
uct.next(c);
- int32_t lengthMatched = utext_getNativeIndex(text) - 
startingTextIndex;
+ int32_t lengthMatched = (int32_t)utext_getNativeIndex(text) - 
startingTextIndex;
  codePointsMatched += 1;
 +if (ignoreSet != NULL && ignoreSet->contains(c)) {
 +continue;
@@ -1022,11 +1022,11 @@ index cb594c6..82f2e77 100644
 -int32_t *prefix) const {
 +int32_t *prefix, UnicodeSet const* ignoreSet, 
int32_t minLength) const {
  BytesTrie bt(characters);
- int32_t startingTextIndex = utext_getNativeIndex(text);
+ int32_t startingTextIndex = (int32_t)utext_getNativeIndex(text);
  int32_t wordCount = 0;
 @@ -120,7 +126,13 @@ int32_t BytesDictionaryMatcher::matches(UText *text, 
int32_t maxLength, int32_t
  UStringTrieResult result = (codePointsMatched == 0) ? 
bt.first(transform(c)) : bt.next(transform(c));
- int32_t lengthMatched = utext_getNativeIndex(text) - 
startingTextIndex;
+ int32_t lengthMatched = (int32_t)utext_getNativeIndex(text) - 
startingTextIndex;
  codePointsMatched += 1;
 +if (ignoreSet != NULL && ignoreSet->contains(c)) {
 +continue;
@@ -1081,7 +1081,7 @@ diff --git a/source/data/Makefile.in 
b/source/data/Makefile.in
 index 816c82d..c637d70 100644
 --- misc/icu/source/data/Makefile.in
 +++ build/icu/source/data/Makefile.in
-@@ -179,7 +179,7 @@ endif
+@@ -181,7 +181,7 @@ endif
  endif
  endif
  
@@ -1090,17 +1090,17 @@ index 816c82d..c637d70 100644
  ifneq ($(ENABLE_STATIC),)
  ifeq ($(PKGDATA_MODE),dll)
$(PKGDATA_INVOKE) $(PKGDATA) -e $(ICUDATA_ENTRY_POINT) -T $(OUTTMPDIR) 
-p $(ICUDATA_NAME) $(PKGDATA_LIBSTATICNAME) -m static $(PKGDATA_VERSIONING) 
$(PKGDATA_LIST)
-@@ -563,8 +563,14 @@ $(BRKBLDDIR)/burmesedict.dict: 
$(TOOLBINDIR)/gendict$(TOOLEXEEXT) $(DAT_FILES)
-   $(INVOKE) $(TOOLBINDIR)/gendict --bytes --transform offset-0x1000 -c -i 
$(BUILDDIR) $(BRKSRCDIR)/burmesedict.txt $(BRKBLDDIR)/burmesedict.dict
+@@ -564,8 +564,14 @@ $(BRKBLDDIR)/burmesedict.dict: 
$(TOOLBINDIR)/gendict$(TOOLEXEEXT) $(DAT_FILES)
+   $(INVOKE) $(TOOLBINDIR)/gendict --bytes --transform offset-0x1000 -c -i 
$(BUILDDIR) 

[Libreoffice-commits] core.git: external/icu

2016-03-21 Thread Martin Hosken
 external/icu/khmerbreakengine.patch |   10 +-
 1 file changed, 5 insertions(+), 5 deletions(-)

New commits:
commit 7f36f4ce9f9f3d430009ba472d275d038abecb16
Author: Martin Hosken 
Date:   Tue Mar 22 11:26:52 2016 +0700

Fix wrong pattern definitions in khmer dictionary breaker

Change-Id: I0132196744046391759a6e5110d054feee3deea3
Reviewed-on: https://gerrit.libreoffice.org/23420
Tested-by: Jenkins 
Reviewed-by: Martin Hosken 

diff --git a/external/icu/khmerbreakengine.patch 
b/external/icu/khmerbreakengine.patch
index bc0d287..0687645 100644
--- a/external/icu/khmerbreakengine.patch
+++ b/external/icu/khmerbreakengine.patch
@@ -15,8 +15,8 @@ index f1c874d..3ad1b3f 100644
 +fViramaSet.applyPattern(UNICODE_STRING_SIMPLE("[[:ccc=VR:]]"), status);
 +
 +// note Skip Sets contain fIgnoreSet characters too.
-+
fSkipStartSet.applyPattern(UNICODE_STRING_SIMPLE("[[:lb=OP:][:lb=QU:]]\\u200C\\u200D\\u2060"),
 status);
-+
fSkipEndSet.applyPattern(UNICODE_STRING_SIMPLE("[[:lb=CP:][:lb=QU:][:lb=EX:][:lb=CL:]]\\u200C\\u200D\\u2060"),
 status);
++
fSkipStartSet.applyPattern(UNICODE_STRING_SIMPLE("[[:lb=OP:][:lb=QU:]\\u200C\\u200D\\u2060]"),
 status);
++
fSkipEndSet.applyPattern(UNICODE_STRING_SIMPLE("[[:lb=CP:][:lb=QU:][:lb=EX:][:lb=CL:]\\u200C\\u200D\\u2060]"),
 status);
 +
fNBeforeSet.applyPattern(UNICODE_STRING_SIMPLE("[[:lb=CR:][:lb=LF:][:lb=NL:][:lb=SP:][:lb=ZW:][:lb=IS:][:lb=BA:][:lb=NS:]]"),
 status);
  }
  
@@ -332,10 +332,10 @@ index f1c874d..3ad1b3f 100644
 +startZwsp = scanBeforeStart(text, scanStart, breakStart);
 +}
 +utext_setNativeIndex(text, rangeStart);
-+scanFwdClusters(text, rangeStart, initAfter);
++scanFwdClusters(text, rangeEnd, initAfter);
 +bool endZwsp = scanAfterEnd(text, utext_nativeLength(text), scanEnd, 
breakEnd);
 +utext_setNativeIndex(text, rangeEnd - 1);
-+scanBackClusters(text, rangeEnd, finalBefore);
++scanBackClusters(text, rangeStart, finalBefore);
 +if (finalBefore < initAfter) {   // the whole run is tented so no breaks
 +if (breakStart || fTypes < UBRK_LINE)
 +foundBreaks.push(rangeStart, status);
@@ -539,7 +539,7 @@ index f1c874d..3ad1b3f 100644
 +int32_t ln = lengths.elementAti(j);
 +utext_setNativeIndex(text, ln+ix);
 +int32_t c = utext_current32(text);
-+while (fPuncSet.contains(c) || fIgnoreSet.contains(c)) {
++while ((fPuncSet.contains(c) || fIgnoreSet.contains(c)) && ln + i 
< numCodePts) {
 +++ln;
 +utext_next32(text);
 +c = utext_current32(text);
___
Libreoffice-commits mailing list
libreoffice-comm...@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/libreoffice-commits


[Libreoffice-commits] core.git: external/icu

2016-03-19 Thread Martin Hosken
 external/icu/khmerbreakengine.patch |  327 +---
 external/icu/khmerdict.dict |binary
 2 files changed, 17 insertions(+), 310 deletions(-)

New commits:
commit a976a19ca82661d8b459b85f5514b0e4c9222d47
Author: Martin Hosken 
Date:   Thu Mar 17 09:57:35 2016 +0700

Fix bug in khmr linebreaking and update dictionary

Change-Id: I2b776925c2c95cb56ccd592d036823c26054e059
Reviewed-on: https://gerrit.libreoffice.org/23316
Tested-by: Jenkins 
Reviewed-by: Martin Hosken 

diff --git a/external/icu/khmerbreakengine.patch 
b/external/icu/khmerbreakengine.patch
index ba3e392..bc0d287 100644
--- a/external/icu/khmerbreakengine.patch
+++ b/external/icu/khmerbreakengine.patch
@@ -2,7 +2,7 @@ diff --git a/source/common/dictbe.cpp b/source/common/dictbe.cpp
 index f1c874d..3ad1b3f 100644
 --- misc/icu/source/common/dictbe.cpp
 +++ build/icu/source/common/dictbe.cpp
-@@ -27,8 +27,16 @@ U_NAMESPACE_BEGIN
+@@ -27,8 +27,17 @@ U_NAMESPACE_BEGIN
   **
   */
  
@@ -14,13 +14,14 @@ index f1c874d..3ad1b3f 100644
  fTypes = breakTypes;
 +fViramaSet.applyPattern(UNICODE_STRING_SIMPLE("[[:ccc=VR:]]"), status);
 +
++// note Skip Sets contain fIgnoreSet characters too.
 +
fSkipStartSet.applyPattern(UNICODE_STRING_SIMPLE("[[:lb=OP:][:lb=QU:]]\\u200C\\u200D\\u2060"),
 status);
 +
fSkipEndSet.applyPattern(UNICODE_STRING_SIMPLE("[[:lb=CP:][:lb=QU:][:lb=EX:][:lb=CL:]]\\u200C\\u200D\\u2060"),
 status);
 +
fNBeforeSet.applyPattern(UNICODE_STRING_SIMPLE("[[:lb=CR:][:lb=LF:][:lb=NL:][:lb=SP:][:lb=ZW:][:lb=IS:][:lb=BA:][:lb=NS:]]"),
 status);
  }
  
  DictionaryBreakEngine::~DictionaryBreakEngine() {
-@@ -90,7 +98,7 @@ DictionaryBreakEngine::findBreaks( UText *text,
+@@ -90,7 +99,7 @@ DictionaryBreakEngine::findBreaks( UText *text,
  result = divideUpDictionaryRange(text, rangeStart, rangeEnd, 
foundBreaks);
  utext_setNativeIndex(text, current);
  }
@@ -29,7 +30,7 @@ index f1c874d..3ad1b3f 100644
  return result;
  }
  
-@@ -101,6 +109,163 @@ DictionaryBreakEngine::setCharacters( const UnicodeSet 
 ) {
+@@ -101,6 +110,169 @@ DictionaryBreakEngine::setCharacters( const UnicodeSet 
 ) {
  fSet.compact();
  }
  
@@ -87,6 +88,8 @@ index f1c874d..3ad1b3f 100644
 +}
 +for (int i = 0; i < clusterLimit; ++i) { // scan backwards clusterLimit 
clusters
 +while (start > textStart) {
++while (fIgnoreSet.contains(c))
++c = utext_previous32(text);
 +if (!fMarkSet.contains(c)) {
 +if (fBaseSet.contains(c)) {
 +c = utext_previous32(text);
@@ -125,6 +128,10 @@ index f1c874d..3ad1b3f 100644
 +++end;
 +}
 +for (int i = 0; i < clusterLimit; ++i) { // scan forwards clusterLimit 
clusters
++while (fIgnoreSet.contains(c)) {
++utext_next32(text);
++c = utext_current32(text);
++}
 +if (fBaseSet.contains(c)) {
 +while (end < textEnd) {
 +utext_next32(text);
@@ -193,7 +200,7 @@ index f1c874d..3ad1b3f 100644
  /*
   **
   * PossibleWord
-@@ -128,35 +293,35 @@ private:
+@@ -128,35 +302,35 @@ private:
  public:
  PossibleWord() : count(0), prefix(0), offset(-1), mark(0), current(0) {};
  ~PossibleWord() {};
@@ -238,242 +245,7 @@ index f1c874d..3ad1b3f 100644
  // Dictionary leaves text after longest prefix, not longest word. 
Back up.
  if (count <= 0) {
  utext_setNativeIndex(text, start);
-@@ -261,16 +426,16 @@ ThaiBreakEngine::divideUpDictionaryRange( UText *text,
- int32_t current;
- UErrorCode status = U_ZERO_ERROR;
- PossibleWord words[THAI_LOOKAHEAD];
--
-+
- utext_setNativeIndex(text, rangeStart);
--
-+
- while (U_SUCCESS(status) && (current = 
(int32_t)utext_getNativeIndex(text)) < rangeEnd) {
- cpWordLength = 0;
- cuWordLength = 0;
- 
- // Look for candidate words at the current position
- int32_t candidates = 
words[wordsFound%THAI_LOOKAHEAD].candidates(text, fDictionary, rangeEnd);
--
-+
- // If we found exactly one, use that
- if (candidates == 1) {
- cuWordLength = words[wordsFound % 
THAI_LOOKAHEAD].acceptMarked(text);
-@@ -291,12 +456,12 @@ ThaiBreakEngine::divideUpDictionaryRange( UText *text,
- words[wordsFound%THAI_LOOKAHEAD].markCurrent();
- wordsMatched = 2;
- }
--
-+
- // If we're already at the end of the range, we're done
- if ((int32_t)utext_getNativeIndex(text) >= rangeEnd) {
- goto foundBest;
- }
--
-+
- // See if any of 

[Libreoffice-commits] core.git: external/icu

2016-01-08 Thread Martin Hosken
 external/icu/khmerbreakengine.patch |   16 
 1 file changed, 8 insertions(+), 8 deletions(-)

New commits:
commit 39b718dd655220110523b7013e65ea4f821aedf7
Author: Martin Hosken 
Date:   Fri Jan 8 16:41:52 2016 +0700

Fix applying external dict to icu, and khmer break engine fixes

Change-Id: Ib897e5fa5e80f75f501694dbf874aabd92253b25
Reviewed-on: https://gerrit.libreoffice.org/21247
Tested-by: Jenkins 
Reviewed-by: Martin Hosken 

diff --git a/external/icu/khmerbreakengine.patch 
b/external/icu/khmerbreakengine.patch
index 03e6079b..ba3e392 100644
--- a/external/icu/khmerbreakengine.patch
+++ b/external/icu/khmerbreakengine.patch
@@ -14,8 +14,8 @@ index f1c874d..3ad1b3f 100644
  fTypes = breakTypes;
 +fViramaSet.applyPattern(UNICODE_STRING_SIMPLE("[[:ccc=VR:]]"), status);
 +
-+fSkipStartSet.applyPattern(UNICODE_STRING_SIMPLE("[[:lb=OP:][:lb=QU:]]"), 
status);
-+
fSkipEndSet.applyPattern(UNICODE_STRING_SIMPLE("[[:lb=CP:][:lb=QU:][:lb=EX:][:lb=CL:]]"),
 status);
++
fSkipStartSet.applyPattern(UNICODE_STRING_SIMPLE("[[:lb=OP:][:lb=QU:]]\\u200C\\u200D\\u2060"),
 status);
++
fSkipEndSet.applyPattern(UNICODE_STRING_SIMPLE("[[:lb=CP:][:lb=QU:][:lb=EX:][:lb=CL:]]\\u200C\\u200D\\u2060"),
 status);
 +
fNBeforeSet.applyPattern(UNICODE_STRING_SIMPLE("[[:lb=CR:][:lb=LF:][:lb=NL:][:lb=SP:][:lb=ZW:][:lb=IS:][:lb=BA:][:lb=NS:]]"),
 status);
  }
  
@@ -473,7 +473,7 @@ index f1c874d..3ad1b3f 100644
  // Look ahead for possible suffixes if a dictionary word does not 
follow.
  // We do this in code rather than using a rule so that the heuristic
  // resynch continues to function. For example, one of the suffix 
characters
-@@ -828,51 +993,29 @@ foundBest:
+@@ -828,51 +993,28 @@ foundBest:
   * KhmerBreakEngine
   */
  
@@ -506,7 +506,7 @@ index f1c874d..3ad1b3f 100644
  setCharacters(fKhmerWordSet);
  }
  
fMarkSet.applyPattern(UNICODE_STRING_SIMPLE("[[:Khmr:]&[:LineBreak=SA:]&[:M:]]"),
 status);
- fMarkSet.add(0x0020);
+-fMarkSet.add(0x0020);
 -fEndWordSet = fKhmerWordSet;
 -fBeginWordSet.add(0x1780, 0x17B3);
 -//fBeginWordSet.add(0x17A3, 0x17A4);  // deprecated vowels
@@ -522,7 +522,7 @@ index f1c874d..3ad1b3f 100644
 -//fSuffixSet.add(THAI_MAIYAMOK);
 +fIgnoreSet.add(0x2060); // WJ
 +fIgnoreSet.add(0x200C, 0x200D); // ZWJ, ZWNJ
-+fBaseSet.applyPattern(UNICODE_STRING_SIMPLE("[[:Khmr:]&[:^M:]]"), status);
++
fBaseSet.applyPattern(UNICODE_STRING_SIMPLE("[[:Khmr:]&[:lb=SA:]&[:^M:]]"), 
status);
 +
fPuncSet.applyPattern(UNICODE_STRING_SIMPLE("[\\u17D4\\u17D5\\u17D6\\u17D7\\u17D9:]"),
 status);
  
  // Compact for caching.
@@ -750,7 +750,7 @@ index f1c874d..3ad1b3f 100644
 -if (cuWordLength <= 0) {
 -wordsFound += 1;
 -}
-+} while (fMarkSet.contains(c));
++} while (fMarkSet.contains(c) || fIgnoreSet.contains(c));
 +values.setElementAt(BADSNLP, count);
 +lengths.setElementAt(utext_getNativeIndex(text) - currix, 
count++);
 +} else {
@@ -775,7 +775,7 @@ index f1c874d..3ad1b3f 100644
 -else {
 -// Back up to where we were for next iteration
 -utext_setNativeIndex(text, current+cuWordLength);
-+int32_t ln_j_i = ln + i;
++int32_t ln_j_i = ln + i;   // yes really i!
 +if (newSnlp < bestSnlp.elementAti(ln_j_i)) {
 +if (v == BADSNLP) {
 +int32_t p = prev.elementAti(i);
@@ -1395,7 +1395,7 @@ index 816c82d..c637d70 100644
 +#$(MAINBUILDDIR)/khmerdict.stamp: $(TOOLBINDIR)/gendict$(TOOLEXEEXT) 
$(BRKSRCDIR)/khmerdict.txt build-local
 +# $(INVOKE) $(TOOLBINDIR)/gendict --bytes --transform offset-0x1780 -c -i 
$(BUILDDIR) $(BRKSRCDIR)/khmerdict.txt $(BRKBLDDIR)/khmerdict.dict
 +$(MAINBUILDDIR)/khmerdict.stamp: $(BRKSRCDIR)/khmerdict.dict build-local
-+  cp $< $(MAINBUILDDIR)
++  cp $< $(BRKBLDDIR)
 +  echo "timestamp" > $@
 
  CFU
___
Libreoffice-commits mailing list
libreoffice-comm...@lists.freedesktop.org
http://lists.freedesktop.org/mailman/listinfo/libreoffice-commits


[Libreoffice-commits] core.git: external/icu i18npool/source

2016-01-04 Thread Martin Hosken
 external/icu/UnpackedTarball_icu.mk |3 
 external/icu/khmerbreakengine.patch | 1403 
 external/icu/khmerdict.dict |binary
 i18npool/source/breakiterator/breakiterator_unicode.cxx |2 
 4 files changed, 1407 insertions(+), 1 deletion(-)

New commits:
commit fbb00383d82da5ce375f1b034d3fb9ebdd9a8f0e
Author: Martin Hosken 
Date:   Sat Dec 12 11:36:53 2015 +0700

Use .dict files since below the 500K limit

Change-Id: Iec71ad4918cd333f0a44d372017ecee300e3aca9
Reviewed-on: https://gerrit.libreoffice.org/20748
Tested-by: Jenkins 
Reviewed-by: Martin Hosken 

diff --git a/external/icu/UnpackedTarball_icu.mk 
b/external/icu/UnpackedTarball_icu.mk
index c48d025..4a6a114 100644
--- a/external/icu/UnpackedTarball_icu.mk
+++ b/external/icu/UnpackedTarball_icu.mk
@@ -27,6 +27,9 @@ $(eval $(call gb_UnpackedTarball_add_patches,icu,\
external/icu/clang-cl.patch.0 \
$(if $(filter-out 
ANDROID,$(OS)),external/icu/icu4c-icudata-stdlibs.diff) \
$(if $(filter EMSCRIPTEN,$(OS)),external/icu/icu4c-emscripten.patch.1) \
+   external/icu/khmerbreakengine.patch \
 ))
 
+$(eval $(call 
gb_UnpackedTarball_add_file,icu,source/data/brkitr/khmerdict.dict,external/icu/khmerdict.dict))
+
 # vim: set noet sw=4 ts=4:
diff --git a/external/icu/khmerbreakengine.patch 
b/external/icu/khmerbreakengine.patch
new file mode 100644
index 000..03e6079b
--- /dev/null
+++ b/external/icu/khmerbreakengine.patch
@@ -0,0 +1,1403 @@
+diff --git a/source/common/dictbe.cpp b/source/common/dictbe.cpp
+index f1c874d..3ad1b3f 100644
+--- misc/icu/source/common/dictbe.cpp
 build/icu/source/common/dictbe.cpp
+@@ -27,8 +27,16 @@ U_NAMESPACE_BEGIN
+  **
+  */
+ 
+-DictionaryBreakEngine::DictionaryBreakEngine(uint32_t breakTypes) {
++DictionaryBreakEngine::DictionaryBreakEngine(uint32_t breakTypes) :
++clusterLimit(3)
++{
++UErrorCode status = U_ZERO_ERROR;
+ fTypes = breakTypes;
++fViramaSet.applyPattern(UNICODE_STRING_SIMPLE("[[:ccc=VR:]]"), status);
++
++fSkipStartSet.applyPattern(UNICODE_STRING_SIMPLE("[[:lb=OP:][:lb=QU:]]"), 
status);
++
fSkipEndSet.applyPattern(UNICODE_STRING_SIMPLE("[[:lb=CP:][:lb=QU:][:lb=EX:][:lb=CL:]]"),
 status);
++
fNBeforeSet.applyPattern(UNICODE_STRING_SIMPLE("[[:lb=CR:][:lb=LF:][:lb=NL:][:lb=SP:][:lb=ZW:][:lb=IS:][:lb=BA:][:lb=NS:]]"),
 status);
+ }
+ 
+ DictionaryBreakEngine::~DictionaryBreakEngine() {
+@@ -90,7 +98,7 @@ DictionaryBreakEngine::findBreaks( UText *text,
+ result = divideUpDictionaryRange(text, rangeStart, rangeEnd, 
foundBreaks);
+ utext_setNativeIndex(text, current);
+ }
+-
++
+ return result;
+ }
+ 
+@@ -101,6 +109,163 @@ DictionaryBreakEngine::setCharacters( const UnicodeSet 
 ) {
+ fSet.compact();
+ }
+ 
++bool
++DictionaryBreakEngine::scanBeforeStart(UText *text, int32_t& start, bool 
) const {
++UErrorCode status = U_ZERO_ERROR;
++UText* ut = utext_clone(NULL, text, false, true, );
++utext_setNativeIndex(ut, start);
++UChar32 c = utext_current32(ut);
++bool res = false;
++doBreak = true;
++while (start >= 0) {
++if (!fSkipStartSet.contains(c)) {
++res = (c == ZWSP);
++break;
++}
++--start;
++c = utext_previous32(ut);
++doBreak = false;
++}
++utext_close(ut);
++return res;
++}
++
++bool
++DictionaryBreakEngine::scanAfterEnd(UText *text, int32_t textEnd, int32_t& 
end, bool ) const {
++UErrorCode status = U_ZERO_ERROR;
++UText* ut = utext_clone(NULL, text, false, true, );
++utext_setNativeIndex(ut, end);
++UChar32 c = utext_current32(ut);
++bool res = false;
++doBreak = !fNBeforeSet.contains(c);
++while (end < textEnd) {
++if (!fSkipEndSet.contains(c)) {
++res = (c == ZWSP);
++break;
++}
++++end;
++c = utext_next32(ut);
++doBreak = false;
++}
++utext_close(ut);
++return res;
++}
++
++void
++DictionaryBreakEngine::scanBackClusters(UText *text, int32_t textStart, 
int32_t& start) const {
++UChar32 c = 0;
++start = utext_getNativeIndex(text);
++while (start > textStart) {
++c = utext_previous32(text);
++--start;
++if (!fSkipEndSet.contains(c))
++break;
++}
++for (int i = 0; i < clusterLimit; ++i) { // scan backwards clusterLimit 
clusters
++while (start > textStart) {
++if (!fMarkSet.contains(c)) {
++if (fBaseSet.contains(c)) {
++c = utext_previous32(text);
++if (!fViramaSet.contains(c)) { // Virama (e.g. coeng) 
preceding base. Treat sequence as a mark
++utext_next32(text);
++c = 

[Libreoffice-commits] core.git: external/icu

2015-11-03 Thread Stephan Bergmann
 external/icu/ExternalProject_icu.mk |4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)

New commits:
commit c6822f927a73e5b2ee72208b139b6808116fe1e0
Author: Stephan Bergmann 
Date:   Tue Nov 3 14:48:35 2015 +0100

Use newly introduced gb_DEBUGINFO_FLAGS instead of hardcoded -g

Change-Id: Iaaa80d997fa7babb9212787653c149b72d842a6c

diff --git a/external/icu/ExternalProject_icu.mk 
b/external/icu/ExternalProject_icu.mk
index 5817a6d..0442997 100644
--- a/external/icu/ExternalProject_icu.mk
+++ b/external/icu/ExternalProject_icu.mk
@@ -55,14 +55,14 @@ icu_CFLAGS:=" \
$(if $(debug),$(gb_DEBUG_CFLAGS),$(gb_COMPILEROPTFLAGS)) \
$(if $(ENABLE_LTO),$(gb_LTOFLAGS)) \
$(if $(filter GCC,$(COM)),-fno-strict-aliasing) \
-   $(if $(filter $(true),$(gb_SYMBOL)),-g) \
+   $(if $(filter $(true),$(gb_SYMBOL)),$(gb_DEBUGINFO_FLAGS)) \
$(if $(filter ANDROID,$(OS)),-fvisibility=hidden 
-fno-omit-frame-pointer)"
 icu_CXXFLAGS:="$(CXXFLAGS) $(CXXFLAGS_CXX11) \
$(if $(filter IOS,$(OS)),-DUCONFIG_NO_FILE_IO) \
$(if $(debug),$(gb_DEBUG_CFLAGS),$(gb_COMPILEROPTFLAGS)) \
$(if $(ENABLE_LTO),$(gb_LTOFLAGS)) \
$(if $(filter GCC,$(COM)),-fno-strict-aliasing) \
-   $(if $(filter $(true),$(gb_SYMBOL)),-g) \
+   $(if $(filter $(true),$(gb_SYMBOL)),$(gb_DEBUGINFO_FLAGS)) \
$(if $(filter ANDROID,$(OS)),-fvisibility=hidden 
-fno-omit-frame-pointer)"
 icu_LDFLAGS:=" \
$(if $(ENABLE_LTO),$(gb_LTOFLAGS)) \
___
Libreoffice-commits mailing list
libreoffice-comm...@lists.freedesktop.org
http://lists.freedesktop.org/mailman/listinfo/libreoffice-commits


[Libreoffice-commits] core.git: external/icu

2015-10-06 Thread Samuel Mehrbrodt
 external/icu/UnpackedTarball_icu.mk   |1 
 external/icu/icu4c-emscripten.patch.1 |  116 ++
 2 files changed, 117 insertions(+)

New commits:
commit 70b72e8705c17bad7a232b909b30f0f5b3635821
Author: Samuel Mehrbrodt 
Date:   Tue Oct 6 15:03:05 2015 +0200

Emscripten: Add patch to build ICU

Change-Id: If5924054b53fd2b5acf2ec903cd1acf710cc2ef1

diff --git a/external/icu/UnpackedTarball_icu.mk 
b/external/icu/UnpackedTarball_icu.mk
index 2beeb68..a1640e7 100644
--- a/external/icu/UnpackedTarball_icu.mk
+++ b/external/icu/UnpackedTarball_icu.mk
@@ -30,6 +30,7 @@ $(eval $(call gb_UnpackedTarball_add_patches,icu,\
external/icu/icu.changeset_36801.patch.1 \
$(if $(filter-out 
ANDROID,$(OS)),external/icu/icu4c-icudata-stdlibs.diff) \
external/icu/icu.vc15.patch \
+   $(if $(filter EMSCRIPTEN,$(OS)),external/icu/icu4c-emscripten.patch.1) \
 ))
 
 # vim: set noet sw=4 ts=4:
diff --git a/external/icu/icu4c-emscripten.patch.1 
b/external/icu/icu4c-emscripten.patch.1
new file mode 100644
index 000..3ce6d52
--- /dev/null
+++ b/external/icu/icu4c-emscripten.patch.1
@@ -0,0 +1,116 @@
+--- icu.org/source/config/mh-unknown   2015-10-06 11:35:03.212459286 +0200
 icu/source/config/mh-unknown   2015-10-06 12:01:00.497972406 +0200
+@@ -1,27 +1,90 @@
+ ## -*-makefile-*-
+-## Copyright (c) 2003, International Business Machines Corporation and
++## Emscripten-specific setup
++## Copyright (c) 1999-2013, International Business Machines Corporation and
+ ## others. All Rights Reserved.
+-##
+ 
+-# Note, this is not a real mh- file. You got here because configure
+-# (specifically, aclocal.m4) could not determine a suitable mh- file.
+-#
+-# Perhaps your platform wasn't detected- try changing aclocal.m4 and
+-# re-running autoconf. 
+-#
+-# If your platform is truly new/different:
+-# As a start, try copying mh-linux (which is fairly generic) over this
+-# file, and re-run config.status.
+-
+-%.$(STATIC_O) %.o %.$(STATIC_O) %.o ../data/%.o %.d %.d 
%.$(SO).$(SO_TARGET_VERSION_MAJOR) %.$(SO):
+-  @echo 
+-  @echo 
+-  @echo "*** ERROR - configure could not detect your platform"
+-  @echo "*** see the readme.html"
+-  @echo "*** or, try copying icu/source/config/mh-linux to mh-unknown"
+-  @echo "***   and editing it."
+-  @echo 
+-  @echo 
+-  exit 1
++## Commands to generate dependency files
++GEN_DEPS.c=  $(CC) -E -MM $(DEFS) $(CPPFLAGS)
++GEN_DEPS.cc= $(CXX) -E -MM $(DEFS) $(CPPFLAGS) $(CXXFLAGS)
+ 
++## Flags for position independent code
++SHAREDLIBCFLAGS = -fPIC
++SHAREDLIBCXXFLAGS = -fPIC
++SHAREDLIBCPPFLAGS = -DPIC
+ 
++## Additional flags when building libraries and with threads
++THREADSCPPFLAGS = -D_REENTRANT
++LIBCPPFLAGS =
++
++## Compiler switch to embed a runtime search path
++LD_RPATH= -Wl,-zorigin,-rpath,'$$'ORIGIN
++LD_RPATH_PRE = -Wl,-rpath,
++
++## Force RPATH=$ORIGIN to locate own dependencies w/o need for 
LD_LIBRARY_PATH:
++ENABLE_RPATH=YES
++RPATHLDFLAGS=${LD_RPATH_PRE}'$$ORIGIN'
++
++## These are the library specific LDFLAGS
++#LDFLAGSICUDT=-nodefaultlibs -nostdlib
++# Debian change: linking icudata as data only causes too many problems.
++LDFLAGSICUDT=
++
++## Compiler switch to embed a library name
++# The initial tab in the next line is to prevent icu-config from reading it.
++  LD_SONAME = -Wl,-soname -Wl,$(notdir $(MIDDLE_SO_TARGET))
++#SH# # We can't depend on MIDDLE_SO_TARGET being set.
++#SH# LD_SONAME=
++
++## Shared library options
++LD_SOOPTIONS= -Wl,-Bsymbolic-functions
++
++## Shared object suffix
++SO = so
++## Non-shared intermediate object suffix
++STATIC_O = ao
++
++## Compilation rules
++%.$(STATIC_O): $(srcdir)/%.c
++  $(call SILENT_COMPILE,$(strip $(COMPILE.c) $(STATICCPPFLAGS) 
$(STATICCFLAGS)) -o $@ $<)
++%.o: $(srcdir)/%.c
++  $(call SILENT_COMPILE,$(strip $(COMPILE.c) $(DYNAMICCPPFLAGS) 
$(DYNAMICCFLAGS)) -o $@ $<)
++
++%.$(STATIC_O): $(srcdir)/%.cpp
++  $(call SILENT_COMPILE,$(strip $(COMPILE.cc) $(STATICCPPFLAGS) 
$(STATICCXXFLAGS)) -o $@ $<)
++%.o: $(srcdir)/%.cpp
++  $(call SILENT_COMPILE,$(strip $(COMPILE.cc) $(DYNAMICCPPFLAGS) 
$(DYNAMICCXXFLAGS)) -o $@ $<)
++
++
++## Dependency rules
++%.d: $(srcdir)/%.c
++  $(call ICU_MSG,(deps)) $<
++  @$(SHELL) -ec '$(GEN_DEPS.c) $< \
++  | sed '\''s%\($*\)\.o[ :]*%\1.o $@ : %g'\'' > $@; \
++  [ -s $@ ] || rm -f $@'
++
++%.d: $(srcdir)/%.cpp
++  $(call ICU_MSG,(deps)) $<
++  @$(SHELL) -ec '$(GEN_DEPS.cc) $< \
++  | sed '\''s%\($*\)\.o[ :]*%\1.o $@ : %g'\'' > $@; \
++  [ -s $@ ] || rm -f $@'
++
++## Versioned libraries rules
++
++%.$(SO).$(SO_TARGET_VERSION_MAJOR): %.$(SO).$(SO_TARGET_VERSION)
++  $(RM) $@ && ln -s ${

[Libreoffice-commits] core.git: external/icu

2015-09-17 Thread David Tardon
 external/icu/ExternalProject_icu.mk |2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

New commits:
commit 8e8ad3f697c4caf0e48edf0953e706625fba47bb
Author: David Tardon 
Date:   Thu Sep 17 20:36:40 2015 +0200

pass user-set CXXFLAGS

Change-Id: I1b4f0f3e7f5a7092f904fc8de59bb704073ed7db

diff --git a/external/icu/ExternalProject_icu.mk 
b/external/icu/ExternalProject_icu.mk
index 38a25bc..bd93be4 100644
--- a/external/icu/ExternalProject_icu.mk
+++ b/external/icu/ExternalProject_icu.mk
@@ -57,7 +57,7 @@ icu_CFLAGS:=" \
$(if $(filter GCC,$(COM)),-fno-strict-aliasing) \
$(if $(filter $(true),$(gb_SYMBOL)),-g) \
$(if $(filter ANDROID,$(OS)),-fvisibility=hidden 
-fno-omit-frame-pointer)"
-icu_CXXFLAGS:="$(CXXFLAGS_CXX11) \
+icu_CXXFLAGS:="$(CXXFLAGS) $(CXXFLAGS_CXX11) \
$(if $(filter IOS,$(OS)),-DUCONFIG_NO_FILE_IO) \
$(if $(debug),$(gb_DEBUG_CFLAGS),$(gb_COMPILEROPTFLAGS)) \
$(if $(ENABLE_LTO),$(gb_LTOFLAGS)) \
___
Libreoffice-commits mailing list
libreoffice-comm...@lists.freedesktop.org
http://lists.freedesktop.org/mailman/listinfo/libreoffice-commits


[Libreoffice-commits] core.git: external/icu

2015-09-02 Thread David Ostrovsky
 external/icu/ExternalProject_icu.mk |2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

New commits:
commit fe22febbda04bc8e1b17348600857e4c4b29156e
Author: David Ostrovsky 
Date:   Tue Sep 1 00:02:19 2015 +0200

icu: Parallelize writing to PDB files

Change-Id: I728177b27fa4049c3f3945246f0f19f937c949b4
Reviewed-on: https://gerrit.libreoffice.org/18216
Reviewed-by: Michael Stahl 
Tested-by: Michael Stahl 

diff --git a/external/icu/ExternalProject_icu.mk 
b/external/icu/ExternalProject_icu.mk
index d302a7c..38a25bc 100644
--- a/external/icu/ExternalProject_icu.mk
+++ b/external/icu/ExternalProject_icu.mk
@@ -22,7 +22,7 @@ ifeq ($(COM),MSC)
 $(call gb_ExternalProject_get_state_target,icu,build) :
$(call gb_ExternalProject_run,build,\
export LIB="$(ILIB)" \
-   && CFLAGS="-arch:SSE $(SOLARINC) $(gb_DEBUG_CFLAGS)" 
CPPFLAGS="$(SOLARINC)" CXXFLAGS="-arch:SSE $(SOLARINC) $(gb_DEBUG_CFLAGS)" \
+   && CFLAGS="-FS -arch:SSE $(SOLARINC) $(gb_DEBUG_CFLAGS)" 
CPPFLAGS="$(SOLARINC)" CXXFLAGS="-FS -arch:SSE $(SOLARINC) $(gb_DEBUG_CFLAGS)" \
INSTALL=`cygpath -m /usr/bin/install` \
./runConfigureICU \
$(if $(MSVC_USE_DEBUG_RUNTIME),--enable-debug 
--disable-release) \
___
Libreoffice-commits mailing list
libreoffice-comm...@lists.freedesktop.org
http://lists.freedesktop.org/mailman/listinfo/libreoffice-commits


[Libreoffice-commits] core.git: external/icu

2015-07-09 Thread David Ostrovsky
 external/icu/UnpackedTarball_icu.mk |1 +
 external/icu/icu.vc15.patch |   13 +
 2 files changed, 14 insertions(+)

New commits:
commit 9b597430c632b8c20a7595f998cd26a02e1f8656
Author: David Ostrovsky da...@ostrovsky.org
Date:   Sat Jul 4 21:11:58 2015 +0200

Icu: Fix compilation on VS 2015

Change-Id: Iec2806dfa416bcbfa63eed2985c74c7a2ea897ea
Reviewed-on: https://gerrit.libreoffice.org/16759
Reviewed-by: Michael Stahl mst...@redhat.com
Tested-by: Michael Stahl mst...@redhat.com

diff --git a/external/icu/UnpackedTarball_icu.mk 
b/external/icu/UnpackedTarball_icu.mk
index 0934289..2beeb68 100644
--- a/external/icu/UnpackedTarball_icu.mk
+++ b/external/icu/UnpackedTarball_icu.mk
@@ -29,6 +29,7 @@ $(eval $(call gb_UnpackedTarball_add_patches,icu,\
external/icu/icu.changeset_36727.patch.1 \
external/icu/icu.changeset_36801.patch.1 \
$(if $(filter-out 
ANDROID,$(OS)),external/icu/icu4c-icudata-stdlibs.diff) \
+   external/icu/icu.vc15.patch \
 ))
 
 # vim: set noet sw=4 ts=4:
diff --git a/external/icu/icu.vc15.patch b/external/icu/icu.vc15.patch
new file mode 100644
index 000..564a7cf
--- /dev/null
+++ b/external/icu/icu.vc15.patch
@@ -0,0 +1,13 @@
+--- misc/icu/source/io/ufile.c 2015-07-04 19:08:35.889168902 +0200
 misc/build/icu/source/io/ufile.c   2015-07-04 19:12:43.040185494 +0200
+@@ -66,7 +66,9 @@
+ #if U_PLATFORM_USES_ONLY_WIN32_API
+ if (0 = result-fFileno  result-fFileno = 2) {
+ /* stdin, stdout and stderr need to be special cased for Windows 98 */
+-#if _MSC_VER = 1400
++#if _MSC_VER = 1900
++result-fFile = __acrt_iob_func(_fileno(f));
++#elif _MSC_VER = 1400
+ result-fFile = __iob_func()[_fileno(f)];
+ #else
+ result-fFile = _iob[_fileno(f)];
___
Libreoffice-commits mailing list
libreoffice-comm...@lists.freedesktop.org
http://lists.freedesktop.org/mailman/listinfo/libreoffice-commits


[Libreoffice-commits] core.git: external/icu

2015-04-12 Thread Rene Engelhard
 external/icu/UnpackedTarball_icu.mk |1 +
 external/icu/icu4c-icudata-stdlibs.diff |   15 +++
 2 files changed, 16 insertions(+)

New commits:
commit e3ebd11ff7bab15bdedcd9e2b7bbe1092b038167
Author: Rene Engelhard r...@debian.org
Date:   Sat Apr 11 17:28:35 2015 +0200

fix internal icu build on armhf (taken from Debians icu package)

Change-Id: Ib287799906e234ce795a0f9ded5cdeebcdffba4e

diff --git a/external/icu/UnpackedTarball_icu.mk 
b/external/icu/UnpackedTarball_icu.mk
index fb08c8d..774eb10 100644
--- a/external/icu/UnpackedTarball_icu.mk
+++ b/external/icu/UnpackedTarball_icu.mk
@@ -28,6 +28,7 @@ $(eval $(call gb_UnpackedTarball_add_patches,icu,\
external/icu/icu.changeset_36724.patch.1 \
external/icu/icu.changeset_36727.patch.1 \
external/icu/icu.changeset_36801.patch.1 \
+   external/icu/icu4c-icudata-stdlibs.diff \
 ))
 
 # vim: set noet sw=4 ts=4:
diff --git a/external/icu/icu4c-icudata-stdlibs.diff 
b/external/icu/icu4c-icudata-stdlibs.diff
new file mode 100644
index 000..16bea7b
--- /dev/null
+++ b/external/icu/icu4c-icudata-stdlibs.diff
@@ -0,0 +1,15 @@
+Index: icu-52~m1/source/config/mh-linux
+===
+--- build/icu-52~m1.orig/source/config/mh-linux2013-09-14 
18:53:23.284040467 -0400
 build/icu-52~m1/source/config/mh-linux 2013-09-14 18:53:23.284040467 
-0400
+@@ -21,7 +21,9 @@
+ RPATHLDFLAGS=${LD_RPATH_PRE}'$$ORIGIN'
+ 
+ ## These are the library specific LDFLAGS
+-LDFLAGSICUDT=-nodefaultlibs -nostdlib
++#LDFLAGSICUDT=-nodefaultlibs -nostdlib
++# Debian change: linking icudata as data only causes too many problems.
++LDFLAGSICUDT=
+ 
+ ## Compiler switch to embed a library name
+ # The initial tab in the next line is to prevent icu-config from reading it.
___
Libreoffice-commits mailing list
libreoffice-comm...@lists.freedesktop.org
http://lists.freedesktop.org/mailman/listinfo/libreoffice-commits


[Libreoffice-commits] core.git: external/icu

2015-04-12 Thread Miklos Vajna
 external/icu/UnpackedTarball_icu.mk |2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

New commits:
commit db2d64f5a2d1f4d4a4b419db618d648ceb339a34
Author: Miklos Vajna vmik...@collabora.co.uk
Date:   Sun Apr 12 18:37:02 2015 +0200

icu: fix Android build

Change-Id: I15f8e960f253db3f13f68bb2da84f0191d888f5b

diff --git a/external/icu/UnpackedTarball_icu.mk 
b/external/icu/UnpackedTarball_icu.mk
index 774eb10..0934289 100644
--- a/external/icu/UnpackedTarball_icu.mk
+++ b/external/icu/UnpackedTarball_icu.mk
@@ -28,7 +28,7 @@ $(eval $(call gb_UnpackedTarball_add_patches,icu,\
external/icu/icu.changeset_36724.patch.1 \
external/icu/icu.changeset_36727.patch.1 \
external/icu/icu.changeset_36801.patch.1 \
-   external/icu/icu4c-icudata-stdlibs.diff \
+   $(if $(filter-out 
ANDROID,$(OS)),external/icu/icu4c-icudata-stdlibs.diff) \
 ))
 
 # vim: set noet sw=4 ts=4:
___
Libreoffice-commits mailing list
libreoffice-comm...@lists.freedesktop.org
http://lists.freedesktop.org/mailman/listinfo/libreoffice-commits


[Libreoffice-commits] core.git: external/icu

2015-04-10 Thread Eike Rathke
 external/icu/UnpackedTarball_icu.mk  |3 
 external/icu/icu.changeset_36724.patch.1 |   39 
 external/icu/icu.changeset_36727.patch.1 |   55 +
 external/icu/icu.changeset_36801.patch.1 | 1222 +++
 4 files changed, 1319 insertions(+)

New commits:
commit 68786ad8fd26a7785d568133b5328281c4b4496f
Author: Eike Rathke er...@redhat.com
Date:   Fri Apr 10 22:49:51 2015 +0200

icu: various regex fixes

Backported from
http://bugs.icu-project.org/trac/changeset/36724
http://bugs.icu-project.org/trac/changeset/36727
http://bugs.icu-project.org/trac/changeset/36801

Change-Id: Idd85c3344e3ef86e390341038f53ad2a398b3fa3

diff --git a/external/icu/UnpackedTarball_icu.mk 
b/external/icu/UnpackedTarball_icu.mk
index 3740450..fb08c8d 100644
--- a/external/icu/UnpackedTarball_icu.mk
+++ b/external/icu/UnpackedTarball_icu.mk
@@ -25,6 +25,9 @@ $(eval $(call gb_UnpackedTarball_add_patches,icu,\
external/icu/icu4c-scriptrun.patch \
external/icu/icu4c-icu11451.patch.1 \
external/icu/rtti.patch.0 \
+   external/icu/icu.changeset_36724.patch.1 \
+   external/icu/icu.changeset_36727.patch.1 \
+   external/icu/icu.changeset_36801.patch.1 \
 ))
 
 # vim: set noet sw=4 ts=4:
diff --git a/external/icu/icu.changeset_36724.patch.1 
b/external/icu/icu.changeset_36724.patch.1
new file mode 100644
index 000..82e0f21
--- /dev/null
+++ b/external/icu/icu.changeset_36724.patch.1
@@ -0,0 +1,39 @@
+Index: icu/source/i18n/regexcmp.cpp
+===
+--- icu/source/i18n/regexcmp.cpp   (revision 36723)
 icu/source/i18n/regexcmp.cpp   (revision 36724)
+@@ -2136,4 +2136,8 @@
+ int32_t minML= minMatchLength(fMatchOpenParen, patEnd);
+ int32_t maxML= maxMatchLength(fMatchOpenParen, patEnd);
++if (URX_TYPE(maxML) != 0) {
++error(U_REGEX_LOOK_BEHIND_LIMIT);
++break;
++}
+ if (maxML == INT32_MAX) {
+ error(U_REGEX_LOOK_BEHIND_LIMIT);
+@@ -2169,4 +2173,8 @@
+ int32_t minML= minMatchLength(fMatchOpenParen, patEnd);
+ int32_t maxML= maxMatchLength(fMatchOpenParen, patEnd);
++if (URX_TYPE(maxML) != 0) {
++error(U_REGEX_LOOK_BEHIND_LIMIT);
++break;
++}
+ if (maxML == INT32_MAX) {
+ error(U_REGEX_LOOK_BEHIND_LIMIT);
+Index: icu/source/test/testdata/regextst.txt
+===
+--- icu/source/test/testdata/regextst.txt  (revision 36723)
 icu/source/test/testdata/regextst.txt  (revision 36724)
+@@ -1201,4 +1201,12 @@
+ A|B|\U00012345hello 0\U00012345/0
+ A|B|\U0001hello \ud800
++
++# Bug 11370
++#   Max match length computation of look-behind expression gives result that 
is too big to fit in the
++#   in the 24 bit operand portion of the compiled code. Expressions should 
fail to compile
++#   (Look-behind match length must be bounded. This case is treated as 
unbounded, an error.)
++
++(?!(0123456789a){1000})x E  no match
++(?!\\ubeaf(\\ubeaf{11000}){11000})   E  no match
+ 
+ #  Random debugging, Temporary
diff --git a/external/icu/icu.changeset_36727.patch.1 
b/external/icu/icu.changeset_36727.patch.1
new file mode 100644
index 000..1b8e01e
--- /dev/null
+++ b/external/icu/icu.changeset_36727.patch.1
@@ -0,0 +1,55 @@
+Index: icu/source/i18n/regexcmp.cpp
+===
+--- icu/source/i18n/regexcmp.cpp   (revision 36726)
 icu/source/i18n/regexcmp.cpp   (revision 36727)
+@@ -2340,5 +2340,13 @@
+ if (fIntervalUpper == 0) {
+ // Pathological case.  Attempt no matches, as if the block doesn't 
exist.
++// Discard the generated code for the block.
++// If the block included parens, discard the info pertaining to them 
as well.
+ fRXPat-fCompiledPat-setSize(topOfBlock);
++if (fMatchOpenParen = topOfBlock) {
++fMatchOpenParen = -1;
++}
++if (fMatchCloseParen = topOfBlock) {
++fMatchCloseParen = -1;
++}
+ return TRUE;
+ }
+Index: icu/source/i18n/regexcmp.h
+===
+--- icu/source/i18n/regexcmp.h (revision 36726)
 icu/source/i18n/regexcmp.h (revision 36727)
+@@ -188,5 +188,7 @@
+  //   of the slot 
reserved for a state save
+  //   at the start of the 
most recently processed
+- //   parenthesized block.
++ //   parenthesized 
block. Updated when processing
++ //   a 

[Libreoffice-commits] core.git: external/icu

2015-01-09 Thread Stephan Bergmann
 external/icu/icu-ubsan.patch.0 |6 --
 1 file changed, 4 insertions(+), 2 deletions(-)

New commits:
commit 89b5423c01ab4e4f05f8d73fe7826f64197abe41
Author: Stephan Bergmann sberg...@redhat.com
Date:   Fri Jan 9 10:20:18 2015 +0100

external/icu: Work around -fsanitize=shift

Change-Id: I17936ae2e37520abaa7dd31a5bb9aec6300ea021

diff --git a/external/icu/icu-ubsan.patch.0 b/external/icu/icu-ubsan.patch.0
index e5d8ed6..25efb5f 100644
--- a/external/icu/icu-ubsan.patch.0
+++ b/external/icu/icu-ubsan.patch.0
@@ -51,15 +51,17 @@
  if (fRB-fLookAheadHardBreak) {
 --- source/common/ubidiimp.h
 +++ source/common/ubidiimp.h
-@@ -198,7 +198,7 @@
+@@ -198,8 +198,8 @@
  /* in a Run, logicalStart will get this bit set if the run level is odd */
  #define INDEX_ODD_BIT (1UL31)
  
 -#define MAKE_INDEX_ODD_PAIR(index, level) ((index)|((int32_t)(level)31))
+-#define ADD_ODD_BIT_FROM_LEVEL(x, level)  ((x)|=((int32_t)(level)31))
 +#define MAKE_INDEX_ODD_PAIR(index, level) ((index)|((uint32_t)(level)31))
- #define ADD_ODD_BIT_FROM_LEVEL(x, level)  ((x)|=((int32_t)(level)31))
++#define ADD_ODD_BIT_FROM_LEVEL(x, level)  ((x)|=((uint32_t)(level)31))
  #define REMOVE_ODD_BIT(x) ((x)=~INDEX_ODD_BIT)
  
+ #define GET_INDEX(x)   ((x)~INDEX_ODD_BIT)
 --- source/common/ucharstriebuilder.cpp
 +++ source/common/ucharstriebuilder.cpp
 @@ -285,7 +285,7 @@
___
Libreoffice-commits mailing list
libreoffice-comm...@lists.freedesktop.org
http://lists.freedesktop.org/mailman/listinfo/libreoffice-commits


[Libreoffice-commits] core.git: external/icu

2015-01-07 Thread Stephan Bergmann
 external/icu/icu-ubsan.patch.0 |   11 +++
 1 file changed, 11 insertions(+)

New commits:
commit 2af41bcb2e57df0d5281f81d5c7dec9bfdf37178
Author: Stephan Bergmann sberg...@redhat.com
Date:   Wed Jan 7 09:47:42 2015 +0100

external/icu: Work around -fsanitize=bounds

Change-Id: Iad87d17c162717aa33eec2113697422d9b0545ca

diff --git a/external/icu/icu-ubsan.patch.0 b/external/icu/icu-ubsan.patch.0
index 5729661..e5d8ed6 100644
--- a/external/icu/icu-ubsan.patch.0
+++ b/external/icu/icu-ubsan.patch.0
@@ -71,6 +71,17 @@
  }
  
  UBool
+--- source/common/ucmndata.c
 source/common/ucmndata.c
+@@ -75,7 +75,7 @@
+ typedef struct  {
+ uint32_t  count;
+ uint32_t  reserved;
+-PointerTOCEntry   entry[2];   /* Actual size is from count. */
++PointerTOCEntry   entry[1];   /* Actual size is from count. */
+ }  PointerTOC;
+ 
+ 
 --- source/common/ucmndata.h
 +++ source/common/ucmndata.h
 @@ -50,7 +50,7 @@
___
Libreoffice-commits mailing list
libreoffice-comm...@lists.freedesktop.org
http://lists.freedesktop.org/mailman/listinfo/libreoffice-commits


[Libreoffice-commits] core.git: external/icu

2015-01-06 Thread Stephan Bergmann
 external/icu/icu-ubsan.patch.0 |   11 +++
 1 file changed, 11 insertions(+)

New commits:
commit 934d32a930047d0f221493f8974f1a2682f6779d
Author: Stephan Bergmann sberg...@redhat.com
Date:   Wed Jan 7 08:39:53 2015 +0100

external/icu: Work around -fsanitize=shift

Change-Id: I0ca31fc36b14d433e9276401c952959a46994c91

diff --git a/external/icu/icu-ubsan.patch.0 b/external/icu/icu-ubsan.patch.0
index c1d229c..5729661 100644
--- a/external/icu/icu-ubsan.patch.0
+++ b/external/icu/icu-ubsan.patch.0
@@ -49,6 +49,17 @@
  table-fNumStates = fDStates-size();
  table-fFlags = 0;
  if (fRB-fLookAheadHardBreak) {
+--- source/common/ubidiimp.h
 source/common/ubidiimp.h
+@@ -198,7 +198,7 @@
+ /* in a Run, logicalStart will get this bit set if the run level is odd */
+ #define INDEX_ODD_BIT (1UL31)
+ 
+-#define MAKE_INDEX_ODD_PAIR(index, level) ((index)|((int32_t)(level)31))
++#define MAKE_INDEX_ODD_PAIR(index, level) ((index)|((uint32_t)(level)31))
+ #define ADD_ODD_BIT_FROM_LEVEL(x, level)  ((x)|=((int32_t)(level)31))
+ #define REMOVE_ODD_BIT(x) ((x)=~INDEX_ODD_BIT)
+ 
 --- source/common/ucharstriebuilder.cpp
 +++ source/common/ucharstriebuilder.cpp
 @@ -285,7 +285,7 @@
___
Libreoffice-commits mailing list
libreoffice-comm...@lists.freedesktop.org
http://lists.freedesktop.org/mailman/listinfo/libreoffice-commits


[Libreoffice-commits] core.git: external/icu

2014-12-19 Thread Caolán McNamara
 external/icu/UnpackedTarball_icu.mk |1 +
 external/icu/icu4c-icu11451.patch.1 |   11 +++
 2 files changed, 12 insertions(+)

New commits:
commit bfb9eb550c4facb9aa6346a8d19f015cf5182668
Author: Caolán McNamara caol...@redhat.com
Date:   Fri Dec 19 10:40:02 2014 +

icu#11451 bidi, the gift that keeps on giving

Change-Id: I3bd37f8468c95a29ab3385dbc3ae825b76d8d3df

diff --git a/external/icu/UnpackedTarball_icu.mk 
b/external/icu/UnpackedTarball_icu.mk
index d541e2e..af9c751 100644
--- a/external/icu/UnpackedTarball_icu.mk
+++ b/external/icu/UnpackedTarball_icu.mk
@@ -26,6 +26,7 @@ $(eval $(call gb_UnpackedTarball_add_patches,icu,\
external/icu/icu4c-icu11100.patch.1 \
external/icu/icu4c-icu11131.patch.1 \
external/icu/icu4c-scriptrun.patch \
+   external/icu/icu4c-icu11451.patch.1 \
 ))
 
 # vim: set noet sw=4 ts=4:
diff --git a/external/icu/icu4c-icu11451.patch.1 
b/external/icu/icu4c-icu11451.patch.1
new file mode 100644
index 000..b15185a
--- /dev/null
+++ b/external/icu/icu4c-icu11451.patch.1
@@ -0,0 +1,11 @@
+--- icu/source/common/ubidi.c.orig 2014-12-19 10:23:38.103928414 +
 icu/source/common/ubidi.c  2014-12-19 10:26:58.370071527 +
+@@ -2146,7 +2146,7 @@
+ /* The isolates[] entries contain enough information to
+resume the bidi algorithm in the same state as it was
+when it was interrupted by an isolate sequence. */
+-if(dirProps[start]==PDI) {
++if(dirProps[start]==PDI  pBiDi-isolateCount = 0) {
+ levState.startON=pBiDi-isolates[pBiDi-isolateCount].startON;
+ start1=pBiDi-isolates[pBiDi-isolateCount].start1;
+ stateImp=pBiDi-isolates[pBiDi-isolateCount].stateImp;
___
Libreoffice-commits mailing list
libreoffice-comm...@lists.freedesktop.org
http://lists.freedesktop.org/mailman/listinfo/libreoffice-commits


[Libreoffice-commits] core.git: external/icu

2014-12-19 Thread Tor Lillqvist
 external/icu/icu4c-android.patch |4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)

New commits:
commit c3e32b0fd7fecbacd05786de2cd8a3bff97ce2b6
Author: Tor Lillqvist t...@collabora.com
Date:   Fri Dec 19 18:40:09 2014 +0200

Make icu4c-android.patch apply again

Change-Id: I98d9fecb0f44b0b4354029bab1a5d675e98edd1f

diff --git a/external/icu/icu4c-android.patch b/external/icu/icu4c-android.patch
index ce8c8b4..0b320a8 100644
--- a/external/icu/icu4c-android.patch
+++ b/external/icu/icu4c-android.patch
@@ -17,9 +17,9 @@
fi ;;
 -*-*-linux*|*-*-gnu|*-*-k*bsd*-gnu|*-*-kopensolaris*-gnu) 
icu_cv_host_frag=mh-linux ;;
 +*-*-linux*|*-*-gnu|*-*-k*bsd*-gnu|*-*-kopensolaris*-gnu|*-*-*-androideabi*) 
icu_cv_host_frag=mh-linux ;;
- *-*-cygwin|*-*-mingw32|*-*-mingw64)
+ i[34567]86-*-cygwin)
if test $GCC = yes; then
-   cat confdefs.h - _ACEOF conftest.$ac_ext
+   icu_cv_host_frag=mh-cygwin
 @@ -6032,6 +6032,10 @@
  # Check to see if genccode can generate simple assembly.
  GENCCODE_ASSEMBLY=
___
Libreoffice-commits mailing list
libreoffice-comm...@lists.freedesktop.org
http://lists.freedesktop.org/mailman/listinfo/libreoffice-commits


[Libreoffice-commits] core.git: external/icu

2014-11-30 Thread Caolán McNamara
 external/icu/UnpackedTarball_icu.mk |1 
 external/icu/icu4c-scriptrun.patch  |   58 
 2 files changed, 59 insertions(+)

New commits:
commit a66451887425ddd9387e2b25d5125916f4a35f83
Author: Caolán McNamara caol...@redhat.com
Date:   Sun Nov 30 20:38:42 2014 +

mirror fixes for fdo#78906 and deb#766788 into icu

Change-Id: I9325bb28eb267b023f628e24fea216ad580759e9

diff --git a/external/icu/UnpackedTarball_icu.mk 
b/external/icu/UnpackedTarball_icu.mk
index 0f6ecd1..d541e2e 100644
--- a/external/icu/UnpackedTarball_icu.mk
+++ b/external/icu/UnpackedTarball_icu.mk
@@ -25,6 +25,7 @@ $(eval $(call gb_UnpackedTarball_add_patches,icu,\
external/icu/icu4c-icu11054.patch.1 \
external/icu/icu4c-icu11100.patch.1 \
external/icu/icu4c-icu11131.patch.1 \
+   external/icu/icu4c-scriptrun.patch \
 ))
 
 # vim: set noet sw=4 ts=4:
diff --git a/external/icu/icu4c-scriptrun.patch 
b/external/icu/icu4c-scriptrun.patch
new file mode 100644
index 000..e307811
--- /dev/null
+++ b/external/icu/icu4c-scriptrun.patch
@@ -0,0 +1,58 @@
+--- misc/icu/source/extra/scrptrun/scrptrun.cpp
 misc/build/icu/source/extra/scrptrun/scrptrun.cpp
+@@ -150,7 +150,11 @@
+ // characters above it on the stack will be poped.
+ if (pairIndex = 0) {
+ if ((pairIndex  1) == 0) {
+-parenStack[++parenSP].pairIndex = pairIndex;
++++parenSP;
++int32_t nVecSize = parenStack.size();
++if (parenSP == nVecSize)
++parenStack.resize(nVecSize + 128);
++parenStack[parenSP].pairIndex = pairIndex;
+ parenStack[parenSP].scriptCode  = scriptCode;
+ } else if (parenSP = 0) {
+ int32_t pi = pairIndex  ~1;
+@@ -184,7 +188,14 @@
+ // pop it from the stack
+ if (pairIndex = 0  (pairIndex  1) != 0  parenSP = 0) {
+ parenSP -= 1;
+-startSP -= 1;
++/* decrement startSP only if it is = 0,
++   decrementing it unnecessarily will lead to memory 
corruption
++   while processing the above while block.
++   e.g. startSP = -4 , parenSP = -1
++*/
++if (startSP = 0) {
++startSP -= 1;
++}
+ }
+ } else {
+ // if the run broke on a surrogate pair,
+--- misc/icu/source/extra/scrptrun/scrptrun.h
 misc/build/icu/source/extra/scrptrun/scrptrun.h
+@@ -17,6 +17,7 @@
+ #include unicode/utypes.h
+ #include unicode/uobject.h
+ #include unicode/uscript.h
++#include vector
+ 
+ struct ScriptRecord
+ {
+@@ -79,7 +80,7 @@
+ int32_t scriptEnd;
+ UScriptCode scriptCode;
+ 
+-ParenStackEntry parenStack[128];
++std::vectorParenStackEntry parenStack;
+ int32_t parenSP;
+ 
+ static int8_t highBit(int32_t value);
+@@ -133,6 +134,7 @@
+ scriptEnd   = charStart;
+ scriptCode  = USCRIPT_INVALID_CODE;
+ parenSP = -1;
++parenStack.resize(128);
+ }
+ 
+ inline void ScriptRun::reset(int32_t start, int32_t length)
___
Libreoffice-commits mailing list
libreoffice-comm...@lists.freedesktop.org
http://lists.freedesktop.org/mailman/listinfo/libreoffice-commits


[Libreoffice-commits] core.git: external/icu

2014-10-28 Thread Stephan Bergmann
 external/icu/icu-ubsan.patch.0 |   17 -
 1 file changed, 16 insertions(+), 1 deletion(-)

New commits:
commit 3025a28bc2e89af05c9d287a07223be0447d3c2f
Author: Stephan Bergmann sberg...@redhat.com
Date:   Tue Oct 28 14:33:46 2014 +0100

external/icu: More workaround UBSan flexible array member detection

Change-Id: Ie83e3104bd639be42ac0c6e25fc2eafd88cf0c6f

diff --git a/external/icu/icu-ubsan.patch.0 b/external/icu/icu-ubsan.patch.0
index 5f9e85f..7268bb7 100644
--- a/external/icu/icu-ubsan.patch.0
+++ b/external/icu/icu-ubsan.patch.0
@@ -9,9 +9,24 @@
  /*  This array does not have two elements 
*/
  /*Array Size is actually 
fData-fHeader-fCatCount */
  /*CAUTION:  see 
RBBITableBuilder::getTableSize()  */
+@@ -126,7 +126,7 @@
+ uint32_t fRowLen;   /*  Length of a state table row, in 
bytes.*/
+ uint32_t fFlags;/*  Option Flags for this state table 
*/
+ uint32_t fReserved; /*  reserved  
*/
+-char fTableData[4]; /*  First RBBIStateTableRow begins here.  
*/
++char fTableData[1]; /*  First RBBIStateTableRow begins here.  
*/
+ /*(making it char[] simplifies ugly 
address   */
+ /* arithmetic for indexing variable 
length rows.) */
+ };
 --- source/common/rbbitblb.cpp
 +++ source/common/rbbitblb.cpp
-@@ -1072,10 +1072,10 @@
+@@ -1067,15 +1067,15 @@
+ return 0;
+ }
+ 
+-size= sizeof(RBBIStateTable) - 4;// The header, with no rows to 
the table.
++size= offsetof(RBBIStateTable, fTableData);// The header, with no 
rows to the table.
+ 
  numRows = fDStates-size();
  numCols = fRB-fSetBuilder-getNumCharCategories();
  
___
Libreoffice-commits mailing list
libreoffice-comm...@lists.freedesktop.org
http://lists.freedesktop.org/mailman/listinfo/libreoffice-commits


[Libreoffice-commits] core.git: external/icu

2014-10-28 Thread Stephan Bergmann
 external/icu/icu-ubsan.patch.0 |   67 +
 1 file changed, 67 insertions(+)

New commits:
commit 1f03a8d48c350f6e7c3612b30e0695aa9623982b
Author: Stephan Bergmann sberg...@redhat.com
Date:   Tue Oct 28 16:00:16 2014 +0100

external/icu: workaround -fsanitize=signed-integer-overflow warnings

Change-Id: I44b5d74a3c1addaec77e724a3e7356e3648fc10c

diff --git a/external/icu/icu-ubsan.patch.0 b/external/icu/icu-ubsan.patch.0
index 7268bb7..f3e9d99 100644
--- a/external/icu/icu-ubsan.patch.0
+++ b/external/icu/icu-ubsan.patch.0
@@ -49,6 +49,17 @@
  table-fNumStates = fDStates-size();
  table-fFlags = 0;
  if (fRB-fLookAheadHardBreak) {
+--- source/common/ucharstriebuilder.cpp
 source/common/ucharstriebuilder.cpp
+@@ -285,7 +285,7 @@
+ 
+ UCharsTrieBuilder::UCTLinearMatchNode::UCTLinearMatchNode(const UChar *units, 
int32_t len, Node *nextNode)
+ : LinearMatchNode(len, nextNode), s(units) {
+-hash=hash*37+ustr_hashUCharsN(units, len);
++hash=hash*37U+ustr_hashUCharsN(units, len);
+ }
+ 
+ UBool
 --- source/common/ucmndata.h
 +++ source/common/ucmndata.h
 @@ -50,7 +50,7 @@
@@ -60,6 +71,62 @@
  } UDataOffsetTOC;
  
  /**
+--- source/common/unicode/stringtriebuilder.h
 source/common/unicode/stringtriebuilder.h
+@@ -269,7 +269,7 @@
+ void setValue(int32_t v) {
+ hasValue=TRUE;
+ value=v;
+-hash=hash*37+v;
++hash=hash*37U+v;
+ }
+ protected:
+ UBool hasValue;
+@@ -296,7 +296,7 @@
+ class LinearMatchNode : public ValueNode {
+ public:
+ LinearMatchNode(int32_t len, Node *nextNode)
+-: ValueNode((0x33*37+len)*37+hashCode(nextNode)),
++: ValueNode((0x33U*37+len)*37+hashCode(nextNode)),
+   length(len), next(nextNode) {}
+ virtual UBool operator==(const Node other) const;
+ virtual int32_t markRightEdgesFirst(int32_t edgeNumber);
+@@ -330,7 +330,7 @@
+ equal[length]=NULL;
+ values[length]=value;
+ ++length;
+-hash=(hash*37+c)*37+value;
++hash=(hash*37U+c)*37+value;
+ }
+ // Adds a unit which leads to another match node.
+ void add(int32_t c, Node *node) {
+@@ -338,7 +338,7 @@
+ equal[length]=node;
+ values[length]=0;
+ ++length;
+-hash=(hash*37+c)*37+hashCode(node);
++hash=(hash*37U+c)*37+hashCode(node);
+ }
+ protected:
+ Node *equal[kMaxBranchLinearSubNodeLength];  // NULL means has final 
value.
+@@ -353,7 +353,7 @@
+ class SplitBranchNode : public BranchNode {
+ public:
+ SplitBranchNode(UChar middleUnit, Node *lessThanNode, Node 
*greaterOrEqualNode)
+-: BranchNode(((0x55*37+middleUnit)*37+
++: BranchNode(((0x55U*37+middleUnit)*37+
+   
hashCode(lessThanNode))*37+hashCode(greaterOrEqualNode)),
+   unit(middleUnit), lessThan(lessThanNode), 
greaterOrEqual(greaterOrEqualNode) {}
+ virtual UBool operator==(const Node other) const;
+@@ -370,7 +370,7 @@
+ class BranchHeadNode : public ValueNode {
+ public:
+ BranchHeadNode(int32_t len, Node *subNode)
+-: ValueNode((0x66*37+len)*37+hashCode(subNode)),
++: ValueNode((0x66U*37+len)*37+hashCode(subNode)),
+   length(len), next(subNode) {}
+ virtual UBool operator==(const Node other) const;
+ virtual int32_t markRightEdgesFirst(int32_t edgeNumber);
 --- source/common/ustring.cpp
 +++ source/common/ustring.cpp
 @@ -1486,7 +1486,7 @@
___
Libreoffice-commits mailing list
libreoffice-comm...@lists.freedesktop.org
http://lists.freedesktop.org/mailman/listinfo/libreoffice-commits


[Libreoffice-commits] core.git: external/icu

2014-10-28 Thread Stephan Bergmann
 external/icu/icu-ubsan.patch.0 |   11 +++
 1 file changed, 11 insertions(+)

New commits:
commit acd62e055ee71f330b1d48c3c3c83aaa5ceca29a
Author: Stephan Bergmann sberg...@redhat.com
Date:   Tue Oct 28 17:29:35 2014 +0100

external/icu: workaround -fsanitize=signed-integer-overflow warnings

Change-Id: I7d8e3be80f04ec0a9d1dbd394ac0e2ab2f1a4551

diff --git a/external/icu/icu-ubsan.patch.0 b/external/icu/icu-ubsan.patch.0
index f3e9d99..479007b 100644
--- a/external/icu/icu-ubsan.patch.0
+++ b/external/icu/icu-ubsan.patch.0
@@ -127,6 +127,17 @@
length(len), next(subNode) {}
  virtual UBool operator==(const Node other) const;
  virtual int32_t markRightEdgesFirst(int32_t edgeNumber);
+--- source/common/uresbund.cpp
 source/common/uresbund.cpp
+@@ -53,7 +53,7 @@
+ UHashTok namekey, pathkey;
+ namekey.pointer = b-fName;
+ pathkey.pointer = b-fPath;
+-return uhash_hashChars(namekey)+37*uhash_hashChars(pathkey);
++return uhash_hashChars(namekey)+37U*uhash_hashChars(pathkey);
+ }
+ 
+ /* INTERNAL: compares two entries */
 --- source/common/ustring.cpp
 +++ source/common/ustring.cpp
 @@ -1486,7 +1486,7 @@
___
Libreoffice-commits mailing list
libreoffice-comm...@lists.freedesktop.org
http://lists.freedesktop.org/mailman/listinfo/libreoffice-commits


[Libreoffice-commits] core.git: external/icu

2014-08-28 Thread Caolán McNamara
 external/icu/icu4c-icu11100.patch.1 |   10 ++
 1 file changed, 6 insertions(+), 4 deletions(-)

New commits:
commit 854bf7399a635928e6c155ef2246d636ab11ec13
Author: Caolán McNamara caol...@redhat.com
Date:   Thu Aug 28 10:02:31 2014 +0100

bidi, the gift that keeps on giving

Change-Id: Ia33eb3e4c89963d7391df0339a2a5b948efd0d9f

diff --git a/external/icu/icu4c-icu11100.patch.1 
b/external/icu/icu4c-icu11100.patch.1
index d44dc83..f63a79f 100644
--- a/external/icu/icu4c-icu11100.patch.1
+++ b/external/icu/icu4c-icu11100.patch.1
@@ -1,19 +1,21 @@
 --- 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
-@@ -2097,6 +2097,12 @@
+@@ -2096,6 +2096,14 @@
  return DirProp_ON;
  }
  
 +static int
 +isolatesavailable(UBiDi *pBiDi) {
-+return (pBiDi-isolateCount  SIMPLE_ISOLATES_SIZE-1 ||
-+pBiDi-isolateCount  pBiDi-isolatesSize/sizeof(Isolate)-1);
++if (pBiDi-isolates == pBiDi-simpleIsolates) {
++return pBiDi-isolateCount  SIMPLE_ISOLATES_SIZE-1;
++}
++return pBiDi-isolateCount  pBiDi-isolatesSize/sizeof(Isolate)-1;
 +}
 +
  static void
  resolveImplicitLevels(UBiDi *pBiDi,
int32_t start, int32_t limit,
-@@ -2240,7 +2246,7 @@
+@@ -2239,7 +2247,7 @@
  /* look for the last char not a BN or LRE/RLE/LRO/RLO/PDF */
  for(i=limit-1; istart(DIRPROP_FLAG(dirProps[i])MASK_BN_EXPLICIT); 
i--);
  dirProp=dirProps[i];
___
Libreoffice-commits mailing list
libreoffice-comm...@lists.freedesktop.org
http://lists.freedesktop.org/mailman/listinfo/libreoffice-commits


[Libreoffice-commits] core.git: external/icu

2014-08-28 Thread Caolán McNamara
 external/icu/icu-ubsan.patch.0 |   25 +
 1 file changed, 25 insertions(+)

New commits:
commit 7890a7263f8a6740582bc58328c76613818fe2d5
Author: Caolán McNamara caol...@redhat.com
Date:   Thu Aug 28 15:51:10 2014 +0100

update getTableSize (and fRowLen) for dodgy 2-based arithmetic

Change-Id: I3787a46cf8662ed709534db85d724c17c21b90dd

diff --git a/external/icu/icu-ubsan.patch.0 b/external/icu/icu-ubsan.patch.0
index 01fc290..5f9e85f 100644
--- a/external/icu/icu-ubsan.patch.0
+++ b/external/icu/icu-ubsan.patch.0
@@ -9,6 +9,31 @@
  /*  This array does not have two elements 
*/
  /*Array Size is actually 
fData-fHeader-fCatCount */
  /*CAUTION:  see 
RBBITableBuilder::getTableSize()  */
+--- source/common/rbbitblb.cpp
 source/common/rbbitblb.cpp
+@@ -1072,10 +1072,10 @@
+ numRows = fDStates-size();
+ numCols = fRB-fSetBuilder-getNumCharCategories();
+ 
+-//  Note  The declaration of RBBIStateTableRow is for a table of two 
columns.
+-//Therefore we subtract two from numCols when determining
++//  Note  The declaration of RBBIStateTableRow is for a table of one 
columns.
++//Therefore we subtract one from numCols when determining
+ //how much storage to add to a row for the total columns.
+-rowSize = sizeof(RBBIStateTableRow) + sizeof(uint16_t)*(numCols-2);
++rowSize = sizeof(RBBIStateTableRow) + sizeof(uint16_t)*(numCols-1);
+ size   += numRows * rowSize;
+ return size;
+ }
+@@ -1105,7 +1105,7 @@
+ }
+ 
+ table-fRowLen= sizeof(RBBIStateTableRow) +
+-sizeof(uint16_t) * 
(fRB-fSetBuilder-getNumCharCategories() - 2);
++sizeof(uint16_t) * 
(fRB-fSetBuilder-getNumCharCategories() - 1);
+ table-fNumStates = fDStates-size();
+ table-fFlags = 0;
+ if (fRB-fLookAheadHardBreak) {
 --- source/common/ucmndata.h
 +++ source/common/ucmndata.h
 @@ -50,7 +50,7 @@
___
Libreoffice-commits mailing list
libreoffice-comm...@lists.freedesktop.org
http://lists.freedesktop.org/mailman/listinfo/libreoffice-commits


[Libreoffice-commits] core.git: external/icu

2014-08-26 Thread Caolán McNamara
 external/icu/UnpackedTarball_icu.mk |1 +
 external/icu/icu4c-icu11100.patch.1 |   24 
 2 files changed, 25 insertions(+)

New commits:
commit 5d952d4208aa61b6bb0c20d36745d0554be7cec3
Author: Caolán McNamara caol...@redhat.com
Date:   Tue Aug 26 14:39:48 2014 +0100

Resolves: icu#11100 resolveImplicitLevels woes

Change-Id: I0c052cbcfe375bd1279c2235b53c909920e2e779

diff --git a/external/icu/UnpackedTarball_icu.mk 
b/external/icu/UnpackedTarball_icu.mk
index 07dcab8..3f9eda2 100644
--- a/external/icu/UnpackedTarball_icu.mk
+++ b/external/icu/UnpackedTarball_icu.mk
@@ -23,6 +23,7 @@ $(eval $(call gb_UnpackedTarball_add_patches,icu,\
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 \
 ))
 
 # vim: set noet sw=4 ts=4:
diff --git a/external/icu/icu4c-icu11100.patch.1 
b/external/icu/icu4c-icu11100.patch.1
new file mode 100644
index 000..d44dc83
--- /dev/null
+++ b/external/icu/icu4c-icu11100.patch.1
@@ -0,0 +1,24 @@
+--- 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
+@@ -2097,6 +2097,12 @@
+ return DirProp_ON;
+ }
+ 
++static int
++isolatesavailable(UBiDi *pBiDi) {
++return (pBiDi-isolateCount  SIMPLE_ISOLATES_SIZE-1 ||
++pBiDi-isolateCount  pBiDi-isolatesSize/sizeof(Isolate)-1);
++}
++
+ static void
+ resolveImplicitLevels(UBiDi *pBiDi,
+   int32_t start, int32_t limit,
+@@ -2240,7 +2246,7 @@
+ /* look for the last char not a BN or LRE/RLE/LRO/RLO/PDF */
+ for(i=limit-1; istart(DIRPROP_FLAG(dirProps[i])MASK_BN_EXPLICIT); 
i--);
+ dirProp=dirProps[i];
+-if((dirProp==LRI || dirProp==RLI)  limitpBiDi-length) {
++if((dirProp==LRI || dirProp==RLI)  limitpBiDi-length  
isolatesavailable(pBiDi)) {
+ pBiDi-isolateCount++;
+ pBiDi-isolates[pBiDi-isolateCount].stateImp=stateImp;
+ pBiDi-isolates[pBiDi-isolateCount].state=levState.state;
___
Libreoffice-commits mailing list
libreoffice-comm...@lists.freedesktop.org
http://lists.freedesktop.org/mailman/listinfo/libreoffice-commits


[Libreoffice-commits] core.git: external/icu

2014-08-09 Thread Caolán McNamara
 external/icu/UnpackedTarball_icu.mk |1 
 external/icu/icu4c-icu11054.patch.1 |   44 
 2 files changed, 45 insertions(+)

New commits:
commit d79d2f0ef7a0e300a3ee4be128c625121d0c4b26
Author: Caolán McNamara caol...@redhat.com
Date:   Sat Aug 9 21:14:03 2014 +0100

Resolves: icu#11054 crashes in bracketAddOpening

Change-Id: I5dd63fa41c1568e8bf2d120cc0de5d2c44dd789c

diff --git a/external/icu/UnpackedTarball_icu.mk 
b/external/icu/UnpackedTarball_icu.mk
index 3b06d22..07dcab8 100644
--- a/external/icu/UnpackedTarball_icu.mk
+++ b/external/icu/UnpackedTarball_icu.mk
@@ -22,6 +22,7 @@ $(eval $(call gb_UnpackedTarball_add_patches,icu,\
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 \
 ))
 
 # vim: set noet sw=4 ts=4:
diff --git a/external/icu/icu4c-icu11054.patch.1 
b/external/icu/icu4c-icu11054.patch.1
new file mode 100644
index 000..48d21f5
--- /dev/null
+++ b/external/icu/icu4c-icu11054.patch.1
@@ -0,0 +1,44 @@
+--- 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 */
___
Libreoffice-commits mailing list
libreoffice-comm...@lists.freedesktop.org
http://lists.freedesktop.org/mailman/listinfo/libreoffice-commits


[Libreoffice-commits] core.git: external/icu

2014-07-07 Thread Michael Stahl
 external/icu/ExternalProject_icu.mk |1 +
 1 file changed, 1 insertion(+)

New commits:
commit 108ad26747f6fa6667dd65759d64d71e92979742
Author: Michael Stahl mst...@redhat.com
Date:   Mon Jul 7 23:06:54 2014 +0200

icu: pass in install program as native path, so Win32 make can invoke it

No idea why this wasn't a problem before.

Change-Id: Icbb94111061079069e2fc2102cfa4fe4bdd59bb9

diff --git a/external/icu/ExternalProject_icu.mk 
b/external/icu/ExternalProject_icu.mk
index 04d33a6..ea5f43a 100644
--- a/external/icu/ExternalProject_icu.mk
+++ b/external/icu/ExternalProject_icu.mk
@@ -23,6 +23,7 @@ $(call gb_ExternalProject_get_state_target,icu,build) :
$(call gb_ExternalProject_run,build,\
export LIB=$(ILIB) \
 CFLAGS=$(SOLARINC) $(gb_DEBUG_CFLAGS) 
CPPFLAGS=$(SOLARINC) CXXFLAGS=$(SOLARINC) $(gb_DEBUG_CFLAGS) \
+   INSTALL=`cygpath -m /usr/bin/install` \
./runConfigureICU \
$(if $(MSVC_USE_DEBUG_RUNTIME),--enable-debug 
--disable-release) \
Cygwin/MSVC \
___
Libreoffice-commits mailing list
libreoffice-comm...@lists.freedesktop.org
http://lists.freedesktop.org/mailman/listinfo/libreoffice-commits


[Libreoffice-commits] core.git: external/icu

2014-06-19 Thread Stephan Bergmann
 external/icu/icu-ubsan.patch.0 |   22 ++
 1 file changed, 22 insertions(+)

New commits:
commit d77c108922f7ea2c57bc63bbe289bba92f6213a6
Author: Stephan Bergmann sberg...@redhat.com
Date:   Thu Jun 19 23:05:42 2014 +0200

external/icu: Change flexible array members to be of length 1 instead of 2

...so that -fsanitize=undefined does not report false out-of-bounds 
accesses;
Clang's isFlexibleArrayMemberExpr (lib/CodeGen/CGExpr.cpp) only treats 
arrays of
length 0 and 1 as such special flexible cases.

There appears to be no code in icu that depends on those arrays to be of 
length
2 (e.g., via sizeof), though it does look suspicious that they are 
deliberately
of length 2 instead of 1.

Change-Id: I85293e769f1d64cb4e60e13f1cd7f88b76e37487

diff --git a/external/icu/icu-ubsan.patch.0 b/external/icu/icu-ubsan.patch.0
index ef3121f..01fc290 100644
--- a/external/icu/icu-ubsan.patch.0
+++ b/external/icu/icu-ubsan.patch.0
@@ -1,3 +1,25 @@
+--- source/common/rbbidata.h
 source/common/rbbidata.h
+@@ -113,7 +113,7 @@
+ /* StatusTable of the set of matching 
*/
+ /* tags (rule status values)  
*/
+ int16_t  fReserved;
+-uint16_t fNextState[2]; /*  Next State, indexed by char category. 
*/
++uint16_t fNextState[1]; /*  Next State, indexed by char category. 
*/
+ /*  This array does not have two elements 
*/
+ /*Array Size is actually 
fData-fHeader-fCatCount */
+ /*CAUTION:  see 
RBBITableBuilder::getTableSize()  */
+--- source/common/ucmndata.h
 source/common/ucmndata.h
+@@ -50,7 +50,7 @@
+ 
+ typedef struct {
+ uint32_t count;
+-UDataOffsetTOCEntry entry[2];/* Actual size of array is from count. */
++UDataOffsetTOCEntry entry[1];/* Actual size of array is from count. */
+ } UDataOffsetTOC;
+ 
+ /**
 --- source/common/ustring.cpp
 +++ source/common/ustring.cpp
 @@ -1486,7 +1486,7 @@
___
Libreoffice-commits mailing list
libreoffice-comm...@lists.freedesktop.org
http://lists.freedesktop.org/mailman/listinfo/libreoffice-commits


[Libreoffice-commits] core.git: external/icu

2014-04-29 Thread Eike Rathke
 external/icu/icu4c-android.patch |   12 
 1 file changed, 12 deletions(-)

New commits:
commit f02c7cdbef595660703cce9359fe9eb71ceefacf
Author: Eike Rathke er...@redhat.com
Date:   Tue Apr 29 20:32:17 2014 +0100

drop source/common/putilimp.h part of Android patch, fdo#77071 related

ICU now has its (U_PLATFORM == U_PF_ANDROID) directive.

Change-Id: If740ea0c8004a2a8365d46b5ecf0e388b5965f62

diff --git a/external/icu/icu4c-android.patch b/external/icu/icu4c-android.patch
index ad10fe33..ce8c8b4 100644
--- a/external/icu/icu4c-android.patch
+++ b/external/icu/icu4c-android.patch
@@ -43,18 +43,6 @@
  ;;
  esac
 
 misc/icu/source/common/putilimp.h  2013-10-05 03:49:30.0 +0700
-+++ misc/build/icu/source/common/putilimp.h2013-11-10 17:21:26.224217698 
+0700
-@@ -87,6 +87,8 @@
- /* Use the predefined value. */
- #elif U_PLATFORM_HAS_WIN32_API
- #   define U_HAVE_NL_LANGINFO_CODESET 0
-+#elif defined(__ANDROID__)
-+#   define U_HAVE_NL_LANGINFO_CODESET 0
- #else
- #   define U_HAVE_NL_LANGINFO_CODESET 1
- #endif
-
 --- misc/icu/source/common/unicode/platform.h  2013-10-05 03:49:10.0 
+0700
 +++ misc/build/icu/source/common/unicode/platform.h2013-11-10 
17:22:27.160217186 +0700
 @@ -703,7 +703,7 @@
___
Libreoffice-commits mailing list
libreoffice-comm...@lists.freedesktop.org
http://lists.freedesktop.org/mailman/listinfo/libreoffice-commits


[Libreoffice-commits] core.git: external/icu

2013-11-13 Thread Stephan Bergmann
 external/icu/ExternalProject_icu.mk |2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

New commits:
commit a500ab2ee19a5221817c13fc8975c27fe4e92246
Author: Stephan Bergmann sberg...@redhat.com
Date:   Wed Nov 13 17:03:06 2013 +0100

Tunnel CXXFLAGS_CXX11 into ICU

for our -D__float128=void hack for Clang against libstdc++; it is OK that 
that
explicitly enables C++11 for ICU, as ICU's configure.ac would set 
-std=c++0x if
no -std= is passed in.

Change-Id: I0e5044773c3d6923e3b100e19b5b54ab9edf7a1b

diff --git a/external/icu/ExternalProject_icu.mk 
b/external/icu/ExternalProject_icu.mk
index 26d90b5..bc56ce8 100644
--- a/external/icu/ExternalProject_icu.mk
+++ b/external/icu/ExternalProject_icu.mk
@@ -56,7 +56,7 @@ icu_CFLAGS:= \
$(if $(filter GCC,$(COM)),-fno-strict-aliasing) \
$(if $(filter $(true),$(gb_SYMBOL)),-g) \
$(if $(filter ANDROID,$(OS)),-fvisibility=hidden 
-fno-omit-frame-pointer)
-icu_CXXFLAGS:= \
+icu_CXXFLAGS:=$(CXXFLAGS_CXX11) \
$(if $(filter IOS,$(OS)),-DUCONFIG_NO_FILE_IO) \
$(if $(debug),$(gb_DEBUG_CFLAGS),$(gb_COMPILEROPTFLAGS)) \
$(if $(ENABLE_LTO),$(gb_LTOFLAGS)) \
___
Libreoffice-commits mailing list
libreoffice-comm...@lists.freedesktop.org
http://lists.freedesktop.org/mailman/listinfo/libreoffice-commits


[Libreoffice-commits] core.git: external/icu external/Module_external.mk icu/ExternalPackage_icu.mk icu/ExternalProject_icu.mk icu/icu4c.10129.wintz.patch icu/icu4c.10318.CVE-2013-2924_changeset_34076

2013-10-18 Thread Khaled Hosny
 RepositoryModule_host.mk |1 
 external/Module_external.mk  |1 
 external/icu/ExternalPackage_icu.mk  |   85 ++
 external/icu/ExternalProject_icu.mk  |   99 +++
 external/icu/Makefile|7 
 external/icu/Module_icu.mk   |   18 +
 external/icu/README  |1 
 external/icu/UnpackedTarball_icu.mk  |   34 ++
 external/icu/icu4c-aix.patch |  155 +++
 external/icu/icu4c-android.patch |   65 
 external/icu/icu4c-buffer-overflow.patch |   29 ++
 external/icu/icu4c-build.patch   |  108 +++
 external/icu/icu4c-macosx.patch  |   19 +
 external/icu/icu4c-mkdir.patch   |   10 
 external/icu/icu4c-rpath.patch   |   35 ++
 external/icu/icu4c-solarisgcc.patch  |   12 
 external/icu/icu4c-warnings.patch|   21 +
 external/icu/icu4c-wchar_t.patch |   15 +
 external/icu/icu4c.10129.wintz.patch |   24 +
 external/icu/icu4c.10318.CVE-2013-2924_changeset_34076.patch |   36 ++
 icu/ExternalPackage_icu.mk   |   85 --
 icu/ExternalProject_icu.mk   |   99 ---
 icu/Makefile |7 
 icu/Module_icu.mk|   20 -
 icu/README   |1 
 icu/UnpackedTarball_icu.mk   |   34 --
 icu/icu4c-aix.patch  |  155 ---
 icu/icu4c-android.patch  |   65 
 icu/icu4c-buffer-overflow.patch  |   29 --
 icu/icu4c-build.patch|  108 ---
 icu/icu4c-macosx.patch   |   19 -
 icu/icu4c-mkdir.patch|   10 
 icu/icu4c-rpath.patch|   35 --
 icu/icu4c-solarisgcc.patch   |   12 
 icu/icu4c-warnings.patch |   21 -
 icu/icu4c-wchar_t.patch  |   15 -
 icu/icu4c.10129.wintz.patch  |   24 -
 icu/icu4c.10318.CVE-2013-2924_changeset_34076.patch  |   36 --
 38 files changed, 774 insertions(+), 776 deletions(-)

New commits:
commit 13818a69d77a5806e2bafa92283a56a9f7ac690d
Author: Khaled Hosny khaledho...@eglug.org
Date:   Thu Oct 17 20:02:31 2013 +0200

fdo#70393: move icu to a subdir of external

Change-Id: I9d8191848b093240f79207446afb13ca6fd708e4
Reviewed-on: https://gerrit.libreoffice.org/6309
Tested-by: LibreOffice gerrit bot ger...@libreoffice.org
Reviewed-by: David Tardon dtar...@redhat.com
Tested-by: David Tardon dtar...@redhat.com

diff --git a/RepositoryModule_host.mk b/RepositoryModule_host.mk
index 2c21a6c..314dbeb 100644
--- a/RepositoryModule_host.mk
+++ b/RepositoryModule_host.mk
@@ -61,7 +61,6 @@ $(eval $(call gb_Module_add_moduledirs,libreoffice,\
i18nlangtag \
i18npool \
i18nutil \
-   $(call gb_Helper_optional,ICU,icu) \
idl \
$(call gb_Helper_optional,DESKTOP,idlc) \
instsetoo_native \
diff --git a/external/Module_external.mk b/external/Module_external.mk
index dac8d0a..26b93ad 100644
--- a/external/Module_external.mk
+++ b/external/Module_external.mk
@@ -37,6 +37,7 @@ $(eval $(call gb_Module_add_moduledirs,external,\
$(call gb_Helper_optional,HSQLDB,hsqldb) \
$(call gb_Helper_optional,HUNSPELL,hunspell) \
$(call gb_Helper_optional,HYPHEN,hyphen) \
+   $(call gb_Helper_optional,ICU,icu) \
$(call gb_Helper_optional,LIBATOMIC_OPS,libatomic_ops) \
$(call gb_Helper_optional,LIBPNG,libpng) \
 ))
diff --git a/icu/ExternalPackage_icu.mk b/external/icu/ExternalPackage_icu.mk
similarity index 100%
rename from icu/ExternalPackage_icu.mk
rename to external/icu/ExternalPackage_icu.mk
diff --git a/icu/ExternalProject_icu.mk b/external/icu/ExternalProject_icu.mk
similarity index 100%
rename from icu/ExternalProject_icu.mk
rename to external/icu/ExternalProject_icu.mk
diff --git a/icu/Makefile b/external/icu/Makefile
similarity index 100%
rename from icu/Makefile
rename to external/icu/Makefile
diff --git a/icu/Module_icu.mk b/external/icu/Module_icu.mk
similarity index 94%
rename from icu/Module_icu.mk
rename to external/icu/Module_icu.mk
index 46e02d3..258c26e 100644
--- a/icu/Module_icu.mk
+++ b/external/icu/Module_icu.mk
@@