office-gobmx/external/mariadb-connector-c
Stephan Bergmann 65ed581fc1 clang-cl: Don't define "const" away in external/mariadb-connector-c
Mimicing MSCV, clang-cl doesn't predefine __STDC__
(InitializeStandardPredefinedMacros in clang/lib/Frontend/InitPreprocessor.cpp)
when LangOpts.MSVCCompat aka -fms-compatibility is set, which it is by default
for clang-cl (Clang::ConstructJob in clang/lib/Driver/ToolChains/Clang.cpp).

But clang-cl still needs to be called with /FIIntrin.h to preload declarations
of intrinsics from the Clang-provided Intrin.h, some of which like

  unsigned char _bittest(long const *, long);

both make use of "const" (which isn't defined away because the file is loaded so
early) and are duplicated in the system-provided winnt.h---where the "const"
/is/ defined away when that header is included later, causing "conflicting
types" errors.

("Real" MSVC also runs into the #if defining "const" away, but it seems it
happens to not have bad consequences there.)

Change-Id: Ice92a059330bd945f8a3d9e5fa1635a01d08ad8b
Reviewed-on: https://gerrit.libreoffice.org/60321
Tested-by: Jenkins
Reviewed-by: Stephan Bergmann <sbergman@redhat.com>
2018-09-11 22:59:24 +02:00
..
configs
clang-cl.patch.0
Makefile
mariadb-CONC-104.patch.1
mariadb-inline.patch.1
mariadb-msvc.patch.1
mariadb-swap.patch
Module_mariadb-connector-c.mk
README
StaticLibrary_mariadb-connector-c.mk
UnpackedTarball_mariadb-connector-c.mk

Update to new upstream bzr snapshot:

Don't use 'bzr diff', it will not put renames in the diff in a way
that patch understands.

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

regenerate configs