X-Git-Url: https://git.saurik.com/wxWidgets.git/blobdiff_plain/957686c882df820c73e2e35732969a4da8d72098..6302ab2fa9e617d18e590acbec89cda175350aed:/src/common/strconv.cpp?ds=sidebyside diff --git a/src/common/strconv.cpp b/src/common/strconv.cpp index 2663a564f6..acc3f6481a 100644 --- a/src/common/strconv.cpp +++ b/src/common/strconv.cpp @@ -60,7 +60,7 @@ WXDLLEXPORT_DATA(wxMBConv *) wxConvCurrent = &wxConvLibc; #include #endif -#ifdef HAVE_ICONV_H +#ifdef HAVE_ICONV #include #endif @@ -549,7 +549,7 @@ public: // The classes doing conversion using the iconv_xxx() functions // ============================================================================ -#ifdef HAVE_ICONV_H +#ifdef HAVE_ICONV // VS: glibc 2.1.3 is broken in that iconv() conversion to/from UCS4 fails with E2BIG // if output buffer is _exactly_ as big as needed. Such case is (unless there's @@ -565,11 +565,7 @@ public: #define ICONV_FAILED(cres, bufLeft) (cres == (size_t)-1) #endif -#ifdef WX_ICONV_TAKES_CHAR - #define ICONV_CHAR_CAST(x) (char **)x -#else - #define ICONV_CHAR_CAST(x) (const char **)x -#endif +#define ICONV_CHAR_CAST(x) ((ICONV_CONST char **)(x)) // ---------------------------------------------------------------------------- // IC_CharSet: encapsulates an iconv character set @@ -809,7 +805,7 @@ size_t IC_CharSet::WC2MB(char *buf, const wchar_t *psz, size_t n) return res; } -#endif // HAVE_ICONV_H +#endif // HAVE_ICONV // ============================================================================ // Win32 conversion classes @@ -919,7 +915,7 @@ static wxCharacterSet *wxGetCharacterSet(const wxChar *name) } else { -#ifdef HAVE_ICONV_H +#ifdef HAVE_ICONV cset = new IC_CharSet(name); // may not take NULL #endif }