Define __WXOSX__ and __WXMAC__ on compiler command line.

Although __WXMAC__ and __WXMAC__ were already defined in wx/platform.h if
__WXOSX_XXX__ was defined, they couldn't be used for checks done before
including this header, which was surprising and, in case of __WXMAC__,
backwards incompatible. Define them now on the compiler command line to ensure
that they are always defined.

git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@62353 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
This commit is contained in:
Vadim Zeitlin
2009-10-09 13:05:38 +00:00
parent f3d793069f
commit 17005cd723
3 changed files with 27 additions and 9 deletions

View File

@@ -33,20 +33,25 @@
__WXOSX_IPHONE__ means OS X iPhone
*/
/* backwards compatible define, until configure gets updated */
#if defined __WXMAC__
#define __WXOSX_CARBON__ 1
#endif
/*
Normally all of __WXOSX_XXX__, __WXOSX__ and __WXMAC__ are defined by
configure but ensure that we also define them if configure was not used for
whatever reason.
The primare symbol remains __WXOSX_XXX__ one, __WXOSX__ exists to allow
checking for any OS X port (Carbon and Cocoa) and __WXMAC__ is an old name
for it.
*/
#if defined(__WXOSX_CARBON__) || defined(__WXOSX_COCOA__) || defined(__WXOSX_IPHONE__)
# define __WXOSX__ 1
#endif
#ifdef __WXOSX__
/* for backwards compatibility of code (including our own) define __WXMAC__ */
# ifndef __WXOSX__
# define __WXOSX__ 1
# endif
# ifndef __WXMAC__
# define __WXMAC__ 1
# endif
#endif
#ifdef __WXOSX__
/* setup precise defines according to sdk used */
# include <TargetConditionals.h>
# if defined(__WXOSX_IPHONE__)