summaryrefslogtreecommitdiffstats
path: root/external/boost/boost.between.warning.patch
diff options
context:
space:
mode:
Diffstat (limited to 'external/boost/boost.between.warning.patch')
-rw-r--r--external/boost/boost.between.warning.patch13
1 files changed, 13 insertions, 0 deletions
diff --git a/external/boost/boost.between.warning.patch b/external/boost/boost.between.warning.patch
new file mode 100644
index 000000000000..d000e261d7d6
--- /dev/null
+++ b/external/boost/boost.between.warning.patch
@@ -0,0 +1,13 @@
+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
+@@ -52,6 +52,9 @@
+ }
+ #endif
+ #endif
++ // ensures we get a sensible warning in boost's gettext results about a real mismatch.
++ if (to_charset == from_charset)
++ return std::string(begin, end - begin);
+ throw invalid_charset_error(std::string(to_charset) + " or " + from_charset);
+ }
+