summaryrefslogtreecommitdiffstats
path: root/external/boost/boost.between.warning.patch
diff options
context:
space:
mode:
authorDaniel Baumann <daniel.baumann@progress-linux.org>2024-04-15 05:54:39 +0000
committerDaniel Baumann <daniel.baumann@progress-linux.org>2024-04-15 05:54:39 +0000
commit267c6f2ac71f92999e969232431ba04678e7437e (patch)
tree358c9467650e1d0a1d7227a21dac2e3d08b622b2 /external/boost/boost.between.warning.patch
parentInitial commit. (diff)
downloadlibreoffice-267c6f2ac71f92999e969232431ba04678e7437e.tar.xz
libreoffice-267c6f2ac71f92999e969232431ba04678e7437e.zip
Adding upstream version 4:24.2.0.upstream/4%24.2.0
Signed-off-by: Daniel Baumann <daniel.baumann@progress-linux.org>
Diffstat (limited to 'external/boost/boost.between.warning.patch')
-rw-r--r--external/boost/boost.between.warning.patch21
1 files changed, 21 insertions, 0 deletions
diff --git a/external/boost/boost.between.warning.patch b/external/boost/boost.between.warning.patch
new file mode 100644
index 0000000000..349a9065ce
--- /dev/null
+++ b/external/boost/boost.between.warning.patch
@@ -0,0 +1,21 @@
+diff -ru boost.orig/boost/libs/locale/src/encoding/codepage.cpp boost/boost/libs/locale/src/encoding/codepage.cpp
+--- foo/misc/boost.orig/libs/locale/src/encoding/codepage.cpp
++++ foo/misc/boost/libs/locale/src/boost/locale/encoding/codepage.cpp
+@@ -8,6 +8,7 @@
+ #include <boost/locale/hold_ptr.hpp>
+ #include <memory>
+ #include <string>
++#include <string.h>
+
+ #include "boost/locale/encoding/conv.hpp"
+ #if BOOST_LOCALE_USE_WIN32_API
+@@ -58,6 +58,9 @@
+ return cvt->convert(begin, end);
+ #endif
+ #endif
++ // ensures we get a sensible warning in boost's gettext results about a real mismatch.
++ if (to_charset && from_charset && !strcmp(to_charset, from_charset))
++ return std::string(begin, end - begin);
+ throw invalid_charset_error(std::string(to_charset) + " or " + from_charset);
+ }
+