X-Git-Url: https://git.saurik.com/wxWidgets.git/blobdiff_plain/2432b92dd7a837db13d3938a56c1959decd03203..8ffd43c56b793781fde046aa532340b92a0067eb:/include/wx/memory.h diff --git a/include/wx/memory.h b/include/wx/memory.h index 841ea9e410..23f64dca35 100644 --- a/include/wx/memory.h +++ b/include/wx/memory.h @@ -6,7 +6,7 @@ // Created: 29/01/98 // RCS-ID: $Id$ // Copyright: (c) 1998 Julian Smart -// Licence: wxWindows license +// Licence: wxWindows license ///////////////////////////////////////////////////////////////////////////// #ifndef _WX_MEMORYH__ @@ -29,13 +29,13 @@ #include #if wxUSE_IOSTREAMH -// N.B. BC++ doesn't have istream.h, ostream.h -# include + // N.B. BC++ doesn't have istream.h, ostream.h +# include #else -# include -# ifdef _MSC_VER - using namespace std; -# endif +# include +# if defined(__VISUALC__) || defined(__MWERKS__) + using namespace std; +# endif #endif #ifdef __WXDEBUG__ @@ -49,36 +49,39 @@ void wxDebugFree(void * buf, bool isVect = FALSE); // Undefine temporarily (new is #defined in object.h) because we want to // declare some new operators. #ifdef new -#undef new + #undef new #endif #if defined(__SUNCC__) -#define wxUSE_ARRAY_MEMORY_OPERATORS 0 -#elif !( defined (_MSC_VER) && (_MSC_VER <= 1020) ) || defined( __MWERKS__) -#define wxUSE_ARRAY_MEMORY_OPERATORS 1 + #define wxUSE_ARRAY_MEMORY_OPERATORS 0 +#elif !( defined (__VISUALC__) && (__VISUALC__ <= 1020) ) || defined( __MWERKS__) + #define wxUSE_ARRAY_MEMORY_OPERATORS 1 +#elif defined (__SGI_CC_) + // only supported by -n32 compilers + #ifndef __EDG_ABI_COMPATIBILITY_VERSION + #define wxUSE_ARRAY_MEMORY_OPERATORS 0 + #endif #else -#define wxUSE_ARRAY_MEMORY_OPERATORS 0 + // ::operator new[] is a recent C++ feature, so assume it's not supported + #define wxUSE_ARRAY_MEMORY_OPERATORS 0 #endif // Added JACS 25/11/98: needed for some compilers void * operator new (size_t size); -#if wxUSE_ARRAY_MEMORY_OPERATORS -void * operator new[] (size_t size); -#endif - void * operator new (size_t size, char * fileName, int lineNum); void operator delete (void * buf); #if wxUSE_ARRAY_MEMORY_OPERATORS -void * operator new[] (size_t size, char * fileName, int lineNum); -void operator delete[] (void * buf); + void * operator new[] (size_t size); + void * operator new[] (size_t size, char * fileName, int lineNum); + void operator delete[] (void * buf); #endif // VC++ 6.0 -#if _MSC_VER >= 1200 -void operator delete(void *buf, char*, int); -void operator delete[](void *buf, char*, int); +#if defined(__VISUALC__) && (__VISUALC__ >= 1200) + void operator delete(void *buf, char*, int); + void operator delete[](void *buf, char*, int); #endif #endif