X-Git-Url: https://git.saurik.com/wxWidgets.git/blobdiff_plain/3d94765e6ee6011ac8e4ecfd81760a127aa3e716..dfc69c6d5bd613a20a9cb815622167a258d4a623:/include/wx/platform.h diff --git a/include/wx/platform.h b/include/wx/platform.h index 4df0aa5ab4..aa6c716c03 100644 --- a/include/wx/platform.h +++ b/include/wx/platform.h @@ -19,7 +19,7 @@ Codewarrior doesn't define any Windows symbols until some headers are included */ -#if __MWERKS__ +#ifdef __MWERKS__ # include #endif @@ -58,8 +58,6 @@ can autodetect everything we need if _WIN32 is defined */ #if defined(__CYGWIN__) && defined(__WINDOWS__) - /* for Cygwin, a build of wxMSW, or a build with -mno-cygwin is treated - * as a Windows build. Otherwise it is treated as a unix compiler. */ # ifndef __WXMSW__ # define __WXMSW__ # endif @@ -117,11 +115,6 @@ # ifndef __WIN32__ # define __WIN32__ -# endif - - /* this means Win95-style UI, i.e. Win9x/NT 4+: always true now */ -# if !defined(__WIN95__) -# define __WIN95__ # endif #endif /* Win32 */ @@ -131,12 +124,6 @@ # endif #endif -#ifdef __WINE__ -# ifndef __WIN95__ -# define __WIN95__ -# endif -#endif /* WINE */ - /* detect MS SmartPhone */ #if defined( WIN32_PLATFORM_WFSP ) # ifndef __SMARTPHONE__ @@ -182,6 +169,15 @@ # endif #endif +/* + Include wx/setup.h for the Unix platform defines generated by configure and + the library compilation options + + Note that it must be included before defining hardware symbols below as they + could be already defined by configure + */ +#include "wx/setup.h" + /* Hardware platform detection. @@ -211,11 +207,6 @@ #endif #endif /* alpha */ -/* - Include wx/setup.h for the Unix platform defines generated by configure and - the library compilation options - */ -#include "wx/setup.h" /* adjust the Unicode setting: wxUSE_UNICODE should be defined as 0 or 1 @@ -249,6 +240,21 @@ #endif +/* + This macro can be used to test the Open Watcom version. +*/ +#ifndef __WATCOMC__ +# define wxWATCOM_VERSION(major,minor) 0 +# define wxCHECK_WATCOM_VERSION(major,minor) 0 +# define wxONLY_WATCOM_EARLIER_THAN(major,minor) 0 +#elif defined(__WATCOMC__) && __WATCOMC__ < 1200 +# error "Only Open Watcom is supported in this release" +#else +# define wxWATCOM_VERSION(major,minor) ( major * 100 + minor * 10 + 1100 ) +# define wxCHECK_WATCOM_VERSION(major,minor) ( __WATCOMC__ >= wxWATCOM_VERSION(major,minor) ) +# define wxONLY_WATCOM_EARLIER_THAN(major,minor) ( __WATCOMC__ < wxWATCOM_VERSION(major,minor) ) +#endif + /* check the consistency of the settings in setup.h: note that this must be done after setting wxUSE_UNICODE correctly as it is used in wx/chkconf.h @@ -327,6 +333,11 @@ */ # define __SGI_CC__ # endif /* gcc/!gcc */ + + /* system headers use this symbol and not __cplusplus in some places */ +# ifndef _LANGUAGE_C_PLUS_PLUS +# define _LANGUAGE_C_PLUS_PLUS +# endif # endif /* SGI */ # if defined(sun) || defined(__SUN__) @@ -391,14 +402,16 @@ __DARWIN__ for Darwin related corrections (wxMac, wxMotif) */ #elif defined(__OS2__) + + /* wxOS2 vs. non wxOS2 ports on OS2 platform */ +# if !defined(__WXMOTIF__) && !defined(__WXGTK__) && !defined(__WXX11__) +# ifndef __WXPM__ +# define __WXPM__ +# endif +# endif + # if defined(__IBMCPP__) # define __VISAGEAVER__ __IBMCPP__ -# endif -# ifndef __WXOS2__ -# define __WXOS2__ -# endif -# ifndef __WXPM__ -# define __WXPM__ # endif /* Place other OS/2 compiler environment defines here */ @@ -437,7 +450,7 @@ # define __VISUALC__ _MSC_VER # elif defined(__BCPLUSPLUS__) && !defined(__BORLANDC__) # define __BORLANDC__ -# elif defined(__WATCOMC__) +# elif defined(__WATCOMC__) # elif defined(__SC__) # define __SYMANTECC__ # endif /* compiler */ @@ -469,15 +482,23 @@ # endif #endif -/* Force linking against required libraries under Windows CE: */ -#ifdef __WXWINCE__ -# include "wx/msw/wince/libraries.h" +#ifdef __INTEL_COMPILER +# define __INTELC__ #endif -/* Force inclusion of main PalmOS header: */ -#ifdef __WXPALMOS__ -# include -# undef Abs +/* + We get "Large Files (ILP32) not supported in strict ANSI mode." #error + from HP-UX standard headers when compiling with g++ without this: + */ +#if defined(__HPUX__) && !defined(__STDC_EXT__) +# define __STDC_EXT__ 1 +#endif + +/* Force linking against required libraries under Windows: */ +#ifdef __WXWINCE__ +# include "wx/msw/wince/libraries.h" +#elif defined __WINDOWS__ +# include "wx/msw/libraries.h" #endif /* @@ -500,8 +521,9 @@ */ #if ( defined( __GNUWIN32__ ) || defined( __MINGW32__ ) || \ ( defined( __CYGWIN__ ) && defined( __WINDOWS__ ) ) || \ - (defined(__WATCOMC__) && __WATCOMC__ >= 1200) ) && \ + wxCHECK_WATCOM_VERSION(1,0) ) && \ !defined(__DOS__) && \ + !defined(__WXPM__) && \ !defined(__WXMOTIF__) && \ !defined(__WXGTK__) && \ !defined(__WXX11__) && \ @@ -568,4 +590,3 @@ #endif #endif /* _WX_PLATFORM_H_ */ -