Macros for simplified testing Open Watcom version and required tweaks.

git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@36155 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
This commit is contained in:
Włodzimierz Skiba
2005-11-10 16:16:05 +00:00
parent 2a2d7a737d
commit 6d3d756a6a
11 changed files with 33 additions and 35 deletions

View File

@@ -146,7 +146,7 @@
#elif defined(__BORLANDC__) && (__BORLANDC__ >= 0x500)
/* Borland 5.0+ supports bool */
#define HAVE_BOOL
#elif defined(__WATCOMC__) && (__WATCOMC__ >= 1100)
#elif wxCHECK_WATCOM_VERSION(1,0)
/* Watcom 11+ supports bool */
#define HAVE_BOOL
#elif defined(__DIGITALMARS__)
@@ -609,7 +609,7 @@ typedef int wxWindowID;
#define except(x) catch(...)
#endif /* Metrowerks */
#if defined(__WATCOMC__) && (__WATCOMC__ < 1240)
#if wxONLY_WATCOM_EARLIER_THAN(1,4)
typedef short mode_t;
#endif
@@ -1006,7 +1006,7 @@ inline void *wxUIntToPtr(wxUIntPtr p)
#if defined(__PALMOS__) && !defined(HAVE_SSIZE_T)
#define HAVE_SSIZE_T
#endif
#if defined(__WATCOMC__) && __WATCOMC__ > 1230
#if wxCHECK_WATCOM_VERSION(1,4)
#define HAVE_SSIZE_T
#endif
#ifndef HAVE_SSIZE_T

View File

@@ -278,13 +278,13 @@ enum wxFileKind
// version of struct stat as well as a wide char stat function variant.
// This was droped since OW 1.4 "for consistency across platforms".
#if wxHAS_HUGE_FILES
#if wxUSE_UNICODE && defined(__WATCOMC__) && __WATCOMC__ < 1240
#if wxUSE_UNICODE && wxONLY_WATCOM_EARLIER_THAN(1,4)
#define wxStructStat struct _wstati64
#else
#define wxStructStat struct _stati64
#endif
#else
#if wxUSE_UNICODE && defined(__WATCOMC__) && __WATCOMC__ < 1240
#if wxUSE_UNICODE && wxONLY_WATCOM_EARLIER_THAN(1,4)
#define wxStructStat struct _wstat
#else
#define wxStructStat struct _stat

View File

@@ -37,7 +37,8 @@
#endif
#ifndef wxUSE_NORLANDER_HEADERS
# if (defined(__WATCOMC__) && (__WATCOMC__ >= 1200)) || defined(__WINE__) || ((defined(__MINGW32__) || defined(__CYGWIN__)) && ((__GNUC__>2) ||((__GNUC__==2) && (__GNUC_MINOR__>=95))))
# if ( wxCHECK_WATCOM_VERSION(1,0) || defined(__WINE__) ) || \
((defined(__MINGW32__) || defined(__CYGWIN__)) && ((__GNUC__>2) ||((__GNUC__==2) && (__GNUC_MINOR__>=95))))
# define wxUSE_NORLANDER_HEADERS 1
# else
# define wxUSE_NORLANDER_HEADERS 0
@@ -167,12 +168,6 @@
# define wxUSE_DEBUG_NEW_ALWAYS 0
#endif
/* Early Watcom version don't have good enough wide char support */
#if defined(__WXMSW__) && (defined(__WATCOMC__) && __WATCOMC__ < 1200)
# undef wxUSE_WCHAR_T
# define wxUSE_WCHAR_T 0
#endif
/* DMC++ doesn't have definitions for date picker control, so use generic control
*/
#ifdef __DMC__
@@ -243,4 +238,3 @@
#endif /* wxUSE_DYNAMIC_LOADER */
#endif /* _WX_MSW_CHKCONF_H_ */

View File

@@ -32,7 +32,7 @@
#endif
#endif
#if (defined(__WATCOMC__) && __WATCOMC__ >= 1200)
#if wxCHECK_WATCOM_VERSION(1,0)
#define HAVE_W32API_H
#endif

View File

@@ -24,8 +24,7 @@
#define INCL_WIN
#include <os2.h>
#if defined(__WATCOMC__) && ( __WATCOMC__ < 1240 )
// missing in OpenWatcom 1.3 but added in 1.4
#if wxONLY_WATCOM_EARLIER_THAN(1,4)
inline HATOMTBL APIENTRY WinQuerySystemAtomTable(VOID){return NULL;}
inline ULONG APIENTRY WinQueryAtomName(HATOMTBL,ATOM,PCSZ,ULONG){return 0;}
inline LONG APIENTRY GpiPointArc(HPS,PPOINTL){return GPI_ERROR;}

View File

@@ -36,7 +36,7 @@
#endif
#ifndef wxUSE_NORLANDER_HEADERS
#if (defined(__WATCOMC__) && (__WATCOMC__ >= 1200)) || defined(__WINE__) || ((defined(__MINGW32__) || defined(__CYGWIN__)) && ((__GNUC__>2) ||((__GNUC__==2) && (__GNUC_MINOR__>=95))))
#if (defined(__WINE__) || ((defined(__MINGW32__) || defined(__CYGWIN__)) && ((__GNUC__>2) ||((__GNUC__==2) && (__GNUC_MINOR__>=95))))
# define wxUSE_NORLANDER_HEADERS 1
#else
# define wxUSE_NORLANDER_HEADERS 0
@@ -106,4 +106,3 @@
#endif
/* _WX_PALMOS_CHKCONF_H_ */

View File

@@ -251,6 +251,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
@@ -446,7 +461,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 */
@@ -517,7 +532,7 @@
*/
#if ( defined( __GNUWIN32__ ) || defined( __MINGW32__ ) || \
( defined( __CYGWIN__ ) && defined( __WINDOWS__ ) ) || \
(defined(__WATCOMC__) && __WATCOMC__ >= 1200) ) && \
wxCHECK_WATCOM_VERSION(1,0) ) && \
!defined(__DOS__) && \
!defined(__WXPM__) && \
!defined(__WXMOTIF__) && \