summaryrefslogtreecommitdiffstats
path: root/external/boost/boost.noiconv.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.noiconv.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.noiconv.patch')
-rw-r--r--external/boost/boost.noiconv.patch51
1 files changed, 51 insertions, 0 deletions
diff --git a/external/boost/boost.noiconv.patch b/external/boost/boost.noiconv.patch
new file mode 100644
index 0000000000..02f206375a
--- /dev/null
+++ b/external/boost/boost.noiconv.patch
@@ -0,0 +1,51 @@
+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
+@@ -39,6 +39,7 @@
+ const char* from_charset,
+ method_type how)
+ {
++#if defined(BOOST_LOCALE_WITH_ICONV) || defined(BOOST_LOCALE_WITH_ICU) || defined(BOOST_LOCALE_WITH_WCONV)
+ hold_ptr<converter_between> cvt;
+ #ifdef BOOST_LOCALE_WITH_ICONV
+ cvt.reset(new iconv_between());
+@@ -55,6 +56,7 @@
+ if(cvt->open(to_charset, from_charset, how))
+ return cvt->convert(begin, end);
+ #endif
++#endif
+ throw invalid_charset_error(std::string(to_charset) + " or " + from_charset);
+ }
+
+@@ -65,6 +67,7 @@
+ template<typename CharType>
+ std::basic_string<CharType> convert_to(const char* begin, const char* end, const char* charset, method_type how)
+ {
++#if defined(BOOST_LOCALE_WITH_ICONV) || defined(BOOST_LOCALE_WITH_ICU) || defined(BOOST_LOCALE_WITH_WCONV)
+ hold_ptr<converter_to_utf<CharType>> cvt;
+ #ifdef BOOST_LOCALE_WITH_ICONV
+ cvt.reset(new iconv_to_utf<CharType>());
+@@ -81,6 +84,7 @@
+ if(cvt->open(charset, how))
+ return cvt->convert(begin, end);
+ #endif
++#endif
+ throw invalid_charset_error(charset);
+ }
+
+@@ -91,6 +95,7 @@
+ template<typename CharType>
+ std::string convert_from(const CharType* begin, const CharType* end, const char* charset, method_type how)
+ {
++#if defined(BOOST_LOCALE_WITH_ICONV) || defined(BOOST_LOCALE_WITH_ICU) || defined(BOOST_LOCALE_WITH_WCONV)
+ hold_ptr<converter_from_utf<CharType>> cvt;
+ #ifdef BOOST_LOCALE_WITH_ICONV
+ cvt.reset(new iconv_from_utf<CharType>());
+@@ -107,6 +112,7 @@
+ if(cvt->open(charset, how))
+ return cvt->convert(begin, end);
+ #endif
++#endif
+ throw invalid_charset_error(charset);
+ }
+