[Libreoffice-commits] core.git: Branch 'distro/cib/libreoffice-6-3' - 7 commits - config_host/config_global.h.in configure.ac download.lst external/liblangtag external/libmspub external/mariadb-connector-c include/o3tl o3tl/qa RepositoryExternal.mk sfx2/source solenv/clang-format solenv/flatpak-manifest.in

Michael Stahl (via logerrit) logerrit at kemper.freedesktop.org
Tue Jun 30 12:05:37 UTC 2020


 RepositoryExternal.mk                                               |    7 
 config_host/config_global.h.in                                      |    3 
 configure.ac                                                        |   42 +
 download.lst                                                        |    4 
 external/liblangtag/ExternalProject_liblangtag.mk                   |    1 
 external/libmspub/UnpackedTarball_libmspub.mk                       |    1 
 external/libmspub/stdint.patch                                      |   10 
 external/mariadb-connector-c/README                                 |   18 
 external/mariadb-connector-c/StaticLibrary_mariadb-connector-c.mk   |  113 +----
 external/mariadb-connector-c/UnpackedTarball_mariadb-connector-c.mk |   26 -
 external/mariadb-connector-c/clang-cl.patch.0                       |    4 
 external/mariadb-connector-c/configs/linux_my_config.h              |  212 +--------
 external/mariadb-connector-c/configs/mac_my_config.h                |  217 +---------
 external/mariadb-connector-c/configs/mariadb_version.h              |   38 +
 external/mariadb-connector-c/configs/mysql_version.h                |   28 -
 external/mariadb-connector-c/configs/wnt_ma_config.h                |  154 +++++++
 external/mariadb-connector-c/mariadb-CONC-104.patch.1               |   49 --
 external/mariadb-connector-c/mariadb-inline.patch.1                 |   23 -
 external/mariadb-connector-c/mariadb-msvc.patch.1                   |   13 
 external/mariadb-connector-c/mariadb-swap.patch                     |   24 -
 include/o3tl/span.hxx                                               |   14 
 o3tl/qa/test-span.cxx                                               |    7 
 sfx2/source/appl/appserv.cxx                                        |    1 
 sfx2/source/control/dispatch.cxx                                    |    3 
 solenv/clang-format/blacklist                                       |    3 
 solenv/flatpak-manifest.in                                          |    6 
 26 files changed, 401 insertions(+), 620 deletions(-)

New commits:
commit 29de60a99179c3c703ec1284760b12ed0c76ef07
Author:     Michael Stahl <Michael.Stahl at cib.de>
AuthorDate: Tue Jun 16 15:09:50 2020 +0200
Commit:     Michael Stahl <Michael.Stahl at cib.de>
CommitDate: Tue Jun 30 14:03:51 2020 +0200

    mariadb: upgrade to release 3.1.8
    
    Fixes CVE-2018-3081 CVE-2020-2574 CVE-2020-2752 CVE-2020-2922 CVE-2020-13249
    
    Remove obsolete patches:
    * mariadb-msvc.patch.1
    * mariadb-swap.patch
    * mariadb-inline.patch.1
    * mariadb-CONC-104.patch.1
    
    Don't build anything from plugins/ in the hope that it's not needed.
    
    Reviewed-on: https://gerrit.libreoffice.org/c/core/+/96466
    Tested-by: Jenkins
    Reviewed-by: Stephan Bergmann <sbergman at redhat.com>
    (cherry picked from commit fe041bbc343ee08c6e901f63985d55a90da71c8b)
    
    mariadb: forgot to adapt flatpak-manifest.in
    
    mariadb: the "pvio_socket" plugin turns out to be important
    ... otherwise can't connect to a TCP socket.
    (regression from fe041bbc343ee08c6e901f63985d55a90da71c8b)
    Reviewed-on: https://gerrit.libreoffice.org/c/core/+/96536
    Tested-by: Jenkins
    Reviewed-by: Michael Stahl <michael.stahl at cib.de>
    (cherry picked from commit 82a1650683df7d5c1769dfd68a26a4d071f1a546)
    
    Change-Id: I1c8633866b7108a8bb22dae0e0dd5f4a44bf5150
    Reviewed-on: https://gerrit.libreoffice.org/c/core/+/96519
    Tested-by: Jenkins
    Reviewed-by: Miklos Vajna <vmiklos at collabora.com>
    (cherry picked from commit 329c83c57989948d16b4e4d646607b93ee407a9e)

diff --git a/RepositoryExternal.mk b/RepositoryExternal.mk
index a75ca5097b62..08cfadf76c52 100644
--- a/RepositoryExternal.mk
+++ b/RepositoryExternal.mk
@@ -262,6 +262,13 @@ $(call gb_LinkTarget_add_libs,$(1),\
 	-liconv \
 )
 endif
+$(call gb_LinkTarget_use_system_win32_libs,$(1),\
+	ws2_32 \
+	advapi32 \
+	kernel32 \
+	shlwapi \
+	crypt32 \
+)
 
 endef
 define gb_ExternalProject__use_mariadb-connector-c
diff --git a/download.lst b/download.lst
index 405df996f10a..99238f4b69af 100644
--- a/download.lst
+++ b/download.lst
@@ -166,8 +166,8 @@ export LPSOLVE_SHA256SUM := 171816288f14215c69e730f7a4f1c325739873e21f946ff83884
 export LPSOLVE_TARBALL := 26b3e95ddf3d9c077c480ea45874b3b8-lp_solve_5.5.tar.gz
 export LXML_SHA256SUM := 940caef1ec7c78e0c34b0f6b94fe42d0f2022915ffc78643d28538a5cfd0f40e
 export LXML_TARBALL := lxml-4.1.1.tgz
-export MARIADB_CONNECTOR_C_SHA256SUM := fd2f751dea049c1907735eb236aeace1d811d6a8218118b00bbaa9b84dc5cd60
-export MARIADB_CONNECTOR_C_TARBALL := a233181e03d3c307668b4c722d881661-mariadb_client-2.0.0-src.tar.gz
+export MARIADB_CONNECTOR_C_SHA256SUM := 431434d3926f4bcce2e5c97240609983f60d7ff50df5a72083934759bb863f7b
+export MARIADB_CONNECTOR_C_TARBALL := mariadb-connector-c-3.1.8-src.tar.gz
 export MDDS_SHA256SUM := 25ce3d5af9f6609e1de05bb22b2316e57b74a72a5b686fbb2da199da72349c81
 export MDDS_TARBALL := mdds-1.4.3.tar.bz2
 export MDNSRESPONDER_SHA256SUM := e777b4d7dbf5eb1552cb80090ad1ede319067ab6e45e3990d68aabf6e8b3f5a0
diff --git a/external/mariadb-connector-c/README b/external/mariadb-connector-c/README
index 03a1138b47f8..25209f97f4d2 100644
--- a/external/mariadb-connector-c/README
+++ b/external/mariadb-connector-c/README
@@ -1,16 +1,8 @@
-Update to new upstream bzr snapshot:
+MariaDB Connector/C
 
-Don't use 'bzr diff', it will not put renames in the diff in a way
-that patch understands.
+https://mariadb.com/kb/en/mariadb-connector-c-release-notes/
+https://downloads.mariadb.com/Connectors/c/
 
-bzr -Ossl.cert_reqs=none branch lp:mariadb-native-client
-mv mariadb-native-client mariadb-native-client.trunk
-cp -R mariadb-native-client.trunk mariadb-native-client.release
-cd mariadb-native-client.release
-bzr revert -r mariadb-native-client-1.0.0
-cd ..
-diff -x .bzr -u --recursive -N mariadb-native-client.release/ mariadb-native-client.trunk/  > /path/to/libreoffice_tree/libmariadb/mariadb-trunk-NNN.patch
-sed -i -e 's@^\([+-]\{3\} \)mariadb-native-client.\(trunk\|release\)/@\1mariadb/@' /path/to/libreoffice_tree/libmariadb/mariadb-trunk-NNN.patch
-dos2unix -f /path/to/libreoffice_tree/libmariadb/mariadb-trunk-NNN.patch
+configs/ generated like this:
 
-regenerate configs
\ No newline at end of file
+cmake -DWITH_CURL=OFF -DWITH_SSL=OFF -DWITH_UNIT_TESTS=OFF -DWITH_DYNCOL=OFF .../workdir/UnpackedTarball/mariadb-connector-c/
diff --git a/external/mariadb-connector-c/StaticLibrary_mariadb-connector-c.mk b/external/mariadb-connector-c/StaticLibrary_mariadb-connector-c.mk
index 3e35e1d648c5..b0c62e1b160e 100644
--- a/external/mariadb-connector-c/StaticLibrary_mariadb-connector-c.mk
+++ b/external/mariadb-connector-c/StaticLibrary_mariadb-connector-c.mk
@@ -34,89 +34,40 @@ $(eval $(call gb_StaticLibrary_set_include,mariadb-connector-c,\
 endif
 
 $(eval $(call gb_StaticLibrary_add_generated_cobjects,mariadb-connector-c,\
-	UnpackedTarball/mariadb-connector-c/libmariadb/array \
-	UnpackedTarball/mariadb-connector-c/libmariadb/ma_dyncol \
-	UnpackedTarball/mariadb-connector-c/libmariadb/bchange \
-	UnpackedTarball/mariadb-connector-c/libmariadb/bmove \
 	UnpackedTarball/mariadb-connector-c/libmariadb/bmove_upp \
-	UnpackedTarball/mariadb-connector-c/libmariadb/my_charset \
-	UnpackedTarball/mariadb-connector-c/libmariadb/hash \
-	UnpackedTarball/mariadb-connector-c/libmariadb/violite \
-	UnpackedTarball/mariadb-connector-c/libmariadb/net \
-	UnpackedTarball/mariadb-connector-c/libmariadb/charset \
-	UnpackedTarball/mariadb-connector-c/libmariadb/ma_time \
-	UnpackedTarball/mariadb-connector-c/libmariadb/dbug \
-	UnpackedTarball/mariadb-connector-c/libmariadb/default \
-	UnpackedTarball/mariadb-connector-c/libmariadb/errmsg \
-	UnpackedTarball/mariadb-connector-c/libmariadb/my_vsnprintf \
-	UnpackedTarball/mariadb-connector-c/libmariadb/errors \
-	UnpackedTarball/mariadb-connector-c/libmariadb/getopt1 \
-	UnpackedTarball/mariadb-connector-c/libmariadb/getopt \
 	UnpackedTarball/mariadb-connector-c/libmariadb/get_password \
-	UnpackedTarball/mariadb-connector-c/libmariadb/int2str \
-	UnpackedTarball/mariadb-connector-c/libmariadb/is_prefix \
-	UnpackedTarball/mariadb-connector-c/libmariadb/libmariadb \
-	UnpackedTarball/mariadb-connector-c/libmariadb/list \
-	UnpackedTarball/mariadb-connector-c/libmariadb/llstr \
-	UnpackedTarball/mariadb-connector-c/libmariadb/longlong2str \
-	UnpackedTarball/mariadb-connector-c/libmariadb/mf_dirname \
-	UnpackedTarball/mariadb-connector-c/libmariadb/mf_fn_ext \
-	UnpackedTarball/mariadb-connector-c/libmariadb/mf_format \
-	UnpackedTarball/mariadb-connector-c/libmariadb/mf_loadpath \
-	UnpackedTarball/mariadb-connector-c/libmariadb/mf_pack \
-	UnpackedTarball/mariadb-connector-c/libmariadb/mf_path \
-	UnpackedTarball/mariadb-connector-c/libmariadb/mf_unixpath \
-	UnpackedTarball/mariadb-connector-c/libmariadb/mf_wcomp \
-	UnpackedTarball/mariadb-connector-c/libmariadb/mulalloc \
-	UnpackedTarball/mariadb-connector-c/libmariadb/my_alloc \
-	UnpackedTarball/mariadb-connector-c/libmariadb/my_compress \
-	UnpackedTarball/mariadb-connector-c/libmariadb/my_div \
-	UnpackedTarball/mariadb-connector-c/libmariadb/my_error \
-	UnpackedTarball/mariadb-connector-c/libmariadb/my_fopen \
-	UnpackedTarball/mariadb-connector-c/libmariadb/my_fstream \
-	UnpackedTarball/mariadb-connector-c/libmariadb/my_getwd \
-	UnpackedTarball/mariadb-connector-c/libmariadb/my_init \
-	UnpackedTarball/mariadb-connector-c/libmariadb/my_lib \
-	UnpackedTarball/mariadb-connector-c/libmariadb/my_malloc \
-	UnpackedTarball/mariadb-connector-c/libmariadb/my_messnc \
-	UnpackedTarball/mariadb-connector-c/libmariadb/my_net \
-	UnpackedTarball/mariadb-connector-c/libmariadb/my_once \
-	UnpackedTarball/mariadb-connector-c/libmariadb/my_open \
-	UnpackedTarball/mariadb-connector-c/libmariadb/my_port \
-	UnpackedTarball/mariadb-connector-c/libmariadb/my_pthread \
-	UnpackedTarball/mariadb-connector-c/libmariadb/my_read \
-	UnpackedTarball/mariadb-connector-c/libmariadb/my_realloc \
-	UnpackedTarball/mariadb-connector-c/libmariadb/my_seek \
-	UnpackedTarball/mariadb-connector-c/libmariadb/my_static \
-	UnpackedTarball/mariadb-connector-c/libmariadb/my_symlink \
-	UnpackedTarball/mariadb-connector-c/libmariadb/my_thr_init \
-	UnpackedTarball/mariadb-connector-c/libmariadb/my_write \
-	UnpackedTarball/mariadb-connector-c/libmariadb/password \
-	UnpackedTarball/mariadb-connector-c/libmariadb/str2int \
-	UnpackedTarball/mariadb-connector-c/libmariadb/strcend \
-	UnpackedTarball/mariadb-connector-c/libmariadb/strcont \
-	UnpackedTarball/mariadb-connector-c/libmariadb/strend \
-	UnpackedTarball/mariadb-connector-c/libmariadb/strfill \
-	UnpackedTarball/mariadb-connector-c/libmariadb/string \
-	UnpackedTarball/mariadb-connector-c/libmariadb/strinstr \
-	UnpackedTarball/mariadb-connector-c/libmariadb/strmake \
-	UnpackedTarball/mariadb-connector-c/libmariadb/strmov \
-	UnpackedTarball/mariadb-connector-c/libmariadb/strnmov \
-	UnpackedTarball/mariadb-connector-c/libmariadb/strtoll \
-	UnpackedTarball/mariadb-connector-c/libmariadb/strtoull \
-	UnpackedTarball/mariadb-connector-c/libmariadb/strxmov \
-	UnpackedTarball/mariadb-connector-c/libmariadb/strxnmov \
-	UnpackedTarball/mariadb-connector-c/libmariadb/thr_mutex \
-	UnpackedTarball/mariadb-connector-c/libmariadb/typelib \
-	UnpackedTarball/mariadb-connector-c/libmariadb/sha1 \
-	UnpackedTarball/mariadb-connector-c/libmariadb/my_stmt \
-	UnpackedTarball/mariadb-connector-c/libmariadb/my_loaddata \
-	UnpackedTarball/mariadb-connector-c/libmariadb/my_stmt_codec \
-	UnpackedTarball/mariadb-connector-c/libmariadb/client_plugin \
-	UnpackedTarball/mariadb-connector-c/libmariadb/my_auth \
-	UnpackedTarball/mariadb-connector-c/libmariadb/ma_secure \
-$(if $(filter $(OS),WNT), \
-	UnpackedTarball/mariadb-connector-c/win-iconv/win_iconv,) \
+	UnpackedTarball/mariadb-connector-c/libmariadb/ma_alloc \
+	UnpackedTarball/mariadb-connector-c/libmariadb/ma_array \
+	UnpackedTarball/mariadb-connector-c/libmariadb/ma_charset \
+	UnpackedTarball/mariadb-connector-c/libmariadb/ma_compress \
+	UnpackedTarball/mariadb-connector-c/libmariadb/ma_context \
+	UnpackedTarball/mariadb-connector-c/libmariadb/ma_default \
+	UnpackedTarball/mariadb-connector-c/libmariadb/ma_dtoa \
+	UnpackedTarball/mariadb-connector-c/libmariadb/ma_errmsg \
+	UnpackedTarball/mariadb-connector-c/libmariadb/ma_hash \
+	UnpackedTarball/mariadb-connector-c/libmariadb/ma_init \
+	UnpackedTarball/mariadb-connector-c/libmariadb/ma_io \
+	UnpackedTarball/mariadb-connector-c/libmariadb/ma_list \
+	UnpackedTarball/mariadb-connector-c/libmariadb/ma_ll2str \
+	UnpackedTarball/mariadb-connector-c/libmariadb/ma_loaddata \
+	UnpackedTarball/mariadb-connector-c/libmariadb/ma_net \
+	UnpackedTarball/mariadb-connector-c/libmariadb/ma_password \
+	UnpackedTarball/mariadb-connector-c/libmariadb/ma_pvio \
+	UnpackedTarball/mariadb-connector-c/libmariadb/ma_sha1 \
+	UnpackedTarball/mariadb-connector-c/libmariadb/ma_stmt_codec \
+	UnpackedTarball/mariadb-connector-c/libmariadb/ma_string \
+	UnpackedTarball/mariadb-connector-c/libmariadb/ma_time \
+	UnpackedTarball/mariadb-connector-c/libmariadb/mariadb_async \
+	UnpackedTarball/mariadb-connector-c/libmariadb/mariadb_charset \
+	UnpackedTarball/mariadb-connector-c/libmariadb/mariadb_dyncol \
+	UnpackedTarball/mariadb-connector-c/libmariadb/mariadb_lib \
+	UnpackedTarball/mariadb-connector-c/libmariadb/mariadb_stmt \
+	UnpackedTarball/mariadb-connector-c/libmariadb/ma_client_plugin \
+	UnpackedTarball/mariadb-connector-c/plugins/auth/my_auth \
+	UnpackedTarball/mariadb-connector-c/plugins/pvio/pvio_socket \
+	$(if $(filter $(OS),WNT), \
+		UnpackedTarball/mariadb-connector-c/libmariadb/win32_errmsg \
+		UnpackedTarball/mariadb-connector-c/win-iconv/win_iconv) \
 ))
 
 # vim: set noet sw=4 ts=4:
diff --git a/external/mariadb-connector-c/UnpackedTarball_mariadb-connector-c.mk b/external/mariadb-connector-c/UnpackedTarball_mariadb-connector-c.mk
index 71af2847a5b2..3d8ca9295131 100644
--- a/external/mariadb-connector-c/UnpackedTarball_mariadb-connector-c.mk
+++ b/external/mariadb-connector-c/UnpackedTarball_mariadb-connector-c.mk
@@ -11,27 +11,31 @@ $(eval $(call gb_UnpackedTarball_UnpackedTarball,mariadb-connector-c))
 
 $(eval $(call gb_UnpackedTarball_set_tarball,mariadb-connector-c,$(MARIADB_CONNECTOR_C_TARBALL)))
 
-$(eval $(call gb_UnpackedTarball_add_file,mariadb-connector-c,include/mysql_version.h,external/mariadb-connector-c/configs/mysql_version.h))
+$(eval $(call gb_UnpackedTarball_add_file,mariadb-connector-c,include/mariadb_version.h,external/mariadb-connector-c/configs/mariadb_version.h))
 
-ifneq ($(OS),WNT)
+ifeq ($(OS),WNT)
+$(eval $(call gb_UnpackedTarball_add_file,mariadb-connector-c,include/ma_config.h,external/mariadb-connector-c/configs/wnt_ma_config.h))
+else
 ifeq ($(OS),MACOSX)
-$(eval $(call gb_UnpackedTarball_add_file,mariadb-connector-c,include/my_config.h,external/mariadb-connector-c/configs/mac_my_config.h))
+$(eval $(call gb_UnpackedTarball_add_file,mariadb-connector-c,include/ma_config.h,external/mariadb-connector-c/configs/mac_my_config.h))
 else
-$(eval $(call gb_UnpackedTarball_add_file,mariadb-connector-c,include/my_config.h,external/mariadb-connector-c/configs/linux_my_config.h))
+$(eval $(call gb_UnpackedTarball_add_file,mariadb-connector-c,include/ma_config.h,external/mariadb-connector-c/configs/linux_my_config.h))
 endif
 endif # $(OS),WNT
 
 $(eval $(call gb_UnpackedTarball_set_patchlevel,mariadb-connector-c,1))
 
-# mariadb-connector-c/mariadb-static-inline.patch upstream at
-# <https://mariadb.atlassian.net/browse/CONC-18> "no external definition of
-# non-static inline local_thr_alarm in libmariadb/net.c":
 $(eval $(call gb_UnpackedTarball_add_patches,mariadb-connector-c,\
-    external/mariadb-connector-c/mariadb-swap.patch \
-    $(if $(filter MSC,$(COM)),external/mariadb-connector-c/mariadb-msvc.patch.1) \
-    external/mariadb-connector-c/mariadb-inline.patch.1 \
-    external/mariadb-connector-c/mariadb-CONC-104.patch.1 \
     external/mariadb-connector-c/clang-cl.patch.0 \
 ))
 
+# TODO are any "plugins" needed?
+$(eval $(call gb_UnpackedTarball_set_post_action,mariadb-connector-c, \
+	< libmariadb/ma_client_plugin.c.in sed \
+		-e 's/@EXTERNAL_PLUGINS@/extern struct st_mysql_client_plugin pvio_socket_client_plugin;/' \
+		-e 's/@BUILTIN_PLUGINS@/(struct st_mysql_client_plugin *)\&pvio_socket_client_plugin$(COMMA)/' \
+		> libmariadb/ma_client_plugin.c  \
+))
+
+
 # vim: set noet sw=4 ts=4:
diff --git a/external/mariadb-connector-c/clang-cl.patch.0 b/external/mariadb-connector-c/clang-cl.patch.0
index 7a886e67cf7c..4c9ef4def3f6 100644
--- a/external/mariadb-connector-c/clang-cl.patch.0
+++ b/external/mariadb-connector-c/clang-cl.patch.0
@@ -1,5 +1,5 @@
---- libmariadb/getopt.c
-+++ libmariadb/getopt.c
+--- unittest/libmariadb/getopt.c
++++ unittest/libmariadb/getopt.c
 @@ -38,7 +38,7 @@
  #include <config.h>
  #endif
diff --git a/external/mariadb-connector-c/configs/linux_my_config.h b/external/mariadb-connector-c/configs/linux_my_config.h
index a52a62ce0cdd..577a6e163d68 100644
--- a/external/mariadb-connector-c/configs/linux_my_config.h
+++ b/external/mariadb-connector-c/configs/linux_my_config.h
@@ -2,277 +2,141 @@
 /*
  * Include file constants (processed in LibmysqlIncludeFiles.txt 1
  */
+/* #undef HAVE_OPENSSL_APPLINK_C */
 #define HAVE_ALLOCA_H 1
-#define HAVE_ARPA_INET_H 1
-#define HAVE_CRYPT_H 1
-#define HAVE_DIRENT_H 1
+/* #undef HAVE_BIGENDIAN */
+#define HAVE_SETLOCALE 1
+#define HAVE_NL_LANGINFO 1
 #define HAVE_DLFCN_H 1
-#define HAVE_EXECINFO_H 1
 #define HAVE_FCNTL_H 1
-#define HAVE_FENV_H 1
 #define HAVE_FLOAT_H 1
-/* #undef HAVE_FPU_CONTROL_H */
-#define HAVE_GRP_H 1
-/* #undef HAVE_IEEEFP_H */
 #define HAVE_LIMITS_H 1
-#define HAVE_MALLOC_H 1
-#define HAVE_MEMORY_H 1
-#define HAVE_NETINET_IN_H 1
-#define HAVE_PATHS_H 1
 #define HAVE_PWD_H 1
-#define HAVE_SCHED_H 1
 /* #undef HAVE_SELECT_H */
 #define HAVE_STDDEF_H 1
 #define HAVE_STDINT_H 1
 #define HAVE_STDLIB_H 1
 #define HAVE_STRING_H 1
-#define HAVE_STRINGS_H 1
-/* #undef HAVE_SYNCH_H */
-/* #undef HAVE_SYS_FPU_H */
 #define HAVE_SYS_IOCTL_H 1
-#define HAVE_SYS_IPC_H 1
-#define HAVE_SYS_MMAN_H 1
-#define HAVE_SYS_PRCTL_H 1
 #define HAVE_SYS_SELECT_H 1
-#define HAVE_SYS_SHM_H 1
 #define HAVE_SYS_SOCKET_H 1
-#define HAVE_SYS_STAT_H 1
 /* #undef HAVE_SYS_STREAM_H */
-#define HAVE_SYS_TIMEB_H 1
 #define HAVE_SYS_TYPES_H 1
 #define HAVE_SYS_UN_H 1
-/* #undef HAVE_SYSENT_H */
-#define HAVE_TERMIO_H 1
-#define HAVE_TERMIOS_H 1
 #define HAVE_UNISTD_H 1
-#define HAVE_UTIME_H 1
+#define HAVE_UCONTEXT_H 1
 
 /*
  * function definitions - processed in LibmysqlFunctions.txt 
  */
-#define HAVE_ACCESS 1
-/* #undef HAVE_AIOWAIT */
-#define HAVE_ALARM 1
-/* #undef HAVE_ALLOCA */
-#define HAVE_BCMP 1
-/* #undef HAVE_BFILL */
-/* #undef HAVE_BMOVE */
-#define HAVE_BZERO 1
-#define HAVE_CLOCK_GETTIME 1
-/* #undef HAVE_COMPRESS */
-/* #undef HAVE_CRYPT */
-#define HAVE_DLERROR 1
-#define HAVE_DLOPEN 1
-#define HAVE_FCHMOD 1
-#define HAVE_FCNTL 1
-/* #undef HAVE_FCONVERT */
-#define HAVE_FDATASYNC 1
-#define HAVE_FESETROUND 1
-#define HAVE_FINITE 1
-#define HAVE_FSEEKO 1
-#define HAVE_FSYNC 1
-#define HAVE_GETADDRINFO 1
-#define HAVE_GETCWD 1
-#define HAVE_GETHOSTBYADDR_R 1
-#define HAVE_GETHOSTBYNAME_R 1
-/* #undef HAVE_GETHRTIME */
-#define HAVE_GETNAMEINFO 1
-#define HAVE_GETPAGESIZE 1
-#define HAVE_GETPASS 1
-/* #undef HAVE_GETPASSPHRASE */
-#define HAVE_GETPWNAM 1
+
+/* #undef HAVE_DLERROR */
+/* #undef HAVE_DLOPEN */
 #define HAVE_GETPWUID 1
-#define HAVE_GETRLIMIT 1
-#define HAVE_GETRUSAGE 1
-#define HAVE_GETWD 1
-#define HAVE_GMTIME_R 1
-#define HAVE_INITGROUPS 1
-#define HAVE_LDIV 1
-#define HAVE_LOCALTIME_R 1
-#define HAVE_LOG2 1
-#define HAVE_LONGJMP 1
-#define HAVE_LSTAT 1
-#define HAVE_MADVISE 1
-#define HAVE_MALLINFO 1
-#define HAVE_MEMALIGN 1
 #define HAVE_MEMCPY 1
-#define HAVE_MEMMOVE 1
-#define HAVE_MKSTEMP 1
-#define HAVE_MLOCK 1
-#define HAVE_MLOCKALL 1
-#define HAVE_MMAP 1
-#define HAVE_MMAP64 1
-#define HAVE_PERROR 1
 #define HAVE_POLL 1
-#define HAVE_PREAD 1
-/* #undef HAVE_PTHREAD_ATTR_CREATE */
-#define HAVE_PTHREAD_ATTR_GETSTACKSIZE 1
-/* #undef HAVE_PTHREAD_ATTR_SETPRIO */
-#define HAVE_PTHREAD_ATTR_SETSCHEDPARAM 1
-#define HAVE_PTHREAD_ATTR_SETSCOPE 1
-#define HAVE_PTHREAD_ATTR_SETSTACKSIZE 1
-/* #undef HAVE_PTHREAD_CONDATTR_CREATE */
-/* #undef HAVE_PTHREAD_INIT */
-#define HAVE_PTHREAD_KEY_DELETE 1
-#define HAVE_PTHREAD_KILL 1
-#define HAVE_PTHREAD_RWLOCK_RDLOCK 1
-/* #undef HAVE_PTHREAD_SETPRIO_NP */
-#define HAVE_PTHREAD_SETSCHEDPARAM 1
-#define HAVE_PTHREAD_SIGMASK 1
-/* #undef HAVE_PTHREAD_THREADMASK */
-/* #undef HAVE_PTHREAD_YIELD_NP */
-#define HAVE_READDIR_R 1
-#define HAVE_READLINK 1
-#define HAVE_REALPATH 1
-#define HAVE_RENAME 1
-#define HAVE_SCHED_YIELD 1
-#define HAVE_SELECT 1
-/* #undef HAVE_SETFD */
-/* #undef HAVE_SETFILEPOINTER */
-#define HAVE_SIGNAL 1
-#define HAVE_SIGACTION 1
-/* #undef HAVE_SIGTHREADMASK */
-#define HAVE_SIGWAIT 1
-#define HAVE_SLEEP 1
-#define HAVE_SNPRINTF 1
-/* #undef HAVE_SQLITE */
-#define HAVE_STPCPY 1
-#define HAVE_STRERROR 1
-/* #undef HAVE_STRLCPY */
-#define HAVE_STRNLEN 1
-#define HAVE_STRPBRK 1
-#define HAVE_STRSEP 1
-#define HAVE_STRSTR 1
-#define HAVE_STRTOK_R 1
-#define HAVE_STRTOL 1
-#define HAVE_STRTOLL 1
-#define HAVE_STRTOUL 1
-#define HAVE_STRTOULL 1
+/* #undef HAVE_STRTOK_R */
+/* #undef HAVE_STRTOL */
+/* #undef HAVE_STRTOLL */
+/* #undef HAVE_STRTOUL */
+/* #undef HAVE_STRTOULL */
 /* #undef HAVE_TELL */
 /* #undef HAVE_THR_SETCONCURRENCY */
 /* #undef HAVE_THR_YIELD */
-#define HAVE_VASPRINTF 1
-#define HAVE_VSNPRINTF 1
+/* #undef HAVE_VASPRINTF */
+/* #undef HAVE_VSNPRINTF */
+#define HAVE_CUSERID 1
 
 /*
  * types and sizes
  */
-/* Types we may use */
-#define SIZEOF_CHAR 1
-#if SIZEOF_CHAR
-# define HAVE_CHAR 1
-#endif
+
 
 #define SIZEOF_CHARP 8
-#if SIZEOF_CHARP
+#if defined(SIZEOF_CHARP)
 # define HAVE_CHARP 1
 #endif
 
-#define SIZEOF_SHORT 2
-#if SIZEOF_SHORT
-# define HAVE_SHORT 1
-#endif
 
 #define SIZEOF_INT 4
-#if SIZEOF_INT
+#if defined(SIZEOF_INT)
 # define HAVE_INT 1
 #endif
 
 #define SIZEOF_LONG 8
-#if SIZEOF_LONG
+#if defined(SIZEOF_LONG)
 # define HAVE_LONG 1
 #endif
 
 #define SIZEOF_LONG_LONG 8
-#if SIZEOF_LONG_LONG
+#if defined(SIZEOF_LONG_LONG)
 # define HAVE_LONG_LONG 1
 #endif
 
-#define SIZEOF_OFF_T 8
-#if SIZEOF_OFF_T
-# define HAVE_OFF_T 1
-#endif
-
-#define SIZEOF_SIGSET_T 128
-#if SIZEOF_SIGSET_T
-# define HAVE_SIGSET_T 1
-#endif
 
 #define SIZEOF_SIZE_T 8
-#if SIZEOF_SIZE_T
+#if defined(SIZEOF_SIZE_T)
 # define HAVE_SIZE_T 1
 #endif
 
-/* #undef SIZEOF_UCHAR */
-#if SIZEOF_UCHAR
-# define HAVE_UCHAR 1
-#endif
 
 #define SIZEOF_UINT 4
-#if SIZEOF_UINT
+#if defined(SIZEOF_UINT)
 # define HAVE_UINT 1
 #endif
 
 #define SIZEOF_ULONG 8
-#if SIZEOF_ULONG
+#if defined(SIZEOF_ULONG)
 # define HAVE_ULONG 1
 #endif
 
 /* #undef SIZEOF_INT8 */
-#if SIZEOF_INT8
+#if defined(SIZEOF_INT8)
 # define HAVE_INT8 1
 #endif
 /* #undef SIZEOF_UINT8 */
-#if SIZEOF_UINT8
+#if defined(SIZEOF_UINT8)
 # define HAVE_UINT8 1
 #endif
 
 /* #undef SIZEOF_INT16 */
-#if SIZEOF_INT16
+#if defined(SIZEOF_INT16)
 # define HAVE_INT16 1
 #endif
 /* #undef SIZEOF_UINT16 */
-#if SIZEOF_UINT16
+#if defined(SIZEOF_UINT16)
 # define HAVE_UINT16 1
 #endif
 
 /* #undef SIZEOF_INT32 */
-#if SIZEOF_INT32
+#if defined(SIZEOF_INT32)
 # define HAVE_INT32 1
 #endif
 /* #undef SIZEOF_UINT32 */
-#if SIZEOF_UINT32
+#if defined(SIZEOF_UINT32)
 # define HAVE_UINT32 1
 #endif
-/* #undef SIZEOF_U_INT32_T */
-#if SIZEOF_U_INT32_T
-# define HAVE_U_INT32_T 1
-#endif
 
 /* #undef SIZEOF_INT64 */
-#if SIZEOF_INT64
+#if defined(SIZEOF_INT64)
 # define HAVE_INT64 1
 #endif
 /* #undef SIZEOF_UINT64 */
-#if SIZEOF_UINT64
+#if defined(SIZEOF_UINT64)
 # define HAVE_UINT64 1
 #endif
 
 /* #undef SIZEOF_SOCKLEN_T */
-#if SIZEOF_SOCKLEN_T
+#if defined(SIZEOF_SOCKLEN_T)
 # define HAVE_SOCKLEN_T 1
 #endif
 
 #define SOCKET_SIZE_TYPE socklen_t
 
-#define RETSIGTYPE void
-#define RETQSORTTYPE void 
+#define LOCAL_INFILE_MODE_OFF  0
+#define LOCAL_INFILE_MODE_ON   1
+#define LOCAL_INFILE_MODE_AUTO 2
+#define ENABLED_LOCAL_INFILE LOCAL_INFILE_MODE_AUTO
 
-/*
- * various other defines
- */
-/* #undef HAVE_THREADS */
-#define SHAREDIR "share"
-#define DEFAULT_CHARSET_HOME "/usr/local"
-#define PLUGINDIR "/usr/local/lib/plugin"
+#define MARIADB_DEFAULT_CHARSET "latin1"
 
diff --git a/external/mariadb-connector-c/configs/mac_my_config.h b/external/mariadb-connector-c/configs/mac_my_config.h
index 766c757c27e5..c94856115b95 100644
--- a/external/mariadb-connector-c/configs/mac_my_config.h
+++ b/external/mariadb-connector-c/configs/mac_my_config.h
@@ -1,277 +1,142 @@
 
-#define HAVE_GETHOSTBYNAME_R_GLIBC2_STYLE 1
-
 /*
  * Include file constants (processed in LibmysqlIncludeFiles.txt 1
  */
+/* #undef HAVE_OPENSSL_APPLINK_C */
 #define HAVE_ALLOCA_H 1
-#define HAVE_ARPA_INET_H 1
-/* #undef HAVE_CRYPT_H */
-#define HAVE_DIRENT_H 1
+/* #undef HAVE_BIGENDIAN */
+#define HAVE_SETLOCALE 1
+#define HAVE_NL_LANGINFO 1
 #define HAVE_DLFCN_H 1
-#define HAVE_EXECINFO_H 1
 #define HAVE_FCNTL_H 1
-#define HAVE_FENV_H 1
 #define HAVE_FLOAT_H 1
-/* #undef HAVE_FPU_CONTROL_H */
-#define HAVE_GRP_H 1
-/* #undef HAVE_IEEEFP_H */
 #define HAVE_LIMITS_H 1
-/* #undef HAVE_MALLOC_H */
-#define HAVE_MEMORY_H 1
-#define HAVE_NETINET_IN_H 1
-#define HAVE_PATHS_H 1
 #define HAVE_PWD_H 1
-#define HAVE_SCHED_H 1
 /* #undef HAVE_SELECT_H */
 #define HAVE_STDDEF_H 1
 #define HAVE_STDINT_H 1
 #define HAVE_STDLIB_H 1
 #define HAVE_STRING_H 1
-#define HAVE_STRINGS_H 1
-/* #undef HAVE_SYNCH_H */
-/* #undef HAVE_SYS_FPU_H */
 #define HAVE_SYS_IOCTL_H 1
-#define HAVE_SYS_IPC_H 1
-#define HAVE_SYS_MMAN_H 1
-/* #undef HAVE_SYS_PRCTL_H */
 #define HAVE_SYS_SELECT_H 1
-#define HAVE_SYS_SHM_H 1
 #define HAVE_SYS_SOCKET_H 1
-#define HAVE_SYS_STAT_H 1
 /* #undef HAVE_SYS_STREAM_H */
-#define HAVE_SYS_TIMEB_H 1
 #define HAVE_SYS_TYPES_H 1
 #define HAVE_SYS_UN_H 1
-/* #undef HAVE_SYSENT_H */
-/* #undef HAVE_TERMIO_H */
-#define HAVE_TERMIOS_H 1
 #define HAVE_UNISTD_H 1
-#define HAVE_UTIME_H 1
+/* #undef HAVE_UCONTEXT_H */
 
 /*
- * function definitions - processed in LibmysqlFunctions.txt
+ * function definitions - processed in LibmysqlFunctions.txt 
  */
-#define HAVE_ACCESS 1
-/* #undef HAVE_AIOWAIT */
-#define HAVE_ALARM 1
-/* #undef HAVE_ALLOCA */
-#define HAVE_BCMP 1
-/* #undef HAVE_BFILL */
-/* #undef HAVE_BMOVE */
-#define HAVE_BZERO 1
-/* #undef HAVE_CLOCK_GETTIME */
-/* #undef HAVE_COMPRESS */
-#define HAVE_CRYPT 1
+
 #define HAVE_DLERROR 1
 #define HAVE_DLOPEN 1
-#define HAVE_FCHMOD 1
-#define HAVE_FCNTL 1
-/* #undef HAVE_FCONVERT */
-/* #undef HAVE_FDATASYNC */
-#define HAVE_FESETROUND 1
-#define HAVE_FINITE 1
-#define HAVE_FSEEKO 1
-#define HAVE_FSYNC 1
-#define HAVE_GETADDRINFO 1
-#define HAVE_GETCWD 1
-/* #undef HAVE_GETHOSTBYADDR_R */
-/* #undef HAVE_GETHOSTBYNAME_R */
-/* #undef HAVE_GETHRTIME */
-#define HAVE_GETNAMEINFO 1
-#define HAVE_GETPAGESIZE 1
-#define HAVE_GETPASS 1
-/* #undef HAVE_GETPASSPHRASE */
-#define HAVE_GETPWNAM 1
 #define HAVE_GETPWUID 1
-#define HAVE_GETRLIMIT 1
-#define HAVE_GETRUSAGE 1
-#define HAVE_GETWD 1
-#define HAVE_GMTIME_R 1
-#define HAVE_INITGROUPS 1
-#define HAVE_LDIV 1
-#define HAVE_LOCALTIME_R 1
-#define HAVE_LOG2 1
-#define HAVE_LONGJMP 1
-#define HAVE_LSTAT 1
-#define HAVE_MADVISE 1
-/* #undef HAVE_MALLINFO */
-/* #undef HAVE_MEMALIGN */
 #define HAVE_MEMCPY 1
-#define HAVE_MEMMOVE 1
-#define HAVE_MKSTEMP 1
-#define HAVE_MLOCK 1
-#define HAVE_MLOCKALL 1
-#define HAVE_MMAP 1
-/* #undef HAVE_MMAP64 */
-#define HAVE_PERROR 1
 #define HAVE_POLL 1
-#define HAVE_PREAD 1
-/* #undef HAVE_PTHREAD_ATTR_CREATE */
-#define HAVE_PTHREAD_ATTR_GETSTACKSIZE 1
-/* #undef HAVE_PTHREAD_ATTR_SETPRIO */
-#define HAVE_PTHREAD_ATTR_SETSCHEDPARAM 1
-#define HAVE_PTHREAD_ATTR_SETSCOPE 1
-#define HAVE_PTHREAD_ATTR_SETSTACKSIZE 1
-/* #undef HAVE_PTHREAD_CONDATTR_CREATE */
-/* #undef HAVE_PTHREAD_INIT */
-#define HAVE_PTHREAD_KEY_DELETE 1
-#define HAVE_PTHREAD_KILL 1
-#define HAVE_PTHREAD_RWLOCK_RDLOCK 1
-/* #undef HAVE_PTHREAD_SETPRIO_NP */
-#define HAVE_PTHREAD_SETSCHEDPARAM 1
-#define HAVE_PTHREAD_SIGMASK 1
-/* #undef HAVE_PTHREAD_THREADMASK */
-#define HAVE_PTHREAD_YIELD_NP 1
-#define HAVE_READDIR_R 1
-#define HAVE_READLINK 1
-#define HAVE_REALPATH 1
-#define HAVE_RENAME 1
-#define HAVE_SCHED_YIELD 1
-#define HAVE_SELECT 1
-/* #undef HAVE_SETFD */
-/* #undef HAVE_SETFILEPOINTER */
-#define HAVE_SIGNAL 1
-#define HAVE_SIGACTION 1
-/* #undef HAVE_SIGTHREADMASK */
-#define HAVE_SIGWAIT 1
-#define HAVE_SLEEP 1
-#define HAVE_SNPRINTF 1
-#define HAVE_STPCPY 1
-#define HAVE_STRERROR 1
-#define HAVE_STRLCPY 1
-#define HAVE_STRNLEN 1
-#define HAVE_STRPBRK 1
-#define HAVE_STRSEP 1
-#define HAVE_STRSTR 1
-#define HAVE_STRTOK_R 1
-#define HAVE_STRTOL 1
-#define HAVE_STRTOLL 1
-#define HAVE_STRTOUL 1
-#define HAVE_STRTOULL 1
+/* #undef HAVE_STRTOK_R */
+/* #undef HAVE_STRTOL */
+/* #undef HAVE_STRTOLL */
+/* #undef HAVE_STRTOUL */
+/* #undef HAVE_STRTOULL */
 /* #undef HAVE_TELL */
 /* #undef HAVE_THR_SETCONCURRENCY */
 /* #undef HAVE_THR_YIELD */
-#define HAVE_VASPRINTF 1
-#define HAVE_VSNPRINTF 1
+/* #undef HAVE_VASPRINTF */
+/* #undef HAVE_VSNPRINTF */
+/* #undef HAVE_CUSERID */
 
 /*
  * types and sizes
  */
-/* Types we may use */
-#define SIZEOF_CHAR 1
-#ifdef SIZEOF_CHAR
-# define HAVE_CHAR 1
-#endif
 
-#define SIZEOF_CHARP 4
-#ifdef SIZEOF_CHARP
+
+#define SIZEOF_CHARP 8
+#if defined(SIZEOF_CHARP)
 # define HAVE_CHARP 1
 #endif
 
-#define SIZEOF_SHORT 2
-#ifdef SIZEOF_SHORT
-# define HAVE_SHORT 1
-#endif
 
 #define SIZEOF_INT 4
-#ifdef SIZEOF_INT
+#if defined(SIZEOF_INT)
 # define HAVE_INT 1
 #endif
 
-#define SIZEOF_LONG 4
-#ifdef SIZEOF_LONG
+#define SIZEOF_LONG 8
+#if defined(SIZEOF_LONG)
 # define HAVE_LONG 1
 #endif
 
 #define SIZEOF_LONG_LONG 8
-#ifdef SIZEOF_LONG_LONG
+#if defined(SIZEOF_LONG_LONG)
 # define HAVE_LONG_LONG 1
 #endif
 
-#define SIZEOF_OFF_T 8
-#ifdef SIZEOF_OFF_T
-# define HAVE_OFF_T 1
-#endif
 
-#define SIZEOF_SIGSET_T 4
-#ifdef SIZEOF_SIGSET_T
-# define HAVE_SIGSET_T 1
-#endif
-
-#define SIZEOF_SIZE_T 4
-#ifdef SIZEOF_SIZE_T
+#define SIZEOF_SIZE_T 8
+#if defined(SIZEOF_SIZE_T)
 # define HAVE_SIZE_T 1
 #endif
 
-/* #undef SIZEOF_UCHAR */
-#ifdef SIZEOF_UCHAR
-# define HAVE_UCHAR 1
-#endif
 
 #define SIZEOF_UINT 4
-#ifdef SIZEOF_UINT
+#if defined(SIZEOF_UINT)
 # define HAVE_UINT 1
 #endif
 
 /* #undef SIZEOF_ULONG */
-#ifdef SIZEOF_ULONG
+#if defined(SIZEOF_ULONG)
 # define HAVE_ULONG 1
 #endif
 
 /* #undef SIZEOF_INT8 */
-#ifdef SIZEOF_INT8
+#if defined(SIZEOF_INT8)
 # define HAVE_INT8 1
 #endif
 /* #undef SIZEOF_UINT8 */
-#ifdef SIZEOF_UINT8
+#if defined(SIZEOF_UINT8)
 # define HAVE_UINT8 1
 #endif
 
 /* #undef SIZEOF_INT16 */
-#ifdef SIZEOF_INT16
+#if defined(SIZEOF_INT16)
 # define HAVE_INT16 1
 #endif
 /* #undef SIZEOF_UINT16 */
-#ifdef SIZEOF_UINT16
+#if defined(SIZEOF_UINT16)
 # define HAVE_UINT16 1
 #endif
 
 /* #undef SIZEOF_INT32 */
-#ifdef SIZEOF_INT32
+#if defined(SIZEOF_INT32)
 # define HAVE_INT32 1
 #endif
 /* #undef SIZEOF_UINT32 */
-#ifdef SIZEOF_UINT32
+#if defined(SIZEOF_UINT32)
 # define HAVE_UINT32 1
 #endif
-/* #undef SIZEOF_U_INT32_T */
-#ifdef SIZEOF_U_INT32_T
-# define HAVE_U_INT32_T 1
-#endif
 
 /* #undef SIZEOF_INT64 */
-#ifdef SIZEOF_INT64
+#if defined(SIZEOF_INT64)
 # define HAVE_INT64 1
 #endif
 /* #undef SIZEOF_UINT64 */
-#ifdef SIZEOF_UINT64
+#if defined(SIZEOF_UINT64)
 # define HAVE_UINT64 1
 #endif
 
 /* #undef SIZEOF_SOCKLEN_T */
-#ifdef SIZEOF_SOCKLEN_T
+#if defined(SIZEOF_SOCKLEN_T)
 # define HAVE_SOCKLEN_T 1
 #endif
 
 #define SOCKET_SIZE_TYPE socklen_t
 
-#define RETSIGTYPE void
-#define RETQSORTTYPE void
+#define LOCAL_INFILE_MODE_OFF  0
+#define LOCAL_INFILE_MODE_ON   1
+#define LOCAL_INFILE_MODE_AUTO 2
+#define ENABLED_LOCAL_INFILE LOCAL_INFILE_MODE_AUTO
+
+#define MARIADB_DEFAULT_CHARSET "latin1"
 
-/*
- * various other defines
- */
-/* #undef HAVE_THREADS */
-#define SHAREDIR "share"
-#define DEFAULT_CHARSET_HOME "/usr/local"
diff --git a/external/mariadb-connector-c/configs/mariadb_version.h b/external/mariadb-connector-c/configs/mariadb_version.h
new file mode 100644
index 000000000000..7344982a6d29
--- /dev/null
+++ b/external/mariadb-connector-c/configs/mariadb_version.h
@@ -0,0 +1,38 @@
+/* Copyright Abandoned 1996, 1999, 2001 MySQL AB
+   This file is public domain and comes with NO WARRANTY of any kind */
+
+/* Version numbers for protocol & mysqld */
+
+#ifndef _mariadb_version_h_
+#define _mariadb_version_h_
+
+#ifdef _CUSTOMCONFIG_
+#include <custom_conf.h>
+#else
+#define PROTOCOL_VERSION		10
+#define MARIADB_CLIENT_VERSION_STR	"10.4.3"
+#define MARIADB_BASE_VERSION		"mariadb-10.4"
+#define MARIADB_VERSION_ID		100403
+#define MARIADB_PORT	        	3306
+#define MARIADB_UNIX_ADDR               "/tmp/mysql.sock"
+
+#define MYSQL_CONFIG_NAME               "my"
+#define MYSQL_VERSION_ID                100403
+#define MYSQL_SERVER_VERSION            "10.4.3-MariaDB"
+
+#define MARIADB_PACKAGE_VERSION "3.1.8"
+#define MARIADB_PACKAGE_VERSION_ID 30108
+#define MARIADB_SYSTEM_TYPE "Linux"
+#define MARIADB_MACHINE_TYPE "x86_64"
+#define MARIADB_PLUGINDIR "/usr/local/lib/mariadb/plugin"
+
+/* mysqld compile time options */
+#ifndef MYSQL_CHARSET
+#define MYSQL_CHARSET			""
+#endif
+#endif
+
+/* Source information */
+#define CC_SOURCE_REVISION ""
+
+#endif /* _mariadb_version_h_ */
diff --git a/external/mariadb-connector-c/configs/mysql_version.h b/external/mariadb-connector-c/configs/mysql_version.h
deleted file mode 100644
index 050e861b7b91..000000000000
--- a/external/mariadb-connector-c/configs/mysql_version.h
+++ /dev/null
@@ -1,28 +0,0 @@
-/* Copyright Abandoned 1996, 1999, 2001 MySQL AB
-   This file is public domain and comes with NO WARRANTY of any kind */
-
-/* Version numbers for protocol & mysqld */
-
-#ifdef _CUSTOMCONFIG_
-#include <custom_conf.h>
-#else
-#define PROTOCOL_VERSION 10
-#define MYSQL_CLIENT_VERSION "5.5.0"
-#define MYSQL_SERVER_VERSION "5.5.0"
-#define MYSQL_SERVER_SUFFIX ""
-#define FRM_VER
-#define MYSQL_VERSION_ID 50500
-#define MYSQL_PORT 3306
-#define MYSQL_UNIX_ADDR "/tmp/mysql.sock"
-#define MYSQL_CONFIG_NAME "my"
-
-#define MARIADB_PACKAGE_VERSION "1.1.2"
-#define MARIADB_SYSTEM_TYPE "Linux"
-#define MARIADB_MACHINE_TYPE "x86_64"
-
-/* mysqld compile time options */
-#ifndef MYSQL_CHARSET
-#define MYSQL_CHARSET ""
-#endif
-#endif
-
diff --git a/external/mariadb-connector-c/configs/wnt_ma_config.h b/external/mariadb-connector-c/configs/wnt_ma_config.h
new file mode 100644
index 000000000000..d06393509881
--- /dev/null
+++ b/external/mariadb-connector-c/configs/wnt_ma_config.h
@@ -0,0 +1,154 @@
+
+/*
+ * Include file constants (processed in LibmysqlIncludeFiles.txt 1
+ */
+/* #undef HAVE_OPENSSL_APPLINK_C */
+/* #undef HAVE_ALLOCA_H */
+/* #undef HAVE_BIGENDIAN */
+#define HAVE_SETLOCALE 1
+/* #undef HAVE_NL_LANGINFO */
+/* #undef HAVE_DLFCN_H */
+#define HAVE_FCNTL_H 1
+#define HAVE_FLOAT_H 1
+#define HAVE_LIMITS_H 1
+/* #undef HAVE_PWD_H */
+/* #undef HAVE_SELECT_H */
+#define HAVE_STDDEF_H 1
+/* #undef HAVE_STDINT_H */
+#define HAVE_STDLIB_H 1
+#define HAVE_STRING_H 1
+/* #undef HAVE_SYS_IOCTL_H */
+/* #undef HAVE_SYS_SELECT_H */
+/* #undef HAVE_SYS_SOCKET_H */
+/* #undef HAVE_SYS_STREAM_H */
+#define HAVE_SYS_TYPES_H 1
+/* #undef HAVE_SYS_UN_H */
+/* #undef HAVE_UNISTD_H */
+/* #undef HAVE_UCONTEXT_H */
+
+/*
+ * function definitions - processed in LibmysqlFunctions.txt 
+ */
+
+/* #undef HAVE_DLERROR */
+/* #undef HAVE_DLOPEN */
+/* #undef HAVE_GETPWUID */
+#define HAVE_MEMCPY 1
+/* #undef HAVE_POLL */
+/* #undef HAVE_STRTOK_R */
+#define HAVE_STRTOL 1
+/* #undef HAVE_STRTOLL */
+#define HAVE_STRTOUL 1
+/* #undef HAVE_STRTOULL */
+#define HAVE_TELL 1
+/* #undef HAVE_THR_SETCONCURRENCY */
+/* #undef HAVE_THR_YIELD */
+/* #undef HAVE_VASPRINTF */
+#define HAVE_VSNPRINTF 1
+/* #undef HAVE_CUSERID */
+
+/*
+ * types and sizes
+ */
+
+
+#ifdef _M_X64
+#define SIZEOF_CHARP 8
+#else
+#define SIZEOF_CHARP 4
+#endif
+#if defined(SIZEOF_CHARP)
+# define HAVE_CHARP 1
+#endif
+
+
+#define SIZEOF_INT 4
+#if defined(SIZEOF_INT)
+# define HAVE_INT 1
+#endif
+
+#define SIZEOF_LONG 4
+#if defined(SIZEOF_LONG)
+# define HAVE_LONG 1
+#endif
+
+#ifdef _M_X64
+#define SIZEOF_LONG_LONG 8
+#else
+#define SIZEOF_LONG_LONG 4
+#endif
+#if defined(SIZEOF_LONG_LONG)
+# define HAVE_LONG_LONG 1
+#endif
+
+
+#ifdef _M_X64
+#define SIZEOF_SIZE_T 8
+#else
+#define SIZEOF_SIZE_T 4
+#endif
+#if defined(SIZEOF_SIZE_T)
+# define HAVE_SIZE_T 1
+#endif
+
+
+/* #undef SIZEOF_UINT */
+#if defined(SIZEOF_UINT)
+# define HAVE_UINT 1
+#endif
+
+/* #undef SIZEOF_ULONG */
+#if defined(SIZEOF_ULONG)
+# define HAVE_ULONG 1
+#endif
+
+/* #undef SIZEOF_INT8 */
+#if defined(SIZEOF_INT8)
+# define HAVE_INT8 1
+#endif
+/* #undef SIZEOF_UINT8 */
+#if defined(SIZEOF_UINT8)
+# define HAVE_UINT8 1
+#endif
+
+/* #undef SIZEOF_INT16 */
+#if defined(SIZEOF_INT16)
+# define HAVE_INT16 1
+#endif
+/* #undef SIZEOF_UINT16 */
+#if defined(SIZEOF_UINT16)
+# define HAVE_UINT16 1
+#endif
+
+/* #undef SIZEOF_INT32 */
+#if defined(SIZEOF_INT32)
+# define HAVE_INT32 1
+#endif
+/* #undef SIZEOF_UINT32 */
+#if defined(SIZEOF_UINT32)
+# define HAVE_UINT32 1
+#endif
+
+/* #undef SIZEOF_INT64 */
+#if defined(SIZEOF_INT64)
+# define HAVE_INT64 1
+#endif
+/* #undef SIZEOF_UINT64 */
+#if defined(SIZEOF_UINT64)
+# define HAVE_UINT64 1
+#endif
+
+/* #undef SIZEOF_SOCKLEN_T */
+#if defined(SIZEOF_SOCKLEN_T)
+# define HAVE_SOCKLEN_T 1
+#endif
+
+#define SOCKET_SIZE_TYPE int
+
+#define LOCAL_INFILE_MODE_OFF  0
+#define LOCAL_INFILE_MODE_ON   1
+#define LOCAL_INFILE_MODE_AUTO 2
+#define ENABLED_LOCAL_INFILE LOCAL_INFILE_MODE_AUTO
+
+#define MARIADB_DEFAULT_CHARSET "latin1"
+
diff --git a/external/mariadb-connector-c/mariadb-CONC-104.patch.1 b/external/mariadb-connector-c/mariadb-CONC-104.patch.1
deleted file mode 100644
index cba9fbba339d..000000000000
--- a/external/mariadb-connector-c/mariadb-CONC-104.patch.1
+++ /dev/null
@@ -1,49 +0,0 @@
---- mariadb/include/errmsg.h	2014-04-04 12:21:01.000000000 +0200
-+++ mariadb/include/errmsg.h	2014-09-17 17:47:25.000000000 +0200
-@@ -66,6 +66,7 @@
- #define CR_PARAMS_NOT_BOUND     2031
- #define CR_INVALID_PARAMETER_NO  2034
- #define CR_UNSUPPORTED_PARAM_TYPE 2036
-+#define CR_SECURE_AUTH          2049
- #define CR_NO_DATA              2051
- #define CR_NO_STMT_METADATA     2052
- #define CR_NOT_IMPLEMENTED      2054
---- mariadb/libmariadb/errmsg.c	2014-04-04 12:21:01.000000000 +0200
-+++ mariadb/libmariadb/errmsg.c	2014-09-17 17:48:44.000000000 +0200
-@@ -129,7 +129,7 @@
- /* 2046 */  "",
- /* 2047 */  "",
- /* 2048 */  "",
--/* 2049 */  "",
-+/* 2049 */  "Connection with old authentication protocol refused.",
- /* 2050 */  "",
- /* 2051 */  "",
- /* 2052 */  "Prepared statement contains no metadata",
---- mariadb/libmariadb/libmariadb.c	2014-04-04 12:21:01.000000000 +0200
-+++ mariadb/libmariadb/libmariadb.c	2014-09-17 17:56:13.000000000 +0200
-@@ -1864,7 +1864,14 @@
-       scramble_plugin= native_password_plugin_name;
-     }
-   } else
-+  {
-     mysql->server_capabilities&= ~CLIENT_SECURE_CONNECTION;
-+    if (mysql->options.secure_auth)
-+    {
-+      SET_CLIENT_ERROR(mysql, CR_SECURE_AUTH, unknown_sqlstate, 0);
-+      goto error;
-+    }
-+  }
- 
-   /* Set character set */
-   if (mysql->options.charset_name)
-@@ -3031,7 +3038,9 @@
-       }
-     }
-     break;
--
-+  case MYSQL_SECURE_AUTH:
-+    mysql->options.secure_auth= *(my_bool *)arg1;
-+    break;
-   default:
-     va_end(ap);
-     DBUG_RETURN(-1);
diff --git a/external/mariadb-connector-c/mariadb-inline.patch.1 b/external/mariadb-connector-c/mariadb-inline.patch.1
deleted file mode 100644
index 84ebc814069e..000000000000
--- a/external/mariadb-connector-c/mariadb-inline.patch.1
+++ /dev/null
@@ -1,23 +0,0 @@
-diff -ur mariadb.org/libmariadb/hash.c mariadb/libmariadb/hash.c
---- mariadb.org/libmariadb/hash.c	2014-09-03 14:57:29.000000000 +0200
-+++ mariadb/libmariadb/hash.c	2014-09-03 14:59:09.000000000 +0200
-@@ -94,7 +94,7 @@
-   handle inline functions that are not defined as native types
- */
- 
--inline char*
-+uchar*
- hash_key(HASH *hash,const uchar *record,uint *length,my_bool first)
- {
-   if (hash->get_key)
-@@ -191,9 +191,6 @@
- #endif
- 
- 
--#ifndef __SUNPRO_C				/* SUNPRO can't handle this */
--inline
--#endif
- unsigned int rec_hashnr(HASH *hash,const uchar *record)
- {
-   uint length;
-
diff --git a/external/mariadb-connector-c/mariadb-msvc.patch.1 b/external/mariadb-connector-c/mariadb-msvc.patch.1
deleted file mode 100644
index b88f00f8d309..000000000000
--- a/external/mariadb-connector-c/mariadb-msvc.patch.1
+++ /dev/null
@@ -1,13 +0,0 @@
---- mariadb/libmariadb/my_pthread.c.orig	2013-04-17 15:45:52.025896770 +0200
-+++ mariadb/libmariadb/my_pthread.c	2013-04-17 15:47:32.292895908 +0200
-@@ -28,6 +28,10 @@
- 
- #ifdef _WIN32
- 
-+#ifndef ETIMEDOUT  /* does not exist MSVC 2008 but was added in MSVC 2010 */
-+#define ETIMEDOUT 145
-+#endif
-+
- int 
- pthread_cond_init (pthread_cond_t *cv, const pthread_condattr_t *attr)
- {
diff --git a/external/mariadb-connector-c/mariadb-swap.patch b/external/mariadb-connector-c/mariadb-swap.patch
deleted file mode 100644
index bfada2d2c4a6..000000000000
--- a/external/mariadb-connector-c/mariadb-swap.patch
+++ /dev/null
@@ -1,24 +0,0 @@
---- mariadb/include/global.h	2013-03-06 17:06:42.545906061 +0100
-+++ mariadb/include/global.h	2013-03-07 14:45:03.811128674 +0100
-@@ -247,7 +247,9 @@
- #endif
- 
- #define sgn(a)		(((a) < 0) ? -1 : ((a) > 0) ? 1 : 0)
-+#ifndef __cplusplus
- #define swap(t,a,b)	{ register t dummy; dummy = a; a = b; b = dummy; }
-+#endif
- #define test(a)		((a) ? 1 : 0)
- #define set_if_bigger(a,b)  { if ((a) < (b)) (a)=(b); }
- #define set_if_smaller(a,b) { if ((a) > (b)) (a)=(b); }
---- mariadb/include/my_global.h	2013-03-06 17:06:42.546906037 +0100
-+++ mariadb/include/my_global.h	2013-03-07 14:44:47.032529753 +0100
-@@ -278,7 +278,9 @@
- #endif
- 
- #define sgn(a)		(((a) < 0) ? -1 : ((a) > 0) ? 1 : 0)
-+#ifndef __cplusplus
- #define swap(t,a,b)	{ register t dummy; dummy = a; a = b; b = dummy; }
-+#endif
- #define test(a)		((a) ? 1 : 0)
- #define set_if_bigger(a,b)  { if ((a) < (b)) (a)=(b); }
- #define set_if_smaller(a,b) { if ((a) > (b)) (a)=(b); }
diff --git a/solenv/clang-format/blacklist b/solenv/clang-format/blacklist
index 09e0c490d1f6..7da33503d52c 100644
--- a/solenv/clang-format/blacklist
+++ b/solenv/clang-format/blacklist
@@ -4555,7 +4555,8 @@ external/clucene/configs/clucene-config-generic.h
 external/libpng/configs/pnglibconf.h
 external/mariadb-connector-c/configs/linux_my_config.h
 external/mariadb-connector-c/configs/mac_my_config.h
-external/mariadb-connector-c/configs/mysql_version.h
+external/mariadb-connector-c/configs/wnt_ma_config.h
+external/mariadb-connector-c/configs/mariadb_version.h
 external/neon/configs/config.h
 external/redland/raptor/raptor2.h
 external/redland/raptor/raptor_config.h
diff --git a/solenv/flatpak-manifest.in b/solenv/flatpak-manifest.in
index a22d5f578b0a..cb766aa303ea 100644
--- a/solenv/flatpak-manifest.in
+++ b/solenv/flatpak-manifest.in
@@ -339,10 +339,10 @@
                     "dest-filename": "external/tarballs/26b3e95ddf3d9c077c480ea45874b3b8-lp_solve_5.5.tar.gz"
                 },
                 {
-                    "url": "https://dev-www.libreoffice.org/src/a233181e03d3c307668b4c722d881661-mariadb_client-2.0.0-src.tar.gz",
-                    "sha256": "fd2f751dea049c1907735eb236aeace1d811d6a8218118b00bbaa9b84dc5cd60",
+                    "url": "https://dev-www.libreoffice.org/src/mariadb-connector-c-3.1.8-src.tar.gz",
+                    "sha256": "431434d3926f4bcce2e5c97240609983f60d7ff50df5a72083934759bb863f7b",
                     "type": "file",
-                    "dest-filename": "external/tarballs/a233181e03d3c307668b4c722d881661-mariadb_client-2.0.0-src.tar.gz"
+                    "dest-filename": "external/tarballs/mariadb-connector-c-3.1.8-src.tar.gz"
                 },
                 {
                     "url": "https://dev-www.libreoffice.org/src/mdds-1.4.3.tar.bz2",
commit 7b28446c2b49e7315a7633cf6c9aae32c27dc4af
Author:     Michael Stahl <Michael.Stahl at cib.de>
AuthorDate: Tue Jun 30 11:17:12 2020 +0200
Commit:     Michael Stahl <Michael.Stahl at cib.de>
CommitDate: Tue Jun 30 14:03:51 2020 +0200

    suppress liblangtag -Werror=format=2
    
    Change-Id: Ib95cc6a5994a678f5e82695e0be1e78c461c3a7f

diff --git a/external/liblangtag/ExternalProject_liblangtag.mk b/external/liblangtag/ExternalProject_liblangtag.mk
index 3fb5618f7fc1..1542381c792e 100644
--- a/external/liblangtag/ExternalProject_liblangtag.mk
+++ b/external/liblangtag/ExternalProject_liblangtag.mk
@@ -28,6 +28,7 @@ $(call gb_ExternalProject_get_state_target,liblangtag,build):
 			--enable-shared --disable-static) \
 		$(if $(verbose),--disable-silent-rules,--enable-silent-rules) \
 		$(if $(filter TRUE,$(HAVE_GCC_BUILTIN_ATOMIC)),"lt_cv_has_atomic=yes","lt_cv_has_atomic=no") \
+		--enable-compile-warnings=minimum \
 		CFLAGS='$(CFLAGS) \
 				$(if $(ENABLE_OPTIMIZED), \
 					$(gb_COMPILEROPTFLAGS),$(gb_COMPILERNOOPTFLAGS)) \
commit 7d95ee9af433798d5b5eea0dcfd8d9a867420196
Author:     Stephan Bergmann <sbergman at redhat.com>
AuthorDate: Tue Jun 11 11:56:33 2019 +0200
Commit:     Michael Stahl <Michael.Stahl at cib.de>
CommitDate: Tue Jun 30 14:03:51 2020 +0200

    external/libmspub: missing include
    
    Change-Id: I446b26b3c0ffd0d62178f374b570c9fbd1885dd4
    Reviewed-on: https://gerrit.libreoffice.org/73813
    Tested-by: Jenkins
    Reviewed-by: Stephan Bergmann <sbergman at redhat.com>
    (cherry picked from commit d0e38b8f1efc6a0b2b519ce1f82a83c5766f5633)

diff --git a/external/libmspub/UnpackedTarball_libmspub.mk b/external/libmspub/UnpackedTarball_libmspub.mk
index f337d402d47f..1451f723e316 100644
--- a/external/libmspub/UnpackedTarball_libmspub.mk
+++ b/external/libmspub/UnpackedTarball_libmspub.mk
@@ -15,6 +15,7 @@ $(eval $(call gb_UnpackedTarball_set_patchlevel,libmspub,0))
 
 $(eval $(call gb_UnpackedTarball_add_patches,libmspub,\
     external/libmspub/ubsan.patch \
+    external/libmspub/stdint.patch \
 ))
 
 $(eval $(call gb_UnpackedTarball_update_autoconf_configs,libmspub))
diff --git a/external/libmspub/stdint.patch b/external/libmspub/stdint.patch
new file mode 100644
index 000000000000..61f1dd122904
--- /dev/null
+++ b/external/libmspub/stdint.patch
@@ -0,0 +1,10 @@
+--- src/lib/MSPUBMetaData.h
++++ src/lib/MSPUBMetaData.h
+@@ -13,6 +13,7 @@
+ #include <map>
+ #include <utility>
+ #include <vector>
++#include <stdint.h>
+ 
+ #include <librevenge/librevenge.h>
+ 
commit 20b2fd6dfb3be3b176ac3e01213c7257f1474cae
Author:     Stephan Bergmann <sbergman at redhat.com>
AuthorDate: Fri Dec 6 16:36:01 2019 +0100
Commit:     Michael Stahl <Michael.Stahl at cib.de>
CommitDate: Tue Jun 30 14:03:51 2020 +0200

    Adapt o3tl::span to P1872R0
    
    ..."span should have size_type, not index_type"
    (<http://www.open-std.org/jtc1/sc22/wg21/docs/papers/2019/p1872r0.pdf>), as
    implemented by libc++ since <https://github.com/llvm/llvm-project/commit/
    1466335cf4b2854a0be1defcf279fe50772bad6f> "[libc++][P1872] span should have
    size_type, not index_type."
    
    All uses of index_type had been added to mitigate the previous std::span change
    from signed (ptrdiff_t) to unsigned (size_t) index_type, see
    6ef8420fdbf8dff16de13147c5ab833bc5e01121 "Adapt o3tl::span to updated C++2a
    std::span".  There is no easy solution to transparently support all three
    std::span variants currently out there (signed index_type, unsigned index_type,
    unsigned size_type), without causing compilation failures due to
    CPPUNIT_ASSERT_EQUAL with arguments of different types, or compiler warnings
    about mixed signed/unsigned comparisons.  So rule out the oldest std::span
    variant (signed index_type) in configure.ac (so that o3tl::span will use its
    own hand-rolled code in that case) and simplify the uses of index_type to
    std::size_t (as had already been mentioned in
    6ef8420fdbf8dff16de13147c5ab833bc5e01121).
    
    Reviewed-on: https://gerrit.libreoffice.org/84652
    Tested-by: Jenkins
    Reviewed-by: Stephan Bergmann <sbergman at redhat.com>
    (cherry picked from commit 8e6865188242bccb3d8aa857ddc990d72a058d3d)
    Reviewed-on: https://gerrit.libreoffice.org/c/core/+/87757
    Reviewed-by: Caolán McNamara <caolanm at redhat.com>
    (cherry picked from commit bb9833594b031c6d0ec91422f85968c4b1f2f8bc)
    
    Change-Id: I6ddf424ffb7941da3f69ad66fd29ecd35f09afae

diff --git a/config_host/config_global.h.in b/config_host/config_global.h.in
index 2e986fbe24b6..0b44ad05373e 100644
--- a/config_host/config_global.h.in
+++ b/config_host/config_global.h.in
@@ -24,6 +24,9 @@ Any change in this header will cause a rebuild of almost everything.
 /* Guaranteed copy elision (C++17), __cpp_guaranteed_copy_elision (C++2a): */
 #define HAVE_CPP_GUARANTEED_COPY_ELISION 0
 
+// Useable C++2a <span>:
+#define HAVE_CPP_SPAN 0
+
 /* GCC bug <https://gcc.gnu.org/bugzilla/show_bug.cgi?id=87150> "move ctor wrongly chosen in return
    stmt (derived vs. base)": */
 #define HAVE_GCC_BUG_87150 0
diff --git a/configure.ac b/configure.ac
index c1ffc25ecf44..df7094a8145c 100644
--- a/configure.ac
+++ b/configure.ac
@@ -6771,6 +6771,22 @@ AC_COMPILE_IFELSE([AC_LANG_SOURCE([
 CXXFLAGS=$save_CXXFLAGS
 AC_LANG_POP([C++])
 
+AC_MSG_CHECKING([whether $CXX supports C++2a <span> with unsigned size_type])
+AC_LANG_PUSH([C++])
+save_CXXFLAGS=$CXXFLAGS
+CXXFLAGS="$CXXFLAGS $CXXFLAGS_CXX11"
+AC_COMPILE_IFELSE([AC_LANG_SOURCE([
+        #include <span>
+        #include <type_traits>
+        // Don't check size_type directly, as it was called index_type before P1872R0:
+        void f(std::span<int> s) { static_assert(std::is_unsigned_v<decltype(s.size())>); };
+    ])], [
+        AC_DEFINE([HAVE_CPP_SPAN],[1])
+        AC_MSG_RESULT([yes])
+    ], [AC_MSG_RESULT([no])])
+CXXFLAGS=$save_CXXFLAGS
+AC_LANG_POP([C++])
+
 AC_MSG_CHECKING([whether $CXX has GCC bug 87150])
 AC_LANG_PUSH([C++])
 save_CXXFLAGS=$CXXFLAGS
diff --git a/include/o3tl/span.hxx b/include/o3tl/span.hxx
index 1618b86df897..b19d2d847ac7 100644
--- a/include/o3tl/span.hxx
+++ b/include/o3tl/span.hxx
@@ -12,7 +12,9 @@
 
 #include <sal/config.h>
 
-#if __has_include(<span>)
+#include <config_global.h>
+
+#if HAVE_CPP_SPAN
 
 #include <span>
 
@@ -40,7 +42,7 @@ public:
     using iterator = pointer;
     using const_reverse_iterator = std::reverse_iterator<const_iterator>;
     using reverse_iterator = std::reverse_iterator<iterator>;
-    using index_type = std::size_t;
+    using size_type = std::size_t;
     using difference_type = std::ptrdiff_t;
 
     constexpr span() noexcept : data_(nullptr), size_(0) {}
@@ -48,7 +50,7 @@ public:
     template<std::size_t N>
     constexpr span (T (&a)[N]) noexcept : data_(a), size_(N) {}
 
-    constexpr span (T *a, index_type len) noexcept
+    constexpr span (T *a, size_type len) noexcept
         : data_(a), size_(len)
     {
         // not terribly sure about this, might need to strengthen it
@@ -72,9 +74,9 @@ public:
     { return rbegin(); }
     constexpr const_reverse_iterator crend() const noexcept { return rend(); }
 
-    constexpr index_type size() const noexcept { return size_; }
+    constexpr size_type size() const noexcept { return size_; }
 
-    constexpr reference operator [](index_type pos) const {
+    constexpr reference operator [](size_type pos) const {
         assert(pos < size());
         return data_[pos];
     }
@@ -83,7 +85,7 @@ public:
 
 private:
     pointer    data_;
-    index_type size_;
+    size_type size_;
 };
 
 } // namespace o3tl
diff --git a/o3tl/qa/test-span.cxx b/o3tl/qa/test-span.cxx
index 7ec67fa7fd91..3cb78ace1db2 100644
--- a/o3tl/qa/test-span.cxx
+++ b/o3tl/qa/test-span.cxx
@@ -9,6 +9,7 @@
 
 #include <sal/config.h>
 
+#include <cstddef>
 #include <utility>
 
 #include <cppunit/TestAssert.h>
@@ -42,7 +43,7 @@ private:
         CPPUNIT_ASSERT_EQUAL(3, *v.crbegin());
         CPPUNIT_ASSERT_EQUAL(
             o3tl::span<int>::difference_type(3), v.crend() - v.crbegin());
-        CPPUNIT_ASSERT_EQUAL(o3tl::span<int>::index_type(3), v.size());
+        CPPUNIT_ASSERT_EQUAL(std::size_t(3), v.size());
         CPPUNIT_ASSERT(!v.empty());
         CPPUNIT_ASSERT_EQUAL(2, v[1]);
         CPPUNIT_ASSERT_EQUAL(1, *v.data());
@@ -52,8 +53,8 @@ private:
             o3tl::span<int const> v1( d1 );
             o3tl::span<int const> v2( d2 );
             std::swap(v1, v2);
-            CPPUNIT_ASSERT_EQUAL(o3tl::span<int>::index_type(4), v1.size());
-            CPPUNIT_ASSERT_EQUAL(o3tl::span<int>::index_type(2), v2.size());
+            CPPUNIT_ASSERT_EQUAL(std::size_t(4), v1.size());
+            CPPUNIT_ASSERT_EQUAL(std::size_t(2), v2.size());
         }
     }
 };
diff --git a/sfx2/source/control/dispatch.cxx b/sfx2/source/control/dispatch.cxx
index 702e6064f157..c3f3ad60c10c 100644
--- a/sfx2/source/control/dispatch.cxx
+++ b/sfx2/source/control/dispatch.cxx
@@ -20,6 +20,7 @@
 #include <config_features.h>
 
 #include <algorithm>
+#include <cstddef>
 #include <deque>
 #include <vector>
 
@@ -1547,7 +1548,7 @@ void SfxDispatcher::SetSlotFilter(SfxSlotFilterState nEnable,
 {
 #ifdef DBG_UTIL
     // Check Array
-    for ( o3tl::span<sal_uInt16 const>::index_type n = 1; n < pSIDs.size(); ++n )
+    for ( std::size_t n = 1; n < pSIDs.size(); ++n )
         DBG_ASSERT( pSIDs[n] > pSIDs[n-1], "SetSlotFilter: SIDs not sorted" );
 #endif
 
commit 0ce12e1384f9dd456cd665061b9751e50eb1be63
Author:     Stephan Bergmann <sbergman at redhat.com>
AuthorDate: Mon Apr 20 11:40:24 2020 +0200
Commit:     Michael Stahl <Michael.Stahl at cib.de>
CommitDate: Tue Jun 30 14:03:51 2020 +0200

    Add --with-latest-c++ to explicitly opt in for -std=c++20/-std:c++latest
    
    Adaptation of this change to this branch. The point is to avoid
    compiling as C++2a as the code for externals has not been patched
    properly for that here. Here is the original commit message even if I
    assume it is a bit misleading in this branch:
    
    cd472d1d8489f30797f47d3f6dafede28c1feb90 "Compile as C++2a, where available" had
    started to unconditionally check for support of -std=c++2a (and later also
    -std=c++20) for Clang and GCC, but that can cause occasional issues especially
    for Linux distros, see e.g. 55c724b93dfd4c9a1afb10d60fbc2d7a9a66cf61 "replace
    boost::bimap in sdext pdfimport" or
    <https://bugzilla.redhat.com/show_bug.cgi?id=1818723>
    "/usr/include/boost/format/alt_sstream_impl.hpp incompatible with -std=c++20
    (std::allocator::allocate hint argument)" (where
    677c8de4fa79cd9b278b142013ba7f1c9e4e41c3 "external/boost: Adapt to
    std::allocator parts removed in C++20" is not picked up due to
    --with-system-boost).
    
    So better require an explicit opt-in via a new --with-latest-c++.  And while at
    it, also make that enable -std:c++latest for MSVC.
    
    Change-Id: I2d1f03144fad9a7884562e56b1b76cab5eb8f080
    Reviewed-on: https://gerrit.libreoffice.org/c/core/+/92555
    Tested-by: Jenkins
    Reviewed-by: Stephan Bergmann <sbergman at redhat.com>
    Reviewed-on: https://gerrit.libreoffice.org/c/core/+/93204
    Tested-by: Jenkins CollaboraOffice <jenkinscollaboraoffice at gmail.com>
    Reviewed-by: Tor Lillqvist <tml at collabora.com>
    Reviewed-on: https://gerrit.libreoffice.org/c/core/+/93692
    Tested-by: Tor Lillqvist <tml at collabora.com>
    (cherry picked from commit f0b74640137f07ed74027f98fbf6d1c0d98939bf)

diff --git a/configure.ac b/configure.ac
index 8c251fb31e1a..c1ffc25ecf44 100644
--- a/configure.ac
+++ b/configure.ac
@@ -2130,6 +2130,12 @@ libo_FUZZ_ARG_WITH(lxml,
          report widget classes and ids.]),
 ,)
 
+libo_FUZZ_ARG_WITH(latest-c++,
+    AS_HELP_STRING([--with-latest-c++],
+        [Try to enable the latest features of the C++ compiler, even if they are not yet part of a
+         published standard.]),,
+        [$with_latest_c__=no])
+
 dnl ===================================================================
 dnl Branding
 dnl ===================================================================
@@ -6441,9 +6447,17 @@ dnl ===================================================================
 AC_MSG_CHECKING([whether $CXX supports C++17])
 CXXFLAGS_CXX11=
 if test "$COM" = MSC -a "$COM_IS_CLANG" != TRUE; then
-    CXXFLAGS_CXX11='-std:c++17 -Zc:__cplusplus'
+    if test "$with_latest_c__" = yes; then
+        CXXFLAGS_CXX11=-std:c++latest
+    else
+        CXXFLAGS_CXX11=-std:c++17
+    fi
+    CXXFLAGS_CXX11="$CXXFLAGS_CXX11 -Zc:__cplusplus"
 elif test "$GCC" = "yes" -o "$COM_IS_CLANG" = TRUE; then
-    my_flags='-std=c++2a -std=c++17 -std=c++1z'
+    my_flags='-std=c++17 -std=c++1z'
+    if test "$with_latest_c__" = yes; then
+        my_flags="-std=gnu++2a -std=c++2a $my_flags"
+    fi
     for flag in $my_flags; do
         if test "$COM" = MSC; then
             flag="-Xclang $flag"
commit 7aa7729babe9d9c0a3268ea6b40c012cba4433ae
Author:     Stephan Bergmann <sbergman at redhat.com>
AuthorDate: Sun Oct 20 14:42:56 2019 +0200
Commit:     Michael Stahl <Michael.Stahl at cib.de>
CommitDate: Tue Jun 30 14:03:51 2020 +0200

    We do not need a C++ GNU dialect
    
    1cf7ab61a71d4b7295942ff5c855896e60c15081 "use -std=gnu++0x rather than
    -std=c++0x" appears to have started this, but the only rationale it gives is
    that it keeps things in sync with GCC's default behavior when no -std= is given.
    But it apparently works fine to build with a -std=c++... standard dialect.
    
    This allows to get rid of the check introduced with
    50cd28e5728b6a64c1e605567540739ea6ef42ca "Ensure configuration that defines
    math_errhandling in <cmath>".
    
    (It kept bothering me to say "I observe this-and-this with -std=c++2a" when what
    configure.ac made me actually use was -std=gnu++2a.  And truthfully saying
    "-std=gnu++2a" would have been a distraction, as what is relevant for such an
    observation is most likely the "2a" and not the "gnu" part.)
    
    Change-Id: I7c213a702ffb7df6f4c2c4a421008e30e2712a51
    Reviewed-on: https://gerrit.libreoffice.org/81176
    Tested-by: Jenkins
    Reviewed-by: Luboš Luňák <l.lunak at collabora.com>
    (cherry picked from commit a9f77e87f3e6ca3333bbb16dec5456f3bf2903b8)

diff --git a/configure.ac b/configure.ac
index 5d328a481440..8c251fb31e1a 100644
--- a/configure.ac
+++ b/configure.ac
@@ -6443,7 +6443,7 @@ CXXFLAGS_CXX11=
 if test "$COM" = MSC -a "$COM_IS_CLANG" != TRUE; then
     CXXFLAGS_CXX11='-std:c++17 -Zc:__cplusplus'
 elif test "$GCC" = "yes" -o "$COM_IS_CLANG" = TRUE; then
-    my_flags='-std=gnu++2a -std=c++2a -std=gnu++17 -std=gnu++1z -std=c++17 -std=c++1z'
+    my_flags='-std=c++2a -std=c++17 -std=c++1z'
     for flag in $my_flags; do
         if test "$COM" = MSC; then
             flag="-Xclang $flag"
@@ -6486,7 +6486,6 @@ elif test "$GCC" = "yes" -o "$COM_IS_CLANG" = TRUE; then
         ])
         AC_COMPILE_IFELSE([AC_LANG_PROGRAM([[
             #include <algorithm>
-            #include <cmath>
             #include <functional>
             #include <vector>
 
@@ -6506,13 +6505,6 @@ elif test "$GCC" = "yes" -o "$COM_IS_CLANG" = TRUE; then
             void f(std::vector<int> & v, std::function<bool(int, int)> fn) {
                 std::sort(v.begin(), v.end(), fn);
             }
-
-            // At least with glibc-headers-2.28-26.fc29.x86_64, when building for Linux x86 32-bit
-            // (via -m32) and passed-in CXXFLAGS setting -O1 (or higher; overriding -Os as set in
-            // solenv/gbuild/platform/LINUX_INTEL_GCC.mk), std=gnu* would cause math_errhandling to
-            // get undef'ed in /usr/include/bits/mathinline.h, while std=c* keeps it defined (as
-            // needed by sc/source/core/tool/math.cxx):
-            int g() { return math_errhandling; }
             ]])],[CXXFLAGS_CXX11=$flag $my_float128hack])
         AC_LANG_POP([C++])
         CXXFLAGS=$save_CXXFLAGS
commit 1e2d5383489cb1d53a1bbfaec777461994c73b64
Author:     Michael Stahl <Michael.Stahl at cib.de>
AuthorDate: Tue Jun 30 14:01:45 2020 +0200
Commit:     Michael Stahl <Michael.Stahl at cib.de>
CommitDate: Tue Jun 30 14:03:51 2020 +0200

    sfx2: missing include
    
    Change-Id: I72e2a14cb38725fe990c9489e845cd8261e5994c

diff --git a/sfx2/source/appl/appserv.cxx b/sfx2/source/appl/appserv.cxx
index e5c050b62860..4fd6ff51c9ea 100644
--- a/sfx2/source/appl/appserv.cxx
+++ b/sfx2/source/appl/appserv.cxx
@@ -72,6 +72,7 @@
 #include <svtools/ehdl.hxx>
 #include <vcl/help.hxx>
 #include <vcl/stdtext.hxx>
+#include <vcl/settings.hxx>
 #include <rtl/ustrbuf.hxx>
 #include <sal/log.hxx>
 #include <osl/file.hxx>


More information about the Libreoffice-commits mailing list