summaryrefslogtreecommitdiff
path: root/external
diff options
context:
space:
mode:
authorTor Lillqvist <tml@collabora.com>2018-05-16 18:08:59 +0300
committerTor Lillqvist <tml@collabora.com>2018-05-31 21:36:26 +0300
commitbca5abfdd56cecfaf500d4f8fa0a2b015f034e06 (patch)
tree27a874cb8eb2716b1c1151004ebe8334881a4657 /external
parent0f106de7dceaa8e48a53b014dbd58e15837e577d (diff)
Don't ever attempt to initialise a std::locale with a UTF-8 locale on Windows
As I said in 2ff121f298e64ff204621220622472fe697d599d, passing a POSIX-style locale name to the std::locale constructor on Windows is decidedly odd, and apparently boost adds insult to injury by even really attempting to use a UTF-8 one if that is what our code thinks it wants. Or something. This commit avoids the ton of "warn:unotools.i18n:7996:3544:unotools/source/i18n/resmgr.cxx:123: CRT Report Hook: ASSERT: f:\dd\vctools\crt\crtw32\stdcpp\xmbtowc.c(89) : Assertion failed: ploc->_Mbcurmax == 1 || ploc->_Mbcurmax == 2" we otherwise get when built with --enable-dbgutil and a current VS2015 (or 2017?). Change-Id: I3a774dff7b12d9960f553c9f242e0463c6d13d5d Reviewed-on: https://gerrit.libreoffice.org/54444 Tested-by: Jenkins <ci@libreoffice.org> Reviewed-by: Tor Lillqvist <tml@collabora.com>
Diffstat (limited to 'external')
-rw-r--r--external/boost/UnpackedTarball_boost.mk2
-rw-r--r--external/boost/windows-no-utf8-locales.patch.020
2 files changed, 22 insertions, 0 deletions
diff --git a/external/boost/UnpackedTarball_boost.mk b/external/boost/UnpackedTarball_boost.mk
index 4156bf7c3261..b4211bb2fe73 100644
--- a/external/boost/UnpackedTarball_boost.mk
+++ b/external/boost/UnpackedTarball_boost.mk
@@ -37,6 +37,8 @@ boost_patches += clang-cl.patch.0
boost_patches += boost_1_60_0.undef.warning.patch
boost_patches += boost_1_63_0.undef.warning.patch.1
+boost_patches += windows-no-utf8-locales.patch.0
+
$(eval $(call gb_UnpackedTarball_UnpackedTarball,boost))
$(eval $(call gb_UnpackedTarball_set_tarball,boost,$(BOOST_TARBALL)))
diff --git a/external/boost/windows-no-utf8-locales.patch.0 b/external/boost/windows-no-utf8-locales.patch.0
new file mode 100644
index 000000000000..66038cad70fb
--- /dev/null
+++ b/external/boost/windows-no-utf8-locales.patch.0
@@ -0,0 +1,20 @@
+Don't ever attempt to initialise a std::locale with a UTF-8 locale on Windows -*- Mode: Diff -*-
+
+--- libs/locale/src/std/std_backend.cpp
++++ libs/locale/src/std/std_backend.cpp
+@@ -109,12 +109,13 @@
+ #endif
+ }
+ else {
++ #if !defined(BOOST_WINDOWS)
+ if(loadable(lid)) {
+ name_ = lid;
+ utf_mode_ = utf8_native_with_wide;
+ }
+- #if defined(BOOST_WINDOWS)
+- else if(loadable(win_name)) {
++ #else
++ if(loadable(win_name)) {
+ name_ = win_name;
+ utf_mode_ = utf8_from_wide;
+ }