Remove BCC-specific conditionally compiled code
This commit is contained in:
@@ -81,8 +81,6 @@
|
|||||||
// ABI-compatible with the corresponding version of the MSVC and we want to
|
// ABI-compatible with the corresponding version of the MSVC and we want to
|
||||||
// allow using it compile the application code using MSVC-built DLLs.
|
// allow using it compile the application code using MSVC-built DLLs.
|
||||||
#define __WX_BO_COMPILER ",Intel C++"
|
#define __WX_BO_COMPILER ",Intel C++"
|
||||||
#elif defined(__BORLANDC__)
|
|
||||||
#define __WX_BO_COMPILER ",Borland C++"
|
|
||||||
#else
|
#else
|
||||||
#define __WX_BO_COMPILER
|
#define __WX_BO_COMPILER
|
||||||
#endif
|
#endif
|
||||||
|
@@ -93,9 +93,6 @@
|
|||||||
/* VC++ and BC++ starting with 5.2 have TCHAR support */
|
/* VC++ and BC++ starting with 5.2 have TCHAR support */
|
||||||
#ifdef __VISUALC__
|
#ifdef __VISUALC__
|
||||||
#define wxHAVE_TCHAR_SUPPORT
|
#define wxHAVE_TCHAR_SUPPORT
|
||||||
#elif defined(__BORLANDC__) && (__BORLANDC__ >= 0x520)
|
|
||||||
#define wxHAVE_TCHAR_SUPPORT
|
|
||||||
#include <ctype.h>
|
|
||||||
#elif defined(__MINGW32__)
|
#elif defined(__MINGW32__)
|
||||||
#define wxHAVE_TCHAR_SUPPORT
|
#define wxHAVE_TCHAR_SUPPORT
|
||||||
#include <stddef.h>
|
#include <stddef.h>
|
||||||
@@ -199,11 +196,7 @@
|
|||||||
Notice that we use an intermediate macro to allow x to be expanded
|
Notice that we use an intermediate macro to allow x to be expanded
|
||||||
if it's a macro itself.
|
if it's a macro itself.
|
||||||
*/
|
*/
|
||||||
#ifndef wxCOMPILER_BROKEN_CONCAT_OPER
|
#define wxT(x) wxCONCAT_HELPER(L, x)
|
||||||
#define wxT(x) wxCONCAT_HELPER(L, x)
|
|
||||||
#else
|
|
||||||
#define wxT(x) wxPREPEND_L(x)
|
|
||||||
#endif
|
|
||||||
#endif /* ASCII/Unicode */
|
#endif /* ASCII/Unicode */
|
||||||
#endif /* !defined(wxT) */
|
#endif /* !defined(wxT) */
|
||||||
|
|
||||||
@@ -223,11 +216,7 @@
|
|||||||
/*
|
/*
|
||||||
As above with wxT(), wxS() argument is expanded if it's a macro.
|
As above with wxT(), wxS() argument is expanded if it's a macro.
|
||||||
*/
|
*/
|
||||||
#ifndef wxCOMPILER_BROKEN_CONCAT_OPER
|
#define wxS(x) wxCONCAT_HELPER(L, x)
|
||||||
#define wxS(x) wxCONCAT_HELPER(L, x)
|
|
||||||
#else
|
|
||||||
#define wxS(x) wxPREPEND_L(x)
|
|
||||||
#endif
|
|
||||||
#else /* wxUSE_UNICODE_UTF8 || ANSI */
|
#else /* wxUSE_UNICODE_UTF8 || ANSI */
|
||||||
#define wxS(x) x
|
#define wxS(x) x
|
||||||
#endif
|
#endif
|
||||||
|
@@ -60,8 +60,6 @@
|
|||||||
# pragma message("Please update wx/compiler.h to recognize this VC++ version")
|
# pragma message("Please update wx/compiler.h to recognize this VC++ version")
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
#elif defined(__BCPLUSPLUS__) && !defined(__BORLANDC__)
|
|
||||||
# define __BORLANDC__
|
|
||||||
#elif defined(__SUNPRO_CC)
|
#elif defined(__SUNPRO_CC)
|
||||||
# ifndef __SUNCC__
|
# ifndef __SUNCC__
|
||||||
# define __SUNCC__ __SUNPRO_CC
|
# define __SUNCC__ __SUNPRO_CC
|
||||||
|
@@ -41,16 +41,6 @@
|
|||||||
/* a Unicode-friendly version of wxSTRINGIZE_T */
|
/* a Unicode-friendly version of wxSTRINGIZE_T */
|
||||||
#define wxSTRINGIZE_T(x) wxAPPLY_T(wxSTRINGIZE(x))
|
#define wxSTRINGIZE_T(x) wxAPPLY_T(wxSTRINGIZE(x))
|
||||||
|
|
||||||
/*
|
|
||||||
Special workarounds for compilers with broken "##" operator. For all the
|
|
||||||
other ones we can just use it directly.
|
|
||||||
*/
|
|
||||||
#ifdef wxCOMPILER_BROKEN_CONCAT_OPER
|
|
||||||
#define wxPREPEND_L(x) L ## x
|
|
||||||
#define wxAPPEND_i64(x) x ## i64
|
|
||||||
#define wxAPPEND_ui64(x) x ## ui64
|
|
||||||
#endif /* wxCOMPILER_BROKEN_CONCAT_OPER */
|
|
||||||
|
|
||||||
/*
|
/*
|
||||||
Helper macros for wxMAKE_UNIQUE_NAME: normally this works by appending the
|
Helper macros for wxMAKE_UNIQUE_NAME: normally this works by appending the
|
||||||
current line number to the given identifier to reduce the probability of the
|
current line number to the given identifier to reduce the probability of the
|
||||||
|
@@ -157,11 +157,6 @@
|
|||||||
#endif /* VC++ 8 */
|
#endif /* VC++ 8 */
|
||||||
#endif /* __VISUALC__ */
|
#endif /* __VISUALC__ */
|
||||||
|
|
||||||
/* suppress some Borland C++ warnings */
|
|
||||||
#ifdef __BORLANDC__
|
|
||||||
# pragma warn -inl /* Functions containing reserved words and certain constructs are not expanded inline */
|
|
||||||
#endif /* __BORLANDC__ */
|
|
||||||
|
|
||||||
/*
|
/*
|
||||||
g++ gives a warning when a class has private dtor if it has no friends but
|
g++ gives a warning when a class has private dtor if it has no friends but
|
||||||
this is a perfectly valid situation for a ref-counted class which destroys
|
this is a perfectly valid situation for a ref-counted class which destroys
|
||||||
@@ -497,7 +492,6 @@ typedef short int WXTYPE;
|
|||||||
#if defined(__GNUWIN32__)
|
#if defined(__GNUWIN32__)
|
||||||
#define wxSTDCALL __attribute__((stdcall))
|
#define wxSTDCALL __attribute__((stdcall))
|
||||||
#else
|
#else
|
||||||
/* both VC++ and Borland understand this */
|
|
||||||
#define wxSTDCALL _stdcall
|
#define wxSTDCALL _stdcall
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
@@ -880,12 +874,8 @@ typedef short int WXTYPE;
|
|||||||
/* sometimes the value of a variable is *really* not used, to suppress the */
|
/* sometimes the value of a variable is *really* not used, to suppress the */
|
||||||
/* resulting warning you may pass it to this function */
|
/* resulting warning you may pass it to this function */
|
||||||
#ifdef __cplusplus
|
#ifdef __cplusplus
|
||||||
# ifdef __BORLANDC__
|
template <class T>
|
||||||
# define wxUnusedVar(identifier) identifier
|
inline void wxUnusedVar(const T& WXUNUSED(t)) { }
|
||||||
# else
|
|
||||||
template <class T>
|
|
||||||
inline void wxUnusedVar(const T& WXUNUSED(t)) { }
|
|
||||||
# endif
|
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
/* ---------------------------------------------------------------------------- */
|
/* ---------------------------------------------------------------------------- */
|
||||||
|
@@ -20,9 +20,9 @@
|
|||||||
# define WXIMPORT __attribute__ ((visibility("default")))
|
# define WXIMPORT __attribute__ ((visibility("default")))
|
||||||
#elif defined(__WINDOWS__)
|
#elif defined(__WINDOWS__)
|
||||||
/*
|
/*
|
||||||
__declspec works in BC++ 5 and later as well as VC++.
|
__declspec works in as VC++.
|
||||||
*/
|
*/
|
||||||
# if defined(__VISUALC__) || defined(__BORLANDC__)
|
# if defined(__VISUALC__)
|
||||||
# define WXEXPORT __declspec(dllexport)
|
# define WXEXPORT __declspec(dllexport)
|
||||||
# define WXIMPORT __declspec(dllimport)
|
# define WXIMPORT __declspec(dllimport)
|
||||||
/*
|
/*
|
||||||
|
@@ -4287,10 +4287,6 @@ typedef void (wxEvtHandler::*wxPressAndTapEventFunction)(wxPressAndTapEvent&);
|
|||||||
static const wxEventTable sm_eventTable; \
|
static const wxEventTable sm_eventTable; \
|
||||||
static wxEventHashTable sm_eventHashTable
|
static wxEventHashTable sm_eventHashTable
|
||||||
|
|
||||||
// N.B.: when building DLL with Borland C++ 5.5 compiler, you must initialize
|
|
||||||
// sm_eventTable before using it in GetEventTable() or the compiler gives
|
|
||||||
// E2233 (see http://groups.google.com/groups?selm=397dcc8a%241_2%40dnews)
|
|
||||||
|
|
||||||
#define wxBEGIN_EVENT_TABLE(theClass, baseClass) \
|
#define wxBEGIN_EVENT_TABLE(theClass, baseClass) \
|
||||||
const wxEventTable theClass::sm_eventTable = \
|
const wxEventTable theClass::sm_eventTable = \
|
||||||
{ &baseClass::sm_eventTable, &theClass::sm_eventTableEntries[0] }; \
|
{ &baseClass::sm_eventTable, &theClass::sm_eventTableEntries[0] }; \
|
||||||
|
@@ -32,12 +32,6 @@
|
|||||||
#endif // __WINDOWS__
|
#endif // __WINDOWS__
|
||||||
#endif // native Win compiler
|
#endif // native Win compiler
|
||||||
|
|
||||||
#ifdef __BORLANDC__ // Please someone tell me which version of Borland needs
|
|
||||||
// this (3.1 I believe) and how to test for it.
|
|
||||||
// If this works for Borland 4.0 as well, then no worries.
|
|
||||||
#include <dir.h>
|
|
||||||
#endif
|
|
||||||
|
|
||||||
#include <fcntl.h> // O_RDONLY &c
|
#include <fcntl.h> // O_RDONLY &c
|
||||||
|
|
||||||
// ----------------------------------------------------------------------------
|
// ----------------------------------------------------------------------------
|
||||||
@@ -127,8 +121,7 @@ enum wxPosixPermissions
|
|||||||
( \
|
( \
|
||||||
defined(__VISUALC__) || \
|
defined(__VISUALC__) || \
|
||||||
defined(__MINGW64_TOOLCHAIN__) || \
|
defined(__MINGW64_TOOLCHAIN__) || \
|
||||||
(defined(__MINGW32__) && !defined(__WINE__)) || \
|
(defined(__MINGW32__) && !defined(__WINE__)) \
|
||||||
defined(__BORLANDC__) \
|
|
||||||
)
|
)
|
||||||
|
|
||||||
// temporary defines just used immediately below
|
// temporary defines just used immediately below
|
||||||
@@ -183,8 +176,6 @@ enum wxPosixPermissions
|
|||||||
#endif
|
#endif
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
// other Windows compilers (Borland) don't have huge file support (or at
|
|
||||||
// least not all functions needed for it by wx) currently
|
|
||||||
|
|
||||||
// types
|
// types
|
||||||
|
|
||||||
@@ -195,33 +186,14 @@ enum wxPosixPermissions
|
|||||||
typedef off_t wxFileOffset;
|
typedef off_t wxFileOffset;
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
// at least Borland 5.5 doesn't like "struct ::stat" so don't use the scope
|
|
||||||
// resolution operator present in wxPOSIX_IDENT for it
|
#define wxPOSIX_STRUCT(s) struct wxPOSIX_IDENT(s)
|
||||||
#ifdef __BORLANDC__
|
|
||||||
#define wxPOSIX_STRUCT(s) struct s
|
|
||||||
#else
|
|
||||||
#define wxPOSIX_STRUCT(s) struct wxPOSIX_IDENT(s)
|
|
||||||
#endif
|
|
||||||
|
|
||||||
// Borland is special in that it uses _stat with Unicode functions (for
|
#ifdef wxHAS_HUGE_FILES
|
||||||
// MSVC compatibility?) but stat with ANSI ones
|
#define wxStructStat struct _stati64
|
||||||
#ifdef __BORLANDC__
|
#else
|
||||||
#if wxHAS_HUGE_FILES
|
#define wxStructStat struct _stat
|
||||||
#define wxStructStat struct stati64
|
#endif
|
||||||
#else
|
|
||||||
#if wxUSE_UNICODE
|
|
||||||
#define wxStructStat struct _stat
|
|
||||||
#else
|
|
||||||
#define wxStructStat struct stat
|
|
||||||
#endif
|
|
||||||
#endif
|
|
||||||
#else // !__BORLANDC__
|
|
||||||
#ifdef wxHAS_HUGE_FILES
|
|
||||||
#define wxStructStat struct _stati64
|
|
||||||
#else
|
|
||||||
#define wxStructStat struct _stat
|
|
||||||
#endif
|
|
||||||
#endif // __BORLANDC__/!__BORLANDC__
|
|
||||||
|
|
||||||
|
|
||||||
// functions
|
// functions
|
||||||
@@ -232,7 +204,7 @@ enum wxPosixPermissions
|
|||||||
// to avoid using them as they're not present in earlier versions and
|
// to avoid using them as they're not present in earlier versions and
|
||||||
// always using the native functions spelling is easier than testing for
|
// always using the native functions spelling is easier than testing for
|
||||||
// the versions
|
// the versions
|
||||||
#if defined(__BORLANDC__) || defined(__MINGW64_TOOLCHAIN__)
|
#if defined(__MINGW64_TOOLCHAIN__)
|
||||||
#define wxPOSIX_IDENT(func) ::func
|
#define wxPOSIX_IDENT(func) ::func
|
||||||
#else // by default assume MSVC-compatible names
|
#else // by default assume MSVC-compatible names
|
||||||
#define wxPOSIX_IDENT(func) _ ## func
|
#define wxPOSIX_IDENT(func) _ ## func
|
||||||
@@ -263,15 +235,13 @@ enum wxPosixPermissions
|
|||||||
#define wxTell wxPOSIX_IDENT(tell)
|
#define wxTell wxPOSIX_IDENT(tell)
|
||||||
#endif // wxHAS_HUGE_FILES/!wxHAS_HUGE_FILES
|
#endif // wxHAS_HUGE_FILES/!wxHAS_HUGE_FILES
|
||||||
|
|
||||||
#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)
|
#define wxFsync _commit
|
||||||
#ifndef HAVE_FSYNC
|
|
||||||
#define HAVE_FSYNC
|
// could be already defined by configure (Cygwin)
|
||||||
#endif
|
#ifndef HAVE_FSYNC
|
||||||
#endif // BORLANDC
|
#define HAVE_FSYNC
|
||||||
|
#endif
|
||||||
|
|
||||||
#define wxEof wxPOSIX_IDENT(eof)
|
#define wxEof wxPOSIX_IDENT(eof)
|
||||||
|
|
||||||
@@ -297,14 +267,8 @@ enum wxPosixPermissions
|
|||||||
|
|
||||||
// then wide char ones
|
// then wide char ones
|
||||||
#if wxUSE_UNICODE
|
#if wxUSE_UNICODE
|
||||||
// special workaround for buggy wopen() in bcc 5.5
|
|
||||||
#if defined(__BORLANDC__) && \
|
#define wxCRT_OpenW _wopen
|
||||||
(__BORLANDC__ >= 0x550 && __BORLANDC__ <= 0x551)
|
|
||||||
WXDLLIMPEXP_BASE int wxCRT_OpenW(const wxChar *pathname,
|
|
||||||
int flags, mode_t mode);
|
|
||||||
#else
|
|
||||||
#define wxCRT_OpenW _wopen
|
|
||||||
#endif
|
|
||||||
|
|
||||||
wxDECL_FOR_STRICT_MINGW32(int, _wopen, (const wchar_t*, int, ...))
|
wxDECL_FOR_STRICT_MINGW32(int, _wopen, (const wchar_t*, int, ...))
|
||||||
wxDECL_FOR_STRICT_MINGW32(int, _waccess, (const wchar_t*, int))
|
wxDECL_FOR_STRICT_MINGW32(int, _waccess, (const wchar_t*, int))
|
||||||
|
@@ -321,11 +321,6 @@ public:
|
|||||||
#endif // wxUSE_STREAMS
|
#endif // wxUSE_STREAMS
|
||||||
|
|
||||||
bool Create( const char* const* xpmData );
|
bool Create( const char* const* xpmData );
|
||||||
#ifdef __BORLANDC__
|
|
||||||
// needed for Borland 5.5
|
|
||||||
wxImage( char** xpmData ) { Create(const_cast<const char* const*>(xpmData)); }
|
|
||||||
bool Create( char** xpmData ) { return Create(const_cast<const char* const*>(xpmData)); }
|
|
||||||
#endif
|
|
||||||
|
|
||||||
bool Create( int width, int height, bool clear = true );
|
bool Create( int width, int height, bool clear = true );
|
||||||
bool Create( int width, int height, unsigned char* data, bool static_data = false );
|
bool Create( int width, int height, unsigned char* data, bool static_data = false );
|
||||||
|
@@ -1408,14 +1408,7 @@ public:
|
|||||||
// functions if their parameters are complicated enough, but by defining them
|
// functions if their parameters are complicated enough, but by defining them
|
||||||
// as an empty inline function we ensure that even dumbest compilers optimise
|
// as an empty inline function we ensure that even dumbest compilers optimise
|
||||||
// them away
|
// them away
|
||||||
#ifdef __BORLANDC__
|
inline void wxLogNop() { }
|
||||||
// but Borland gives "W8019: Code has no effect" for wxLogNop() so we need
|
|
||||||
// to define it differently for it to avoid these warnings (same problem as
|
|
||||||
// with wxUnusedVar())
|
|
||||||
#define wxLogNop() { }
|
|
||||||
#else
|
|
||||||
inline void wxLogNop() { }
|
|
||||||
#endif
|
|
||||||
|
|
||||||
#if wxUSE_LOG_DEBUG
|
#if wxUSE_LOG_DEBUG
|
||||||
#define wxLogDebug wxDO_LOG_IF_ENABLED(Debug)
|
#define wxLogDebug wxDO_LOG_IF_ENABLED(Debug)
|
||||||
|
@@ -72,7 +72,7 @@
|
|||||||
}
|
}
|
||||||
#else /* C++98 */
|
#else /* C++98 */
|
||||||
|
|
||||||
#if defined(__VISUALC__) || defined(__BORLANDC__)
|
#if defined(__VISUALC__)
|
||||||
#include <float.h>
|
#include <float.h>
|
||||||
#define wxFinite(x) _finite(x)
|
#define wxFinite(x) _finite(x)
|
||||||
#elif defined(__MINGW64_TOOLCHAIN__) || defined(__clang__)
|
#elif defined(__MINGW64_TOOLCHAIN__) || defined(__clang__)
|
||||||
@@ -102,7 +102,7 @@
|
|||||||
#endif
|
#endif
|
||||||
|
|
||||||
|
|
||||||
#if defined(__VISUALC__)||defined(__BORLAND__)
|
#if defined(__VISUALC__)
|
||||||
#define wxIsNaN(x) _isnan(x)
|
#define wxIsNaN(x) _isnan(x)
|
||||||
#elif defined(__GNUG__)||defined(__GNUWIN32__)|| \
|
#elif defined(__GNUG__)||defined(__GNUWIN32__)|| \
|
||||||
defined(__SGI_CC__)||defined(__SUNCC__)||defined(__XLC__)|| \
|
defined(__SGI_CC__)||defined(__SUNCC__)||defined(__XLC__)|| \
|
||||||
|
@@ -162,8 +162,7 @@
|
|||||||
* All of the settings below require SEH support (__try/__catch) and can't work
|
* All of the settings below require SEH support (__try/__catch) and can't work
|
||||||
* without it.
|
* without it.
|
||||||
*/
|
*/
|
||||||
#if !defined(_MSC_VER) && \
|
#if !defined(_MSC_VER)
|
||||||
(!defined(__BORLANDC__) || __BORLANDC__ < 0x0550)
|
|
||||||
# undef wxUSE_ON_FATAL_EXCEPTION
|
# undef wxUSE_ON_FATAL_EXCEPTION
|
||||||
# define wxUSE_ON_FATAL_EXCEPTION 0
|
# define wxUSE_ON_FATAL_EXCEPTION 0
|
||||||
|
|
||||||
@@ -215,27 +214,6 @@
|
|||||||
# endif
|
# endif
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
/*
|
|
||||||
Compiler-specific checks.
|
|
||||||
*/
|
|
||||||
|
|
||||||
/* Borland */
|
|
||||||
#ifdef __BORLANDC__
|
|
||||||
|
|
||||||
#if __BORLANDC__ < 0x500
|
|
||||||
/* BC++ 4.0 can't compile JPEG library */
|
|
||||||
# undef wxUSE_LIBJPEG
|
|
||||||
# define wxUSE_LIBJPEG 0
|
|
||||||
#endif
|
|
||||||
|
|
||||||
/* wxUSE_DEBUG_NEW_ALWAYS = 1 not compatible with BC++ in DLL mode */
|
|
||||||
#if defined(WXMAKINGDLL) || defined(WXUSINGDLL)
|
|
||||||
# undef wxUSE_DEBUG_NEW_ALWAYS
|
|
||||||
# define wxUSE_DEBUG_NEW_ALWAYS 0
|
|
||||||
#endif
|
|
||||||
|
|
||||||
#endif /* __BORLANDC__ */
|
|
||||||
|
|
||||||
/*
|
/*
|
||||||
un/redefine the options which we can't compile (after checking that they're
|
un/redefine the options which we can't compile (after checking that they're
|
||||||
defined
|
defined
|
||||||
|
@@ -47,32 +47,6 @@ extern WXDLLIMPEXP_CORE int
|
|||||||
wxCmdLineArgType pCmdLine = NULL,
|
wxCmdLineArgType pCmdLine = NULL,
|
||||||
int nCmdShow = SW_SHOWNORMAL);
|
int nCmdShow = SW_SHOWNORMAL);
|
||||||
|
|
||||||
#if defined(__BORLANDC__) && wxUSE_UNICODE
|
|
||||||
// Borland C++ has the following nonstandard behaviour: when the -WU
|
|
||||||
// command line flag is used, the linker expects to find wWinMain instead
|
|
||||||
// of WinMain. This flag causes the compiler to define _UNICODE and
|
|
||||||
// UNICODE symbols and there's no way to detect its use, so we have to
|
|
||||||
// define both WinMain and wWinMain so that wxIMPLEMENT_WXWIN_MAIN works
|
|
||||||
// for both code compiled with and without -WU.
|
|
||||||
// See http://sourceforge.net/tracker/?func=detail&atid=309863&aid=1935997&group_id=9863
|
|
||||||
// for more details.
|
|
||||||
#define wxIMPLEMENT_WXWIN_MAIN_BORLAND_NONSTANDARD \
|
|
||||||
extern "C" int WINAPI wWinMain(HINSTANCE hInstance, \
|
|
||||||
HINSTANCE hPrevInstance, \
|
|
||||||
wchar_t * WXUNUSED(lpCmdLine), \
|
|
||||||
int nCmdShow) \
|
|
||||||
{ \
|
|
||||||
wxDISABLE_DEBUG_SUPPORT(); \
|
|
||||||
\
|
|
||||||
/* NB: wxEntry expects lpCmdLine argument to be char*, not */ \
|
|
||||||
/* wchar_t*, but fortunately it's not used anywhere */ \
|
|
||||||
/* and we can simply pass NULL in: */ \
|
|
||||||
return wxEntry(hInstance, hPrevInstance, NULL, nCmdShow); \
|
|
||||||
}
|
|
||||||
#else
|
|
||||||
#define wxIMPLEMENT_WXWIN_MAIN_BORLAND_NONSTANDARD
|
|
||||||
#endif // defined(__BORLANDC__) && wxUSE_UNICODE
|
|
||||||
|
|
||||||
#define wxIMPLEMENT_WXWIN_MAIN \
|
#define wxIMPLEMENT_WXWIN_MAIN \
|
||||||
extern "C" int WINAPI WinMain(HINSTANCE hInstance, \
|
extern "C" int WINAPI WinMain(HINSTANCE hInstance, \
|
||||||
HINSTANCE hPrevInstance, \
|
HINSTANCE hPrevInstance, \
|
||||||
@@ -86,8 +60,7 @@ extern WXDLLIMPEXP_CORE int
|
|||||||
/* to pass lpCmdLine to wxEntry() here, you'll have to fix */ \
|
/* to pass lpCmdLine to wxEntry() here, you'll have to fix */ \
|
||||||
/* wWinMain() above too. */ \
|
/* wWinMain() above too. */ \
|
||||||
return wxEntry(hInstance, hPrevInstance, NULL, nCmdShow); \
|
return wxEntry(hInstance, hPrevInstance, NULL, nCmdShow); \
|
||||||
} \
|
}
|
||||||
wxIMPLEMENT_WXWIN_MAIN_BORLAND_NONSTANDARD
|
|
||||||
|
|
||||||
#endif // wxUSE_GUI
|
#endif // wxUSE_GUI
|
||||||
|
|
||||||
|
@@ -121,13 +121,12 @@ extern LONG APIENTRY
|
|||||||
|
|
||||||
// This one is a macro so that it can be tested with #ifdef, it will be
|
// This one is a macro so that it can be tested with #ifdef, it will be
|
||||||
// undefined if it cannot be implemented for a given compiler.
|
// undefined if it cannot be implemented for a given compiler.
|
||||||
// Vc++, bcc, dmc, ow, mingw akk have _get_osfhandle() and Cygwin has
|
// Vc++, dmc, ow, mingw akk have _get_osfhandle() and Cygwin has
|
||||||
// get_osfhandle. Others are currently unknown, e.g. Salford, Intel, Visual
|
// get_osfhandle. Others are currently unknown, e.g. Salford, Intel, Visual
|
||||||
// Age.
|
// Age.
|
||||||
#if defined(__CYGWIN__)
|
#if defined(__CYGWIN__)
|
||||||
#define wxGetOSFHandle(fd) ((HANDLE)get_osfhandle(fd))
|
#define wxGetOSFHandle(fd) ((HANDLE)get_osfhandle(fd))
|
||||||
#elif defined(__VISUALC__) \
|
#elif defined(__VISUALC__) \
|
||||||
|| defined(__BORLANDC__) \
|
|
||||||
|| defined(__MINGW32__)
|
|| defined(__MINGW32__)
|
||||||
#define wxGetOSFHandle(fd) ((HANDLE)_get_osfhandle(fd))
|
#define wxGetOSFHandle(fd) ((HANDLE)_get_osfhandle(fd))
|
||||||
#define wxOpenOSFHandle(h, flags) (_open_osfhandle(wxPtrToUInt(h), flags))
|
#define wxOpenOSFHandle(h, flags) (_open_osfhandle(wxPtrToUInt(h), flags))
|
||||||
|
@@ -18,14 +18,7 @@
|
|||||||
WXDLLIMPEXP_BASE unsigned long wxGlobalSEHandler(EXCEPTION_POINTERS *pExcPtrs);
|
WXDLLIMPEXP_BASE unsigned long wxGlobalSEHandler(EXCEPTION_POINTERS *pExcPtrs);
|
||||||
|
|
||||||
// helper macro for wxSEH_HANDLE
|
// helper macro for wxSEH_HANDLE
|
||||||
#if defined(__BORLANDC__)
|
|
||||||
// some compilers don't understand that this code is unreachable and warn
|
|
||||||
// about no value being returned from the function without it, so calm them
|
|
||||||
// down
|
|
||||||
#define wxSEH_DUMMY_RETURN(rc) return rc;
|
|
||||||
#else
|
|
||||||
#define wxSEH_DUMMY_RETURN(rc)
|
#define wxSEH_DUMMY_RETURN(rc)
|
||||||
#endif
|
|
||||||
|
|
||||||
// macros which allow to avoid many #if wxUSE_ON_FATAL_EXCEPTION in the code
|
// macros which allow to avoid many #if wxUSE_ON_FATAL_EXCEPTION in the code
|
||||||
// which uses them
|
// which uses them
|
||||||
|
@@ -82,7 +82,6 @@
|
|||||||
define it ourselves if any of the following macros is defined:
|
define it ourselves if any of the following macros is defined:
|
||||||
|
|
||||||
- MSVC _WIN32 (notice that this is also defined under Win64)
|
- MSVC _WIN32 (notice that this is also defined under Win64)
|
||||||
- Borland __WIN32__
|
|
||||||
- Our __WXMSW__ which selects Windows as platform automatically
|
- Our __WXMSW__ which selects Windows as platform automatically
|
||||||
*/
|
*/
|
||||||
#if defined(_WIN32) || defined(__WIN32__) || defined(__WXMSW__)
|
#if defined(_WIN32) || defined(__WIN32__) || defined(__WXMSW__)
|
||||||
@@ -224,42 +223,6 @@
|
|||||||
#endif /* wxUSE_UNICODE */
|
#endif /* wxUSE_UNICODE */
|
||||||
|
|
||||||
|
|
||||||
/*
|
|
||||||
test for old versions of Borland C, normally need at least 5.82, Turbo
|
|
||||||
explorer, available for free at http://www.turboexplorer.com/downloads
|
|
||||||
*/
|
|
||||||
|
|
||||||
|
|
||||||
/*
|
|
||||||
Older versions of Borland C have some compiler bugs that need
|
|
||||||
workarounds. Mostly pertains to the free command line compiler 5.5.1.
|
|
||||||
*/
|
|
||||||
#if defined(__BORLANDC__) && (__BORLANDC__ <= 0x551)
|
|
||||||
/*
|
|
||||||
The Borland free compiler is unable to handle overloaded enum
|
|
||||||
comparisons under certain conditions e.g. when any class has a
|
|
||||||
conversion ctor for an integral type and there's an overload to
|
|
||||||
compare between an integral type and that class type.
|
|
||||||
*/
|
|
||||||
# define wxCOMPILER_NO_OVERLOAD_ON_ENUM
|
|
||||||
|
|
||||||
/*
|
|
||||||
This is needed to overcome bugs in 5.5.1 STL, linking errors will
|
|
||||||
result if it is not defined.
|
|
||||||
*/
|
|
||||||
# define _RWSTD_COMPILE_INSTANTIATE
|
|
||||||
|
|
||||||
/*
|
|
||||||
Preprocessor in older Borland compilers have major problems
|
|
||||||
concatenating with ##. Specifically, if the string operands being
|
|
||||||
concatenated have special meaning (e.g. L"str", 123i64 etc)
|
|
||||||
then ## will not concatenate the operands correctly.
|
|
||||||
|
|
||||||
As a workaround, define wxPREPEND* and wxAPPEND* without using
|
|
||||||
wxCONCAT_HELPER.
|
|
||||||
*/
|
|
||||||
# define wxCOMPILER_BROKEN_CONCAT_OPER
|
|
||||||
#endif /* __BORLANDC__ */
|
|
||||||
|
|
||||||
/*
|
/*
|
||||||
OS: then test for generic Unix defines, then for particular flavours and
|
OS: then test for generic Unix defines, then for particular flavours and
|
||||||
@@ -369,7 +332,7 @@
|
|||||||
# include "wx/msw/libraries.h"
|
# include "wx/msw/libraries.h"
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
#if defined(__BORLANDC__) || (defined(__GNUC__) && __GNUC__ < 3)
|
#if (defined(__GNUC__) && __GNUC__ < 3)
|
||||||
#define wxNEEDS_CHARPP
|
#define wxNEEDS_CHARPP
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
|
@@ -23,8 +23,7 @@
|
|||||||
#include <string.h>
|
#include <string.h>
|
||||||
|
|
||||||
// prefer snprintf over sprintf
|
// prefer snprintf over sprintf
|
||||||
#if defined(__VISUALC__) || \
|
#if defined(__VISUALC__)
|
||||||
(defined(__BORLANDC__) && __BORLANDC__ >= 0x540)
|
|
||||||
#define system_sprintf(buff, max, flags, data) \
|
#define system_sprintf(buff, max, flags, data) \
|
||||||
::_snprintf(buff, max, flags, data)
|
::_snprintf(buff, max, flags, data)
|
||||||
#elif defined(HAVE_SNPRINTF)
|
#elif defined(HAVE_SNPRINTF)
|
||||||
@@ -252,7 +251,7 @@ bool wxPrintfConvSpec<CharType>::Parse(const CharType *format)
|
|||||||
case wxT('.'):
|
case wxT('.'):
|
||||||
// don't use CHECK_PREC here to avoid warning about the value
|
// don't use CHECK_PREC here to avoid warning about the value
|
||||||
// assigned to prec_dot inside it being never used (because
|
// assigned to prec_dot inside it being never used (because
|
||||||
// overwritten just below) from Borland in release build
|
// overwritten just below)
|
||||||
if (in_prec && !prec_dot)
|
if (in_prec && !prec_dot)
|
||||||
m_szFlags[flagofs++] = '.';
|
m_szFlags[flagofs++] = '.';
|
||||||
in_prec = true;
|
in_prec = true;
|
||||||
|
@@ -46,13 +46,8 @@ public:
|
|||||||
|
|
||||||
// test for pointer validity: defining conversion to unspecified_bool_type
|
// test for pointer validity: defining conversion to unspecified_bool_type
|
||||||
// and not more obvious bool to avoid implicit conversions to integer types
|
// and not more obvious bool to avoid implicit conversions to integer types
|
||||||
#ifdef __BORLANDC__
|
|
||||||
// this compiler is too dumb to use unspecified_bool_type operator in tests
|
|
||||||
// of the form "if ( !ptr )"
|
|
||||||
typedef bool unspecified_bool_type;
|
|
||||||
#else
|
|
||||||
typedef T *(wxScopedPtr<T>::*unspecified_bool_type)() const;
|
typedef T *(wxScopedPtr<T>::*unspecified_bool_type)() const;
|
||||||
#endif // __BORLANDC__
|
|
||||||
operator unspecified_bool_type() const
|
operator unspecified_bool_type() const
|
||||||
{
|
{
|
||||||
return m_ptr ? &wxScopedPtr<T>::get : NULL;
|
return m_ptr ? &wxScopedPtr<T>::get : NULL;
|
||||||
|
@@ -1085,11 +1085,10 @@ public:
|
|||||||
reverse_iterator_impl operator--(int)
|
reverse_iterator_impl operator--(int)
|
||||||
{ reverse_iterator_impl tmp = *this; ++m_cur; return tmp; }
|
{ reverse_iterator_impl tmp = *this; ++m_cur; return tmp; }
|
||||||
|
|
||||||
// NB: explicit <T> in the functions below is to keep BCC 5.5 happy
|
|
||||||
reverse_iterator_impl operator+(ptrdiff_t n) const
|
reverse_iterator_impl operator+(ptrdiff_t n) const
|
||||||
{ return reverse_iterator_impl<T>(m_cur - n); }
|
{ return reverse_iterator_impl(m_cur - n); }
|
||||||
reverse_iterator_impl operator-(ptrdiff_t n) const
|
reverse_iterator_impl operator-(ptrdiff_t n) const
|
||||||
{ return reverse_iterator_impl<T>(m_cur + n); }
|
{ return reverse_iterator_impl(m_cur + n); }
|
||||||
reverse_iterator_impl operator+=(ptrdiff_t n)
|
reverse_iterator_impl operator+=(ptrdiff_t n)
|
||||||
{ m_cur -= n; return *this; }
|
{ m_cur -= n; return *this; }
|
||||||
reverse_iterator_impl operator-=(ptrdiff_t n)
|
reverse_iterator_impl operator-=(ptrdiff_t n)
|
||||||
|
@@ -247,10 +247,6 @@ typedef wxUint32 wxDword;
|
|||||||
#define wxLongLong_t __int64
|
#define wxLongLong_t __int64
|
||||||
#define wxLongLongSuffix i64
|
#define wxLongLongSuffix i64
|
||||||
#define wxLongLongFmtSpec "I64"
|
#define wxLongLongFmtSpec "I64"
|
||||||
#elif defined(__BORLANDC__) && defined(__WIN32__) && (__BORLANDC__ >= 0x520)
|
|
||||||
#define wxLongLong_t __int64
|
|
||||||
#define wxLongLongSuffix i64
|
|
||||||
#define wxLongLongFmtSpec "L"
|
|
||||||
#elif defined(__MINGW32__) && \
|
#elif defined(__MINGW32__) && \
|
||||||
(defined(__USE_MINGW_ANSI_STDIO) && (__USE_MINGW_ANSI_STDIO != 1))
|
(defined(__USE_MINGW_ANSI_STDIO) && (__USE_MINGW_ANSI_STDIO != 1))
|
||||||
#define wxLongLong_t long long
|
#define wxLongLong_t long long
|
||||||
@@ -277,17 +273,8 @@ typedef wxUint32 wxDword;
|
|||||||
wxLL() and wxULL() macros allow to define 64 bit constants in a
|
wxLL() and wxULL() macros allow to define 64 bit constants in a
|
||||||
portable way.
|
portable way.
|
||||||
*/
|
*/
|
||||||
#ifndef wxCOMPILER_BROKEN_CONCAT_OPER
|
#define wxLL(x) wxCONCAT(x, wxLongLongSuffix)
|
||||||
#define wxLL(x) wxCONCAT(x, wxLongLongSuffix)
|
#define wxULL(x) wxCONCAT(x, wxCONCAT(u, wxLongLongSuffix))
|
||||||
#define wxULL(x) wxCONCAT(x, wxCONCAT(u, wxLongLongSuffix))
|
|
||||||
#else
|
|
||||||
/*
|
|
||||||
Currently only Borland compiler has broken concatenation operator
|
|
||||||
and this compiler is known to use [u]i64 suffix.
|
|
||||||
*/
|
|
||||||
#define wxLL(x) wxAPPEND_i64(x)
|
|
||||||
#define wxULL(x) wxAPPEND_ui64(x)
|
|
||||||
#endif
|
|
||||||
|
|
||||||
typedef wxLongLong_t wxInt64;
|
typedef wxLongLong_t wxInt64;
|
||||||
typedef wxULongLong_t wxUint64;
|
typedef wxULongLong_t wxUint64;
|
||||||
|
@@ -163,9 +163,8 @@ private:
|
|||||||
// This cryptic expression means "typedef Ops to wxVectorMemOpsMovable if
|
// This cryptic expression means "typedef Ops to wxVectorMemOpsMovable if
|
||||||
// type T is movable type, otherwise to wxVectorMemOpsGeneric".
|
// type T is movable type, otherwise to wxVectorMemOpsGeneric".
|
||||||
//
|
//
|
||||||
// Note that bcc needs the extra parentheses for non-type template
|
|
||||||
// arguments to compile this expression.
|
typedef typename wxIf< wxIsMovable<T>::value,
|
||||||
typedef typename wxIf< (wxIsMovable<T>::value),
|
|
||||||
wxPrivate::wxVectorMemOpsMovable<T>,
|
wxPrivate::wxVectorMemOpsMovable<T>,
|
||||||
wxPrivate::wxVectorMemOpsGeneric<T> >::value
|
wxPrivate::wxVectorMemOpsGeneric<T> >::value
|
||||||
Ops;
|
Ops;
|
||||||
|
@@ -231,11 +231,7 @@ extern unsigned long android_wcstoul(const wchar_t *nptr, wchar_t **endptr, int
|
|||||||
#endif
|
#endif
|
||||||
|
|
||||||
/* define wxCRT_StricmpA/W and wxCRT_StrnicmpA/W for various compilers */
|
/* define wxCRT_StricmpA/W and wxCRT_StrnicmpA/W for various compilers */
|
||||||
|
#if defined(__VISUALC__) || defined(__MINGW32__)
|
||||||
#if defined(__BORLANDC__)
|
|
||||||
#define wxCRT_StricmpA stricmp
|
|
||||||
#define wxCRT_StrnicmpA strnicmp
|
|
||||||
#elif defined(__VISUALC__) || defined(__MINGW32__)
|
|
||||||
/*
|
/*
|
||||||
Due to MinGW 5.3 bug (https://sourceforge.net/p/mingw/bugs/2322/),
|
Due to MinGW 5.3 bug (https://sourceforge.net/p/mingw/bugs/2322/),
|
||||||
_stricmp() and _strnicmp() are not declared in its standard headers
|
_stricmp() and _strnicmp() are not declared in its standard headers
|
||||||
|
@@ -132,8 +132,7 @@
|
|||||||
is a wrapper around it as explained below
|
is a wrapper around it as explained below
|
||||||
*/
|
*/
|
||||||
|
|
||||||
#if defined(__VISUALC__) || \
|
#if defined(__VISUALC__)
|
||||||
(defined(__BORLANDC__) && __BORLANDC__ >= 0x540)
|
|
||||||
#define wxCRT_VsnprintfA _vsnprintf
|
#define wxCRT_VsnprintfA _vsnprintf
|
||||||
#define wxCRT_VsnprintfW _vsnwprintf
|
#define wxCRT_VsnprintfW _vsnwprintf
|
||||||
#else
|
#else
|
||||||
|
@@ -13,7 +13,7 @@
|
|||||||
|
|
||||||
// check if to use precompiled headers: do it for most Windows compilers unless
|
// check if to use precompiled headers: do it for most Windows compilers unless
|
||||||
// explicitly disabled by defining NOPCH
|
// explicitly disabled by defining NOPCH
|
||||||
#if defined(__VISUALC__) || defined(__BORLANDC__)
|
#if defined(__VISUALC__)
|
||||||
// If user did not request NOCPH and we're not building using configure
|
// If user did not request NOCPH and we're not building using configure
|
||||||
// then assume user wants precompiled headers.
|
// then assume user wants precompiled headers.
|
||||||
#if !defined(NOPCH) && !defined(__WX_SETUP_H__)
|
#if !defined(NOPCH) && !defined(__WX_SETUP_H__)
|
||||||
|
@@ -39,11 +39,6 @@ public:
|
|||||||
// Read directly from XPM data (as passed to wxBitmap ctor):
|
// Read directly from XPM data (as passed to wxBitmap ctor):
|
||||||
wxImage ReadData(const char* const* xpm_data);
|
wxImage ReadData(const char* const* xpm_data);
|
||||||
|
|
||||||
#ifdef __BORLANDC__
|
|
||||||
// needed for Borland 5.5
|
|
||||||
wxImage ReadData(char** xpm_data)
|
|
||||||
{ return ReadData(const_cast<const char* const*>(xpm_data)); }
|
|
||||||
#endif
|
|
||||||
};
|
};
|
||||||
|
|
||||||
#endif // wxUSE_IMAGE && wxUSE_XPM
|
#endif // wxUSE_IMAGE && wxUSE_XPM
|
||||||
|
@@ -211,8 +211,6 @@ wxString wxDynamicLibrary::CanonicalizePluginName(const wxString& name,
|
|||||||
suffix << wxT("_gcc");
|
suffix << wxT("_gcc");
|
||||||
#elif defined(__VISUALC__)
|
#elif defined(__VISUALC__)
|
||||||
suffix << wxT("_vc");
|
suffix << wxT("_vc");
|
||||||
#elif defined(__BORLANDC__)
|
|
||||||
suffix << wxT("_bcc");
|
|
||||||
#endif
|
#endif
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
|
@@ -16,7 +16,7 @@
|
|||||||
#include <stdlib.h>
|
#include <stdlib.h>
|
||||||
|
|
||||||
// conversion tables, generated by scripts in $(WXWIN)/misc/unictabl:
|
// conversion tables, generated by scripts in $(WXWIN)/misc/unictabl:
|
||||||
#if defined( __BORLANDC__ ) || defined(__DARWIN__)
|
#if defined(__DARWIN__)
|
||||||
#include "../common/unictabl.inc"
|
#include "../common/unictabl.inc"
|
||||||
#else
|
#else
|
||||||
#include "unictabl.inc"
|
#include "unictabl.inc"
|
||||||
|
@@ -596,9 +596,7 @@ void wxMouseEvent::Assign(const wxMouseEvent& event)
|
|||||||
{
|
{
|
||||||
wxEvent::operator=(event);
|
wxEvent::operator=(event);
|
||||||
|
|
||||||
// Borland C++ 5.82 doesn't compile an explicit call to an implicitly
|
*this = event;
|
||||||
// defined operator=() so need to do it this way:
|
|
||||||
*static_cast<wxMouseState *>(this) = event;
|
|
||||||
|
|
||||||
m_x = event.m_x;
|
m_x = event.m_x;
|
||||||
m_y = event.m_y;
|
m_y = event.m_y;
|
||||||
@@ -805,9 +803,7 @@ wxKeyEvent& wxKeyEvent::operator=(const wxKeyEvent& evt)
|
|||||||
{
|
{
|
||||||
wxEvent::operator=(evt);
|
wxEvent::operator=(evt);
|
||||||
|
|
||||||
// Borland C++ 5.82 doesn't compile an explicit call to an
|
*this = evt;
|
||||||
// implicitly defined operator=() so need to do it this way:
|
|
||||||
*static_cast<wxKeyboardState *>(this) = evt;
|
|
||||||
|
|
||||||
DoAssignMembers(evt);
|
DoAssignMembers(evt);
|
||||||
}
|
}
|
||||||
|
@@ -78,7 +78,6 @@
|
|||||||
#include <fab.h>
|
#include <fab.h>
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
// TODO: Borland probably has _wgetcwd as well?
|
|
||||||
#if defined(_MSC_VER) || defined(__MINGW32__)
|
#if defined(_MSC_VER) || defined(__MINGW32__)
|
||||||
wxDECL_FOR_STRICT_MINGW32(wchar_t*, _wgetcwd, (wchar_t*, int))
|
wxDECL_FOR_STRICT_MINGW32(wchar_t*, _wgetcwd, (wchar_t*, int))
|
||||||
|
|
||||||
@@ -107,48 +106,6 @@ static wxChar wxFileFunctionsBuffer[4*_MAXPATHLEN];
|
|||||||
// implementation
|
// implementation
|
||||||
// ============================================================================
|
// ============================================================================
|
||||||
|
|
||||||
// ----------------------------------------------------------------------------
|
|
||||||
// wrappers around standard POSIX functions
|
|
||||||
// ----------------------------------------------------------------------------
|
|
||||||
|
|
||||||
#if wxUSE_UNICODE && defined __BORLANDC__ \
|
|
||||||
&& __BORLANDC__ >= 0x550 && __BORLANDC__ <= 0x551
|
|
||||||
|
|
||||||
// BCC 5.5 and 5.5.1 have a bug in _wopen where files are created read only
|
|
||||||
// regardless of the mode parameter. This hack works around the problem by
|
|
||||||
// setting the mode with _wchmod.
|
|
||||||
//
|
|
||||||
int wxCRT_OpenW(const wchar_t *pathname, int flags, mode_t mode)
|
|
||||||
{
|
|
||||||
int moreflags = 0;
|
|
||||||
|
|
||||||
// we only want to fix the mode when the file is actually created, so
|
|
||||||
// when creating first try doing it O_EXCL so we can tell if the file
|
|
||||||
// was already there.
|
|
||||||
if ((flags & O_CREAT) && !(flags & O_EXCL) && (mode & wxS_IWUSR) != 0)
|
|
||||||
moreflags = O_EXCL;
|
|
||||||
|
|
||||||
int fd = _wopen(pathname, flags | moreflags, mode);
|
|
||||||
|
|
||||||
// the file was actually created and needs fixing
|
|
||||||
if (fd != -1 && (flags & O_CREAT) != 0 && (mode & wxS_IWUSR) != 0)
|
|
||||||
{
|
|
||||||
close(fd);
|
|
||||||
_wchmod(pathname, mode);
|
|
||||||
fd = _wopen(pathname, flags & ~(O_EXCL | O_CREAT));
|
|
||||||
}
|
|
||||||
// the open failed, but it may have been because the added O_EXCL stopped
|
|
||||||
// the opening of an existing file, so try again without.
|
|
||||||
else if (fd == -1 && moreflags != 0)
|
|
||||||
{
|
|
||||||
fd = _wopen(pathname, flags & ~O_CREAT);
|
|
||||||
}
|
|
||||||
|
|
||||||
return fd;
|
|
||||||
}
|
|
||||||
|
|
||||||
#endif
|
|
||||||
|
|
||||||
// ----------------------------------------------------------------------------
|
// ----------------------------------------------------------------------------
|
||||||
// wxPathList
|
// wxPathList
|
||||||
// ----------------------------------------------------------------------------
|
// ----------------------------------------------------------------------------
|
||||||
@@ -1075,7 +1032,6 @@ wxRenameFile(const wxString& file1, const wxString& file2, bool overwrite)
|
|||||||
bool wxRemoveFile(const wxString& file)
|
bool wxRemoveFile(const wxString& file)
|
||||||
{
|
{
|
||||||
#if defined(__VISUALC__) \
|
#if defined(__VISUALC__) \
|
||||||
|| defined(__BORLANDC__) \
|
|
||||||
|| defined(__GNUWIN32__)
|
|| defined(__GNUWIN32__)
|
||||||
int res = wxRemove(file);
|
int res = wxRemove(file);
|
||||||
#elif defined(__WXMAC__)
|
#elif defined(__WXMAC__)
|
||||||
|
@@ -985,11 +985,7 @@ const wxLanguageInfo *wxLocale::GetLanguageInfo(int lang)
|
|||||||
for ( size_t i = 0; i < count; i++ )
|
for ( size_t i = 0; i < count; i++ )
|
||||||
{
|
{
|
||||||
if ( ms_languagesDB->Item(i).Language == lang )
|
if ( ms_languagesDB->Item(i).Language == lang )
|
||||||
{
|
return &ms_languagesDB->Item(i);
|
||||||
// We need to create a temporary here in order to make this work with BCC in final build mode
|
|
||||||
wxLanguageInfo *ptr = &ms_languagesDB->Item(i);
|
|
||||||
return ptr;
|
|
||||||
}
|
|
||||||
}
|
}
|
||||||
|
|
||||||
return NULL;
|
return NULL;
|
||||||
|
@@ -87,12 +87,6 @@ struct tm *wxLocaltime_r(const time_t* ticks, struct tm* temp)
|
|||||||
wxMutexLocker locker(timeLock);
|
wxMutexLocker locker(timeLock);
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
// Borland CRT crashes when passed 0 ticks for some reason, see SF bug 1704438
|
|
||||||
#ifdef __BORLANDC__
|
|
||||||
if ( !*ticks )
|
|
||||||
return NULL;
|
|
||||||
#endif
|
|
||||||
|
|
||||||
const tm * const t = localtime(ticks);
|
const tm * const t = localtime(ticks);
|
||||||
if ( !t )
|
if ( !t )
|
||||||
return NULL;
|
return NULL;
|
||||||
@@ -111,11 +105,6 @@ struct tm *wxGmtime_r(const time_t* ticks, struct tm* temp)
|
|||||||
wxMutexLocker locker(timeLock);
|
wxMutexLocker locker(timeLock);
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
#ifdef __BORLANDC__
|
|
||||||
if ( !*ticks )
|
|
||||||
return NULL;
|
|
||||||
#endif
|
|
||||||
|
|
||||||
const tm * const t = gmtime(ticks);
|
const tm * const t = gmtime(ticks);
|
||||||
if ( !t )
|
if ( !t )
|
||||||
return NULL;
|
return NULL;
|
||||||
@@ -185,7 +174,7 @@ int wxGetTimeZone()
|
|||||||
|
|
||||||
#if defined(WX_TIMEZONE) // If WX_TIMEZONE was defined by configure, use it.
|
#if defined(WX_TIMEZONE) // If WX_TIMEZONE was defined by configure, use it.
|
||||||
return WX_TIMEZONE;
|
return WX_TIMEZONE;
|
||||||
#elif defined(__BORLANDC__) || defined(__MINGW32__)
|
#elif defined(__MINGW32__)
|
||||||
#if defined(__MINGW32_TOOLCHAIN__) && defined(__STRICT_ANSI__)
|
#if defined(__MINGW32_TOOLCHAIN__) && defined(__STRICT_ANSI__)
|
||||||
extern long _timezone;
|
extern long _timezone;
|
||||||
#endif
|
#endif
|
||||||
@@ -311,8 +300,6 @@ wxLongLong wxGetUTCTimeMillis()
|
|||||||
|
|
||||||
#if defined(__VISUALC__)
|
#if defined(__VISUALC__)
|
||||||
#pragma message("wxStopWatch will be up to second resolution!")
|
#pragma message("wxStopWatch will be up to second resolution!")
|
||||||
#elif defined(__BORLANDC__)
|
|
||||||
#pragma message "wxStopWatch will be up to second resolution!"
|
|
||||||
#else
|
#else
|
||||||
#warning "wxStopWatch will be up to second resolution!"
|
#warning "wxStopWatch will be up to second resolution!"
|
||||||
#endif // compiler
|
#endif // compiler
|
||||||
|
@@ -71,10 +71,6 @@
|
|||||||
// #include "MoreFilesX.h"
|
// #include "MoreFilesX.h"
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
#ifdef __BORLANDC__
|
|
||||||
#include "dos.h"
|
|
||||||
#endif
|
|
||||||
|
|
||||||
extern WXDLLEXPORT_DATA(const char) wxFileSelectorDefaultWildcardStr[];
|
extern WXDLLEXPORT_DATA(const char) wxFileSelectorDefaultWildcardStr[];
|
||||||
|
|
||||||
// If compiled under Windows, this macro can cause problems
|
// If compiled under Windows, this macro can cause problems
|
||||||
|
@@ -43,10 +43,8 @@
|
|||||||
wxDEFINE_EVENT( wxEVT_DIALUP_CONNECTED, wxDialUpEvent );
|
wxDEFINE_EVENT( wxEVT_DIALUP_CONNECTED, wxDialUpEvent );
|
||||||
wxDEFINE_EVENT( wxEVT_DIALUP_DISCONNECTED, wxDialUpEvent );
|
wxDEFINE_EVENT( wxEVT_DIALUP_DISCONNECTED, wxDialUpEvent );
|
||||||
|
|
||||||
// Doesn't yet compile under BC++
|
|
||||||
// Wine: no wininet.h
|
// Wine: no wininet.h
|
||||||
#if (!defined(__BORLANDC__) || (__BORLANDC__>=0x550)) && \
|
#if !defined(__WINE__)
|
||||||
!defined(__WINE__)
|
|
||||||
|
|
||||||
#include <ras.h>
|
#include <ras.h>
|
||||||
#include <raserror.h>
|
#include <raserror.h>
|
||||||
@@ -1294,6 +1292,6 @@ static void WINAPI wxRasDialFunc(UINT WXUNUSED(unMsg),
|
|||||||
rasconnstate, dwError);
|
rasconnstate, dwError);
|
||||||
}
|
}
|
||||||
|
|
||||||
#endif // __BORLANDC__
|
#endif // #if !defined(__WINE__)
|
||||||
|
|
||||||
#endif // wxUSE_DIALUP_MANAGER
|
#endif // wxUSE_DIALUP_MANAGER
|
||||||
|
@@ -25,11 +25,6 @@
|
|||||||
|
|
||||||
#include <mmsystem.h>
|
#include <mmsystem.h>
|
||||||
|
|
||||||
// Why doesn't BC++ have joyGetPosEx?
|
|
||||||
#if defined(__BORLANDC__)
|
|
||||||
#define NO_JOYGETPOSEX
|
|
||||||
#endif
|
|
||||||
|
|
||||||
#include "wx/msw/registry.h"
|
#include "wx/msw/registry.h"
|
||||||
|
|
||||||
#include <regstr.h>
|
#include <regstr.h>
|
||||||
|
@@ -45,7 +45,7 @@
|
|||||||
// Currently gcc doesn't define NMLVFINDITEM, and DMC only defines
|
// Currently gcc doesn't define NMLVFINDITEM, and DMC only defines
|
||||||
// it by its old name NM_FINDTIEM.
|
// it by its old name NM_FINDTIEM.
|
||||||
//
|
//
|
||||||
#if defined(__VISUALC__) || defined(__BORLANDC__) || defined(NMLVFINDITEM)
|
#if defined(__VISUALC__) || defined(NMLVFINDITEM)
|
||||||
#define HAVE_NMLVFINDITEM 1
|
#define HAVE_NMLVFINDITEM 1
|
||||||
#elif defined(NM_FINDITEM)
|
#elif defined(NM_FINDITEM)
|
||||||
#define HAVE_NMLVFINDITEM 1
|
#define HAVE_NMLVFINDITEM 1
|
||||||
|
@@ -40,12 +40,6 @@
|
|||||||
#include "wx/msw/crashrpt.h"
|
#include "wx/msw/crashrpt.h"
|
||||||
#endif // wxUSE_ON_FATAL_EXCEPTION
|
#endif // wxUSE_ON_FATAL_EXCEPTION
|
||||||
|
|
||||||
#ifdef __BORLANDC__
|
|
||||||
// BC++ has to be special: its run-time expects the DLL entry point to be
|
|
||||||
// named DllEntryPoint instead of the (more) standard DllMain
|
|
||||||
#define DllMain DllEntryPoint
|
|
||||||
#endif // __BORLANDC__
|
|
||||||
|
|
||||||
// defined in common/init.cpp
|
// defined in common/init.cpp
|
||||||
extern int wxEntryReal(int& argc, wxChar **argv);
|
extern int wxEntryReal(int& argc, wxChar **argv);
|
||||||
extern int wxEntryCleanupReal(int& argc, wxChar **argv);
|
extern int wxEntryCleanupReal(int& argc, wxChar **argv);
|
||||||
|
@@ -12,12 +12,6 @@
|
|||||||
#include "wx/wxprec.h"
|
#include "wx/wxprec.h"
|
||||||
|
|
||||||
|
|
||||||
// With Borland C++, all samples crash if this is compiled in.
|
|
||||||
#if (defined(__BORLANDC__) && (__BORLANDC__ < 0x520)) || defined(__CYGWIN10__)
|
|
||||||
#undef wxUSE_OLE_AUTOMATION
|
|
||||||
#define wxUSE_OLE_AUTOMATION 0
|
|
||||||
#endif
|
|
||||||
|
|
||||||
#ifndef WX_PRECOMP
|
#ifndef WX_PRECOMP
|
||||||
#include "wx/log.h"
|
#include "wx/log.h"
|
||||||
#include "wx/math.h"
|
#include "wx/math.h"
|
||||||
|
@@ -717,15 +717,9 @@ STDMETHODIMP wxIDataObject::SetData(FORMATETC *pformatetc,
|
|||||||
case CF_OEMTEXT:
|
case CF_OEMTEXT:
|
||||||
size = strlen((const char *)ptr.Get());
|
size = strlen((const char *)ptr.Get());
|
||||||
break;
|
break;
|
||||||
#if !(defined(__BORLANDC__) && (__BORLANDC__ < 0x500))
|
|
||||||
case CF_UNICODETEXT:
|
case CF_UNICODETEXT:
|
||||||
#if ( defined(__BORLANDC__) && (__BORLANDC__ > 0x530) )
|
|
||||||
size = std::wcslen((const wchar_t *)ptr.Get()) * sizeof(wchar_t);
|
|
||||||
#else
|
|
||||||
size = wxWcslen((const wchar_t *)ptr.Get()) * sizeof(wchar_t);
|
size = wxWcslen((const wchar_t *)ptr.Get()) * sizeof(wchar_t);
|
||||||
#endif
|
|
||||||
break;
|
break;
|
||||||
#endif
|
|
||||||
case CF_BITMAP:
|
case CF_BITMAP:
|
||||||
case CF_HDROP:
|
case CF_HDROP:
|
||||||
// these formats don't use size at all, anyhow (but
|
// these formats don't use size at all, anyhow (but
|
||||||
|
@@ -272,8 +272,6 @@ void wxStandardPaths::IgnoreAppBuildSubDirs()
|
|||||||
compilerPrefix = "vc";
|
compilerPrefix = "vc";
|
||||||
#elif defined(__GNUG__)
|
#elif defined(__GNUG__)
|
||||||
compilerPrefix = "gcc";
|
compilerPrefix = "gcc";
|
||||||
#elif defined(__BORLANDC__)
|
|
||||||
compilerPrefix = "bcc";
|
|
||||||
#else
|
#else
|
||||||
return;
|
return;
|
||||||
#endif
|
#endif
|
||||||
|
@@ -43,22 +43,9 @@
|
|||||||
#define _MT
|
#define _MT
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
#if defined(__BORLANDC__)
|
|
||||||
#if !defined(__MT__)
|
|
||||||
// I can't set -tWM in the IDE (anyone?) so have to do this
|
|
||||||
#define __MT__
|
|
||||||
#endif
|
|
||||||
|
|
||||||
#if !defined(__MFC_COMPAT__)
|
|
||||||
// Needed to know about _beginthreadex etc..
|
|
||||||
#define __MFC_COMPAT__
|
|
||||||
#endif
|
|
||||||
#endif // BC++
|
|
||||||
|
|
||||||
// define wxUSE_BEGIN_THREAD if the compiler has _beginthreadex() function
|
// define wxUSE_BEGIN_THREAD if the compiler has _beginthreadex() function
|
||||||
// which should be used instead of Win32 ::CreateThread() if possible
|
// which should be used instead of Win32 ::CreateThread() if possible
|
||||||
#if defined(__VISUALC__) || \
|
#if defined(__VISUALC__) || \
|
||||||
(defined(__BORLANDC__) && (__BORLANDC__ >= 0x500)) || \
|
|
||||||
(defined(__GNUG__) && defined(__MSVCRT__))
|
(defined(__GNUG__) && defined(__MSVCRT__))
|
||||||
|
|
||||||
#undef wxUSE_BEGIN_THREAD
|
#undef wxUSE_BEGIN_THREAD
|
||||||
|
@@ -68,12 +68,6 @@
|
|||||||
#include <cygwin/version.h>
|
#include <cygwin/version.h>
|
||||||
#endif //GNUWIN32
|
#endif //GNUWIN32
|
||||||
|
|
||||||
#ifdef __BORLANDC__ // Please someone tell me which version of Borland needs
|
|
||||||
// this (3.1 I believe) and how to test for it.
|
|
||||||
// If this works for Borland 4.0 as well, then no worries.
|
|
||||||
#include <dir.h>
|
|
||||||
#endif
|
|
||||||
|
|
||||||
// VZ: there is some code using NetXXX() functions to get the full user name:
|
// VZ: there is some code using NetXXX() functions to get the full user name:
|
||||||
// I don't think it's a good idea because they don't work under Win95 and
|
// I don't think it's a good idea because they don't work under Win95 and
|
||||||
// seem to return the same as wxGetUserId() under NT. If you really want
|
// seem to return the same as wxGetUserId() under NT. If you really want
|
||||||
@@ -445,13 +439,8 @@ bool wxGetDiskSpace(const wxString& path,
|
|||||||
}
|
}
|
||||||
|
|
||||||
// ULARGE_INTEGER is a union of a 64 bit value and a struct containing
|
// ULARGE_INTEGER is a union of a 64 bit value and a struct containing
|
||||||
// two 32 bit fields which may be or may be not named - try to make it
|
// two 32 bit fields which may be or may be not named
|
||||||
// compile in all cases
|
|
||||||
#if defined(__BORLANDC__) && !defined(_ANONYMOUS_STRUCT)
|
|
||||||
#define UL(ul) ul.u
|
|
||||||
#else // anon union
|
|
||||||
#define UL(ul) ul
|
#define UL(ul) ul
|
||||||
#endif
|
|
||||||
if ( pTotal )
|
if ( pTotal )
|
||||||
{
|
{
|
||||||
#if wxUSE_LONGLONG
|
#if wxUSE_LONGLONG
|
||||||
|
@@ -16,8 +16,6 @@
|
|||||||
|
|
||||||
#if defined(__VISUALC__)
|
#if defined(__VISUALC__)
|
||||||
#pragma message("OpenGL support is not implemented in wxQt")
|
#pragma message("OpenGL support is not implemented in wxQt")
|
||||||
#elif defined(__BORLANDC__)
|
|
||||||
#pragma message "OpenGL support is not implemented in wxQt"
|
|
||||||
#else
|
#else
|
||||||
#warning "OpenGL support is not implemented in wxQt"
|
#warning "OpenGL support is not implemented in wxQt"
|
||||||
#endif
|
#endif
|
||||||
|
@@ -33,9 +33,6 @@ using std::string;
|
|||||||
#if defined _MSC_VER && _MSC_VER >= 1310 && !defined __WIN64__
|
#if defined _MSC_VER && _MSC_VER >= 1310 && !defined __WIN64__
|
||||||
# define WXARC_MEMBER_TEMPLATES
|
# define WXARC_MEMBER_TEMPLATES
|
||||||
#endif
|
#endif
|
||||||
#if defined __BORLANDC__ && __BORLANDC__ >= 0x530
|
|
||||||
# define WXARC_MEMBER_TEMPLATES
|
|
||||||
#endif
|
|
||||||
#if defined __HP_aCC && __HP_aCC > 33300
|
#if defined __HP_aCC && __HP_aCC > 33300
|
||||||
# define WXARC_MEMBER_TEMPLATES
|
# define WXARC_MEMBER_TEMPLATES
|
||||||
#endif
|
#endif
|
||||||
@@ -382,7 +379,7 @@ void TempDir::RemoveDir(wxString& path)
|
|||||||
#if defined __UNIX__ || defined __MINGW32__
|
#if defined __UNIX__ || defined __MINGW32__
|
||||||
# define WXARC_popen popen
|
# define WXARC_popen popen
|
||||||
# define WXARC_pclose pclose
|
# define WXARC_pclose pclose
|
||||||
#elif defined _MSC_VER || defined __BORLANDC__
|
#elif defined _MSC_VER
|
||||||
# define WXARC_popen _popen
|
# define WXARC_popen _popen
|
||||||
# define WXARC_pclose _pclose
|
# define WXARC_pclose _pclose
|
||||||
#else
|
#else
|
||||||
|
Reference in New Issue
Block a user