From 99fda03aa3c7f3ea80581b1d1ab62e709d46317e Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?V=C3=A1clav=20Slav=C3=ADk?= Date: Mon, 13 Aug 2007 14:43:44 +0000 Subject: [PATCH] Mingw compilation fix git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@48048 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775 --- include/wx/log.h | 9 ++++++++- 1 file changed, 8 insertions(+), 1 deletion(-) diff --git a/include/wx/log.h b/include/wx/log.h index 41a4b86fae..254df43702 100644 --- a/include/wx/log.h +++ b/include/wx/log.h @@ -619,6 +619,13 @@ WXDLLIMPEXP_BASE const wxChar* wxSysErrorMsg(unsigned long nErrCode = 0); #define WX_WATCOM_ONLY_CODE( x ) #endif +#if defined(__WATCOMC__) || defined(__MINGW32__) + // Mingw has similar problem with wxLogSysError: + #define WX_WATCOM_OR_MINGW_ONLY_CODE( x ) x +#else + #define WX_WATCOM_OR_MINGW_ONLY_CODE( x ) +#endif + // log functions do nothing at all #define DECLARE_LOG_FUNCTION(level) \ WX_DEFINE_VARARG_FUNC_NOP(wxLog##level, 1, (const wxString&)) \ @@ -632,7 +639,7 @@ WXDLLIMPEXP_BASE const wxChar* wxSysErrorMsg(unsigned long nErrCode = 0); #define DECLARE_LOG_FUNCTION2_EXP(level, argclass, arg, expdecl) \ WX_DEFINE_VARARG_FUNC_NOP(wxLog##level, 2, (argclass, const wxString&)) \ - WX_WATCOM_ONLY_CODE( \ + WX_WATCOM_OR_MINGW_ONLY_CODE( \ WX_DEFINE_VARARG_FUNC_NOP(wxLog##level, 2, (argclass, const char*)) \ WX_DEFINE_VARARG_FUNC_NOP(wxLog##level, 2, (argclass, const wchar_t*)) \ WX_DEFINE_VARARG_FUNC_NOP(wxLog##level, 2, (argclass, const wxCStrData&)) \