office-gobmx/external/boost/boost.noiconv.patch
Caolán McNamara 3d0cbe3e7b try without iconv, we probably don't need it in practice
Change-Id: I14782971dd35f8d96f1e9b08fdf060aa917a1e37
2017-04-28 14:36:14 +01:00

51 lines
2.4 KiB
Diff

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
@@ -39,6 +39,7 @@
char const *from_charset,
method_type how)
{
+ #if defined(BOOST_LOCALE_WITH_ICONV) || defined(BOOST_LOCALE_WITH_ICU) || defined(BOOST_LOCALE_WITH_WCONV)
std::auto_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 @@
char const *charset,
method_type how)
{
+ #if defined(BOOST_LOCALE_WITH_ICONV) || defined(BOOST_LOCALE_WITH_ICU) || defined(BOOST_LOCALE_WITH_WCONV)
std::auto_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 @@
char const *charset,
method_type how)
{
+ #if defined(BOOST_LOCALE_WITH_ICONV) || defined(BOOST_LOCALE_WITH_ICU) || defined(BOOST_LOCALE_WITH_WCONV)
std::auto_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);
}