X-Git-Url: https://git.saurik.com/wxWidgets.git/blobdiff_plain/b1d66b5415f7befb45e050d7097571642b8bfa56..016105291a38f62a4811025653947cb4f8da765e:/src/common/strconv.cpp diff --git a/src/common/strconv.cpp b/src/common/strconv.cpp index 5362f1234c..bd39f333b0 100644 --- a/src/common/strconv.cpp +++ b/src/common/strconv.cpp @@ -409,9 +409,11 @@ WXDLLEXPORT_DATA(wxCSConv) wxConvLocal((const wxChar *)NULL); #if defined(__WIN32__) && !defined(__WXMICROWIN__) +#if wxUSE_GUI + // VZ: the new version of wxCharsetToCodepage() is more politically correct // and should work on other Windows versions as well but the old version is -// still needed for !wxUSE_FONTMAP case +// still needed for !wxUSE_FONTMAP || !wxUSE_GUI case extern long wxEncodingToCodepage(wxFontEncoding encoding) { @@ -434,7 +436,7 @@ extern long wxEncodingToCodepage(wxFontEncoding encoding) return csetInfo.ciACP; } -#if wxUSE_FONTMAP && wxUSE_GUI +#if wxUSE_FONTMAP extern long wxCharsetToCodepage(const wxChar *name) { @@ -450,7 +452,12 @@ extern long wxCharsetToCodepage(const wxChar *name) return wxEncodingToCodepage(enc); } -#else // old wxCharsetToCodepage() by OK +#endif // wxUSE_FONTMAP + +#endif // wxUSE_GUI + +// include old wxCharsetToCodepage() by OK if needed +#if !wxUSE_GUI || !wxUSE_FONTMAP #include "wx/msw/registry.h" @@ -486,7 +493,7 @@ extern long wxCharsetToCodepage(const wxChar *name) return CP; } -#endif // wxUSE_FONTMAP/!wxUSE_FONTMAP +#endif // !wxUSE_GUI || !wxUSE_FONTMAP #endif // Win32