diff --git a/include/wx/build.h b/include/wx/build.h index 43f43cbf68..d94a2bfebf 100644 --- a/include/wx/build.h +++ b/include/wx/build.h @@ -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 diff --git a/include/wx/chartype.h b/include/wx/chartype.h index b29c1a6a0c..ad8e4bffda 100644 --- a/include/wx/chartype.h +++ b/include/wx/chartype.h @@ -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 #elif defined(__MINGW32__) #define wxHAVE_TCHAR_SUPPORT #include @@ -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 diff --git a/include/wx/compiler.h b/include/wx/compiler.h index 7ff4574005..416a902d3f 100644 --- a/include/wx/compiler.h +++ b/include/wx/compiler.h @@ -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 diff --git a/include/wx/cpp.h b/include/wx/cpp.h index 422ab032e9..60bcd92a7e 100644 --- a/include/wx/cpp.h +++ b/include/wx/cpp.h @@ -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 diff --git a/include/wx/defs.h b/include/wx/defs.h index 83bae9dca3..101a016727 100644 --- a/include/wx/defs.h +++ b/include/wx/defs.h @@ -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 - inline void wxUnusedVar(const T& WXUNUSED(t)) { } -# endif + template + inline void wxUnusedVar(const T& WXUNUSED(t)) { } #endif /* ---------------------------------------------------------------------------- */ diff --git a/include/wx/dlimpexp.h b/include/wx/dlimpexp.h index a818c49999..fd75cb9d15 100644 --- a/include/wx/dlimpexp.h +++ b/include/wx/dlimpexp.h @@ -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) /* diff --git a/include/wx/event.h b/include/wx/event.h index 5042ada638..fb58167edb 100644 --- a/include/wx/event.h +++ b/include/wx/event.h @@ -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] }; \ diff --git a/include/wx/filefn.h b/include/wx/filefn.h index 4d25bf13e1..e98c909cec 100644 --- a/include/wx/filefn.h +++ b/include/wx/filefn.h @@ -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 -#endif - #include // 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 + + #define wxPOSIX_STRUCT(s) struct wxPOSIX_IDENT(s) - // 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__ + #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)) diff --git a/include/wx/image.h b/include/wx/image.h index f73fa70fab..2a0cb489b5 100644 --- a/include/wx/image.h +++ b/include/wx/image.h @@ -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(xpmData)); } - bool Create( char** xpmData ) { return Create(const_cast(xpmData)); } -#endif bool Create( int width, int height, bool clear = true ); bool Create( int width, int height, unsigned char* data, bool static_data = false ); diff --git a/include/wx/log.h b/include/wx/log.h index 2333fcbf14..5e59c76338 100644 --- a/include/wx/log.h +++ b/include/wx/log.h @@ -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) diff --git a/include/wx/math.h b/include/wx/math.h index 8c39bb2aa5..981dfc9e32 100644 --- a/include/wx/math.h +++ b/include/wx/math.h @@ -72,7 +72,7 @@ } #else /* C++98 */ -#if defined(__VISUALC__) || defined(__BORLANDC__) +#if defined(__VISUALC__) #include #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__)|| \ diff --git a/include/wx/msw/chkconf.h b/include/wx/msw/chkconf.h index 0c9b1acf41..1d6feabd69 100644 --- a/include/wx/msw/chkconf.h +++ b/include/wx/msw/chkconf.h @@ -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 diff --git a/include/wx/msw/init.h b/include/wx/msw/init.h index eb3fead314..9caabf3a1f 100644 --- a/include/wx/msw/init.h +++ b/include/wx/msw/init.h @@ -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 diff --git a/include/wx/msw/private.h b/include/wx/msw/private.h index 66fef4d9ae..c02ee410a2 100644 --- a/include/wx/msw/private.h +++ b/include/wx/msw/private.h @@ -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)) diff --git a/include/wx/msw/seh.h b/include/wx/msw/seh.h index 2af8e59f08..3d224864ea 100644 --- a/include/wx/msw/seh.h +++ b/include/wx/msw/seh.h @@ -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 diff --git a/include/wx/platform.h b/include/wx/platform.h index 3aa6c16249..eee73324ef 100644 --- a/include/wx/platform.h +++ b/include/wx/platform.h @@ -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 diff --git a/include/wx/private/wxprintf.h b/include/wx/private/wxprintf.h index 241a50308a..71876de610 100644 --- a/include/wx/private/wxprintf.h +++ b/include/wx/private/wxprintf.h @@ -23,8 +23,7 @@ #include // 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::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; diff --git a/include/wx/scopedptr.h b/include/wx/scopedptr.h index 784e99d00e..a6bd239c25 100644 --- a/include/wx/scopedptr.h +++ b/include/wx/scopedptr.h @@ -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::*unspecified_bool_type)() const; -#endif // __BORLANDC__ + operator unspecified_bool_type() const { return m_ptr ? &wxScopedPtr::get : NULL; diff --git a/include/wx/string.h b/include/wx/string.h index 2dc071290a..fead97785b 100644 --- a/include/wx/string.h +++ b/include/wx/string.h @@ -1085,11 +1085,10 @@ public: reverse_iterator_impl operator--(int) { reverse_iterator_impl tmp = *this; ++m_cur; return tmp; } - // NB: explicit in the functions below is to keep BCC 5.5 happy reverse_iterator_impl operator+(ptrdiff_t n) const - { return reverse_iterator_impl(m_cur - n); } + { return reverse_iterator_impl(m_cur - n); } reverse_iterator_impl operator-(ptrdiff_t n) const - { return reverse_iterator_impl(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) diff --git a/include/wx/types.h b/include/wx/types.h index 6e8d76b756..0e45d37ff1 100644 --- a/include/wx/types.h +++ b/include/wx/types.h @@ -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; diff --git a/include/wx/vector.h b/include/wx/vector.h index 771b25bc0a..c8b6320653 100644 --- a/include/wx/vector.h +++ b/include/wx/vector.h @@ -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::value), + + typedef typename wxIf< wxIsMovable::value, wxPrivate::wxVectorMemOpsMovable, wxPrivate::wxVectorMemOpsGeneric >::value Ops; diff --git a/include/wx/wxcrtbase.h b/include/wx/wxcrtbase.h index 2926647e05..015e63d18a 100644 --- a/include/wx/wxcrtbase.h +++ b/include/wx/wxcrtbase.h @@ -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 diff --git a/include/wx/wxcrtvararg.h b/include/wx/wxcrtvararg.h index 38bbb241c2..36aae29957 100644 --- a/include/wx/wxcrtvararg.h +++ b/include/wx/wxcrtvararg.h @@ -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 diff --git a/include/wx/wxprec.h b/include/wx/wxprec.h index e1fc0459cf..366f0a36fc 100644 --- a/include/wx/wxprec.h +++ b/include/wx/wxprec.h @@ -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__) diff --git a/include/wx/xpmdecod.h b/include/wx/xpmdecod.h index 68edc924e7..46b5aafb3d 100644 --- a/include/wx/xpmdecod.h +++ b/include/wx/xpmdecod.h @@ -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(xpm_data)); } -#endif }; #endif // wxUSE_IMAGE && wxUSE_XPM diff --git a/src/common/dynlib.cpp b/src/common/dynlib.cpp index 6210d82d85..833c88ce48 100644 --- a/src/common/dynlib.cpp +++ b/src/common/dynlib.cpp @@ -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 diff --git a/src/common/encconv.cpp b/src/common/encconv.cpp index fed0896cd0..569feac53e 100644 --- a/src/common/encconv.cpp +++ b/src/common/encconv.cpp @@ -16,7 +16,7 @@ #include // 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" diff --git a/src/common/event.cpp b/src/common/event.cpp index a4f3659a97..88868785ef 100644 --- a/src/common/event.cpp +++ b/src/common/event.cpp @@ -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(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(this) = evt; + *this = evt; DoAssignMembers(evt); } diff --git a/src/common/filefn.cpp b/src/common/filefn.cpp index 7e822e59c9..61db37b52c 100644 --- a/src/common/filefn.cpp +++ b/src/common/filefn.cpp @@ -78,7 +78,6 @@ #include #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__) diff --git a/src/common/intl.cpp b/src/common/intl.cpp index ebe9200210..066e056847 100644 --- a/src/common/intl.cpp +++ b/src/common/intl.cpp @@ -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; diff --git a/src/common/time.cpp b/src/common/time.cpp index dfe388be20..3a99a26982 100644 --- a/src/common/time.cpp +++ b/src/common/time.cpp @@ -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 diff --git a/src/generic/dirctrlg.cpp b/src/generic/dirctrlg.cpp index 76e2262559..617f08001a 100644 --- a/src/generic/dirctrlg.cpp +++ b/src/generic/dirctrlg.cpp @@ -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 diff --git a/src/msw/dialup.cpp b/src/msw/dialup.cpp index 22de37dbbe..63e489813f 100644 --- a/src/msw/dialup.cpp +++ b/src/msw/dialup.cpp @@ -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 #include @@ -1294,6 +1292,6 @@ static void WINAPI wxRasDialFunc(UINT WXUNUSED(unMsg), rasconnstate, dwError); } -#endif // __BORLANDC__ +#endif // #if !defined(__WINE__) #endif // wxUSE_DIALUP_MANAGER diff --git a/src/msw/joystick.cpp b/src/msw/joystick.cpp index ae0375c99c..e4919770b8 100644 --- a/src/msw/joystick.cpp +++ b/src/msw/joystick.cpp @@ -25,11 +25,6 @@ #include -// Why doesn't BC++ have joyGetPosEx? -#if defined(__BORLANDC__) -#define NO_JOYGETPOSEX -#endif - #include "wx/msw/registry.h" #include diff --git a/src/msw/listctrl.cpp b/src/msw/listctrl.cpp index ab0aa1f464..3e0b0ebcec 100644 --- a/src/msw/listctrl.cpp +++ b/src/msw/listctrl.cpp @@ -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 diff --git a/src/msw/main.cpp b/src/msw/main.cpp index 04ecc2e22a..c4a441cc67 100644 --- a/src/msw/main.cpp +++ b/src/msw/main.cpp @@ -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); diff --git a/src/msw/ole/automtn.cpp b/src/msw/ole/automtn.cpp index 12157ecd98..0dab31b237 100644 --- a/src/msw/ole/automtn.cpp +++ b/src/msw/ole/automtn.cpp @@ -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" diff --git a/src/msw/ole/dataobj.cpp b/src/msw/ole/dataobj.cpp index bee97f814a..bb55833eca 100644 --- a/src/msw/ole/dataobj.cpp +++ b/src/msw/ole/dataobj.cpp @@ -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 diff --git a/src/msw/stdpaths.cpp b/src/msw/stdpaths.cpp index db443f11f4..f2987bf869 100644 --- a/src/msw/stdpaths.cpp +++ b/src/msw/stdpaths.cpp @@ -272,8 +272,6 @@ void wxStandardPaths::IgnoreAppBuildSubDirs() compilerPrefix = "vc"; #elif defined(__GNUG__) compilerPrefix = "gcc"; -#elif defined(__BORLANDC__) - compilerPrefix = "bcc"; #else return; #endif diff --git a/src/msw/thread.cpp b/src/msw/thread.cpp index 268c05ef66..04d16742d8 100644 --- a/src/msw/thread.cpp +++ b/src/msw/thread.cpp @@ -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 diff --git a/src/msw/utils.cpp b/src/msw/utils.cpp index ee82f68b4f..10c75c1ae7 100644 --- a/src/msw/utils.cpp +++ b/src/msw/utils.cpp @@ -68,12 +68,6 @@ #include #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 -#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 diff --git a/src/qt/glcanvas.cpp b/src/qt/glcanvas.cpp index 0bd3cc8931..4361b344a3 100644 --- a/src/qt/glcanvas.cpp +++ b/src/qt/glcanvas.cpp @@ -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 diff --git a/tests/archive/archivetest.cpp b/tests/archive/archivetest.cpp index d9756d89e5..50dfec53c3 100644 --- a/tests/archive/archivetest.cpp +++ b/tests/archive/archivetest.cpp @@ -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