Remove (Open)Watcom support.
This compiler is not being developed since several years and almost certainly can't be used to build the current wxWidgets sources anyhow, so remove all support for it, including a lot of extremely ugly workarounds for its bugs with template functions. git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@76546 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
This commit is contained in:
@@ -301,23 +301,15 @@
|
||||
// This is not a real option but is used as the default value for
|
||||
// wxUSE_STD_IOSTREAM, wxUSE_STD_STRING and wxUSE_STD_CONTAINERS.
|
||||
//
|
||||
// Currently the Digital Mars and Watcom compilers come without standard C++
|
||||
// library headers by default, wxUSE_STD_STRING can be set to 1 if you do have
|
||||
// them (e.g. from STLPort).
|
||||
#if defined(__DMC__) || defined(__WATCOMC__)
|
||||
#define wxUSE_STD_DEFAULT 0
|
||||
#else
|
||||
#define wxUSE_STD_DEFAULT 1
|
||||
#endif
|
||||
// Set it to 0 if you want to disable the use of all standard classes
|
||||
// completely for some reason.
|
||||
#define wxUSE_STD_DEFAULT 1
|
||||
|
||||
// Use standard C++ containers to implement wxVector<>, wxStack<>, wxDList<>
|
||||
// and wxHashXXX<> classes. If disabled, wxWidgets own (mostly compatible but
|
||||
// usually more limited) implementations are used which allows to avoid the
|
||||
// dependency on the C++ run-time library.
|
||||
//
|
||||
// Notice that the compilers mentioned in wxUSE_STD_DEFAULT comment above don't
|
||||
// support using standard containers.
|
||||
//
|
||||
// Default is 0 for compatibility reasons.
|
||||
//
|
||||
// Recommended setting: 1 unless compatibility with the official wxWidgets
|
||||
|
@@ -68,8 +68,6 @@
|
||||
#define __WX_BO_COMPILER ",Borland C++"
|
||||
#elif defined(__DIGITALMARS__)
|
||||
#define __WX_BO_COMPILER ",DigitalMars"
|
||||
#elif defined(__WATCOMC__)
|
||||
#define __WX_BO_COMPILER ",Watcom C++"
|
||||
#else
|
||||
#define __WX_BO_COMPILER
|
||||
#endif
|
||||
|
@@ -26,8 +26,6 @@
|
||||
#endif
|
||||
#elif defined(__GNUWIN32__) && !defined(__MINGW32__)
|
||||
#define wxUSE_WCHAR_T 0
|
||||
#elif defined(__WATCOMC__)
|
||||
#define wxUSE_WCHAR_T 0
|
||||
#else
|
||||
/* add additional compiler checks if this fails */
|
||||
#define wxUSE_WCHAR_T 1
|
||||
@@ -45,7 +43,7 @@
|
||||
|
||||
Actually MinGW has tchar.h, but it does not include wchar.h
|
||||
*/
|
||||
#if defined(__MINGW32__) || defined(__WATCOMC__)
|
||||
#if defined(__MINGW32__)
|
||||
#ifndef HAVE_WCHAR_H
|
||||
#define HAVE_WCHAR_H
|
||||
#endif
|
||||
@@ -93,8 +91,6 @@
|
||||
#elif defined(__BORLANDC__) && (__BORLANDC__ >= 0x520)
|
||||
#define wxHAVE_TCHAR_SUPPORT
|
||||
#include <ctype.h>
|
||||
#elif defined(__WATCOMC__)
|
||||
#define wxHAVE_TCHAR_SUPPORT
|
||||
#elif defined(__DMC__)
|
||||
#define wxHAVE_TCHAR_SUPPORT
|
||||
#elif defined(__MINGW32__) && wxCHECK_W32API_VERSION( 1, 0 )
|
||||
|
@@ -55,7 +55,6 @@
|
||||
|
||||
#elif defined(__BCPLUSPLUS__) && !defined(__BORLANDC__)
|
||||
# define __BORLANDC__
|
||||
#elif defined(__WATCOMC__)
|
||||
#elif defined(__SC__)
|
||||
# define __SYMANTECC__
|
||||
#elif defined(__SUNPRO_CC)
|
||||
@@ -114,22 +113,6 @@
|
||||
#define wxCHECK_SUNCC_VERSION(maj, min) (0)
|
||||
#endif
|
||||
|
||||
#ifndef __WATCOMC__
|
||||
# define wxWATCOM_VERSION(major,minor) 0
|
||||
# define wxCHECK_WATCOM_VERSION(major,minor) 0
|
||||
# define wxONLY_WATCOM_EARLIER_THAN(major,minor) 0
|
||||
# define WX_WATCOM_ONLY_CODE( x )
|
||||
#else
|
||||
# if __WATCOMC__ < 1200
|
||||
# error "Only Open Watcom is supported in this release"
|
||||
# endif
|
||||
|
||||
# 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) )
|
||||
# define WX_WATCOM_ONLY_CODE( x ) x
|
||||
#endif
|
||||
|
||||
/*
|
||||
This macro can be used to check that the version of mingw32 CRT is at least
|
||||
maj.min
|
||||
|
@@ -83,7 +83,7 @@
|
||||
/*
|
||||
Helpers for defining macros that expand into a single statement.
|
||||
|
||||
The standatd solution is to use "do { ... } while (0)" statement but MSVC
|
||||
The standard solution is to use "do { ... } while (0)" statement but MSVC
|
||||
generates a C4127 "condition expression is constant" warning for it so we
|
||||
use something which is just complicated enough to not be recognized as a
|
||||
constant but still simple enough to be optimized away.
|
||||
@@ -93,14 +93,8 @@
|
||||
Notice that wxASSERT_ARG_TYPE in wx/strvargarg.h relies on these macros
|
||||
creating some kind of a loop because it uses "break".
|
||||
*/
|
||||
#ifdef __WATCOMC__
|
||||
#define wxFOR_ONCE(name) for(int name=0; name<1; name++)
|
||||
#define wxSTATEMENT_MACRO_BEGIN wxFOR_ONCE(wxMAKE_UNIQUE_NAME(wxmacro)) {
|
||||
#define wxSTATEMENT_MACRO_END }
|
||||
#else
|
||||
#define wxSTATEMENT_MACRO_BEGIN do {
|
||||
#define wxSTATEMENT_MACRO_END } while ( (void)0, 0 )
|
||||
#endif
|
||||
#define wxSTATEMENT_MACRO_BEGIN do {
|
||||
#define wxSTATEMENT_MACRO_END } while ( (void)0, 0 )
|
||||
|
||||
/*
|
||||
Define __WXFUNCTION__ which is like standard __FUNCTION__ but defined as
|
||||
@@ -135,8 +129,6 @@
|
||||
#define HAVE_VARIADIC_MACROS 1
|
||||
#elif wxCHECK_VISUALC_VERSION(8)
|
||||
#define HAVE_VARIADIC_MACROS 1
|
||||
#elif wxCHECK_WATCOM_VERSION(1,2)
|
||||
#define HAVE_VARIADIC_MACROS 1
|
||||
#endif
|
||||
#endif /* !HAVE_VARIADIC_MACROS */
|
||||
|
||||
|
@@ -404,14 +404,7 @@ extern void WXDLLIMPEXP_BASE wxAbort();
|
||||
|
||||
It may be used both within a function and in the global scope.
|
||||
*/
|
||||
#if defined(__WATCOMC__)
|
||||
/* avoid "unused symbol" warning */
|
||||
#define wxCOMPILE_TIME_ASSERT(expr, msg) \
|
||||
class wxMAKE_UNIQUE_ASSERT_NAME { \
|
||||
unsigned int msg: expr; \
|
||||
wxMAKE_UNIQUE_ASSERT_NAME() { wxUnusedVar(msg); } \
|
||||
}
|
||||
#elif defined( __VMS )
|
||||
#if defined( __VMS )
|
||||
namespace wxdebug{
|
||||
|
||||
// HP aCC cannot deal with missing names for template value parameters
|
||||
|
@@ -243,8 +243,6 @@ typedef short int WXTYPE;
|
||||
#define HAVE_EXPLICIT
|
||||
#elif defined(__DIGITALMARS__)
|
||||
#define HAVE_EXPLICIT
|
||||
#elif defined(__WATCOMC__)
|
||||
#define HAVE_EXPLICIT
|
||||
#endif
|
||||
#endif /* !HAVE_EXPLICIT */
|
||||
|
||||
@@ -421,13 +419,6 @@ typedef short int WXTYPE;
|
||||
special cases.
|
||||
*/
|
||||
|
||||
#ifdef __WATCOMC__
|
||||
/* Watcom uses array type for va_list except for PPC and Alpha */
|
||||
#if !defined(__PPC__) && !defined(__AXP__)
|
||||
#define VA_LIST_IS_ARRAY
|
||||
#endif
|
||||
#endif /* __WATCOMC__ */
|
||||
|
||||
#if defined(__PPC__) && (defined(_CALL_SYSV) || defined (_WIN32))
|
||||
/*
|
||||
PPC using SysV ABI and NT/PPC are special in that they use an
|
||||
@@ -882,10 +873,6 @@ typedef short int WXTYPE;
|
||||
/* compiler specific settings */
|
||||
/* ---------------------------------------------------------------------------- */
|
||||
|
||||
#if wxONLY_WATCOM_EARLIER_THAN(1,4)
|
||||
typedef short mode_t;
|
||||
#endif
|
||||
|
||||
/* where should i put this? we need to make sure of this as it breaks */
|
||||
/* the <iostream> code. */
|
||||
#if !wxUSE_IOSTREAMH && defined(__WXDEBUG__)
|
||||
@@ -1128,10 +1115,6 @@ typedef wxUint32 wxDword;
|
||||
#define wxLongLong_t __int64
|
||||
#define wxLongLongSuffix i64
|
||||
#define wxLongLongFmtSpec "L"
|
||||
#elif (defined(__WATCOMC__) && (defined(__WIN32__) || defined(__DOS__)))
|
||||
#define wxLongLong_t __int64
|
||||
#define wxLongLongSuffix i64
|
||||
#define wxLongLongFmtSpec "L"
|
||||
#elif defined(__DIGITALMARS__)
|
||||
#define wxLongLong_t __int64
|
||||
#define wxLongLongSuffix LL
|
||||
@@ -1218,8 +1201,6 @@ typedef wxUint32 wxDword;
|
||||
#if defined(_SSIZE_T_) || defined(_SSIZE_T_DEFINED)
|
||||
#define HAVE_SSIZE_T
|
||||
#endif
|
||||
#elif wxCHECK_WATCOM_VERSION(1,4)
|
||||
#define HAVE_SSIZE_T
|
||||
#endif
|
||||
#endif /* !HAVE_SSIZE_T */
|
||||
|
||||
|
@@ -20,10 +20,9 @@
|
||||
# define WXIMPORT __attribute__ ((visibility("default")))
|
||||
#elif defined(__WINDOWS__)
|
||||
/*
|
||||
__declspec works in BC++ 5 and later, Watcom C++ 11.0 and later as well
|
||||
as VC++.
|
||||
__declspec works in BC++ 5 and later as well as VC++.
|
||||
*/
|
||||
# if defined(__VISUALC__) || defined(__BORLANDC__) || defined(__WATCOMC__)
|
||||
# if defined(__VISUALC__) || defined(__BORLANDC__)
|
||||
# define WXEXPORT __declspec(dllexport)
|
||||
# define WXIMPORT __declspec(dllimport)
|
||||
/*
|
||||
|
@@ -88,12 +88,9 @@
|
||||
defined(__WXMSW__)
|
||||
|
||||
/*
|
||||
These compilers can't deal with templates in wx/rawbmp.h:
|
||||
- HP aCC for PA-RISC
|
||||
- Watcom < 1.8
|
||||
HP aCC for PA-RISC can't deal with templates in wx/rawbmp.h.
|
||||
*/
|
||||
#if !wxONLY_WATCOM_EARLIER_THAN(1, 8) && \
|
||||
!(defined(__HP_aCC) && defined(__hppa))
|
||||
#if !(defined(__HP_aCC) && defined(__hppa))
|
||||
#define wxHAS_RAW_BITMAP
|
||||
#endif
|
||||
#endif
|
||||
|
@@ -40,11 +40,6 @@
|
||||
#endif // native Win compiler
|
||||
|
||||
#if defined(__DOS__)
|
||||
#ifdef __WATCOMC__
|
||||
#include <direct.h>
|
||||
#include <dos.h>
|
||||
#include <io.h>
|
||||
#endif
|
||||
#ifdef __DJGPP__
|
||||
#include <io.h>
|
||||
#include <unistd.h>
|
||||
@@ -180,7 +175,6 @@ enum wxPosixPermissions
|
||||
(defined(__MINGW32__) && !defined(__WINE__) && \
|
||||
wxCHECK_W32API_VERSION(0, 5)) || \
|
||||
defined(__DMC__) || \
|
||||
defined(__WATCOMC__) || \
|
||||
defined(__BORLANDC__) \
|
||||
)
|
||||
|
||||
@@ -208,8 +202,8 @@ enum wxPosixPermissions
|
||||
#define wxFtell ftello64
|
||||
#endif
|
||||
|
||||
// other Windows compilers (DMC, Watcom, and Borland) don't have huge file
|
||||
// support (or at least not all functions needed for it by wx) currently
|
||||
// other Windows compilers (Borland) don't have huge file support (or at
|
||||
// least not all functions needed for it by wx) currently
|
||||
|
||||
// types
|
||||
|
||||
@@ -228,12 +222,8 @@ enum wxPosixPermissions
|
||||
#define wxPOSIX_STRUCT(s) struct wxPOSIX_IDENT(s)
|
||||
#endif
|
||||
|
||||
// Notice that Watcom is the only compiler to have a wide char
|
||||
// version of struct stat as well as a wide char stat function variant.
|
||||
// This was dropped since OW 1.4 "for consistency across platforms".
|
||||
//
|
||||
// Borland is also special in that it uses _stat with Unicode functions
|
||||
// (for MSVC compatibility?) but stat with ANSI ones
|
||||
// Borland is special in that it uses _stat with Unicode functions (for
|
||||
// MSVC compatibility?) but stat with ANSI ones
|
||||
#ifdef __BORLANDC__
|
||||
#if wxHAS_HUGE_FILES
|
||||
#define wxStructStat struct stati64
|
||||
@@ -246,17 +236,9 @@ enum wxPosixPermissions
|
||||
#endif
|
||||
#else // !__BORLANDC__
|
||||
#ifdef wxHAS_HUGE_FILES
|
||||
#if wxUSE_UNICODE && wxONLY_WATCOM_EARLIER_THAN(1,4)
|
||||
#define wxStructStat struct _wstati64
|
||||
#else
|
||||
#define wxStructStat struct _stati64
|
||||
#endif
|
||||
#define wxStructStat struct _stati64
|
||||
#else
|
||||
#if wxUSE_UNICODE && wxONLY_WATCOM_EARLIER_THAN(1,4)
|
||||
#define wxStructStat struct _wstat
|
||||
#else
|
||||
#define wxStructStat struct _stat
|
||||
#endif
|
||||
#define wxStructStat struct _stat
|
||||
#endif
|
||||
#endif // __BORLANDC__/!__BORLANDC__
|
||||
|
||||
@@ -269,7 +251,7 @@ enum wxPosixPermissions
|
||||
// to avoid using them as they're not present in earlier versions and
|
||||
// always using the native functions spelling is easier than testing for
|
||||
// the versions
|
||||
#if defined(__BORLANDC__) || defined(__DMC__) || defined(__WATCOMC__) || defined(__MINGW64__)
|
||||
#if defined(__BORLANDC__) || defined(__DMC__) || defined(__MINGW64__)
|
||||
#define wxPOSIX_IDENT(func) ::func
|
||||
#else // by default assume MSVC-compatible names
|
||||
#define wxPOSIX_IDENT(func) _ ## func
|
||||
@@ -300,17 +282,15 @@ enum wxPosixPermissions
|
||||
#define wxTell wxPOSIX_IDENT(tell)
|
||||
#endif // wxHAS_HUGE_FILES/!wxHAS_HUGE_FILES
|
||||
|
||||
#ifndef __WATCOMC__
|
||||
#if !defined(__BORLANDC__) || (__BORLANDC__ > 0x540)
|
||||
// NB: this one is not POSIX and always has the underscore
|
||||
#define wxFsync _commit
|
||||
#if !defined(__BORLANDC__) || (__BORLANDC__ > 0x540)
|
||||
// NB: this one is not POSIX and always has the underscore
|
||||
#define wxFsync _commit
|
||||
|
||||
// could be already defined by configure (Cygwin)
|
||||
#ifndef HAVE_FSYNC
|
||||
#define HAVE_FSYNC
|
||||
#endif
|
||||
#endif // BORLANDC
|
||||
#endif
|
||||
// could be already defined by configure (Cygwin)
|
||||
#ifndef HAVE_FSYNC
|
||||
#define HAVE_FSYNC
|
||||
#endif
|
||||
#endif // BORLANDC
|
||||
|
||||
#define wxEof wxPOSIX_IDENT(eof)
|
||||
|
||||
|
@@ -302,23 +302,15 @@
|
||||
// This is not a real option but is used as the default value for
|
||||
// wxUSE_STD_IOSTREAM, wxUSE_STD_STRING and wxUSE_STD_CONTAINERS.
|
||||
//
|
||||
// Currently the Digital Mars and Watcom compilers come without standard C++
|
||||
// library headers by default, wxUSE_STD_STRING can be set to 1 if you do have
|
||||
// them (e.g. from STLPort).
|
||||
#if defined(__DMC__) || defined(__WATCOMC__)
|
||||
#define wxUSE_STD_DEFAULT 0
|
||||
#else
|
||||
#define wxUSE_STD_DEFAULT 1
|
||||
#endif
|
||||
// Set it to 0 if you want to disable the use of all standard classes
|
||||
// completely for some reason.
|
||||
#define wxUSE_STD_DEFAULT 1
|
||||
|
||||
// Use standard C++ containers to implement wxVector<>, wxStack<>, wxDList<>
|
||||
// and wxHashXXX<> classes. If disabled, wxWidgets own (mostly compatible but
|
||||
// usually more limited) implementations are used which allows to avoid the
|
||||
// dependency on the C++ run-time library.
|
||||
//
|
||||
// Notice that the compilers mentioned in wxUSE_STD_DEFAULT comment above don't
|
||||
// support using standard containers.
|
||||
//
|
||||
// Default is 0 for compatibility reasons.
|
||||
//
|
||||
// Recommended setting: 1 unless compatibility with the official wxWidgets
|
||||
|
112
include/wx/log.h
112
include/wx/log.h
@@ -1018,89 +1018,6 @@ public:
|
||||
)
|
||||
#endif // WXWIN_COMPATIBILITY_2_8
|
||||
|
||||
#ifdef __WATCOMC__
|
||||
// workaround for http://bugzilla.openwatcom.org/show_bug.cgi?id=351
|
||||
WX_VARARG_WATCOM_WORKAROUND(void, Log,
|
||||
1, (const wxString&),
|
||||
(wxFormatString(f1)))
|
||||
WX_VARARG_WATCOM_WORKAROUND(void, Log,
|
||||
1, (const wxCStrData&),
|
||||
(wxFormatString(f1)))
|
||||
WX_VARARG_WATCOM_WORKAROUND(void, Log,
|
||||
1, (const char*),
|
||||
(wxFormatString(f1)))
|
||||
WX_VARARG_WATCOM_WORKAROUND(void, Log,
|
||||
1, (const wchar_t*),
|
||||
(wxFormatString(f1)))
|
||||
|
||||
WX_VARARG_WATCOM_WORKAROUND(void, Log,
|
||||
2, (long, const wxString&),
|
||||
(f1, wxFormatString(f2)))
|
||||
WX_VARARG_WATCOM_WORKAROUND(void, Log,
|
||||
2, (long, const wxCStrData&),
|
||||
(f1, wxFormatString(f2)))
|
||||
WX_VARARG_WATCOM_WORKAROUND(void, Log,
|
||||
2, (long, const char *),
|
||||
(f1, wxFormatString(f2)))
|
||||
WX_VARARG_WATCOM_WORKAROUND(void, Log,
|
||||
2, (long, const wchar_t *),
|
||||
(f1, wxFormatString(f2)))
|
||||
|
||||
WX_VARARG_WATCOM_WORKAROUND(void, Log,
|
||||
2, (wxObject *, const wxString&),
|
||||
(f1, wxFormatString(f2)))
|
||||
WX_VARARG_WATCOM_WORKAROUND(void, Log,
|
||||
2, (wxObject *, const wxCStrData&),
|
||||
(f1, wxFormatString(f2)))
|
||||
WX_VARARG_WATCOM_WORKAROUND(void, Log,
|
||||
2, (wxObject *, const char *),
|
||||
(f1, wxFormatString(f2)))
|
||||
WX_VARARG_WATCOM_WORKAROUND(void, Log,
|
||||
2, (wxObject *, const wchar_t *),
|
||||
(f1, wxFormatString(f2)))
|
||||
|
||||
WX_VARARG_WATCOM_WORKAROUND(void, LogAtLevel,
|
||||
2, (wxLogLevel, const wxString&),
|
||||
(f1, wxFormatString(f2)))
|
||||
WX_VARARG_WATCOM_WORKAROUND(void, LogAtLevel,
|
||||
2, (wxLogLevel, const wxCStrData&),
|
||||
(f1, wxFormatString(f2)))
|
||||
WX_VARARG_WATCOM_WORKAROUND(void, LogAtLevel,
|
||||
2, (wxLogLevel, const char *),
|
||||
(f1, wxFormatString(f2)))
|
||||
WX_VARARG_WATCOM_WORKAROUND(void, LogAtLevel,
|
||||
2, (wxLogLevel, const wchar_t *),
|
||||
(f1, wxFormatString(f2)))
|
||||
|
||||
WX_VARARG_WATCOM_WORKAROUND(void, LogTrace,
|
||||
2, (const wxString&, const wxString&),
|
||||
(f1, wxFormatString(f2)))
|
||||
WX_VARARG_WATCOM_WORKAROUND(void, LogTrace,
|
||||
2, (const wxString&, const wxCStrData&),
|
||||
(f1, wxFormatString(f2)))
|
||||
WX_VARARG_WATCOM_WORKAROUND(void, LogTrace,
|
||||
2, (const wxString&, const char *),
|
||||
(f1, wxFormatString(f2)))
|
||||
WX_VARARG_WATCOM_WORKAROUND(void, LogTrace,
|
||||
2, (const wxString&, const wchar_t *),
|
||||
(f1, wxFormatString(f2)))
|
||||
|
||||
#if WXWIN_COMPATIBILITY_2_8
|
||||
WX_VARARG_WATCOM_WORKAROUND(void, LogTrace,
|
||||
2, (wxTraceMask, wxTraceMask),
|
||||
(f1, wxFormatString(f2)))
|
||||
WX_VARARG_WATCOM_WORKAROUND(void, LogTrace,
|
||||
2, (wxTraceMask, const wxCStrData&),
|
||||
(f1, wxFormatString(f2)))
|
||||
WX_VARARG_WATCOM_WORKAROUND(void, LogTrace,
|
||||
2, (wxTraceMask, const char *),
|
||||
(f1, wxFormatString(f2)))
|
||||
WX_VARARG_WATCOM_WORKAROUND(void, LogTrace,
|
||||
2, (wxTraceMask, const wchar_t *),
|
||||
(f1, wxFormatString(f2)))
|
||||
#endif // WXWIN_COMPATIBILITY_2_8
|
||||
#endif // __WATCOMC__
|
||||
|
||||
private:
|
||||
#if !wxUSE_UTF8_LOCALE_ONLY
|
||||
void DoLog(const wxChar *format, ...)
|
||||
@@ -1441,34 +1358,14 @@ WXDLLIMPEXP_BASE const wxChar* wxSysErrorMsg(unsigned long nErrCode = 0);
|
||||
#undef wxUSE_LOG_TRACE
|
||||
#define wxUSE_LOG_TRACE 0
|
||||
|
||||
#if defined(__WATCOMC__) || defined(__MINGW32__)
|
||||
// Mingw has similar problem with wxLogSysError:
|
||||
#define WX_WATCOM_OR_MINGW_ONLY_CODE( x ) x
|
||||
#else
|
||||
#define WX_WATCOM_OR_MINGW_ONLY_CODE( x )
|
||||
#endif
|
||||
|
||||
// define macros for defining log functions which do nothing at all
|
||||
//
|
||||
// WX_WATCOM_ONLY_CODE is needed to work around
|
||||
// http://bugzilla.openwatcom.org/show_bug.cgi?id=351
|
||||
#define wxDEFINE_EMPTY_LOG_FUNCTION(level) \
|
||||
WX_DEFINE_VARARG_FUNC_NOP(wxLog##level, 1, (const wxFormatString&)) \
|
||||
WX_WATCOM_ONLY_CODE( \
|
||||
WX_DEFINE_VARARG_FUNC_NOP(wxLog##level, 1, (const char*)) \
|
||||
WX_DEFINE_VARARG_FUNC_NOP(wxLog##level, 1, (const wchar_t*)) \
|
||||
WX_DEFINE_VARARG_FUNC_NOP(wxLog##level, 1, (const wxCStrData&)) \
|
||||
) \
|
||||
inline void wxVLog##level(const wxFormatString& WXUNUSED(format), \
|
||||
va_list WXUNUSED(argptr)) { } \
|
||||
|
||||
#define wxDEFINE_EMPTY_LOG_FUNCTION2(level, argclass) \
|
||||
WX_DEFINE_VARARG_FUNC_NOP(wxLog##level, 2, (argclass, const wxFormatString&)) \
|
||||
WX_WATCOM_OR_MINGW_ONLY_CODE( \
|
||||
WX_DEFINE_VARARG_FUNC_NOP(wxLog##level, 2, (argclass, const char*)) \
|
||||
WX_DEFINE_VARARG_FUNC_NOP(wxLog##level, 2, (argclass, const wchar_t*)) \
|
||||
WX_DEFINE_VARARG_FUNC_NOP(wxLog##level, 2, (argclass, const wxCStrData&)) \
|
||||
) \
|
||||
inline void wxVLog##level(argclass WXUNUSED(arg), \
|
||||
const wxFormatString& WXUNUSED(format), \
|
||||
va_list WXUNUSED(argptr)) {}
|
||||
@@ -1562,11 +1459,6 @@ public:
|
||||
WX_DEFINE_VARARG_FUNC_NOP(wxLogTrace, 2, (wxTraceMask, const wxFormatString&))
|
||||
#endif
|
||||
WX_DEFINE_VARARG_FUNC_NOP(wxLogTrace, 2, (const wxString&, const wxFormatString&))
|
||||
#ifdef __WATCOMC__
|
||||
// workaround for http://bugzilla.openwatcom.org/show_bug.cgi?id=351
|
||||
WX_DEFINE_VARARG_FUNC_NOP(wxLogTrace, 2, (const char*, const char*))
|
||||
WX_DEFINE_VARARG_FUNC_NOP(wxLogTrace, 2, (const wchar_t*, const wchar_t*))
|
||||
#endif
|
||||
#endif // HAVE_VARIADIC_MACROS/!HAVE_VARIADIC_MACROS
|
||||
#endif // wxUSE_LOG_TRACE/!wxUSE_LOG_TRACE
|
||||
|
||||
@@ -1607,10 +1499,6 @@ wxSafeShowMessage(const wxString& title, const wxString& text);
|
||||
#include "wx/cocoa/log.h"
|
||||
#endif
|
||||
|
||||
#ifdef WX_WATCOM_ONLY_CODE
|
||||
#undef WX_WATCOM_ONLY_CODE
|
||||
#endif
|
||||
|
||||
// macro which disables debug logging in release builds: this is done by
|
||||
// default by wxIMPLEMENT_APP() so usually it doesn't need to be used explicitly
|
||||
#if defined(NDEBUG) && wxUSE_LOG_DEBUG
|
||||
|
@@ -46,7 +46,7 @@
|
||||
"integers, using emulation class instead.\n" \
|
||||
"Please report your compiler version to " \
|
||||
"wx-dev@lists.wxwidgets.org!"
|
||||
#elif !defined(__WATCOMC__)
|
||||
#else
|
||||
#pragma warning "Your compiler does not appear to support 64 bit "\
|
||||
"integers, using emulation class instead.\n" \
|
||||
"Please report your compiler version to " \
|
||||
|
@@ -57,7 +57,7 @@
|
||||
#if __cplusplus >= 201103
|
||||
#include <cmath>
|
||||
#define wxFinite(x) std::isfinite(x)
|
||||
#elif defined(__VISUALC__) || defined(__BORLANDC__) || defined(__WATCOMC__)
|
||||
#elif defined(__VISUALC__) || defined(__BORLANDC__)
|
||||
#include <float.h>
|
||||
#define wxFinite(x) _finite(x)
|
||||
#elif defined(__MINGW64_TOOLCHAIN__) || defined(__clang__)
|
||||
|
@@ -175,49 +175,6 @@ public:
|
||||
const CtorString&,
|
||||
const CtorString&),
|
||||
VarArgInit, VarArgInit)
|
||||
#ifdef __WATCOMC__
|
||||
// workaround for http://bugzilla.openwatcom.org/show_bug.cgi?id=351
|
||||
WX_VARARG_WATCOM_WORKAROUND_CTOR(
|
||||
wxFileTypeInfo,
|
||||
4, (const wxString&,
|
||||
const wxString&,
|
||||
const wxString&,
|
||||
const wxString&),
|
||||
(CtorString(f1),
|
||||
CtorString(f2),
|
||||
CtorString(f3),
|
||||
CtorString(f4)));
|
||||
WX_VARARG_WATCOM_WORKAROUND_CTOR(
|
||||
wxFileTypeInfo,
|
||||
4, (const wxCStrData&,
|
||||
const wxCStrData&,
|
||||
const wxCStrData&,
|
||||
const wxCStrData&),
|
||||
(CtorString(f1),
|
||||
CtorString(f2),
|
||||
CtorString(f3),
|
||||
CtorString(f4)));
|
||||
WX_VARARG_WATCOM_WORKAROUND_CTOR(
|
||||
wxFileTypeInfo,
|
||||
4, (const char*,
|
||||
const char*,
|
||||
const char*,
|
||||
const char*),
|
||||
(CtorString(f1),
|
||||
CtorString(f2),
|
||||
CtorString(f3),
|
||||
CtorString(f4)));
|
||||
WX_VARARG_WATCOM_WORKAROUND_CTOR(
|
||||
wxFileTypeInfo,
|
||||
4, (const wchar_t*,
|
||||
const wchar_t*,
|
||||
const wchar_t*,
|
||||
const wchar_t*),
|
||||
(CtorString(f1),
|
||||
CtorString(f2),
|
||||
CtorString(f3),
|
||||
CtorString(f4)));
|
||||
#endif
|
||||
|
||||
// the array elements correspond to the parameters of the ctor above in
|
||||
// the same order
|
||||
|
@@ -302,23 +302,15 @@
|
||||
// This is not a real option but is used as the default value for
|
||||
// wxUSE_STD_IOSTREAM, wxUSE_STD_STRING and wxUSE_STD_CONTAINERS.
|
||||
//
|
||||
// Currently the Digital Mars and Watcom compilers come without standard C++
|
||||
// library headers by default, wxUSE_STD_STRING can be set to 1 if you do have
|
||||
// them (e.g. from STLPort).
|
||||
#if defined(__DMC__) || defined(__WATCOMC__)
|
||||
#define wxUSE_STD_DEFAULT 0
|
||||
#else
|
||||
#define wxUSE_STD_DEFAULT 1
|
||||
#endif
|
||||
// Set it to 0 if you want to disable the use of all standard classes
|
||||
// completely for some reason.
|
||||
#define wxUSE_STD_DEFAULT 1
|
||||
|
||||
// Use standard C++ containers to implement wxVector<>, wxStack<>, wxDList<>
|
||||
// and wxHashXXX<> classes. If disabled, wxWidgets own (mostly compatible but
|
||||
// usually more limited) implementations are used which allows to avoid the
|
||||
// dependency on the C++ run-time library.
|
||||
//
|
||||
// Notice that the compilers mentioned in wxUSE_STD_DEFAULT comment above don't
|
||||
// support using standard containers.
|
||||
//
|
||||
// Default is 0 for compatibility reasons.
|
||||
//
|
||||
// Recommended setting: 1 unless compatibility with the official wxWidgets
|
||||
|
@@ -40,17 +40,6 @@ public:
|
||||
// void Printf(const wxString& format, ...) = 0;
|
||||
WX_DEFINE_VARARG_FUNC_VOID(Printf, 1, (const wxFormatString&),
|
||||
DoPrintfWchar, DoPrintfUtf8)
|
||||
#ifdef __WATCOMC__
|
||||
// workaround for http://bugzilla.openwatcom.org/show_bug.cgi?id=351
|
||||
WX_VARARG_WATCOM_WORKAROUND(void, Printf, 1, (const wxString&),
|
||||
(wxFormatString(f1)));
|
||||
WX_VARARG_WATCOM_WORKAROUND(void, Printf, 1, (const wxCStrData&),
|
||||
(wxFormatString(f1)));
|
||||
WX_VARARG_WATCOM_WORKAROUND(void, Printf, 1, (const char*),
|
||||
(wxFormatString(f1)));
|
||||
WX_VARARG_WATCOM_WORKAROUND(void, Printf, 1, (const wchar_t*),
|
||||
(wxFormatString(f1)));
|
||||
#endif
|
||||
|
||||
// called by DoPrintf() to output formatted string but can also be called
|
||||
// directly if no formatting is needed
|
||||
|
@@ -120,7 +120,7 @@
|
||||
*/
|
||||
|
||||
#ifndef wxUSE_NORLANDER_HEADERS
|
||||
# if ( wxCHECK_WATCOM_VERSION(1,0) || defined(__WINE__) ) || \
|
||||
# if ( defined(__WINE__) ) || \
|
||||
((defined(__MINGW32__) || defined(__CYGWIN__)) && ((__GNUC__>2) ||((__GNUC__==2) && (__GNUC_MINOR__>=95))))
|
||||
# define wxUSE_NORLANDER_HEADERS 1
|
||||
# else
|
||||
|
@@ -52,16 +52,11 @@
|
||||
#endif
|
||||
#endif
|
||||
|
||||
#if wxCHECK_WATCOM_VERSION(1,0)
|
||||
#define HAVE_W32API_H
|
||||
#endif
|
||||
|
||||
/* check for MinGW/Cygwin w32api version ( releases >= 0.5, only ) */
|
||||
#if defined( HAVE_W32API_H )
|
||||
#include <w32api.h>
|
||||
#endif
|
||||
|
||||
/* Watcom can't handle defined(xxx) here: */
|
||||
#if defined(__W32API_MAJOR_VERSION) && defined(__W32API_MINOR_VERSION)
|
||||
#define wxCHECK_W32API_VERSION( major, minor ) \
|
||||
( ( ( __W32API_MAJOR_VERSION > (major) ) \
|
||||
|
@@ -480,13 +480,6 @@ typedef struct _OSVERSIONINFOEX {
|
||||
#endif
|
||||
// DMC++
|
||||
|
||||
/*
|
||||
* The following are specifically required for OpenWatcom C++ (none at present)
|
||||
*/
|
||||
|
||||
#if defined(__WATCOMC__)
|
||||
#endif
|
||||
|
||||
/*
|
||||
* The following are specifically required for MinGW (none at present)
|
||||
*/
|
||||
|
@@ -179,7 +179,6 @@ extern LONG APIENTRY _EXPORT
|
||||
#elif defined(__VISUALC__) \
|
||||
|| defined(__BORLANDC__) \
|
||||
|| defined(__DMC__) \
|
||||
|| defined(__WATCOMC__) \
|
||||
|| defined(__MINGW32__)
|
||||
#define wxGetOSFHandle(fd) ((HANDLE)_get_osfhandle(fd))
|
||||
#define wxOpenOSFHandle(h, flags) (_open_osfhandle(wxPtrToUInt(h), flags))
|
||||
|
@@ -302,23 +302,15 @@
|
||||
// This is not a real option but is used as the default value for
|
||||
// wxUSE_STD_IOSTREAM, wxUSE_STD_STRING and wxUSE_STD_CONTAINERS.
|
||||
//
|
||||
// Currently the Digital Mars and Watcom compilers come without standard C++
|
||||
// library headers by default, wxUSE_STD_STRING can be set to 1 if you do have
|
||||
// them (e.g. from STLPort).
|
||||
#if defined(__DMC__) || defined(__WATCOMC__)
|
||||
#define wxUSE_STD_DEFAULT 0
|
||||
#else
|
||||
#define wxUSE_STD_DEFAULT 1
|
||||
#endif
|
||||
// Set it to 0 if you want to disable the use of all standard classes
|
||||
// completely for some reason.
|
||||
#define wxUSE_STD_DEFAULT 1
|
||||
|
||||
// Use standard C++ containers to implement wxVector<>, wxStack<>, wxDList<>
|
||||
// and wxHashXXX<> classes. If disabled, wxWidgets own (mostly compatible but
|
||||
// usually more limited) implementations are used which allows to avoid the
|
||||
// dependency on the C++ run-time library.
|
||||
//
|
||||
// Notice that the compilers mentioned in wxUSE_STD_DEFAULT comment above don't
|
||||
// support using standard containers.
|
||||
//
|
||||
// Default is 0 for compatibility reasons.
|
||||
//
|
||||
// Recommended setting: 1 unless compatibility with the official wxWidgets
|
||||
|
@@ -302,23 +302,15 @@
|
||||
// This is not a real option but is used as the default value for
|
||||
// wxUSE_STD_IOSTREAM, wxUSE_STD_STRING and wxUSE_STD_CONTAINERS.
|
||||
//
|
||||
// Currently the Digital Mars and Watcom compilers come without standard C++
|
||||
// library headers by default, wxUSE_STD_STRING can be set to 1 if you do have
|
||||
// them (e.g. from STLPort).
|
||||
#if defined(__DMC__) || defined(__WATCOMC__)
|
||||
#define wxUSE_STD_DEFAULT 0
|
||||
#else
|
||||
#define wxUSE_STD_DEFAULT 1
|
||||
#endif
|
||||
// Set it to 0 if you want to disable the use of all standard classes
|
||||
// completely for some reason.
|
||||
#define wxUSE_STD_DEFAULT 1
|
||||
|
||||
// Use standard C++ containers to implement wxVector<>, wxStack<>, wxDList<>
|
||||
// and wxHashXXX<> classes. If disabled, wxWidgets own (mostly compatible but
|
||||
// usually more limited) implementations are used which allows to avoid the
|
||||
// dependency on the C++ run-time library.
|
||||
//
|
||||
// Notice that the compilers mentioned in wxUSE_STD_DEFAULT comment above don't
|
||||
// support using standard containers.
|
||||
//
|
||||
// Default is 0 for compatibility reasons.
|
||||
//
|
||||
// Recommended setting: 1 unless compatibility with the official wxWidgets
|
||||
|
@@ -303,23 +303,15 @@
|
||||
// This is not a real option but is used as the default value for
|
||||
// wxUSE_STD_IOSTREAM, wxUSE_STD_STRING and wxUSE_STD_CONTAINERS.
|
||||
//
|
||||
// Currently the Digital Mars and Watcom compilers come without standard C++
|
||||
// library headers by default, wxUSE_STD_STRING can be set to 1 if you do have
|
||||
// them (e.g. from STLPort).
|
||||
#if defined(__DMC__) || defined(__WATCOMC__)
|
||||
#define wxUSE_STD_DEFAULT 0
|
||||
#else
|
||||
#define wxUSE_STD_DEFAULT 1
|
||||
#endif
|
||||
// Set it to 0 if you want to disable the use of all standard classes
|
||||
// completely for some reason.
|
||||
#define wxUSE_STD_DEFAULT 1
|
||||
|
||||
// Use standard C++ containers to implement wxVector<>, wxStack<>, wxDList<>
|
||||
// and wxHashXXX<> classes. If disabled, wxWidgets own (mostly compatible but
|
||||
// usually more limited) implementations are used which allows to avoid the
|
||||
// dependency on the C++ run-time library.
|
||||
//
|
||||
// Notice that the compilers mentioned in wxUSE_STD_DEFAULT comment above don't
|
||||
// support using standard containers.
|
||||
//
|
||||
// Default is 0 for compatibility reasons.
|
||||
//
|
||||
// Recommended setting: 1 unless compatibility with the official wxWidgets
|
||||
|
@@ -292,12 +292,8 @@
|
||||
# ifndef __DOS__
|
||||
# define __DOS__
|
||||
# endif
|
||||
/* size_t is the same as unsigned int for Watcom 11 compiler, */
|
||||
/* so define it if it hadn't been done by configure yet */
|
||||
/* define it if it hadn't been done by configure yet */
|
||||
# if !defined(wxSIZE_T_IS_UINT) && !defined(wxSIZE_T_IS_ULONG)
|
||||
# ifdef __WATCOMC__
|
||||
# define wxSIZE_T_IS_UINT
|
||||
# endif
|
||||
# ifdef __DJGPP__
|
||||
# define wxSIZE_T_IS_ULONG
|
||||
# endif
|
||||
@@ -421,8 +417,7 @@
|
||||
_UNICODE macros as it includes _mingw.h which relies on them being set.
|
||||
*/
|
||||
#if ( defined( __GNUWIN32__ ) || defined( __MINGW32__ ) || \
|
||||
( defined( __CYGWIN__ ) && defined( __WINDOWS__ ) ) || \
|
||||
wxCHECK_WATCOM_VERSION(1,0) ) && \
|
||||
( defined( __CYGWIN__ ) && defined( __WINDOWS__ ) ) ) && \
|
||||
!defined(__DOS__) && \
|
||||
!defined(__WXMOTIF__) && \
|
||||
!defined(__WXX11__)
|
||||
@@ -576,7 +571,7 @@
|
||||
#if defined(_MSC_VER) && (_MSC_VER >= 1310)
|
||||
# undef wxUSE_IOSTREAMH
|
||||
# define wxUSE_IOSTREAMH 0
|
||||
#elif defined(__DMC__) || defined(__WATCOMC__)
|
||||
#elif defined(__DMC__)
|
||||
# undef wxUSE_IOSTREAMH
|
||||
# define wxUSE_IOSTREAMH 1
|
||||
#elif defined(__MINGW32__)
|
||||
|
@@ -14,18 +14,12 @@
|
||||
|
||||
#if wxUSE_SELECT_DISPATCHER
|
||||
|
||||
#if defined(HAVE_SYS_SELECT_H) || defined(__WATCOMC__)
|
||||
#if defined(HAVE_SYS_SELECT_H)
|
||||
#include <sys/time.h>
|
||||
#include <sys/select.h>
|
||||
#endif
|
||||
|
||||
#ifdef __WATCOMC__
|
||||
#include <types.h>
|
||||
#include <sys/ioctl.h>
|
||||
#include <tcpustd.h>
|
||||
#else
|
||||
#include <sys/types.h>
|
||||
#endif
|
||||
#include <sys/types.h>
|
||||
|
||||
#include "wx/private/fdiodispatcher.h"
|
||||
|
||||
|
@@ -26,30 +26,6 @@
|
||||
// helpers
|
||||
// ----------------------------------------------------------------------------
|
||||
|
||||
#ifdef __WATCOMC__
|
||||
|
||||
// WATCOM-FIXME: C++ of Open Watcom 1.3 doesn't like OnScopeExit() created
|
||||
// through template so it must be workarounded with dedicated inlined macro.
|
||||
// For compatibility with Watcom compilers wxPrivate::OnScopeExit must be
|
||||
// replaced with wxPrivateOnScopeExit but in user code (for everyone who
|
||||
// doesn't care about OW compatibility) wxPrivate::OnScopeExit still works.
|
||||
|
||||
#define wxPrivateOnScopeExit(guard) \
|
||||
{ \
|
||||
if ( !(guard).WasDismissed() ) \
|
||||
{ \
|
||||
wxTRY \
|
||||
{ \
|
||||
(guard).Execute(); \
|
||||
} \
|
||||
wxCATCH_ALL(;) \
|
||||
} \
|
||||
}
|
||||
|
||||
#define wxPrivateUse(n) wxUnusedVar(n)
|
||||
|
||||
#else
|
||||
|
||||
namespace wxPrivate
|
||||
{
|
||||
// in the original implementation this was a member template function of
|
||||
@@ -79,8 +55,6 @@ namespace wxPrivate
|
||||
#define wxPrivateOnScopeExit(n) wxPrivate::OnScopeExit(n)
|
||||
#define wxPrivateUse(n) wxPrivate::Use(n)
|
||||
|
||||
#endif
|
||||
|
||||
// ============================================================================
|
||||
// wxScopeGuard for functions and functors
|
||||
// ============================================================================
|
||||
|
@@ -298,23 +298,15 @@
|
||||
// This is not a real option but is used as the default value for
|
||||
// wxUSE_STD_IOSTREAM, wxUSE_STD_STRING and wxUSE_STD_CONTAINERS.
|
||||
//
|
||||
// Currently the Digital Mars and Watcom compilers come without standard C++
|
||||
// library headers by default, wxUSE_STD_STRING can be set to 1 if you do have
|
||||
// them (e.g. from STLPort).
|
||||
#if defined(__DMC__) || defined(__WATCOMC__)
|
||||
#define wxUSE_STD_DEFAULT 0
|
||||
#else
|
||||
#define wxUSE_STD_DEFAULT 1
|
||||
#endif
|
||||
// Set it to 0 if you want to disable the use of all standard classes
|
||||
// completely for some reason.
|
||||
#define wxUSE_STD_DEFAULT 1
|
||||
|
||||
// Use standard C++ containers to implement wxVector<>, wxStack<>, wxDList<>
|
||||
// and wxHashXXX<> classes. If disabled, wxWidgets own (mostly compatible but
|
||||
// usually more limited) implementations are used which allows to avoid the
|
||||
// dependency on the C++ run-time library.
|
||||
//
|
||||
// Notice that the compilers mentioned in wxUSE_STD_DEFAULT comment above don't
|
||||
// support using standard containers.
|
||||
//
|
||||
// Default is 0 for compatibility reasons.
|
||||
//
|
||||
// Recommended setting: 1 unless compatibility with the official wxWidgets
|
||||
|
@@ -2179,17 +2179,6 @@ public:
|
||||
// int Printf(const wxString& format, ...);
|
||||
WX_DEFINE_VARARG_FUNC(int, Printf, 1, (const wxFormatString&),
|
||||
DoPrintfWchar, DoPrintfUtf8)
|
||||
#ifdef __WATCOMC__
|
||||
// workaround for http://bugzilla.openwatcom.org/show_bug.cgi?id=351
|
||||
WX_VARARG_WATCOM_WORKAROUND(int, Printf, 1, (const wxString&),
|
||||
(wxFormatString(f1)));
|
||||
WX_VARARG_WATCOM_WORKAROUND(int, Printf, 1, (const wxCStrData&),
|
||||
(wxFormatString(f1)));
|
||||
WX_VARARG_WATCOM_WORKAROUND(int, Printf, 1, (const char*),
|
||||
(wxFormatString(f1)));
|
||||
WX_VARARG_WATCOM_WORKAROUND(int, Printf, 1, (const wchar_t*),
|
||||
(wxFormatString(f1)));
|
||||
#endif
|
||||
// as vprintf(), returns the number of characters written or < 0 on error
|
||||
int PrintfV(const wxString& format, va_list argptr);
|
||||
|
||||
@@ -2197,17 +2186,6 @@ public:
|
||||
// static wxString Format(const wxString& format, ...) WX_ATTRIBUTE_PRINTF_1;
|
||||
WX_DEFINE_VARARG_FUNC(static wxString, Format, 1, (const wxFormatString&),
|
||||
DoFormatWchar, DoFormatUtf8)
|
||||
#ifdef __WATCOMC__
|
||||
// workaround for http://bugzilla.openwatcom.org/show_bug.cgi?id=351
|
||||
WX_VARARG_WATCOM_WORKAROUND(static wxString, Format, 1, (const wxString&),
|
||||
(wxFormatString(f1)));
|
||||
WX_VARARG_WATCOM_WORKAROUND(static wxString, Format, 1, (const wxCStrData&),
|
||||
(wxFormatString(f1)));
|
||||
WX_VARARG_WATCOM_WORKAROUND(static wxString, Format, 1, (const char*),
|
||||
(wxFormatString(f1)));
|
||||
WX_VARARG_WATCOM_WORKAROUND(static wxString, Format, 1, (const wchar_t*),
|
||||
(wxFormatString(f1)));
|
||||
#endif
|
||||
// the same as above, but takes a va_list
|
||||
static wxString FormatV(const wxString& format, va_list argptr);
|
||||
|
||||
@@ -2244,17 +2222,6 @@ public:
|
||||
// int sprintf(const wxString& format, ...) WX_ATTRIBUTE_PRINTF_2;
|
||||
WX_DEFINE_VARARG_FUNC(int, sprintf, 1, (const wxFormatString&),
|
||||
DoPrintfWchar, DoPrintfUtf8)
|
||||
#ifdef __WATCOMC__
|
||||
// workaround for http://bugzilla.openwatcom.org/show_bug.cgi?id=351
|
||||
WX_VARARG_WATCOM_WORKAROUND(int, sprintf, 1, (const wxString&),
|
||||
(wxFormatString(f1)));
|
||||
WX_VARARG_WATCOM_WORKAROUND(int, sprintf, 1, (const wxCStrData&),
|
||||
(wxFormatString(f1)));
|
||||
WX_VARARG_WATCOM_WORKAROUND(int, sprintf, 1, (const char*),
|
||||
(wxFormatString(f1)));
|
||||
WX_VARARG_WATCOM_WORKAROUND(int, sprintf, 1, (const wchar_t*),
|
||||
(wxFormatString(f1)));
|
||||
#endif
|
||||
|
||||
// use Cmp()
|
||||
int CompareTo(const wxChar* psz, caseCompare cmp = exact) const
|
||||
|
@@ -11,9 +11,6 @@
|
||||
#define _WX_STRVARARG_H_
|
||||
|
||||
#include "wx/platform.h"
|
||||
#if wxONLY_WATCOM_EARLIER_THAN(1,4)
|
||||
#error "OpenWatcom version >= 1.4 is required to compile this code"
|
||||
#endif
|
||||
|
||||
#include "wx/cpp.h"
|
||||
#include "wx/chartype.h"
|
||||
@@ -1159,67 +1156,4 @@ private:
|
||||
inline void name(_WX_VARARG_FIXED_UNUSED_EXPAND(numfixed, fixed)) \
|
||||
{}
|
||||
|
||||
|
||||
// ----------------------------------------------------------------------------
|
||||
// workaround for OpenWatcom bug #351
|
||||
// ----------------------------------------------------------------------------
|
||||
|
||||
#ifdef __WATCOMC__
|
||||
// workaround for http://bugzilla.openwatcom.org/show_bug.cgi?id=351
|
||||
|
||||
// This macro can be used to forward a 'vararg' template to another one with
|
||||
// different fixed arguments types. Parameters are same as for
|
||||
// WX_DEFINE_VARARG_FUNC (rettype=void can be used here), 'convfixed' is how
|
||||
// to convert fixed arguments. For example, this is typical code for dealing
|
||||
// with different forms of format string:
|
||||
//
|
||||
// WX_DEFINE_VARARG_FUNC_VOID(Printf, 1, (const wxFormatString&),
|
||||
// DoPrintfWchar, DoPrintfUtf8)
|
||||
// #ifdef __WATCOMC__
|
||||
// WX_VARARG_WATCOM_WORKAROUND(void, Printf, 1, (const wxString&),
|
||||
// (wxFormatString(f1)))
|
||||
// WX_VARARG_WATCOM_WORKAROUND(void, Printf, 1, (const char*),
|
||||
// (wxFormatString(f1)))
|
||||
// ...
|
||||
#define WX_VARARG_WATCOM_WORKAROUND(rettype, name, numfixed, fixed, convfixed)\
|
||||
_WX_VARARG_ITER(_WX_VARARG_MAX_ARGS, \
|
||||
_WX_VARARG_WATCOM_WORKAROUND, \
|
||||
rettype, name, convfixed, dummy, numfixed, fixed)
|
||||
|
||||
#define WX_VARARG_WATCOM_WORKAROUND_CTOR(name, numfixed, fixed, convfixed) \
|
||||
_WX_VARARG_ITER(_WX_VARARG_MAX_ARGS, \
|
||||
_WX_VARARG_WATCOM_WORKAROUND_CTOR, \
|
||||
dummy, name, convfixed, dummy, numfixed, fixed)
|
||||
|
||||
#define _WX_VARARG_WATCOM_UNPACK_1(a1) a1
|
||||
#define _WX_VARARG_WATCOM_UNPACK_2(a1, a2) a1, a2
|
||||
#define _WX_VARARG_WATCOM_UNPACK_3(a1, a2, a3) a1, a2, a3
|
||||
#define _WX_VARARG_WATCOM_UNPACK_4(a1, a2, a3, a4) a1, a2, a3, a4
|
||||
#define _WX_VARARG_WATCOM_UNPACK(N, convfixed) \
|
||||
_WX_VARARG_WATCOM_UNPACK_##N convfixed
|
||||
|
||||
#define _WX_VARARG_PASS_WATCOM(i) a##i
|
||||
|
||||
#define _WX_VARARG_WATCOM_WORKAROUND(N, rettype, name, \
|
||||
convfixed, dummy, numfixed, fixed) \
|
||||
template<_WX_VARARG_JOIN(N, _WX_VARARG_TEMPL)> \
|
||||
rettype name(_WX_VARARG_FIXED_EXPAND(numfixed, fixed), \
|
||||
_WX_VARARG_JOIN(N, _WX_VARARG_ARG)) \
|
||||
{ \
|
||||
return name(_WX_VARARG_WATCOM_UNPACK(numfixed, convfixed), \
|
||||
_WX_VARARG_JOIN(N, _WX_VARARG_PASS_WATCOM)); \
|
||||
}
|
||||
|
||||
#define _WX_VARARG_WATCOM_WORKAROUND_CTOR(N, dummy1, name, \
|
||||
convfixed, dummy2, numfixed, fixed) \
|
||||
template<_WX_VARARG_JOIN(N, _WX_VARARG_TEMPL)> \
|
||||
name(_WX_VARARG_FIXED_EXPAND(numfixed, fixed), \
|
||||
_WX_VARARG_JOIN(N, _WX_VARARG_ARG)) \
|
||||
{ \
|
||||
name(_WX_VARARG_WATCOM_UNPACK(numfixed, convfixed), \
|
||||
_WX_VARARG_JOIN(N, _WX_VARARG_PASS_WATCOM)); \
|
||||
}
|
||||
|
||||
#endif // __WATCOMC__
|
||||
|
||||
#endif // _WX_STRVARARG_H_
|
||||
|
@@ -513,8 +513,6 @@ public:
|
||||
|
||||
// create a new thread and optionally set the stack size on
|
||||
// platforms that support that - call Run() to start it
|
||||
// (special cased for watcom which won't accept 0 default)
|
||||
|
||||
wxThreadError Create(unsigned int stackSize = 0);
|
||||
|
||||
// starts execution of the thread - from the moment Run() is called
|
||||
@@ -800,9 +798,7 @@ inline void wxMutexGuiLeave() { }
|
||||
|
||||
// macros for entering/leaving critical sections which may be used without
|
||||
// having to take them inside "#if wxUSE_THREADS"
|
||||
// (the implementation uses dummy structs to force semicolon after the macro;
|
||||
// also notice that Watcom doesn't like declaring a struct as a member so we
|
||||
// need to actually define it in wxCRIT_SECT_DECLARE_MEMBER)
|
||||
// (the implementation uses dummy structs to force semicolon after the macro)
|
||||
#define wxENTER_CRIT_SECT(cs) do {} while (0)
|
||||
#define wxLEAVE_CRIT_SECT(cs) do {} while (0)
|
||||
#define wxCRIT_SECT_DECLARE(cs) struct wxDummyCS##cs
|
||||
|
@@ -57,7 +57,7 @@ wxLongLong WXDLLIMPEXP_BASE wxGetUTCTimeUSec();
|
||||
#define wxLocaltime_r localtime_r
|
||||
#else
|
||||
WXDLLIMPEXP_BASE struct tm *wxLocaltime_r(const time_t*, struct tm*);
|
||||
#if wxUSE_THREADS && !defined(__WINDOWS__) && !defined(__WATCOMC__)
|
||||
#if wxUSE_THREADS && !defined(__WINDOWS__)
|
||||
// On Windows, localtime _is_ threadsafe!
|
||||
#warning using pseudo thread-safe wrapper for localtime to emulate localtime_r
|
||||
#endif
|
||||
@@ -67,7 +67,7 @@ WXDLLIMPEXP_BASE struct tm *wxLocaltime_r(const time_t*, struct tm*);
|
||||
#define wxGmtime_r gmtime_r
|
||||
#else
|
||||
WXDLLIMPEXP_BASE struct tm *wxGmtime_r(const time_t*, struct tm*);
|
||||
#if wxUSE_THREADS && !defined(__WINDOWS__) && !defined(__WATCOMC__)
|
||||
#if wxUSE_THREADS && !defined(__WINDOWS__)
|
||||
// On Windows, gmtime _is_ threadsafe!
|
||||
#warning using pseudo thread-safe wrapper for gmtime to emulate gmtime_r
|
||||
#endif
|
||||
|
@@ -301,23 +301,15 @@
|
||||
// This is not a real option but is used as the default value for
|
||||
// wxUSE_STD_IOSTREAM, wxUSE_STD_STRING and wxUSE_STD_CONTAINERS.
|
||||
//
|
||||
// Currently the Digital Mars and Watcom compilers come without standard C++
|
||||
// library headers by default, wxUSE_STD_STRING can be set to 1 if you do have
|
||||
// them (e.g. from STLPort).
|
||||
#if defined(__DMC__) || defined(__WATCOMC__)
|
||||
#define wxUSE_STD_DEFAULT 0
|
||||
#else
|
||||
#define wxUSE_STD_DEFAULT 1
|
||||
#endif
|
||||
// Set it to 0 if you want to disable the use of all standard classes
|
||||
// completely for some reason.
|
||||
#define wxUSE_STD_DEFAULT 1
|
||||
|
||||
// Use standard C++ containers to implement wxVector<>, wxStack<>, wxDList<>
|
||||
// and wxHashXXX<> classes. If disabled, wxWidgets own (mostly compatible but
|
||||
// usually more limited) implementations are used which allows to avoid the
|
||||
// dependency on the C++ run-time library.
|
||||
//
|
||||
// Notice that the compilers mentioned in wxUSE_STD_DEFAULT comment above don't
|
||||
// support using standard containers.
|
||||
//
|
||||
// Default is 0 for compatibility reasons.
|
||||
//
|
||||
// Recommended setting: 1 unless compatibility with the official wxWidgets
|
||||
|
@@ -37,9 +37,7 @@ class WXDLLIMPEXP_FWD_BASE wxArrayInt;
|
||||
// needed for wxOperatingSystemId, wxLinuxDistributionInfo
|
||||
#include "wx/platinfo.h"
|
||||
|
||||
#ifdef __WATCOMC__
|
||||
#include <direct.h>
|
||||
#elif defined(__X__)
|
||||
#if defined(__X__)
|
||||
#include <dirent.h>
|
||||
#include <unistd.h>
|
||||
#endif
|
||||
|
@@ -886,9 +886,6 @@ public:
|
||||
virtual void SetPreviousHandler(wxEvtHandler *handler) wxOVERRIDE;
|
||||
|
||||
|
||||
// Watcom doesn't allow reducing access with using access declaration, see
|
||||
// #10749
|
||||
#ifndef __WATCOMC__
|
||||
protected:
|
||||
|
||||
// NOTE: we change the access specifier of the following wxEvtHandler functions
|
||||
@@ -909,7 +906,6 @@ protected:
|
||||
using wxEvtHandler::ProcessPendingEvents;
|
||||
using wxEvtHandler::AddPendingEvent;
|
||||
using wxEvtHandler::QueueEvent;
|
||||
#endif // __WATCOMC__
|
||||
|
||||
public:
|
||||
|
||||
|
@@ -241,7 +241,7 @@ WXDLLIMPEXP_BASE void *calloc( size_t num, size_t size );
|
||||
|
||||
/* define wxCRT_StricmpA/W and wxCRT_StrnicmpA/W for various compilers */
|
||||
|
||||
#if defined(__BORLANDC__) || defined(__WATCOMC__) || defined(__DJGPP__)
|
||||
#if defined(__BORLANDC__) || defined(__DJGPP__)
|
||||
#define wxCRT_StricmpA stricmp
|
||||
#define wxCRT_StrnicmpA strnicmp
|
||||
#elif defined(__SYMANTEC__) || (defined(__VISUALC__) && !defined(__WXWINCE__))
|
||||
@@ -596,23 +596,17 @@ WXDLLIMPEXP_BASE size_t wxCRT_StrftimeW(wchar_t *s, size_t max,
|
||||
ctype.h
|
||||
------------------------------------------------------------------------- */
|
||||
|
||||
#ifdef __WATCOMC__
|
||||
#define WXWCHAR_T_CAST(c) (wint_t)(c)
|
||||
#else
|
||||
#define WXWCHAR_T_CAST(c) c
|
||||
#endif
|
||||
|
||||
#define wxCRT_IsalnumW(c) iswalnum(WXWCHAR_T_CAST(c))
|
||||
#define wxCRT_IsalphaW(c) iswalpha(WXWCHAR_T_CAST(c))
|
||||
#define wxCRT_IscntrlW(c) iswcntrl(WXWCHAR_T_CAST(c))
|
||||
#define wxCRT_IsdigitW(c) iswdigit(WXWCHAR_T_CAST(c))
|
||||
#define wxCRT_IsgraphW(c) iswgraph(WXWCHAR_T_CAST(c))
|
||||
#define wxCRT_IslowerW(c) iswlower(WXWCHAR_T_CAST(c))
|
||||
#define wxCRT_IsprintW(c) iswprint(WXWCHAR_T_CAST(c))
|
||||
#define wxCRT_IspunctW(c) iswpunct(WXWCHAR_T_CAST(c))
|
||||
#define wxCRT_IsspaceW(c) iswspace(WXWCHAR_T_CAST(c))
|
||||
#define wxCRT_IsupperW(c) iswupper(WXWCHAR_T_CAST(c))
|
||||
#define wxCRT_IsxdigitW(c) iswxdigit(WXWCHAR_T_CAST(c))
|
||||
#define wxCRT_IsalnumW(c) iswalnum(c)
|
||||
#define wxCRT_IsalphaW(c) iswalpha(c)
|
||||
#define wxCRT_IscntrlW(c) iswcntrl(c)
|
||||
#define wxCRT_IsdigitW(c) iswdigit(c)
|
||||
#define wxCRT_IsgraphW(c) iswgraph(c)
|
||||
#define wxCRT_IslowerW(c) iswlower(c)
|
||||
#define wxCRT_IsprintW(c) iswprint(c)
|
||||
#define wxCRT_IspunctW(c) iswpunct(c)
|
||||
#define wxCRT_IsspaceW(c) iswspace(c)
|
||||
#define wxCRT_IsupperW(c) iswupper(c)
|
||||
#define wxCRT_IsxdigitW(c) iswxdigit(c)
|
||||
|
||||
#ifdef __GLIBC__
|
||||
#if defined(__GLIBC__) && (__GLIBC__ == 2) && (__GLIBC_MINOR__ == 0)
|
||||
|
@@ -92,10 +92,6 @@
|
||||
#endif
|
||||
#endif /* __MINGW32__ */
|
||||
|
||||
#if defined(__WATCOMC__)
|
||||
#define HAVE_VSWPRINTF 1
|
||||
#endif
|
||||
|
||||
#if wxUSE_PRINTF_POS_PARAMS
|
||||
/*
|
||||
The systems where vsnprintf() supports positional parameters should
|
||||
@@ -145,12 +141,9 @@
|
||||
#define wxCRT_VsnprintfW _vsnwprintf
|
||||
#elif defined(HAVE_VSWPRINTF)
|
||||
#define wxCRT_VsnprintfW vswprintf
|
||||
#elif defined(__WATCOMC__)
|
||||
#define wxCRT_VsnprintfW _vsnwprintf
|
||||
#endif
|
||||
|
||||
#if defined(HAVE_VSNPRINTF) \
|
||||
|| defined(__WATCOMC__)
|
||||
#if defined(HAVE_VSNPRINTF)
|
||||
#ifdef HAVE_BROKEN_VSNPRINTF_DECL
|
||||
#define wxCRT_VsnprintfA wx_fixed_vsnprintf
|
||||
#else
|
||||
@@ -269,14 +262,6 @@
|
||||
// user-friendly wrappers to CRT functions
|
||||
// ----------------------------------------------------------------------------
|
||||
|
||||
#ifdef __WATCOMC__
|
||||
// workaround for http://bugzilla.openwatcom.org/show_bug.cgi?id=351
|
||||
#define wxPrintf wxPrintf_Impl
|
||||
#define wxFprintf wxFprintf_Impl
|
||||
#define wxSprintf wxSprintf_Impl
|
||||
#define wxSnprintf wxSnprintf_Impl
|
||||
#endif
|
||||
|
||||
// FIXME-UTF8: remove this
|
||||
#if wxUSE_UNICODE
|
||||
#define wxCRT_PrintfNative wxCRT_PrintfW
|
||||
@@ -393,27 +378,6 @@ wxVsnprintf(wchar_t *str, size_t size, const wxString& format, va_list argptr);
|
||||
|
||||
#endif // wxUSE_UNICODE
|
||||
|
||||
#ifdef __WATCOMC__
|
||||
// workaround for http://bugzilla.openwatcom.org/show_bug.cgi?id=351
|
||||
//
|
||||
// fortunately, OpenWatcom implements __VA_ARGS__, so we can provide macros
|
||||
// that cast the format argument to wxString:
|
||||
#undef wxPrintf
|
||||
#undef wxFprintf
|
||||
#undef wxSprintf
|
||||
#undef wxSnprintf
|
||||
|
||||
#define wxPrintf(fmt, ...) \
|
||||
wxPrintf_Impl(wxFormatString(fmt), __VA_ARGS__)
|
||||
#define wxFprintf(f, fmt, ...) \
|
||||
wxFprintf_Impl(f, wxFormatString(fmt), __VA_ARGS__)
|
||||
#define wxSprintf(s, fmt, ...) \
|
||||
wxSprintf_Impl(s, wxFormatString(fmt), __VA_ARGS__)
|
||||
#define wxSnprintf(s, n, fmt, ...) \
|
||||
wxSnprintf_Impl(s, n, wxFormatString(fmt), __VA_ARGS__)
|
||||
#endif // __WATCOMC__
|
||||
|
||||
|
||||
// We can't use wxArgNormalizer<T> for variadic arguments to wxScanf() etc.
|
||||
// because they are writable, so instead of providing friendly template
|
||||
// vararg-like functions, we just provide both char* and wchar_t* variants
|
||||
|
@@ -15,7 +15,6 @@
|
||||
// explicitly disabled by defining NOPCH
|
||||
#if defined(__VISUALC__) || \
|
||||
defined(__DMC__) || \
|
||||
defined(__WATCOMC__) || \
|
||||
defined(__BORLANDC__)
|
||||
|
||||
|
||||
@@ -26,11 +25,6 @@
|
||||
#endif
|
||||
#endif
|
||||
|
||||
// For some reason, this must be defined for common dialogs to work.
|
||||
#ifdef __WATCOMC__
|
||||
#define INCLUDE_COMMDLG_H 1
|
||||
#endif
|
||||
|
||||
#ifdef WX_PRECOMP
|
||||
|
||||
// include "wx/chartype.h" first to ensure that UNICODE macro is correctly set
|
||||
|
Reference in New Issue
Block a user