[Libreoffice-commits] core.git: Branch 'distro/cib/libreoffice-6-1' - 8 commits - external/coinmp external/liborcus external/libwpd external/python3 odk/build-examples_common.mk sfx2/source svx/source
Michael Stahl (via logerrit)
logerrit at kemper.freedesktop.org
Fri May 14 19:07:15 UTC 2021
external/coinmp/UnpackedTarball_coinmp.mk | 2
external/coinmp/configure-exit.patch | 33
external/coinmp/register.patch | 369 ++++++++++
external/liborcus/UnpackedTarball_liborcus.mk | 1
external/liborcus/include.patch.0 | 30
external/libwpd/UnpackedTarball_libwpd.mk | 1
external/libwpd/include.patch | 10
external/python3/0001-remove-long-double-from-ctypes-value-union.patch.1 | 34
external/python3/UnpackedTarball_python3.mk | 1
odk/build-examples_common.mk | 2
sfx2/source/doc/objstor.cxx | 33
svx/source/dialog/rulritem.cxx | 2
12 files changed, 517 insertions(+), 1 deletion(-)
New commits:
commit 6a38eafc17c7b1b8972e648db19dc841c3f9902e
Author: Michael Stahl <michael.stahl at allotropia.de>
AuthorDate: Fri May 14 20:37:23 2021 +0200
Commit: Michael Stahl <michael.stahl at allotropia.de>
CommitDate: Fri May 14 20:42:03 2021 +0200
python3: fix segfault importing ctypes
on this line: CFUNCTYPE(c_int)(lambda:None)
python segfaults when compiled with GCC 11.
│ 0x7f7e53a5d64c <PyCFuncPtr_new+220> call 0x7f7e53a5c3d0 <GenericPyCData_new> │
│ 0x7f7e53a5d651 <PyCFuncPtr_new+225> mov %rax,%r13 │
│ 0x7f7e53a5d654 <PyCFuncPtr_new+228> test %rax,%rax │
│ 0x7f7e53a5d657 <PyCFuncPtr_new+231> je 0x7f7e53a5d990 <PyCFuncPtr_new+1056> │
│ 0x7f7e53a5d65d <PyCFuncPtr_new+237> mov 0x88(%rsp),%rax │
│ 0x7f7e53a5d665 <PyCFuncPtr_new+245> movq %r15,%xmm0 │
│ 0x7f7e53a5d66a <PyCFuncPtr_new+250> movq %rax,%xmm1 │
│ 0x7f7e53a5d66f <PyCFuncPtr_new+255> addq $0x1,(%rax) │
│ 0x7f7e53a5d673 <PyCFuncPtr_new+259> mov 0x10(%r13),%rax │
│ 0x7f7e53a5d677 <PyCFuncPtr_new+263> punpcklqdq %xmm1,%xmm0 │
│ >0x7f7e53a5d67b <PyCFuncPtr_new+267> movaps %xmm0,0x60(%r13)
(rr) p/x ($r13 + 0x60) % 16
$10 = 0x8
(rr) p &self->b_value
$11 = (union value *) 0x7f7e53c0fea8
b_value contains "long double" which requires 16 byte alignment so the
subsequent 2 pointers have to be 16 byte aligned, so gcc generates "movaps"
instruction which requires 16 byte alignment, but they're 8 byte aligned.
Change-Id: I8d57311c5dc0d33ab0f7beeb6fee91299bd3de67
diff --git a/external/python3/0001-remove-long-double-from-ctypes-value-union.patch.1 b/external/python3/0001-remove-long-double-from-ctypes-value-union.patch.1
new file mode 100644
index 000000000000..8cdaf84de37c
--- /dev/null
+++ b/external/python3/0001-remove-long-double-from-ctypes-value-union.patch.1
@@ -0,0 +1,34 @@
+From 6d999803a07ef5e01f0048d4f276e9cf4401a23d Mon Sep 17 00:00:00 2001
+From: Benjamin Peterson <benjamin at python.org>
+Date: Mon, 5 Sep 2016 16:24:52 -0700
+Subject: [PATCH] remove long double from ctypes value union
+
+It is unused. It also forces a 16-byte alignment, which creates problems because
+Python's allocator only uses 8-byte alignment.
+---
+ Modules/_ctypes/ctypes.h | 2 --
+ 1 file changed, 2 deletions(-)
+
+diff --git a/Modules/_ctypes/ctypes.h b/Modules/_ctypes/ctypes.h
+index 0d3f7241ca..d80ea82cee 100644
+--- a/Modules/_ctypes/ctypes.h
++++ b/Modules/_ctypes/ctypes.h
+@@ -34,7 +34,6 @@ union value {
+ #ifdef HAVE_LONG_LONG
+ PY_LONG_LONG ll;
+ #endif
+- long double D;
+ };
+
+ /*
+@@ -306,7 +305,6 @@ struct tagPyCArgObject {
+ #ifdef HAVE_LONG_LONG
+ PY_LONG_LONG q;
+ #endif
+- long double D;
+ double d;
+ float f;
+ void *p;
+--
+2.31.1
+
diff --git a/external/python3/UnpackedTarball_python3.mk b/external/python3/UnpackedTarball_python3.mk
index 81a392f76f48..5e29cf21b238 100644
--- a/external/python3/UnpackedTarball_python3.mk
+++ b/external/python3/UnpackedTarball_python3.mk
@@ -27,6 +27,7 @@ $(eval $(call gb_UnpackedTarball_add_patches,python3,\
external/python3/python-3.5.tweak.strip.soabi.patch \
external/python3/0001-3.6-bpo-17239-Disable-external-entities-in-SAX-parse.patch.1 \
external/python3/0001-3.6-closes-bpo-42938-Replace-snprintf-with-Python-un.patch.1 \
+ external/python3/0001-remove-long-double-from-ctypes-value-union.patch.1 \
))
ifneq ($(filter DRAGONFLY FREEBSD LINUX NETBSD OPENBSD SOLARIS,$(OS)),)
commit eac76a51a3e3e846f6a9fa0edeb17e4ed60f2d77
Author: Michael Stahl <Michael.Stahl at cib.de>
AuthorDate: Fri Jul 10 14:30:34 2020 +0200
Commit: Michael Stahl <michael.stahl at allotropia.de>
CommitDate: Fri May 14 16:40:46 2021 +0200
tdf#134582 sfx2: when storing, set Version on embedded object storage
This previously wasn't needed because there was only one version for
which it was checked (1.2) but since commit
a541cd91951eca15e40764244b34c72b347f9f26 there's a second version so
when loading an existing embedded object in one version and storing it
in another, the Version must be updated so the attribute in
META-INF/manifest.xml matches the one in content.xml.
Change-Id: Ic2fc303c6f6bc254050d531d578029377976ecb5
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/98521
Tested-by: Jenkins
Reviewed-by: Michael Stahl <michael.stahl at cib.de>
(cherry picked from commit 519d96fd8b83ef4c61576d87b58f97b7e6e6e3c6)
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/98459
Reviewed-by: Thorsten Behrens <Thorsten.Behrens at CIB.de>
(cherry picked from commit a24a4cc1838e3a2d55261a8edf6cb63186f4c38f)
(cherry picked from commit 2976392800739d38d5f84f1f8242701c526b29e1)
diff --git a/sfx2/source/doc/objstor.cxx b/sfx2/source/doc/objstor.cxx
index 6daa9d5e507d..da2caf64f6fc 100644
--- a/sfx2/source/doc/objstor.cxx
+++ b/sfx2/source/doc/objstor.cxx
@@ -999,6 +999,39 @@ bool SfxObjectShell::DoSave()
pImpl->bIsSaving = true;
+ if (IsOwnStorageFormat(*GetMedium()))
+ {
+ SvtSaveOptions::ODFSaneDefaultVersion nDefVersion = SvtSaveOptions::ODFSVER_012;
+ if (!utl::ConfigManager::IsFuzzing())
+ {
+ SvtSaveOptions aSaveOpt;
+ nDefVersion = aSaveOpt.GetODFSaneDefaultVersion();
+ }
+ uno::Reference<beans::XPropertySet> const xProps(GetMedium()->GetStorage(), uno::UNO_QUERY);
+ assert(xProps.is());
+ if (nDefVersion >= SvtSaveOptions::ODFSVER_012) // property exists only since ODF 1.2
+ {
+ try // tdf#134582 set Version on embedded objects as they
+ { // could have been loaded with a different/old version
+#if 0
+// not on old branch
+ if (SvtSaveOptions::ODFSVER_013 <= nDefVersion)
+ {
+ xProps->setPropertyValue("Version", uno::makeAny<OUString>(ODFVER_013_TEXT));
+ }
+ else
+#endif
+ {
+ xProps->setPropertyValue("Version", uno::makeAny<OUString>(ODFVER_012_TEXT));
+ }
+ }
+ catch (uno::Exception&)
+ {
+ DBG_UNHANDLED_EXCEPTION("sfx.doc" /*, "SfxObjectShell::DoSave"*/);
+ }
+ }
+ }
+
uno::Sequence< beans::NamedValue > aEncryptionData;
if ( IsPackageStorageFormat_Impl( *GetMedium() ) )
{
commit db11c61413b5c5b25f6f611b99f3be5f467d4341
Author: Michael Stahl <michael.stahl at allotropia.de>
AuthorDate: Fri May 14 16:35:46 2021 +0200
Commit: Michael Stahl <michael.stahl at allotropia.de>
CommitDate: Fri May 14 16:36:02 2021 +0200
add missing include
Change-Id: I9ac84a2e2fa88c41749e02f76f082f34a03e2567
diff --git a/svx/source/dialog/rulritem.cxx b/svx/source/dialog/rulritem.cxx
index cbe2dcc731be..845ac8bef938 100644
--- a/svx/source/dialog/rulritem.cxx
+++ b/svx/source/dialog/rulritem.cxx
@@ -25,6 +25,8 @@
#include <com/sun/star/frame/status/LeftRightMargin.hpp>
#include <com/sun/star/frame/status/UpperLowerMargin.hpp>
+#include <limits>
+
SfxPoolItem* SvxPagePosSizeItem::CreateDefault() { return new SvxPagePosSizeItem; }
SfxPoolItem* SvxLongLRSpaceItem::CreateDefault() { return new SvxLongLRSpaceItem; }
SfxPoolItem* SvxLongULSpaceItem::CreateDefault() { return new SvxLongULSpaceItem; }
commit f99bcec1eab11df980adabd48f8d018468332db5
Author: Michael Stahl <michael.stahl at allotropia.de>
AuthorDate: Mon May 3 12:48:14 2021 +0200
Commit: Michael Stahl <michael.stahl at allotropia.de>
CommitDate: Fri May 14 15:34:23 2021 +0200
odk: build examples with GCC with explicit -std=c++11
GCC 11 defaults to -std=c++17, which doesn't support exception
specifications any more.
ddcc98fa50dd9d86a60dada4daa00f4d95ffe005 seems a bit large to backport.
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/115505
Tested-by: Thorsten Behrens <thorsten.behrens at allotropia.de>
Reviewed-by: Thorsten Behrens <thorsten.behrens at allotropia.de>
(cherry picked from commit dff559024d271a69186b608615f4a7095cbee2a4)
Change-Id: I74a182435b268be8fd7a9ff0be9f404122108b51
diff --git a/odk/build-examples_common.mk b/odk/build-examples_common.mk
index 4d7d645ed40a..9f5231c42765 100644
--- a/odk/build-examples_common.mk
+++ b/odk/build-examples_common.mk
@@ -31,7 +31,7 @@ endif
$(foreach my_dir,$(2), \
&& (cd $(INSTDIR)/$(SDKDIRNAME)/examples/$(my_dir) \
&& printf 'yes\n' | LC_ALL=C make \
- CC="$(CXX)" LINK="$(CXX)" LIB="$(CXX)" \
+ CC="$(CXX) $(if $(filter GCC,$(COM)),-std=c++11)" LINK="$(CXX)" LIB="$(CXX)" \
$(if $(filter MACOSX,$(OS)), SHELL=$(ODK_BUILD_SHELL), )))) \
>$(call gb_CustomTarget_get_workdir,$(1))/log 2>&1 \
|| (RET=$$$$? \
commit 5c35d57f80886f4a27e0888dbff49ee7bda8e5eb
Author: Stephan Bergmann <sbergman at redhat.com>
AuthorDate: Thu Nov 5 08:16:43 2020 +0100
Commit: Michael Stahl <michael.stahl at allotropia.de>
CommitDate: Fri May 14 15:34:23 2021 +0200
external/libwpd: Missing include for size_t
...as now reported when building with recent trunk GCC/libstdc++ on Linux:
> In file included from WPXContentListener.cpp:26:
> In file included from ./WPXContentListener.h:29:
> ./WPXTable.h:56:31: error: unknown type name 'size_t'; did you mean 'std::size_t'?
> const WPXTableCell *getCell(size_t i, size_t j)
> ^~~~~~
> std::size_t
Change-Id: Ic20240f01c7b0305cb87ababf53a3aaf66072d61
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/105324
Tested-by: Jenkins
Reviewed-by: Stephan Bergmann <sbergman at redhat.com>
(cherry picked from commit 8d378abf1de0a47517427c086da26588f846592a)
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/115000
Reviewed-by: Michael Stahl <michael.stahl at allotropia.de>
(cherry picked from commit 524cfb93d4033917ad20c718d538235078d068d5)
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/115503
Tested-by: Thorsten Behrens <thorsten.behrens at allotropia.de>
Reviewed-by: Thorsten Behrens <thorsten.behrens at allotropia.de>
(cherry picked from commit fdbc4995522167cc64b6b9ec3f9d523c75e52511)
diff --git a/external/libwpd/UnpackedTarball_libwpd.mk b/external/libwpd/UnpackedTarball_libwpd.mk
index 9baf6d9fce0d..3e29046aae65 100644
--- a/external/libwpd/UnpackedTarball_libwpd.mk
+++ b/external/libwpd/UnpackedTarball_libwpd.mk
@@ -18,6 +18,7 @@ $(eval $(call gb_UnpackedTarball_update_autoconf_configs,libwpd))
$(eval $(call gb_UnpackedTarball_add_patches,libwpd,\
external/libwpd/libwpd-vs2013.patch.1 \
$(if $(SYSTEM_REVENGE),,external/libwpd/rpath.patch) \
+ external/libwpd/include.patch \
))
ifneq ($(OS),MACOSX)
diff --git a/external/libwpd/include.patch b/external/libwpd/include.patch
new file mode 100644
index 000000000000..ca68e8bdb22a
--- /dev/null
+++ b/external/libwpd/include.patch
@@ -0,0 +1,10 @@
+--- src/lib/WPXTable.h
++++ src/lib/WPXTable.h
+@@ -36,6 +36,7 @@
+
+ #ifndef _WPXTABLE_H
+ #define _WPXTABLE_H
++#include <stddef.h>
+ #include <vector>
+ #include <stdio.h>
+
commit 336ccb5a6fe3d9f2c37303f15c3f63eb7e2451b0
Author: Stephan Bergmann <sbergman at redhat.com>
AuthorDate: Thu Oct 1 11:50:40 2020 +0200
Commit: Michael Stahl <michael.stahl at allotropia.de>
CommitDate: Fri May 14 15:34:22 2021 +0200
exteranl/coinmp: Fix build with recent GCC 11 trunk
It had started to fail for me now with
> ~/gcc/trunk/inst/bin/g++ -DHAVE_CONFIG_H -I. -I. -O -MT CoinFinite.lo -MD -MP -MF .deps/CoinFinite.Tpo -c CoinFinite.cpp -fPIC -DPIC -o .libs/CoinFinite.o
> CoinFinite.cpp: In function 'bool CoinFinite(double)':
> CoinFinite.cpp:38:19: error: 'DBL_MAX' was not declared in this scope
> 38 | return val != DBL_MAX && val != -DBL_MAX;
> | ^~~~~~~
> CoinFinite.cpp:8:1: note: 'DBL_MAX' is defined in header '<cfloat>'; did you forget to '#include <cfloat>'?
> 7 | #include "CoinUtilsConfig.h"
> +++ |+#include <cfloat>
> 8 |
because of a missing -DCOINUTILS_BUILD. Which in turn was caused by
workdir/UnpackedTarball/coinmp/CoinUtils/configure (see
workdir/UnpackedTarball/coinmp/CoinUtils/config.log), which first tries to
determine an ac_declaration that would apparently be a suitable declaration of
`exit` without actually including <stdlib.h> in a C++ file. It settles on
> configure:3551: ~/gcc/trunk/inst/bin/g++ -c -g -O2 conftest.cc >&5
> conftest.cc:15:17: warning: 'void std::exit(int)' has not been declared within 'std'
> 15 | extern "C" void std::exit (int) throw (); using std::exit;
> | ^~~
> <built-in>: note: only here as a 'friend'
> configure:3557: $? = 0
(which generates a warning, but no error with the given g++ invocation). The
determined ac_declaration value is then included in confdefs.h, causing the
later
> configure:4014: ~/gcc/trunk/inst/bin/g++ -o conftest -O3 -pipe -DNDEBUG -pedantic-errors -Wparentheses -Wreturn-type -Wcast-qual -Wall -Wpointer-arith -Wwrite-strings -Wconversion -Wno-unknown-pragmas -Wno-long-long -DCOINUTILS_BUILD -Wl,-z,origin -Wl,-rpath,\$$ORIGIN conftest.cc >&5
> conftest.cc:15:17: error: 'void std::exit(int)' has not been declared within 'std'
> 15 | extern "C" void std::exit (int) throw (); using std::exit;
> | ^~~
> <built-in>: note: only here as a 'friend'
> configure:4020: $? = 1
> configure: failed program was:
> | /* confdefs.h. */
> |
> | #define PACKAGE_NAME "CoinUtils"
> | #define PACKAGE_TARNAME "coinutils"
> | #define PACKAGE_VERSION "2.9.11"
> | #define PACKAGE_STRING "CoinUtils 2.9.11"
> | #define PACKAGE_BUGREPORT "http://projects.coin-or.org/CoinUtils"
> | #define COINUTILS_VERSION "2.9.11"
> | #define COINUTILS_VERSION_MAJOR 2
> | #define COINUTILS_VERSION_MINOR 9
> | #define COINUTILS_VERSION_RELEASE 11
> | #define COIN_COINUTILS_VERBOSITY 0
> | #define COIN_COINUTILS_CHECKLEVEL 0
> | #ifdef __cplusplus
> | extern "C" void std::exit (int) throw (); using std::exit;
> | #endif
> | /* end confdefs.h. */
> |
> | int
> | main ()
> | {
> | int i=0; i++;
> | ;
> | return 0;
> | }
> configure:4045: WARNING: The flags CXXFLAGS="-O3 -pipe -DNDEBUG -pedantic-errors -Wparentheses -Wreturn-type -Wcast-qual -Wall -Wpointer-arith -Wwrite-strings -Wconversion -Wno-unknown-pragmas -Wno-long-long -DCOINUTILS_BUILD" do not work. I will now just try '-O', but you might want to set CXXFLAGS manually.
to fail, because its g++ invocation including -pedantic-errors turns that
> 'void std::exit(int)' has not been declared within 'std'
warning into an error.
There were similar build failures in the Cgl,
> ~/gcc/trunk/inst/bin/g++ -DHAVE_CONFIG_H -I. -I. -I~/lo/core/workdir/UnpackedTarball/coinmp/CoinUtils/src -DCOIN_HAS_CLP -O -MT ClpCholeskyDense.lo -MD -MP -MF .deps/ClpCholeskyDense.Tpo -c ClpCholeskyDense.cpp -fPIC -DPIC -o .libs/ClpCholeskyDense.o
> In file included from ClpCholeskyDense.cpp:11:
> ClpHelperFunctions.hpp:16:4: error: #error "don't have header file for math"
> 16 | # error "don't have header file for math"
> | ^~~~~
> In file included from ClpCholeskyDense.cpp:11:
> ClpHelperFunctions.hpp: In function 'double CoinSqrt(double)':
> ClpHelperFunctions.hpp:81:13: error: 'sqrt' was not declared in this scope
> 81 | return sqrt(x);
> | ^~~~
and Clp,
> ~/gcc/trunk/inst/bin/g++ -DHAVE_CONFIG_H -I. -I. -I.. -I./.. -I./../CglGomory -I~/lo/core/workdir/UnpackedTarball/coinmp/CoinUtils/src -I~/lo/core/workdir/UnpackedTarball/coinmp/Osi/src/Osi -I~/lo/core/workdir/UnpackedTarball/coinmp/CoinUtils/src -I~/lo/core/workdir/UnpackedTarball/coinmp/Clp/src/OsiClp -I~/lo/core/workdir/UnpackedTarball/coinmp/Clp/src -I~/lo/core/workdir/UnpackedTarball/coinmp/CoinUtils/src -I~/lo/core/workdir/UnpackedTarball/coinmp/Osi/src/Osi -O -MT CglLandPValidator.lo -MD -MP -MF .deps/CglLandPValidator.Tpo -c CglLandPValidator.cpp -fPIC -DPIC -o .libs/CglLandPValidator.o
> CglLandPValidator.cpp: In member function 'int LAP::Validator::cleanCut(OsiRowCut&, const double*, const OsiSolverInterface&, const CglParam&, const double*, const double*)':
> CglLandPValidator.cpp:66:22: error: 'fabs' was not declared in this scope; did you mean 'labs'?
> 66 | double val = fabs(elems[i]);
> | ^~~~
> | labs
> CglLandPValidator.cpp: In member function 'int LAP::Validator::cleanCut2(OsiRowCut&, const double*, const OsiSolverInterface&, const CglParam&, const double*, const double*)':
> CglLandPValidator.cpp:189:23: error: 'fabs' was not declared in this scope; did you mean 'labs'?
> 189 | double smallest = fabs(rhs);
> | ^~~~
> | labs
subdirectories, and which happened to get solved by the same approach of
removing problematic ac_declaration values from configure.
I am not sure what all that magic of determining that ac_declaration value is
supposed to be good for. There appears to be no trace of it in the
corresponding configure.ac sources, so it likely was automatically added by some
dated autotools (all three configure files mention "Generated by GNU
Autoconf 2.59"). At least on a cursory look, the determined ac_declaration
appears to only be used in configure itself, and not leak into the actual coinmp
build stage, so dropping the problematic ac_declaration values is hopefully
harmless. These three subdirectories were all that failed for me, but there
might still be silent issues in other subdirectories when a problematic
ac_declaration value would negatively affect other configure checks. (An
alternative approach could be to regenerate all the configure files from their
configure.ac sources with a recent autotools. But at least some of the existing
external/coinmp/*.patch* already change such configure files, which would need
to be adapted.)
Change-Id: I0a33b0f654800e8288d3ca28e26a64efc23a3f6b
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/103756
Tested-by: Jenkins
Reviewed-by: Stephan Bergmann <sbergman at redhat.com>
(cherry picked from commit 762aacc4e055fffbc605be81f66f2274dccb4be8)
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/114999
Reviewed-by: Michael Stahl <michael.stahl at allotropia.de>
(cherry picked from commit 802b76340082e817efe67a5be4a021cb998a28a2)
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/115502
Tested-by: Thorsten Behrens <thorsten.behrens at allotropia.de>
Reviewed-by: Thorsten Behrens <thorsten.behrens at allotropia.de>
(cherry picked from commit 7035bb24dd2f925e709ca41241c52fa0aa2e854e)
diff --git a/external/coinmp/UnpackedTarball_coinmp.mk b/external/coinmp/UnpackedTarball_coinmp.mk
index c1f3df9866b1..a918effb1203 100644
--- a/external/coinmp/UnpackedTarball_coinmp.mk
+++ b/external/coinmp/UnpackedTarball_coinmp.mk
@@ -41,6 +41,7 @@ $(eval $(call gb_UnpackedTarball_add_patches,coinmp,\
external/coinmp/rpath.patch \
external/coinmp/libtool.patch \
external/coinmp/register.patch \
+ external/coinmp/configure-exit.patch \
))
# vim: set noet sw=4 ts=4:
diff --git a/external/coinmp/configure-exit.patch b/external/coinmp/configure-exit.patch
new file mode 100644
index 000000000000..0a81b8073fd2
--- /dev/null
+++ b/external/coinmp/configure-exit.patch
@@ -0,0 +1,33 @@
+--- Cgl/configure
++++ Cgl/configure
+@@ -3501,8 +3501,6 @@
+ fi
+ for ac_declaration in \
+ '' \
+- 'extern "C" void std::exit (int) throw (); using std::exit;' \
+- 'extern "C" void std::exit (int); using std::exit;' \
+ 'extern "C" void exit (int) throw ();' \
+ 'extern "C" void exit (int);' \
+ 'void exit (int);'
+--- Clp/configure
++++ Clp/configure
+@@ -3528,8 +3528,6 @@
+ fi
+ for ac_declaration in \
+ '' \
+- 'extern "C" void std::exit (int) throw (); using std::exit;' \
+- 'extern "C" void std::exit (int); using std::exit;' \
+ 'extern "C" void exit (int) throw ();' \
+ 'extern "C" void exit (int);' \
+ 'void exit (int);'
+--- CoinUtils/configure
++++ CoinUtils/configure
+@@ -3527,8 +3527,6 @@
+ fi
+ for ac_declaration in \
+ '' \
+- 'extern "C" void std::exit (int) throw (); using std::exit;' \
+- 'extern "C" void std::exit (int); using std::exit;' \
+ 'extern "C" void exit (int) throw ();' \
+ 'extern "C" void exit (int);' \
+ 'void exit (int);'
commit c2e631f95a7ba33402047e53151b29197cfe6382
Author: Stephan Bergmann <sbergman at redhat.com>
AuthorDate: Mon Jul 20 16:23:18 2020 +0200
Commit: Michael Stahl <michael.stahl at allotropia.de>
CommitDate: Fri May 14 15:34:22 2021 +0200
external/coinmp: C++17 no longer supports "register"
...and GCC 11 trunk g++ now defaults to C++17, so compilation started to fail
with that compiler
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/99082
Tested-by: Jenkins
Reviewed-by: Stephan Bergmann <sbergman at redhat.com>
(cherry picked from commit ad607d898f9826c6fa144783c93541a10ad4740c)
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/114998
Reviewed-by: Michael Stahl <michael.stahl at allotropia.de>
(cherry picked from commit 656085bf2757437a088058871573385ff45f8ef5)
Change-Id: I792e4c7ff59ad88e5571163d5b2362fdb349667d
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/115501
Tested-by: Thorsten Behrens <thorsten.behrens at allotropia.de>
Reviewed-by: Thorsten Behrens <thorsten.behrens at allotropia.de>
(cherry picked from commit 7c6f86f10a614b64d7c7097a06670358e11d8cf4)
diff --git a/external/coinmp/UnpackedTarball_coinmp.mk b/external/coinmp/UnpackedTarball_coinmp.mk
index 35cfbfcdbae8..c1f3df9866b1 100644
--- a/external/coinmp/UnpackedTarball_coinmp.mk
+++ b/external/coinmp/UnpackedTarball_coinmp.mk
@@ -40,6 +40,7 @@ $(eval $(call gb_UnpackedTarball_add_patches,coinmp,\
external/coinmp/ubsan.patch.0 \
external/coinmp/rpath.patch \
external/coinmp/libtool.patch \
+ external/coinmp/register.patch \
))
# vim: set noet sw=4 ts=4:
diff --git a/external/coinmp/register.patch b/external/coinmp/register.patch
new file mode 100644
index 000000000000..cf4ca4d06c01
--- /dev/null
+++ b/external/coinmp/register.patch
@@ -0,0 +1,369 @@
+--- CoinUtils/src/CoinHelperFunctions.hpp
++++ CoinUtils/src/CoinHelperFunctions.hpp
+@@ -41,7 +41,7 @@
+ handled correctly. */
+
+ template <class T> inline void
+-CoinCopyN(register const T* from, const int size, register T* to)
++CoinCopyN(const T* from, const int size, T* to)
+ {
+ if (size == 0 || from == to)
+ return;
+@@ -52,10 +52,10 @@
+ "CoinCopyN", "");
+ #endif
+
+- register int n = (size + 7) / 8;
++ int n = (size + 7) / 8;
+ if (to > from) {
+- register const T* downfrom = from + size;
+- register T* downto = to + size;
++ const T* downfrom = from + size;
++ T* downto = to + size;
+ // Use Duff's device to copy
+ switch (size % 8) {
+ case 0: do{ *--downto = *--downfrom;
+@@ -99,7 +99,7 @@
+ the difference down to int. -- lh, 100823 --
+ */
+ template <class T> inline void
+-CoinCopy(register const T* first, register const T* last, register T* to)
++CoinCopy(const T* first, const T* last, T* to)
+ {
+ CoinCopyN(first, static_cast<int>(last-first), to);
+ }
+@@ -114,7 +114,7 @@
+ Note JJF - the speed claim seems to be false on IA32 so I have added
+ CoinMemcpyN which can be used for atomic data */
+ template <class T> inline void
+-CoinDisjointCopyN(register const T* from, const int size, register T* to)
++CoinDisjointCopyN(const T* from, const int size, T* to)
+ {
+ #ifndef _MSC_VER
+ if (size == 0 || from == to)
+@@ -135,7 +135,7 @@
+ throw CoinError("overlapping arrays", "CoinDisjointCopyN", "");
+ #endif
+
+- for (register int n = size / 8; n > 0; --n, from += 8, to += 8) {
++ for (int n = size / 8; n > 0; --n, from += 8, to += 8) {
+ to[0] = from[0];
+ to[1] = from[1];
+ to[2] = from[2];
+@@ -167,8 +167,8 @@
+ are copied at a time. The source array is given by its first and "after
+ last" entry; the target array is given by its first entry. */
+ template <class T> inline void
+-CoinDisjointCopy(register const T* first, register const T* last,
+- register T* to)
++CoinDisjointCopy(const T* first, const T* last,
++ T* to)
+ {
+ CoinDisjointCopyN(first, static_cast<int>(last - first), to);
+ }
+@@ -256,7 +256,7 @@
+ alternative coding if USE_MEMCPY defined*/
+ #ifndef COIN_USE_RESTRICT
+ template <class T> inline void
+-CoinMemcpyN(register const T* from, const int size, register T* to)
++CoinMemcpyN(const T* from, const int size, T* to)
+ {
+ #ifndef _MSC_VER
+ #ifdef USE_MEMCPY
+@@ -296,7 +296,7 @@
+ throw CoinError("overlapping arrays", "CoinMemcpyN", "");
+ #endif
+
+- for (register int n = size / 8; n > 0; --n, from += 8, to += 8) {
++ for (int n = size / 8; n > 0; --n, from += 8, to += 8) {
+ to[0] = from[0];
+ to[1] = from[1];
+ to[2] = from[2];
+@@ -343,8 +343,8 @@
+ are copied at a time. The source array is given by its first and "after
+ last" entry; the target array is given by its first entry. */
+ template <class T> inline void
+-CoinMemcpy(register const T* first, register const T* last,
+- register T* to)
++CoinMemcpy(const T* first, const T* last,
++ T* to)
+ {
+ CoinMemcpyN(first, static_cast<int>(last - first), to);
+ }
+@@ -358,7 +358,7 @@
+ Note JJF - the speed claim seems to be false on IA32 so I have added
+ CoinZero to allow for memset. */
+ template <class T> inline void
+-CoinFillN(register T* to, const int size, register const T value)
++CoinFillN(T* to, const int size, const T value)
+ {
+ if (size == 0)
+ return;
+@@ -369,7 +369,7 @@
+ "CoinFillN", "");
+ #endif
+ #if 1
+- for (register int n = size / 8; n > 0; --n, to += 8) {
++ for (int n = size / 8; n > 0; --n, to += 8) {
+ to[0] = value;
+ to[1] = value;
+ to[2] = value;
+@@ -413,7 +413,7 @@
+ entries are filled at a time. The array is given by its first and "after
+ last" entry. */
+ template <class T> inline void
+-CoinFill(register T* first, register T* last, const T value)
++CoinFill(T* first, T* last, const T value)
+ {
+ CoinFillN(first, last - first, value);
+ }
+@@ -427,7 +427,7 @@
+ Note JJF - the speed claim seems to be false on IA32 so I have allowed
+ for memset as an alternative */
+ template <class T> inline void
+-CoinZeroN(register T* to, const int size)
++CoinZeroN(T* to, const int size)
+ {
+ #ifdef USE_MEMCPY
+ // Use memset - seems faster on Intel with gcc
+@@ -448,7 +448,7 @@
+ "CoinZeroN", "");
+ #endif
+ #if 1
+- for (register int n = size / 8; n > 0; --n, to += 8) {
++ for (int n = size / 8; n > 0; --n, to += 8) {
+ to[0] = 0;
+ to[1] = 0;
+ to[2] = 0;
+@@ -519,7 +519,7 @@
+ entries are filled at a time. The array is given by its first and "after
+ last" entry. */
+ template <class T> inline void
+-CoinZero(register T* first, register T* last)
++CoinZero(T* first, T* last)
+ {
+ CoinZeroN(first, last - first);
+ }
+@@ -545,7 +545,7 @@
+ This function was introduced because for some reason compiler tend to
+ handle the <code>max()</code> function differently. */
+ template <class T> inline T
+-CoinMax(register const T x1, register const T x2)
++CoinMax(const T x1, const T x2)
+ {
+ return (x1 > x2) ? x1 : x2;
+ }
+@@ -556,7 +556,7 @@
+ This function was introduced because for some reason compiler tend to
+ handle the min() function differently. */
+ template <class T> inline T
+-CoinMin(register const T x1, register const T x2)
++CoinMin(const T x1, const T x2)
+ {
+ return (x1 < x2) ? x1 : x2;
+ }
+@@ -578,7 +578,7 @@
+ according to operator<. The array is given by a pointer to its first entry
+ and by its size. */
+ template <class T> inline bool
+-CoinIsSorted(register const T* first, const int size)
++CoinIsSorted(const T* first, const int size)
+ {
+ if (size == 0)
+ return true;
+@@ -590,7 +590,7 @@
+ #if 1
+ // size1 is the number of comparisons to be made
+ const int size1 = size - 1;
+- for (register int n = size1 / 8; n > 0; --n, first += 8) {
++ for (int n = size1 / 8; n > 0; --n, first += 8) {
+ if (first[8] < first[7]) return false;
+ if (first[7] < first[6]) return false;
+ if (first[6] < first[5]) return false;
+@@ -627,7 +627,7 @@
+ according to operator<. The array is given by its first and "after
+ last" entry. */
+ template <class T> inline bool
+-CoinIsSorted(register const T* first, register const T* last)
++CoinIsSorted(const T* first, const T* last)
+ {
+ return CoinIsSorted(first, static_cast<int>(last - first));
+ }
+@@ -638,7 +638,7 @@
+ etc. For speed 8 entries are filled at a time. The array is given by a
+ pointer to its first entry and its size. */
+ template <class T> inline void
+-CoinIotaN(register T* first, const int size, register T init)
++CoinIotaN(T* first, const int size, T init)
+ {
+ if (size == 0)
+ return;
+@@ -648,7 +648,7 @@
+ throw CoinError("negative number of entries", "CoinIotaN", "");
+ #endif
+ #if 1
+- for (register int n = size / 8; n > 0; --n, first += 8, init += 8) {
++ for (int n = size / 8; n > 0; --n, first += 8, init += 8) {
+ first[0] = init;
+ first[1] = init + 1;
+ first[2] = init + 2;
+@@ -706,7 +706,7 @@
+ integer array specified by the last two arguments (again, first and "after
+ last" entry). */
+ template <class T> inline T *
+-CoinDeleteEntriesFromArray(register T * arrayFirst, register T * arrayLast,
++CoinDeleteEntriesFromArray(T * arrayFirst, T * arrayLast,
+ const int * firstDelPos, const int * lastDelPos)
+ {
+ int delNum = static_cast<int>(lastDelPos - firstDelPos);
+--- CoinUtils/src/CoinModelUseful2.cpp
++++ CoinUtils/src/CoinModelUseful2.cpp
+@@ -917,8 +917,8 @@
+
+ int position=0;
+ int nEof=0; // Number of time send of string
+- register int yystate;
+- register int yyn;
++ int yystate;
++ int yyn;
+ int yyresult;
+ /* Number of tokens to shift before error messages enabled. */
+ int yyerrstatus;
+@@ -936,12 +936,12 @@
+ /* The state stack. */
+ short yyssa[YYINITDEPTH];
+ short *yyss = yyssa;
+- register short *yyssp;
++ short *yyssp;
+
+ /* The semantic value stack. */
+ YYSTYPE yyvsa[YYINITDEPTH];
+ YYSTYPE *yyvs = yyvsa;
+- register YYSTYPE *yyvsp;
++ YYSTYPE *yyvsp;
+
+
+
+--- CoinUtils/src/CoinOslC.h
++++ CoinUtils/src/CoinOslC.h
+@@ -34,30 +34,30 @@
+ extern "C"{
+ #endif
+
+-int c_ekkbtrn( register const EKKfactinfo *fact,
++int c_ekkbtrn( const EKKfactinfo *fact,
+ double *dwork1,
+ int * mpt,int first_nonzero);
+-int c_ekkbtrn_ipivrw( register const EKKfactinfo *fact,
++int c_ekkbtrn_ipivrw( const EKKfactinfo *fact,
+ double *dwork1,
+ int * mpt, int ipivrw,int * spare);
+
+-int c_ekketsj( register /*const*/ EKKfactinfo *fact,
++int c_ekketsj( /*const*/ EKKfactinfo *fact,
+ double *dwork1,
+ int *mpt2, double dalpha, int orig_nincol,
+ int npivot, int *nuspikp,
+ const int ipivrw, int * spare);
+-int c_ekkftrn( register const EKKfactinfo *fact,
++int c_ekkftrn( const EKKfactinfo *fact,
+ double *dwork1,
+ double * dpermu,int * mpt, int numberNonZero);
+
+-int c_ekkftrn_ft( register EKKfactinfo *fact,
++int c_ekkftrn_ft( EKKfactinfo *fact,
+ double *dwork1, int *mpt, int *nincolp);
+-void c_ekkftrn2( register EKKfactinfo *fact, double *dwork1,
++void c_ekkftrn2( EKKfactinfo *fact, double *dwork1,
+ double * dpermu1,int * mpt1, int *nincolp,
+ double *dwork1_ft, int *mpt_ft, int *nincolp_ft);
+
+-int c_ekklfct( register EKKfactinfo *fact);
+-int c_ekkslcf( register const EKKfactinfo *fact);
++int c_ekklfct( EKKfactinfo *fact);
++int c_ekkslcf( const EKKfactinfo *fact);
+ inline void c_ekkscpy(int n, const int *marr1,int *marr2)
+ { CoinMemcpyN(marr1,n,marr2);}
+ inline void c_ekkdcpy(int n, const double *marr1,double *marr2)
+--- CoinUtils/src/CoinOslFactorization2.cpp
++++ CoinUtils/src/CoinOslFactorization2.cpp
+@@ -20,9 +20,9 @@
+ extern int ets_count;
+ extern int ets_check;
+ #endif
+-#define COIN_REGISTER register
++#define COIN_REGISTER
+ #define COIN_REGISTER2
+-#define COIN_REGISTER3 register
++#define COIN_REGISTER3
+ #ifdef COIN_USE_RESTRICT
+ # define COIN_RESTRICT2 __restrict
+ #else
+--- CoinUtils/src/CoinOslFactorization3.cpp
++++ CoinUtils/src/CoinOslFactorization3.cpp
+@@ -1378,7 +1378,7 @@
+ }
+ }
+ } /* c_ekkmltf */
+-int c_ekklfct( register EKKfactinfo *fact)
++int c_ekklfct( EKKfactinfo *fact)
+ {
+ const int nrow = fact->nrow;
+ int ninbas = fact->xcsadr[nrow+1]-1;
+@@ -2607,7 +2607,7 @@
+ }
+ }
+ } /* c_ekkclcp */
+-int c_ekkslcf( register const EKKfactinfo *fact)
++int c_ekkslcf( const EKKfactinfo *fact)
+ {
+ int * hrow = fact->xeradr;
+ int * hcol = fact->xecadr;
+--- CoinUtils/src/CoinPackedVectorBase.cpp
++++ CoinUtils/src/CoinPackedVectorBase.cpp
+@@ -194,8 +194,8 @@
+ double
+ CoinPackedVectorBase::oneNorm() const
+ {
+- register double norm = 0.0;
+- register const double* elements = getElements();
++ double norm = 0.0;
++ const double* elements = getElements();
+ for (int i = getNumElements() - 1; i >= 0; --i) {
+ norm += fabs(elements[i]);
+ }
+@@ -224,8 +224,8 @@
+ double
+ CoinPackedVectorBase::infNorm() const
+ {
+- register double norm = 0.0;
+- register const double* elements = getElements();
++ double norm = 0.0;
++ const double* elements = getElements();
+ for (int i = getNumElements() - 1; i >= 0; --i) {
+ norm = CoinMax(norm, fabs(elements[i]));
+ }
+--- CoinUtils/src/CoinSearchTree.hpp
++++ CoinUtils/src/CoinSearchTree.hpp
+@@ -153,8 +153,8 @@
+ static inline const char* name() { return "CoinSearchTreeComparePreferred"; }
+ inline bool operator()(const CoinTreeSiblings* x,
+ const CoinTreeSiblings* y) const {
+- register const CoinTreeNode* xNode = x->currentNode();
+- register const CoinTreeNode* yNode = y->currentNode();
++ const CoinTreeNode* xNode = x->currentNode();
++ const CoinTreeNode* yNode = y->currentNode();
+ const BitVector128 xPref = xNode->getPreferred();
+ const BitVector128 yPref = yNode->getPreferred();
+ bool retval = true;
+--- CoinUtils/src/CoinSimpFactorization.cpp
++++ CoinUtils/src/CoinSimpFactorization.cpp
+@@ -2440,7 +2440,7 @@
+ const int row=secRowOfU_[i];
+ const int column=colOfU_[i];
+ if ( denseVector_[column]==0.0 ) continue;
+- register const double multiplier=denseVector_[column]*invOfPivots_[row];
++ const double multiplier=denseVector_[column]*invOfPivots_[row];
+ denseVector_[column]=0.0;
+ const int rowBeg=UrowStarts_[row];
+ const int rowEnd=rowBeg+UrowLengths_[row];
commit e1ce4ca6caac838dfea2a78da57f97fa1b9873f1
Author: Stephan Bergmann <sbergman at redhat.com>
AuthorDate: Wed Oct 7 22:29:46 2020 +0200
Commit: Michael Stahl <michael.stahl at allotropia.de>
CommitDate: Fri May 14 15:34:22 2021 +0200
external/liborcus: Missing includes
...as seen with recent GCC 11 trunk libstdc++:
> orcus_xlsx.cpp: In function ‘size_t orcus::{anonymous}::get_schema_rank(orcus::schema_t)’:
> orcus_xlsx.cpp:313:59: error: incomplete type ‘std::numeric_limits<long unsigned int>’ used in nested name specifier
> 313 | return it == rank_map.end() ? numeric_limits<size_t>::max() : it->second;
> | ^~~
etc.
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/104074
Tested-by: Jenkins
Reviewed-by: Stephan Bergmann <sbergman at redhat.com>
(cherry picked from commit a9976a958b2857e308c6598532151878615bfd9f)
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/114997
Reviewed-by: Michael Stahl <michael.stahl at allotropia.de>
(cherry picked from commit eaa9f84465eb330aa4c68711e8c8ec609503c5d3)
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/115500
Tested-by: Thorsten Behrens <thorsten.behrens at allotropia.de>
Reviewed-by: Thorsten Behrens <thorsten.behrens at allotropia.de>
(cherry picked from commit aed21ef623820b36d4ced1fda5c20e2d0fa683a7)
Change-Id: If92cfb565ed9344b2ec1403793d7aeff8bd019ad
diff --git a/external/liborcus/UnpackedTarball_liborcus.mk b/external/liborcus/UnpackedTarball_liborcus.mk
index 3ab387e734be..779ec8d4fba1 100644
--- a/external/liborcus/UnpackedTarball_liborcus.mk
+++ b/external/liborcus/UnpackedTarball_liborcus.mk
@@ -18,6 +18,7 @@ $(eval $(call gb_UnpackedTarball_update_autoconf_configs,liborcus))
$(eval $(call gb_UnpackedTarball_add_patches,liborcus,\
external/liborcus/0001-workaround-a-linking-problem-on-windows.patch \
external/liborcus/rpath.patch.0 \
+ external/liborcus/include.patch.0 \
))
ifeq ($(OS),WNT)
diff --git a/external/liborcus/include.patch.0 b/external/liborcus/include.patch.0
new file mode 100644
index 000000000000..9555dd534b3e
--- /dev/null
+++ b/external/liborcus/include.patch.0
@@ -0,0 +1,30 @@
+--- src/liborcus/orcus_xlsx.cpp
++++ src/liborcus/orcus_xlsx.cpp
+@@ -32,6 +32,7 @@
+
+ #include <cstdlib>
+ #include <iostream>
++#include <limits>
+ #include <string>
+ #include <cstring>
+ #include <sstream>
+--- src/liborcus/xls_xml_context.cpp
++++ src/liborcus/xls_xml_context.cpp
+@@ -16,6 +16,7 @@
+ #include <mdds/sorted_string_map.hpp>
+
+ #include <iostream>
++#include <limits>
+
+ using namespace std;
+
+--- src/liborcus/xlsx_revision_context.cpp
++++ src/liborcus/xlsx_revision_context.cpp
+@@ -16,6 +16,7 @@
+ #include "orcus/global.hpp"
+
+ #include <iostream>
++#include <limits>
+
+ using namespace std;
+
More information about the Libreoffice-commits
mailing list