*/
#ifdef __MWERKS__
# include <stddef.h>
+
+# if !defined(__WXMAC__) && !defined(__WINDOWS__) && !defined(WIN32) && !defined(_WIN32_WCE)
+# define __PALMOS__ 0x05000000
+# endif
#endif
/*
#ifdef __WXMAC__
# if defined(__MACH__)
# define __WXMAC_OSX__
-# define __WXMAC_CARBON__
+# define __WXMAC_CARBON__ /* for backwards compat in user code still defined */
# include <AvailabilityMacros.h>
# ifndef MAC_OS_X_VERSION_10_4
# define MAC_OS_X_VERSION_10_4 1040
# ifndef MAC_OS_X_VERSION_10_5
# define MAC_OS_X_VERSION_10_5 1050
# endif
-# ifdef __WXMAC_XCODE__
-# include <unistd.h>
-# include "wx/mac/carbon/config_xcode.h"
-# endif
# else
-# if TARGET_CARBON
-# define __WXMAC_CARBON__
-# else
-# define __WXMAC_CLASSIC__
-# endif
+# error "only mach-o configurations are supported"
# endif
#endif
/*
__WXOSX__ is a common define to wxMac (Carbon) and wxCocoa ports under OS X.
+
+ DO NOT use this define in base library code. Although wxMac has its own
+ private base library (and thus __WXOSX__,__WXMAC__ and related defines are
+ valid there), wxCocoa shares its library with other ports like wxGTK and wxX11.
+
+ To keep wx authors from screwing this up, only enable __WXOSX__ for wxCocoa when
+ not compiling the base library. We determine this by first checking if
+ wxUSE_BASE is not defined. If it is not defined, then we're not buildling
+ the base library, and possibly not building wx at all (but actually building
+ user code that's using wx). If it is defined then we must check to make sure
+ it is not true. If it is true, we're building base.
+
+ If you want it in the common darwin base library then use __DARWIN__. You
+ can use any Darwin-available libraries like CoreFoundation but please avoid
+ using OS X libraries like Carbon or CoreServices.
+
*/
-#if defined(__WXMAC_OSX__) || defined(__WXCOCOA__)
+#if defined(__WXMAC_OSX__) || (defined(__WXCOCOA__) && (!defined(wxUSE_BASE) || !wxUSE_BASE)) || defined(__WXASPEN__)
# define __WXOSX__
#endif
+#ifdef __WXOSX__
+# ifdef __WXMAC_XCODE__
+# include <unistd.h>
+# include "wx/mac/config_xcode.h"
+# endif
+#endif
/*
first define Windows symbols if they're not defined on the command line: we
can autodetect everything we need if _WIN32 is defined
#if defined(__PALMOS__)
# if __PALMOS__ == 0x06000000
-# define __WXPALMOS6__
+# define __WXPALMOS6__ 1
# endif
# if __PALMOS__ == 0x05000000
-# define __WXPALMOS5__
+# define __WXPALMOS5__ 1
# endif
# ifndef __WXPALMOS__
-# define __WXPALMOS__
+# define __WXPALMOS__ 1
# endif
# ifdef __WXMSW__
# undef __WXMSW__
#endif
-/* test for old versions of Borland C, need at least 5.82, Turbo explorer,
- available for free at http://www.turboexplorer.com/downloads
+/*
+ test for old versions of Borland C, normally need at least 5.82, Turbo
+ explorer, available for free at http://www.turboexplorer.com/downloads
*/
-#if defined(__BORLANDC__) && (__BORLANDC__ < 0x582)
-#error "This version of wxWidgets requires at least Borland 5.82 (Turbo Explorer); You may at your own risk remove this line and try your system"
+#if defined(__BORLANDC__) && (__BORLANDC__ < 0x550)
+# error "wxWidgets requires a newer version of Borland, we recommend upgrading to 5.82 (Turbo Explorer). You may at your own risk remove this line and try building but be prepared to get build errors."
+#endif /* __BORLANDC__ */
+
+#if defined(__BORLANDC__) && (__BORLANDC__ < 0x582) && (__BORLANDC__ > 0x559)
+# ifndef _USE_OLD_RW_STL
+# error "wxWidgets is incompatible with default Borland C++ 5.6 STL library, please add -D_USE_OLD_RW_STL to your bcc32.cfg to use RogueWave STL implementation."
+# endif
#endif /* __BORLANDC__ */
*/
# if defined(_MSC_VER) && !defined(__MWERKS__)
# define __VISUALC__ _MSC_VER
+
+ /*
+ define special symbols for different VC version instead of writing tests
+ for magic numbers such as 1200, 1300 &c repeatedly
+ */
+# if __VISUALC__ < 1100
+# error "This Visual C++ version is too old and not supported any longer."
+# elif __VISUALC__ < 1200
+# define __VISUALC5__
+# elif __VISUALC__ < 1300
+# define __VISUALC6__
+# elif __VISUALC__ < 1400
+# define __VISUALC7__
+# elif __VISUALC__ < 1500
+# define __VISUALC8__
+# elif __VISUALC__ < 1600
+# define __VISUALC9__
+# else
+# pragma message("Please update this code for the next VC++ version")
+# endif
+
# elif defined(__BCPLUSPLUS__) && !defined(__BORLANDC__)
# define __BORLANDC__
# elif defined(__WATCOMC__)
#define wxNEEDS_CHARPP
#endif
+/*
+ This macro can be used to test the Visual C++ version.
+*/
+#ifndef __VISUALC__
+# define wxVISUALC_VERSION(major) 0
+# define wxCHECK_VISUALC_VERSION(major) 0
+#else
+# define wxVISUALC_VERSION(major) ( (6 + major) * 100 )
+# define wxCHECK_VISUALC_VERSION(major) ( __VISUALC__ >= wxVISUALC_VERSION(major) )
+#endif
+
/*
This macro can be used to check that the version of mingw32 compiler is
at least maj.min
# endif
#endif
-#if defined (__WXMAC__)
-# if ( !defined(__MACH__) || ( defined(__BIG_ENDIAN__) && __BIG_ENDIAN__ ) )
-# define WORDS_BIGENDIAN 1
-# else
-# undef WORDS_BIGENDIAN
-# endif
+/*
+ Handle Darwin gcc universal compilation. Don't do this in an Apple-
+ specific case since no sane compiler should be defining either
+ __BIG_ENDIAN__ or __LITTLE_ENDIAN__ unless it really is generating
+ code that will be hosted on a machine with the appropriate endianness.
+ If a compiler defines neither, assume the user or configure set
+ WORDS_BIGENDIAN appropriately.
+ */
+#if defined(__BIG_ENDIAN__)
+# undef WORDS_BIGENDIAN
+# define WORDS_BIGENDIAN 1
+#elif defined(__LITTLE_ENDIAN__)
+# undef WORDS_BIGENDIAN
+#elif defined(__WXMAC__) && !defined(WORDS_BIGENDIAN)
+/* According to Stefan even ancient Mac compilers defined __BIG_ENDIAN__ */
+# warning "Compiling wxMac with probably wrong endianness"
#endif
/*
# define wxVMS_USE_STD
#endif
+#ifdef __VMS
+#define XtDisplay XTDISPLAY
+#ifdef __WXMOTIF__
+#define XtParent XTPARENT
+#define XtScreen XTSCREEN
+#define XtWindow XTWINDOW
+#endif
+#endif
+
/* Choose which method we will use for updating menus
* - in OnIdle, or when we receive a wxEVT_MENU_OPEN event.
* Presently, only Windows and GTK+ support wxEVT_MENU_OPEN.
#include <AvailabilityMacros.h>
#endif
+#if defined (__WXPALMOS__)
+#include "wx/palmos/missing.h"
+#endif // __WXPALMOS__
+
+#if !defined (__WXPALMOS5__)
+#define POSSEC_APPBASE
+#define POSSEC_ARCHIVE
+#define POSSEC_CLNTDATA
+#define POSSEC_CMDLINE
+#define POSSEC_CONFIG
+#define POSSEC_DATETIME
+#define POSSEC_DATETIME2
+#define POSSEC_DATSTRM
+#define POSSEC_DIRCMN
+#define POSSEC_DYNARRAY
+#define POSSEC_DYNLIB
+#define POSSEC_DYNLOAD
+#define POSSEC_ENCCONV
+#define POSSEC_EXTENDED
+#define POSSEC_FFILE
+#define POSSEC_FILE
+#define POSSEC_FILECONF
+#define POSSEC_FILEFN
+#endif // __WXPALMOS5__
+
#endif /* _WX_PLATFORM_H_ */