Bump version to 24.04.3.4
[LibreOffice.git] / external / boost / boost.between.warning.patch
blob349a9065ce623aca4123770dcadd51f3e178cb9c
1 diff -ru boost.orig/boost/libs/locale/src/encoding/codepage.cpp boost/boost/libs/locale/src/encoding/codepage.cpp
2 --- foo/misc/boost.orig/libs/locale/src/encoding/codepage.cpp
3 +++ foo/misc/boost/libs/locale/src/boost/locale/encoding/codepage.cpp
4 @@ -8,6 +8,7 @@
5 #include <boost/locale/hold_ptr.hpp>
6 #include <memory>
7 #include <string>
8 +#include <string.h>
10 #include "boost/locale/encoding/conv.hpp"
11 #if BOOST_LOCALE_USE_WIN32_API
12 @@ -58,6 +58,9 @@
13 return cvt->convert(begin, end);
14 #endif
15 #endif
16 + // ensures we get a sensible warning in boost's gettext results about a real mismatch.
17 + if (to_charset && from_charset && !strcmp(to_charset, from_charset))
18 + return std::string(begin, end - begin);
19 throw invalid_charset_error(std::string(to_charset) + " or " + from_charset);