Move wxCHECK_MINGW32_VERSION() declaration to wx/msw/gccpriv.h.
Unfortunately we can't keep it in wx/compiler.h which is included too early, before UNICODE macro is defined, and we can't define it before including wx/setup.h which itself must be included after wx/compiler.h. So move it to wx/msw/gccpriv.h which is not a great solution, as the best would be to get rid of this gcc-specific file completely, but at least should make everything build again and ensure that _mingw.h is included after UNICODE definition. Closes #15805. git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@75555 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
This commit is contained in:
@@ -17,8 +17,29 @@
|
||||
#define __GNUWIN32__
|
||||
#endif
|
||||
|
||||
#if defined(__MINGW32__) && ( ( __GNUC__ > 2 ) || ( ( __GNUC__ == 2 ) && ( __GNUC_MINOR__ >= 95 ) ) )
|
||||
#if defined(__MINGW32__)
|
||||
/*
|
||||
Include the header defining __MINGW32_{MAJ,MIN}OR_VERSION but check
|
||||
that UNICODE or _UNICODE is already defined, as _mingw.h relies on them
|
||||
being set and we'd get weird compilation errors later if it is included
|
||||
without them being defined, better give a clearer error right now.
|
||||
*/
|
||||
#if !defined(UNICODE)
|
||||
#ifndef wxUSE_UNICODE
|
||||
#error "wxUSE_UNICODE must be defined before including this header."
|
||||
#endif
|
||||
#if wxUSE_UNICODE
|
||||
#error "UNICODE must be defined before including this header."
|
||||
#endif
|
||||
#endif
|
||||
|
||||
#include <_mingw.h>
|
||||
|
||||
#define wxCHECK_MINGW32_VERSION( major, minor ) \
|
||||
( ( ( __MINGW32_MAJOR_VERSION > (major) ) \
|
||||
|| ( __MINGW32_MAJOR_VERSION == (major) && __MINGW32_MINOR_VERSION >= (minor) ) ) )
|
||||
#else
|
||||
#define wxCHECK_MINGW32_VERSION( major, minor ) (0)
|
||||
#endif
|
||||
|
||||
#if defined( __MINGW32__ ) && !defined(__WINE__) && !defined( HAVE_W32API_H )
|
||||
|
Reference in New Issue
Block a user