From dc7c324430ea3762c474bed9a5601585aff489d1 Mon Sep 17 00:00:00 2001 From: Vadim Zeitlin Date: Mon, 10 Dec 2001 23:24:53 +0000 Subject: [PATCH] wxBase compilation fix git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@12976 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775 --- src/common/strconv.cpp | 15 +++++++++++---- 1 file changed, 11 insertions(+), 4 deletions(-) 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 -- 2.47.2