From: Vadim Zeitlin Date: Wed, 12 Jan 2000 21:23:26 +0000 (+0000) Subject: some compilation fixes for mingw32 and not only X-Git-Url: https://git.saurik.com/wxWidgets.git/commitdiff_plain/c5c32d72aa914fc9c61f678168bd78e2afd1f67e some compilation fixes for mingw32 and not only git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@5362 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775 --- diff --git a/include/wx/defs.h b/include/wx/defs.h index 4020d4cb92..3a6376fd34 100644 --- a/include/wx/defs.h +++ b/include/wx/defs.h @@ -349,7 +349,6 @@ typedef int wxWindowID; #else // no stdcall under Unix nor Win16 #define wxCALLBACK - #endif // platform // callling convention for the qsort(3) callback @@ -1800,6 +1799,8 @@ typedef WXHWND WXWidget; #define FAR _far #endif #endif // no FAR +#else // Win32 + #define FAR #endif // Win16/32 #endif // MSW diff --git a/src/msw/fontenum.cpp b/src/msw/fontenum.cpp index 279f7be2ae..f91b00c91f 100644 --- a/src/msw/fontenum.cpp +++ b/src/msw/fontenum.cpp @@ -110,10 +110,12 @@ bool wxFontEnumeratorHelper::SetEncoding(wxFontEncoding encoding) return TRUE; } -#if defined(__GNUWIN32__) - //BJ : FIXME? I have the second implementation in 2.95. Does it work with other versions? - // #define wxFONTENUMPROC int(*)(ENUMLOGFONTEX *, NEWTEXTMETRICEX*, int, LPARAM) - #define wxFONTENUMPROC int(*)(const LOGFONTA *, const TEXTMETRICA *, long unsigned int, LPARAM) +#if defined(__GNUWIN32__) + #if defined(__MINGW32__) && ((__GNUC__>2) ||((__GNUC__==2) && (__GNUC_MINOR__>=95))) + #define wxFONTENUMPROC int(*)(const LOGFONTA *, const TEXTMETRICA *, long unsigned int, LPARAM) + #else + #define wxFONTENUMPROC int(*)(ENUMLOGFONTEX *, NEWTEXTMETRICEX*, int, LPARAM) + #endif #else #define wxFONTENUMPROC FONTENUMPROC #endif