Move UNICODE section of wx/platform.h before wx/compiler.h inclusion.

This fixes the build with some versions of MinGW which depend on UNICODE being
defined correctly in _mingw.h which is included from wx/compiler.h, so that
before this change the build was broken as inconsistent definitions of UNICODE
were used there and in windows.h included later.

git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@75520 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
This commit is contained in:
Vadim Zeitlin 2014-01-03 01:18:47 +00:00
parent 29483c2e15
commit 2ff7b588ae

View File

@ -176,6 +176,38 @@
# include "wx/android/config_android.h"
#endif
/*
adjust the Unicode setting: wxUSE_UNICODE should be defined as 0 or 1
and is used by wxWidgets, _UNICODE and/or UNICODE may be defined or used by
the system headers so bring these settings in sync
Notice that this must be done before wx/compiler.h inclusion as some
compiler-specific headers (_mingw.h) included from there depend on UNICODE
being defined correctly.
*/
/* set wxUSE_UNICODE to 1 if UNICODE or _UNICODE is defined */
#if defined(_UNICODE) || defined(UNICODE)
# undef wxUSE_UNICODE
# define wxUSE_UNICODE 1
#else /* !UNICODE */
# ifndef wxUSE_UNICODE
# define wxUSE_UNICODE 0
# endif
#endif /* UNICODE/!UNICODE */
/* and vice versa: define UNICODE and _UNICODE if wxUSE_UNICODE is 1 */
#if wxUSE_UNICODE
# ifndef _UNICODE
# define _UNICODE
# endif
# ifndef UNICODE
# define UNICODE
# endif
#endif /* wxUSE_UNICODE */
#include "wx/compiler.h"
/*
@ -226,33 +258,6 @@
#endif /* alpha */
/*
adjust the Unicode setting: wxUSE_UNICODE should be defined as 0 or 1
and is used by wxWidgets, _UNICODE and/or UNICODE may be defined or used by
the system headers so bring these settings in sync
*/
/* set wxUSE_UNICODE to 1 if UNICODE or _UNICODE is defined */
#if defined(_UNICODE) || defined(UNICODE)
# undef wxUSE_UNICODE
# define wxUSE_UNICODE 1
#else /* !UNICODE */
# ifndef wxUSE_UNICODE
# define wxUSE_UNICODE 0
# endif
#endif /* UNICODE/!UNICODE */
/* and vice versa: define UNICODE and _UNICODE if wxUSE_UNICODE is 1 */
#if wxUSE_UNICODE
# ifndef _UNICODE
# define _UNICODE
# endif
# ifndef UNICODE
# define UNICODE
# endif
#endif /* wxUSE_UNICODE */
/*
test for old versions of Borland C, normally need at least 5.82, Turbo
explorer, available for free at http://www.turboexplorer.com/downloads