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
|
||||
// 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
|
||||
|
@@ -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
|
||||
|
@@ -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
|
||||
|
@@ -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
|
||||
|
@@ -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
|
||||
|
||||
/* ---------------------------------------------------------------------------- */
|
||||
|
@@ -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)
|
||||
/*
|
||||
|
@@ -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] }; \
|
||||
|
@@ -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
|
||||
|
||||
#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))
|
||||
|
@@ -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 );
|
||||
|
@@ -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)
|
||||
|
@@ -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__)|| \
|
||||
|
@@ -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
|
||||
|
@@ -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
|
||||
|
||||
|
@@ -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))
|
||||
|
@@ -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
|
||||
|
@@ -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
|
||||
|
||||
|
@@ -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;
|
||||
|
@@ -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;
|
||||
|
@@ -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)
|
||||
|
@@ -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;
|
||||
|
@@ -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;
|
||||
|
@@ -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
|
||||
|
@@ -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
|
||||
|
@@ -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__)
|
||||
|
@@ -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
|
||||
|
Reference in New Issue
Block a user