summaryrefslogtreecommitdiff
path: root/external/boost/boost.noiconv.patch
blob: 12e5d2059cea51a15dd035ba585b156067ded96d (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
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
@@ -29,6 +29,7 @@
                         const std::string& from_charset,
                         method_type how)
     {
+#if defined(BOOST_LOCALE_WITH_ICONV) || defined(BOOST_LOCALE_WITH_ICU) || defined(BOOST_LOCALE_WITH_WCONV)
 #ifdef BOOST_LOCALE_WITH_ICONV
         {
             impl::iconv_between cvt;
@@ -50,6 +51,7 @@
                 return cvt.convert(begin, end);
         }
 #endif
+#endif
         throw invalid_charset_error(std::string(to_charset) + " or " + from_charset);
     }
 
@@ -56,6 +58,7 @@
     template<typename CharType>
     std::basic_string<CharType> to_utf(const char* begin, const char* end, const std::string& charset, method_type how)
     {
+#if defined(BOOST_LOCALE_WITH_ICONV) || defined(BOOST_LOCALE_WITH_ICU) || defined(BOOST_LOCALE_WITH_WCONV)
 #ifdef BOOST_LOCALE_WITH_ICONV
         {
             impl::iconv_to_utf<CharType> cvt;
@@ -77,6 +80,7 @@
                 return cvt.convert(begin, end);
         }
 #endif
+#endif
         throw invalid_charset_error(charset);
     }
 
@@ -83,6 +87,7 @@
     template<typename CharType>
     std::string from_utf(const CharType* begin, const CharType* end, const std::string& charset, method_type how)
     {
+#if defined(BOOST_LOCALE_WITH_ICONV) || defined(BOOST_LOCALE_WITH_ICU) || defined(BOOST_LOCALE_WITH_WCONV)
 #ifdef BOOST_LOCALE_WITH_ICONV
         {
             impl::iconv_from_utf<CharType> cvt;
@@ -104,6 +109,7 @@
                 return cvt.convert(begin, end);
         }
 #endif
+#endif
         throw invalid_charset_error(charset);
     }