Remove BCC-specific conditionally compiled code

This commit is contained in:
PB
2020-10-13 18:32:49 +02:00
parent f57f214122
commit a6d4799de9
43 changed files with 52 additions and 391 deletions

View File

@@ -81,8 +81,6 @@
// ABI-compatible with the corresponding version of the MSVC and we want to
// allow using it compile the application code using MSVC-built DLLs.
#define __WX_BO_COMPILER ",Intel C++"
#elif defined(__BORLANDC__)
#define __WX_BO_COMPILER ",Borland C++"
#else
#define __WX_BO_COMPILER
#endif

View File

@@ -93,9 +93,6 @@
/* VC++ and BC++ starting with 5.2 have TCHAR support */
#ifdef __VISUALC__
#define wxHAVE_TCHAR_SUPPORT
#elif defined(__BORLANDC__) && (__BORLANDC__ >= 0x520)
#define wxHAVE_TCHAR_SUPPORT
#include <ctype.h>
#elif defined(__MINGW32__)
#define wxHAVE_TCHAR_SUPPORT
#include <stddef.h>
@@ -199,11 +196,7 @@
Notice that we use an intermediate macro to allow x to be expanded
if it's a macro itself.
*/
#ifndef wxCOMPILER_BROKEN_CONCAT_OPER
#define wxT(x) wxCONCAT_HELPER(L, x)
#else
#define wxT(x) wxPREPEND_L(x)
#endif
#define wxT(x) wxCONCAT_HELPER(L, x)
#endif /* ASCII/Unicode */
#endif /* !defined(wxT) */
@@ -223,11 +216,7 @@
/*
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)
#else
#define wxS(x) wxPREPEND_L(x)
#endif
#define wxS(x) wxCONCAT_HELPER(L, x)
#else /* wxUSE_UNICODE_UTF8 || ANSI */
#define wxS(x) x
#endif

View File

@@ -60,8 +60,6 @@
# pragma message("Please update wx/compiler.h to recognize this VC++ version")
#endif
#elif defined(__BCPLUSPLUS__) && !defined(__BORLANDC__)
# define __BORLANDC__
#elif defined(__SUNPRO_CC)
# ifndef __SUNCC__
# define __SUNCC__ __SUNPRO_CC

View File

@@ -41,16 +41,6 @@
/* a Unicode-friendly version of wxSTRINGIZE_T */
#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
current line number to the given identifier to reduce the probability of the

View File

@@ -157,11 +157,6 @@
#endif /* VC++ 8 */
#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
this is a perfectly valid situation for a ref-counted class which destroys
@@ -497,7 +492,6 @@ typedef short int WXTYPE;
#if defined(__GNUWIN32__)
#define wxSTDCALL __attribute__((stdcall))
#else
/* both VC++ and Borland understand this */
#define wxSTDCALL _stdcall
#endif
@@ -880,12 +874,8 @@ typedef short int WXTYPE;
/* sometimes the value of a variable is *really* not used, to suppress the */
/* resulting warning you may pass it to this function */
#ifdef __cplusplus
# ifdef __BORLANDC__
# define wxUnusedVar(identifier) identifier
# else
template <class T>
inline void wxUnusedVar(const T& WXUNUSED(t)) { }
# endif
template <class T>
inline void wxUnusedVar(const T& WXUNUSED(t)) { }
#endif
/* ---------------------------------------------------------------------------- */

View File

@@ -20,9 +20,9 @@
# define WXIMPORT __attribute__ ((visibility("default")))
#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 WXIMPORT __declspec(dllimport)
/*

View File

@@ -4287,10 +4287,6 @@ typedef void (wxEvtHandler::*wxPressAndTapEventFunction)(wxPressAndTapEvent&);
static const wxEventTable sm_eventTable; \
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) \
const wxEventTable theClass::sm_eventTable = \
{ &baseClass::sm_eventTable, &theClass::sm_eventTableEntries[0] }; \

View File

@@ -32,12 +32,6 @@
#endif // __WINDOWS__
#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
// ----------------------------------------------------------------------------
@@ -127,8 +121,7 @@ enum wxPosixPermissions
( \
defined(__VISUALC__) || \
defined(__MINGW64_TOOLCHAIN__) || \
(defined(__MINGW32__) && !defined(__WINE__)) || \
defined(__BORLANDC__) \
(defined(__MINGW32__) && !defined(__WINE__)) \
)
// temporary defines just used immediately below
@@ -183,8 +176,6 @@ enum wxPosixPermissions
#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
@@ -195,33 +186,14 @@ enum wxPosixPermissions
typedef off_t wxFileOffset;
#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
#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
// MSVC compatibility?) but stat with ANSI ones
#ifdef __BORLANDC__
#if wxHAS_HUGE_FILES
#define wxStructStat struct stati64
#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__
#define wxPOSIX_STRUCT(s) struct wxPOSIX_IDENT(s)
#ifdef wxHAS_HUGE_FILES
#define wxStructStat struct _stati64
#else
#define wxStructStat struct _stat
#endif
// functions
@@ -232,7 +204,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(__MINGW64_TOOLCHAIN__)
#if defined(__MINGW64_TOOLCHAIN__)
#define wxPOSIX_IDENT(func) ::func
#else // by default assume MSVC-compatible names
#define wxPOSIX_IDENT(func) _ ## func
@@ -263,15 +235,13 @@ enum wxPosixPermissions
#define wxTell wxPOSIX_IDENT(tell)
#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)
#ifndef HAVE_FSYNC
#define HAVE_FSYNC
#endif
#endif // BORLANDC
#define wxFsync _commit
// could be already defined by configure (Cygwin)
#ifndef HAVE_FSYNC
#define HAVE_FSYNC
#endif
#define wxEof wxPOSIX_IDENT(eof)
@@ -297,14 +267,8 @@ enum wxPosixPermissions
// then wide char ones
#if wxUSE_UNICODE
// special workaround for buggy wopen() in bcc 5.5
#if defined(__BORLANDC__) && \
(__BORLANDC__ >= 0x550 && __BORLANDC__ <= 0x551)
WXDLLIMPEXP_BASE int wxCRT_OpenW(const wxChar *pathname,
int flags, mode_t mode);
#else
#define wxCRT_OpenW _wopen
#endif
#define wxCRT_OpenW _wopen
wxDECL_FOR_STRICT_MINGW32(int, _wopen, (const wchar_t*, int, ...))
wxDECL_FOR_STRICT_MINGW32(int, _waccess, (const wchar_t*, int))

View File

@@ -321,11 +321,6 @@ public:
#endif // wxUSE_STREAMS
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, unsigned char* data, bool static_data = false );

View File

@@ -1408,14 +1408,7 @@ public:
// functions if their parameters are complicated enough, but by defining them
// as an empty inline function we ensure that even dumbest compilers optimise
// them away
#ifdef __BORLANDC__
// 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
inline void wxLogNop() { }
#if wxUSE_LOG_DEBUG
#define wxLogDebug wxDO_LOG_IF_ENABLED(Debug)

View File

@@ -72,7 +72,7 @@
}
#else /* C++98 */
#if defined(__VISUALC__) || defined(__BORLANDC__)
#if defined(__VISUALC__)
#include <float.h>
#define wxFinite(x) _finite(x)
#elif defined(__MINGW64_TOOLCHAIN__) || defined(__clang__)
@@ -102,7 +102,7 @@
#endif
#if defined(__VISUALC__)||defined(__BORLAND__)
#if defined(__VISUALC__)
#define wxIsNaN(x) _isnan(x)
#elif defined(__GNUG__)||defined(__GNUWIN32__)|| \
defined(__SGI_CC__)||defined(__SUNCC__)||defined(__XLC__)|| \

View File

@@ -162,8 +162,7 @@
* All of the settings below require SEH support (__try/__catch) and can't work
* without it.
*/
#if !defined(_MSC_VER) && \
(!defined(__BORLANDC__) || __BORLANDC__ < 0x0550)
#if !defined(_MSC_VER)
# undef wxUSE_ON_FATAL_EXCEPTION
# define wxUSE_ON_FATAL_EXCEPTION 0
@@ -215,27 +214,6 @@
# 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
defined

View File

@@ -47,32 +47,6 @@ extern WXDLLIMPEXP_CORE int
wxCmdLineArgType pCmdLine = NULL,
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 \
extern "C" int WINAPI WinMain(HINSTANCE hInstance, \
HINSTANCE hPrevInstance, \
@@ -86,8 +60,7 @@ extern WXDLLIMPEXP_CORE int
/* to pass lpCmdLine to wxEntry() here, you'll have to fix */ \
/* wWinMain() above too. */ \
return wxEntry(hInstance, hPrevInstance, NULL, nCmdShow); \
} \
wxIMPLEMENT_WXWIN_MAIN_BORLAND_NONSTANDARD
}
#endif // wxUSE_GUI

View File

@@ -121,13 +121,12 @@ extern LONG APIENTRY
// 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.
// 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
// Age.
#if defined(__CYGWIN__)
#define wxGetOSFHandle(fd) ((HANDLE)get_osfhandle(fd))
#elif defined(__VISUALC__) \
|| defined(__BORLANDC__) \
|| defined(__MINGW32__)
#define wxGetOSFHandle(fd) ((HANDLE)_get_osfhandle(fd))
#define wxOpenOSFHandle(h, flags) (_open_osfhandle(wxPtrToUInt(h), flags))

View File

@@ -18,14 +18,7 @@
WXDLLIMPEXP_BASE unsigned long wxGlobalSEHandler(EXCEPTION_POINTERS *pExcPtrs);
// 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)
#endif
// macros which allow to avoid many #if wxUSE_ON_FATAL_EXCEPTION in the code
// which uses them

View File

@@ -82,7 +82,6 @@
define it ourselves if any of the following macros is defined:
- MSVC _WIN32 (notice that this is also defined under Win64)
- Borland __WIN32__
- Our __WXMSW__ which selects Windows as platform automatically
*/
#if defined(_WIN32) || defined(__WIN32__) || defined(__WXMSW__)
@@ -224,42 +223,6 @@
#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
@@ -369,7 +332,7 @@
# include "wx/msw/libraries.h"
#endif
#if defined(__BORLANDC__) || (defined(__GNUC__) && __GNUC__ < 3)
#if (defined(__GNUC__) && __GNUC__ < 3)
#define wxNEEDS_CHARPP
#endif

View File

@@ -23,8 +23,7 @@
#include <string.h>
// prefer snprintf over sprintf
#if defined(__VISUALC__) || \
(defined(__BORLANDC__) && __BORLANDC__ >= 0x540)
#if defined(__VISUALC__)
#define system_sprintf(buff, max, flags, data) \
::_snprintf(buff, max, flags, data)
#elif defined(HAVE_SNPRINTF)
@@ -252,7 +251,7 @@ bool wxPrintfConvSpec<CharType>::Parse(const CharType *format)
case wxT('.'):
// don't use CHECK_PREC here to avoid warning about the value
// 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)
m_szFlags[flagofs++] = '.';
in_prec = true;

View File

@@ -46,13 +46,8 @@ public:
// test for pointer validity: defining conversion to unspecified_bool_type
// 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;
#endif // __BORLANDC__
operator unspecified_bool_type() const
{
return m_ptr ? &wxScopedPtr<T>::get : NULL;

View File

@@ -1085,11 +1085,10 @@ public:
reverse_iterator_impl operator--(int)
{ 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
{ return reverse_iterator_impl<T>(m_cur - n); }
{ return reverse_iterator_impl(m_cur - n); }
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)
{ m_cur -= n; return *this; }
reverse_iterator_impl operator-=(ptrdiff_t n)

View File

@@ -247,10 +247,6 @@ typedef wxUint32 wxDword;
#define wxLongLong_t __int64
#define wxLongLongSuffix i64
#define wxLongLongFmtSpec "I64"
#elif defined(__BORLANDC__) && defined(__WIN32__) && (__BORLANDC__ >= 0x520)
#define wxLongLong_t __int64
#define wxLongLongSuffix i64
#define wxLongLongFmtSpec "L"
#elif defined(__MINGW32__) && \
(defined(__USE_MINGW_ANSI_STDIO) && (__USE_MINGW_ANSI_STDIO != 1))
#define wxLongLong_t long long
@@ -277,17 +273,8 @@ typedef wxUint32 wxDword;
wxLL() and wxULL() macros allow to define 64 bit constants in a
portable way.
*/
#ifndef wxCOMPILER_BROKEN_CONCAT_OPER
#define wxLL(x) wxCONCAT(x, 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
#define wxLL(x) wxCONCAT(x, wxLongLongSuffix)
#define wxULL(x) wxCONCAT(x, wxCONCAT(u, wxLongLongSuffix))
typedef wxLongLong_t wxInt64;
typedef wxULongLong_t wxUint64;

View File

@@ -163,9 +163,8 @@ private:
// This cryptic expression means "typedef Ops to wxVectorMemOpsMovable if
// 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::wxVectorMemOpsGeneric<T> >::value
Ops;

View File

@@ -231,11 +231,7 @@ extern unsigned long android_wcstoul(const wchar_t *nptr, wchar_t **endptr, int
#endif
/* define wxCRT_StricmpA/W and wxCRT_StrnicmpA/W for various compilers */
#if defined(__BORLANDC__)
#define wxCRT_StricmpA stricmp
#define wxCRT_StrnicmpA strnicmp
#elif defined(__VISUALC__) || defined(__MINGW32__)
#if defined(__VISUALC__) || defined(__MINGW32__)
/*
Due to MinGW 5.3 bug (https://sourceforge.net/p/mingw/bugs/2322/),
_stricmp() and _strnicmp() are not declared in its standard headers

View File

@@ -132,8 +132,7 @@
is a wrapper around it as explained below
*/
#if defined(__VISUALC__) || \
(defined(__BORLANDC__) && __BORLANDC__ >= 0x540)
#if defined(__VISUALC__)
#define wxCRT_VsnprintfA _vsnprintf
#define wxCRT_VsnprintfW _vsnwprintf
#else

View File

@@ -13,7 +13,7 @@
// check if to use precompiled headers: do it for most Windows compilers unless
// 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
// then assume user wants precompiled headers.
#if !defined(NOPCH) && !defined(__WX_SETUP_H__)

View File

@@ -39,11 +39,6 @@ public:
// Read directly from XPM data (as passed to wxBitmap ctor):
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

View File

@@ -211,8 +211,6 @@ wxString wxDynamicLibrary::CanonicalizePluginName(const wxString& name,
suffix << wxT("_gcc");
#elif defined(__VISUALC__)
suffix << wxT("_vc");
#elif defined(__BORLANDC__)
suffix << wxT("_bcc");
#endif
#endif

View File

@@ -16,7 +16,7 @@
#include <stdlib.h>
// conversion tables, generated by scripts in $(WXWIN)/misc/unictabl:
#if defined( __BORLANDC__ ) || defined(__DARWIN__)
#if defined(__DARWIN__)
#include "../common/unictabl.inc"
#else
#include "unictabl.inc"

View File

@@ -596,9 +596,7 @@ void wxMouseEvent::Assign(const wxMouseEvent& event)
{
wxEvent::operator=(event);
// Borland C++ 5.82 doesn't compile an explicit call to an implicitly
// defined operator=() so need to do it this way:
*static_cast<wxMouseState *>(this) = event;
*this = event;
m_x = event.m_x;
m_y = event.m_y;
@@ -805,9 +803,7 @@ wxKeyEvent& wxKeyEvent::operator=(const wxKeyEvent& evt)
{
wxEvent::operator=(evt);
// Borland C++ 5.82 doesn't compile an explicit call to an
// implicitly defined operator=() so need to do it this way:
*static_cast<wxKeyboardState *>(this) = evt;
*this = evt;
DoAssignMembers(evt);
}

View File

@@ -78,7 +78,6 @@
#include <fab.h>
#endif
// TODO: Borland probably has _wgetcwd as well?
#if defined(_MSC_VER) || defined(__MINGW32__)
wxDECL_FOR_STRICT_MINGW32(wchar_t*, _wgetcwd, (wchar_t*, int))
@@ -107,48 +106,6 @@ static wxChar wxFileFunctionsBuffer[4*_MAXPATHLEN];
// 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
// ----------------------------------------------------------------------------
@@ -1075,7 +1032,6 @@ wxRenameFile(const wxString& file1, const wxString& file2, bool overwrite)
bool wxRemoveFile(const wxString& file)
{
#if defined(__VISUALC__) \
|| defined(__BORLANDC__) \
|| defined(__GNUWIN32__)
int res = wxRemove(file);
#elif defined(__WXMAC__)

View File

@@ -985,11 +985,7 @@ const wxLanguageInfo *wxLocale::GetLanguageInfo(int lang)
for ( size_t i = 0; i < count; i++ )
{
if ( ms_languagesDB->Item(i).Language == lang )
{
// 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 &ms_languagesDB->Item(i);
}
return NULL;

View File

@@ -87,12 +87,6 @@ struct tm *wxLocaltime_r(const time_t* ticks, struct tm* temp)
wxMutexLocker locker(timeLock);
#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);
if ( !t )
return NULL;
@@ -111,11 +105,6 @@ struct tm *wxGmtime_r(const time_t* ticks, struct tm* temp)
wxMutexLocker locker(timeLock);
#endif
#ifdef __BORLANDC__
if ( !*ticks )
return NULL;
#endif
const tm * const t = gmtime(ticks);
if ( !t )
return NULL;
@@ -185,7 +174,7 @@ int wxGetTimeZone()
#if defined(WX_TIMEZONE) // If WX_TIMEZONE was defined by configure, use it.
return WX_TIMEZONE;
#elif defined(__BORLANDC__) || defined(__MINGW32__)
#elif defined(__MINGW32__)
#if defined(__MINGW32_TOOLCHAIN__) && defined(__STRICT_ANSI__)
extern long _timezone;
#endif
@@ -311,8 +300,6 @@ wxLongLong wxGetUTCTimeMillis()
#if defined(__VISUALC__)
#pragma message("wxStopWatch will be up to second resolution!")
#elif defined(__BORLANDC__)
#pragma message "wxStopWatch will be up to second resolution!"
#else
#warning "wxStopWatch will be up to second resolution!"
#endif // compiler

View File

@@ -71,10 +71,6 @@
// #include "MoreFilesX.h"
#endif
#ifdef __BORLANDC__
#include "dos.h"
#endif
extern WXDLLEXPORT_DATA(const char) wxFileSelectorDefaultWildcardStr[];
// If compiled under Windows, this macro can cause problems

View File

@@ -43,10 +43,8 @@
wxDEFINE_EVENT( wxEVT_DIALUP_CONNECTED, wxDialUpEvent );
wxDEFINE_EVENT( wxEVT_DIALUP_DISCONNECTED, wxDialUpEvent );
// Doesn't yet compile under BC++
// Wine: no wininet.h
#if (!defined(__BORLANDC__) || (__BORLANDC__>=0x550)) && \
!defined(__WINE__)
#if !defined(__WINE__)
#include <ras.h>
#include <raserror.h>
@@ -1294,6 +1292,6 @@ static void WINAPI wxRasDialFunc(UINT WXUNUSED(unMsg),
rasconnstate, dwError);
}
#endif // __BORLANDC__
#endif // #if !defined(__WINE__)
#endif // wxUSE_DIALUP_MANAGER

View File

@@ -25,11 +25,6 @@
#include <mmsystem.h>
// Why doesn't BC++ have joyGetPosEx?
#if defined(__BORLANDC__)
#define NO_JOYGETPOSEX
#endif
#include "wx/msw/registry.h"
#include <regstr.h>

View File

@@ -45,7 +45,7 @@
// Currently gcc doesn't define NMLVFINDITEM, and DMC only defines
// it by its old name NM_FINDTIEM.
//
#if defined(__VISUALC__) || defined(__BORLANDC__) || defined(NMLVFINDITEM)
#if defined(__VISUALC__) || defined(NMLVFINDITEM)
#define HAVE_NMLVFINDITEM 1
#elif defined(NM_FINDITEM)
#define HAVE_NMLVFINDITEM 1

View File

@@ -40,12 +40,6 @@
#include "wx/msw/crashrpt.h"
#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
extern int wxEntryReal(int& argc, wxChar **argv);
extern int wxEntryCleanupReal(int& argc, wxChar **argv);

View File

@@ -12,12 +12,6 @@
#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
#include "wx/log.h"
#include "wx/math.h"

View File

@@ -717,15 +717,9 @@ STDMETHODIMP wxIDataObject::SetData(FORMATETC *pformatetc,
case CF_OEMTEXT:
size = strlen((const char *)ptr.Get());
break;
#if !(defined(__BORLANDC__) && (__BORLANDC__ < 0x500))
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);
#endif
break;
#endif
case CF_BITMAP:
case CF_HDROP:
// these formats don't use size at all, anyhow (but

View File

@@ -272,8 +272,6 @@ void wxStandardPaths::IgnoreAppBuildSubDirs()
compilerPrefix = "vc";
#elif defined(__GNUG__)
compilerPrefix = "gcc";
#elif defined(__BORLANDC__)
compilerPrefix = "bcc";
#else
return;
#endif

View File

@@ -43,22 +43,9 @@
#define _MT
#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
// which should be used instead of Win32 ::CreateThread() if possible
#if defined(__VISUALC__) || \
(defined(__BORLANDC__) && (__BORLANDC__ >= 0x500)) || \
(defined(__GNUG__) && defined(__MSVCRT__))
#undef wxUSE_BEGIN_THREAD

View File

@@ -68,12 +68,6 @@
#include <cygwin/version.h>
#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:
// 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
@@ -445,13 +439,8 @@ bool wxGetDiskSpace(const wxString& path,
}
// 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
// compile in all cases
#if defined(__BORLANDC__) && !defined(_ANONYMOUS_STRUCT)
#define UL(ul) ul.u
#else // anon union
// two 32 bit fields which may be or may be not named
#define UL(ul) ul
#endif
if ( pTotal )
{
#if wxUSE_LONGLONG

View File

@@ -16,8 +16,6 @@
#if defined(__VISUALC__)
#pragma message("OpenGL support is not implemented in wxQt")
#elif defined(__BORLANDC__)
#pragma message "OpenGL support is not implemented in wxQt"
#else
#warning "OpenGL support is not implemented in wxQt"
#endif

View File

@@ -33,9 +33,6 @@ using std::string;
#if defined _MSC_VER && _MSC_VER >= 1310 && !defined __WIN64__
# define WXARC_MEMBER_TEMPLATES
#endif
#if defined __BORLANDC__ && __BORLANDC__ >= 0x530
# define WXARC_MEMBER_TEMPLATES
#endif
#if defined __HP_aCC && __HP_aCC > 33300
# define WXARC_MEMBER_TEMPLATES
#endif
@@ -382,7 +379,7 @@ void TempDir::RemoveDir(wxString& path)
#if defined __UNIX__ || defined __MINGW32__
# define WXARC_popen popen
# define WXARC_pclose pclose
#elif defined _MSC_VER || defined __BORLANDC__
#elif defined _MSC_VER
# define WXARC_popen _popen
# define WXARC_pclose _pclose
#else