X-Git-Url: https://git.saurik.com/wxWidgets.git/blobdiff_plain/ef620df011862a244e6be57be337e1eefc788b5a..c36f1fc7c9c91a008b308cf6775f2f7a134ef2f1:/include/wx/platform.h diff --git a/include/wx/platform.h b/include/wx/platform.h index 7aff61182b..5c7ad3b8a6 100644 --- a/include/wx/platform.h +++ b/include/wx/platform.h @@ -1,13 +1,13 @@ -/* - * Name: wx/platform.h - * Purpose: define the OS and compiler identification macros - * Author: Vadim Zeitlin - * Modified by: - * Created: 29.10.01 (extracted from wx/defs.h) - * RCS-ID: $Id$ - * Copyright: (c) 1997-2001 wxWindows team - * Licence: wxWindows licence - */ +/** +* Name: wx/platform.h +* Purpose: define the OS and compiler identification macros +* Author: Vadim Zeitlin +* Modified by: +* Created: 29.10.01 (extracted from wx/defs.h) +* RCS-ID: $Id$ +* Copyright: (c) 1997-2001 wxWindows team +* Licence: wxWindows licence +*/ /* THIS IS A C FILE, DON'T USE C++ FEATURES (IN PARTICULAR COMMENTS) IN IT */ @@ -103,6 +103,33 @@ /* check the consistency of the settings in setup.h */ #include "wx/chkconf.h" +/* + adjust the Unicode setting: wxUSE_UNICODE should be defined as 0 or 1 + and is used by wxWindows, _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 */ + + /* some compilers don't support iostream.h any longer, so override the users setting here in such case. @@ -321,9 +348,10 @@ This macro can be used to check that the version of mingw32 compiler is at least maj.min */ -#if defined( __GNUWIN32__ ) || defined( __MINGW32__ ) || \ +#if ( defined( __GNUWIN32__ ) || defined( __MINGW32__ ) || \ defined( __CYGWIN__ ) || \ - (defined(__WATCOMC__) && __WATCOMC__ >= 1200) + (defined(__WATCOMC__) && __WATCOMC__ >= 1200) ) && \ + !defined(__DOS__) # include "wx/msw/gccpriv.h" #else # undef wxCHECK_W32API_VERSION @@ -347,7 +375,7 @@ * Presently, only Windows and GTK+ support wxEVT_MENU_OPEN. */ #ifndef wxUSE_IDLEMENUUPDATES -# if defined(__WXMSW__) || defined(__WXGTK__) +# if (defined(__WXMSW__) || defined(__WXGTK__)) && !defined(__WXUNIVERSAL__) # define wxUSE_IDLEMENUUPDATES 0 # else # define wxUSE_IDLEMENUUPDATES 1