external/boost/UnpackedTarball_boost.mk | 1 + external/boost/boost.between.warning.patch | 13 +++++++++++++ 2 files changed, 14 insertions(+)
New commits: commit f4d5f1200c380ed5d3ebb5dc26cf82217d9db565 Author: Michael Meeks <michael.me...@collabora.com> AuthorDate: Mon Feb 7 12:05:03 2022 +0000 Commit: Andras Timar <andras.ti...@collabora.com> CommitDate: Mon Feb 7 15:32:14 2022 +0100 boost / gettext warning improvement. std::runtime_exception of: "Invalid or unsupported charset:UTF-8 or UTF-8" is less useful than it could be when spat out from the boost gettext impl. Survive for the next (and probably more useful) exception. Change-Id: Ibeb60b4a34f09f47051844c3e8048f38618d0e05 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/129562 Tested-by: Andras Timar <andras.ti...@collabora.com> Reviewed-by: Andras Timar <andras.ti...@collabora.com> diff --git a/external/boost/UnpackedTarball_boost.mk b/external/boost/UnpackedTarball_boost.mk index 33f2f2cd9b50..c93de3e1f169 100644 --- a/external/boost/UnpackedTarball_boost.mk +++ b/external/boost/UnpackedTarball_boost.mk @@ -16,6 +16,7 @@ boost_patches += boost.6142.warnings.patch.1 boost_patches += boost.utility.Wundef.warnings.patch boost_patches += boost.noiconv.patch +boost_patches += boost.between.warning.patch boost_patches += ubsan.patch.0 boost_patches += rtti.patch.0 diff --git a/external/boost/boost.between.warning.patch b/external/boost/boost.between.warning.patch new file mode 100644 index 000000000000..bb4535708549 --- /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/encoding/codepage.cpp +@@ -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); + } +