[Libreoffice-commits] core.git: Branch 'feature/cib_contract6721b' - 9 commits - external/coinmp external/liborcus external/libwpd framework/qa include/sal odk/build-examples_common.mk solenv/gbuild vcl/source
Michael Stahl (via logerrit)
logerrit at kemper.freedesktop.org
Thu Jul 8 11:44:11 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
framework/qa/cppunit/dispatchtest.cxx | 2
include/sal/log.hxx | 5
odk/build-examples_common.mk | 2
solenv/gbuild/platform/com_GCC_defs.mk | 4
vcl/source/window/window.cxx | 2
12 files changed, 457 insertions(+), 4 deletions(-)
New commits:
commit 61c4306a89ff37ee0fe7bb885ed41c28fad64a3d
Author: Michael Stahl <michael.stahl at allotropia.de>
AuthorDate: Wed Jul 7 18:00:36 2021 +0200
Commit: Michael Stahl <michael.stahl at allotropia.de>
CommitDate: Thu Jul 8 13:43:03 2021 +0200
vcl: nerf Window::SetParentToDefaultWindow()
There is a problem with keyboard focus in an Eclipse RCP application on
WNT; it is apparently caused by re-parenting calling
ImplSalReCreateHWND() and that first transfers the focus to the newly
re-created window and when that dies shortly thereafter to the Eclipse
top-level window instead of LO child window.
Re-parenting doesn't work anyway because mpAppWin is always null outside
of unit tests and mpDefaultWin lives outside of time and space and
doesn't know about any window the LO window may be embedded in.
Re-parenting appears to be unnecessary because if a parent dies with
undisposed children that's considered a bug anyway nowadays.
(partially regression from 8a2f7704cd0e43304e54bf2281232335cc0979a3
which removed conditionals that limited the reparenting to floating
windows)
Change-Id: I7a3997d5e714b40918337207ec1387922f86f8e6
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/118588
Tested-by: Jenkins
Reviewed-by: Michael Stahl <michael.stahl at allotropia.de>
(cherry picked from commit 4c6b204fdc0cba873d33d801a9853819c09bdc6e)
diff --git a/vcl/source/window/window.cxx b/vcl/source/window/window.cxx
index 82ce1465b9a9..c2d04462b068 100644
--- a/vcl/source/window/window.cxx
+++ b/vcl/source/window/window.cxx
@@ -1784,7 +1784,7 @@ void Window::SetModalHierarchyHdl(const Link<bool, void>& rLink)
void Window::SetParentToDefaultWindow()
{
Show(false);
- SetParent(ImplGetDefaultWindow());
+ // don't reparent: this window dies anyway and any children must have been disposed already
}
KeyIndicatorState Window::GetIndicatorState() const
commit dfad6e1b3e5fb8a1bf3cc424dd4df3b27d01da11
Author: Stephan Bergmann <sbergman at redhat.com>
AuthorDate: Wed May 5 08:20:18 2021 +0200
Commit: Michael Stahl <michael.stahl at allotropia.de>
CommitDate: Thu Jul 8 13:43:03 2021 +0200
Adapt to "libstdc++: Implement LWG 1203 for rvalue iostreams"
<https://gcc.gnu.org/git/?p=gcc.git;a=commit;h=aa475c4ac80733f85ba47b109fc1900f05e810e2>
towards GCC 12, so that now "the return type is the original rvalue stream type
not its base class." (And which would thus have caused issues like
> sfx2/source/control/bindings.cxx:1323:19: error: dynamic_cast from rvalue to reference type '::std::ostringstream &' (aka 'basic_ostringstream<char> &')
> ? SAL_STREAM("File: " << pFile << " Line: " << nLine) : ""));
> ~~^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
> include/sal/log.hxx:198:6: note: expanded from macro 'SAL_STREAM'
> (dynamic_cast< ::std::ostringstream & >(::std::ostringstream() << stream).str())
> ^
> include/sal/log.hxx:341:20: note: expanded from macro 'SAL_INFO'
> SAL_WHERE, stream)
> ~~~~~~~~~~~^~~~~~~
> include/sal/log.hxx:155:68: note: expanded from macro 'SAL_DETAIL_LOG_STREAM'
> SAL_DETAIL_LOG_STREAM_PRIVATE_(level, area, where, stream); \
> ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~^~~~~~~
> include/sal/log.hxx:133:45: note: expanded from macro 'SAL_DETAIL_LOG_STREAM_PRIVATE_'
> ::sal::detail::StreamStart() << stream) == 1) \
> ^~~~~~
now. While the issue with old libstdc++ that originally prompted the
dynamic_cast was
> sfx2/source/control/bindings.cxx:1323:19: error: no member named 'str' in 'std::basic_ostream<char>'
> ? SAL_STREAM("File: " << pFile << " Line: " << nLine) : ""));
> ~~^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
> include/sal/log.hxx:194:40: note: expanded from macro 'SAL_STREAM'
> (::std::ostringstream() << stream).str()
> ^
> include/sal/log.hxx:336:20: note: expanded from macro 'SAL_INFO'
> SAL_WHERE, stream)
> ~~~~~~~~~~~^~~~~~~
> include/sal/log.hxx:155:68: note: expanded from macro 'SAL_DETAIL_LOG_STREAM'
> SAL_DETAIL_LOG_STREAM_PRIVATE_(level, area, where, stream); \
> ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~^~~~~~~
> include/sal/log.hxx:133:45: note: expanded from macro 'SAL_DETAIL_LOG_STREAM_PRIVATE_'
> ::sal::detail::StreamStart() << stream) == 1) \
> ^~~~~~
.)
The libstdc++ macro _GLIBCXX_RELEASE is reportedly available since GCC 7.1.
Change-Id: I1ee6eabb66355c1f28b9d305cbd85bac50d6b0e1
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/115121
Tested-by: Jenkins
Reviewed-by: Stephan Bergmann <sbergman at redhat.com>
(cherry picked from commit 1f3dddd6f21d91c429190ae314dadeec409f35f4, plus
follow-up 95e26d3dce4f5a3b2d010d5ca47b4e450905a100 "tdf#142326: Adapt to
'libstdc++: Implement LWG 1203 for rvalue iostreams'")
Change-Id: I7c8fef25e15fcfa9b83924467dc86dc2957fbd7d
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/116447
Tested-by: Jenkins
Reviewed-by: Caolán McNamara <caolanm at redhat.com>
(cherry picked from commit 428206c3c1c54d01435cf4e4a07174cfbd567335)
diff --git a/include/sal/log.hxx b/include/sal/log.hxx
index 00d533ab5495..f85c7d882134 100644
--- a/include/sal/log.hxx
+++ b/include/sal/log.hxx
@@ -161,7 +161,10 @@ inline char const * unwrapStream(SAL_UNUSED_PARAMETER StreamIgnore const &) {
@since LibreOffice 3.5
*/
-#if defined _LIBCPP_VERSION || (defined _MSC_VER && _MSC_VER >= 1915)
+#if defined _LIBCPP_VERSION \
+ || (defined _GLIBCXX_RELEASE \
+ && (_GLIBCXX_RELEASE >= 12 || (_GLIBCXX_RELEASE == 11 && __GLIBCXX__ > 20210428))) \
+ || (defined _MSC_VER && _MSC_VER >= 1915)
#define SAL_STREAM(stream) \
(::std::ostringstream() << stream).str()
#else
commit b3810c0a92047fb08b0f44778df517cf52ecd642
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: Thu Jul 8 13:43:03 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.
Change-Id: I74a182435b268be8fd7a9ff0be9f404122108b51
diff --git a/odk/build-examples_common.mk b/odk/build-examples_common.mk
index abcb3a3e2593..d37412e3ec62 100644
--- a/odk/build-examples_common.mk
+++ b/odk/build-examples_common.mk
@@ -47,7 +47,7 @@ else
$(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 $(MACOSX_SHELL_HACK), SHELL="$$$$ODK_BUILD_SHELL", ))) \
$(if $(MACOSX_SHELL_HACK),&& rm -f "$$$$ODK_BUILD_SHELL")) \
>$(call gb_CustomTarget_get_workdir,$(1))/log 2>&1 \
commit fc6ed79df9cae31454fd9ebd04baa690c1afaa9c
Author: Michael Stahl <michael.stahl at allotropia.de>
AuthorDate: Tue May 4 09:22:03 2021 +0200
Commit: Michael Stahl <michael.stahl at allotropia.de>
CommitDate: Thu Jul 8 13:43:03 2021 +0200
gbuild: work around GDB 10 bug with DWARF5 in split debug info
GCC 11 defaults to -gdwarf-5 and GDB can only read it if
-gsplit-dwarf isn't used.
Dwarf Error: wrong unit_type in compilation unit header (is DW_UT_split_compile (0x05), should be DW_UT_type (0x02)) [in module /workdir/CObject/desktop/source/app/main.dwo]
https://sourceware.org/bugzilla/show_bug.cgi?id=27354
https://bugzilla.redhat.com/show_bug.cgi?id=1956475
Change-Id: Ie2ac7193a29a8f257cf6f1d711f9fa6941df48ad
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/115054
Tested-by: Jenkins
Reviewed-by: Michael Stahl <michael.stahl at allotropia.de>
(cherry picked from commit dc8c8a4aa20ddd3139a25d5c052cac9bae944cb8)
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/115193
Reviewed-by: Caolán McNamara <caolanm at redhat.com>
diff --git a/solenv/gbuild/platform/com_GCC_defs.mk b/solenv/gbuild/platform/com_GCC_defs.mk
index acf06a8dc1d5..54ad644f575f 100644
--- a/solenv/gbuild/platform/com_GCC_defs.mk
+++ b/solenv/gbuild/platform/com_GCC_defs.mk
@@ -217,8 +217,12 @@ gb_DEBUGINFO_FLAGS=-g2
endif
gb_LINKER_DEBUGINFO_FLAGS=
+# GCC 11 defaults to -gdwarf-5, which GDB 10 doesn't support in split debug info
ifeq ($(HAVE_GCC_SPLIT_DWARF),TRUE)
gb_DEBUGINFO_FLAGS+=-gsplit-dwarf
+ifeq ($(COM_IS_CLANG),)
+gb_DEBUGINFO_FLAGS+=-gdwarf-4
+endif
endif
ifeq ($(HAVE_CLANG_DEBUG_INFO_KIND_CONSTRUCTOR),TRUE)
commit ddb9556dd8c50285b1ed1b2806ee0aa700083515
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: Thu Jul 8 13:43:03 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>
diff --git a/external/libwpd/UnpackedTarball_libwpd.mk b/external/libwpd/UnpackedTarball_libwpd.mk
index 8d0227b9379d..eefa9331c8d6 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..57f52b4b0aa5
--- /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>
+
+ struct WPXTableCell
commit 60901d60b1655986551bea1b8081c13d50437457
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: Thu Jul 8 13:43:03 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>
diff --git a/external/coinmp/UnpackedTarball_coinmp.mk b/external/coinmp/UnpackedTarball_coinmp.mk
index 260bde164b4b..0784bbde1ac1 100644
--- a/external/coinmp/UnpackedTarball_coinmp.mk
+++ b/external/coinmp/UnpackedTarball_coinmp.mk
@@ -45,6 +45,7 @@ $(eval $(call gb_UnpackedTarball_add_patches,coinmp,\
external/coinmp/libtool.patch \
external/coinmp/Wnon-c-typedef-for-linkage.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 6d50220efc041218ae131ee80dfd98096aeba00e
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: Thu Jul 8 13:43:03 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
Change-Id: I792e4c7ff59ad88e5571163d5b2362fdb349667d
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>
diff --git a/external/coinmp/UnpackedTarball_coinmp.mk b/external/coinmp/UnpackedTarball_coinmp.mk
index 997c6c9d4fc8..260bde164b4b 100644
--- a/external/coinmp/UnpackedTarball_coinmp.mk
+++ b/external/coinmp/UnpackedTarball_coinmp.mk
@@ -44,6 +44,7 @@ $(eval $(call gb_UnpackedTarball_add_patches,coinmp,\
external/coinmp/rpath.patch \
external/coinmp/libtool.patch \
external/coinmp/Wnon-c-typedef-for-linkage.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 d1991e7e39490033d7d2b23a3702d689e28a3a59
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: Thu Jul 8 13:43:03 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.
Change-Id: If92cfb565ed9344b2ec1403793d7aeff8bd019ad
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>
diff --git a/external/liborcus/UnpackedTarball_liborcus.mk b/external/liborcus/UnpackedTarball_liborcus.mk
index e5e33b0b1249..113e8e25818d 100644
--- a/external/liborcus/UnpackedTarball_liborcus.mk
+++ b/external/liborcus/UnpackedTarball_liborcus.mk
@@ -20,6 +20,7 @@ $(eval $(call gb_UnpackedTarball_add_patches,liborcus,\
external/liborcus/gcc9.patch.0 \
external/liborcus/libtool.patch.0 \
external/liborcus/fix-pch.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;
+
commit 8e3d65a834234fcba351b051f4eec7f283e8982a
Author: Michael Stahl <michael.stahl at allotropia.de>
AuthorDate: Thu Jul 8 13:42:39 2021 +0200
Commit: Michael Stahl <michael.stahl at allotropia.de>
CommitDate: Thu Jul 8 13:43:02 2021 +0200
framework: fix build of unit test
Change-Id: Ifeb97ae88365b55eb120e43989fe130efb34d373
diff --git a/framework/qa/cppunit/dispatchtest.cxx b/framework/qa/cppunit/dispatchtest.cxx
index 2e2efec4693a..8b39dbb97a9c 100644
--- a/framework/qa/cppunit/dispatchtest.cxx
+++ b/framework/qa/cppunit/dispatchtest.cxx
@@ -203,7 +203,7 @@ CPPUNIT_TEST_FIXTURE(DispatchTest, testInterception)
CPPUNIT_ASSERT_EQUAL(0, pInterceptor->getUnexpected());
}
-constexpr OUStringLiteral DATA_DIRECTORY = u"/framework/qa/cppunit/data/";
+constexpr OUStringLiteral DATA_DIRECTORY = "/framework/qa/cppunit/data/";
CPPUNIT_TEST_FIXTURE(DispatchTest, testSfxOfficeDispatchDispose)
{
More information about the Libreoffice-commits
mailing list