SGI compilation fixes

git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@1851 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
This commit is contained in:
Vadim Zeitlin 1999-03-03 17:05:25 +00:00
parent 803ef87492
commit ba6f401d45
2 changed files with 31 additions and 36 deletions

View File

@ -128,31 +128,27 @@
// Make sure the environment is set correctly // Make sure the environment is set correctly
#if defined(__WXMSW__) && defined(__X__) #if defined(__WXMSW__) && defined(__X__)
# error "Target can't be both X and Windows" #error "Target can't be both X and Windows"
#elif !defined(__WXMOTIF__) && !defined(__WXMSW__) && !defined(__WXGTK__) && \ #elif !defined(__WXMOTIF__) && !defined(__WXMSW__) && !defined(__WXGTK__) && \
!defined(__WXMAC__) && !defined(__X__) && !defined(__WXQT__) && !defined(__WXSTUBS__) !defined(__WXMAC__) && !defined(__X__) && !defined(__WXQT__) && !defined(__WXSTUBS__)
#error "No Target! Use -D[__WXMOTIF__|__WXGTK__|__WXMSW__|__WXMAC__|__WXQT__|__WXSTUBS__]" #error "No Target! Use -D[__WXMOTIF__|__WXGTK__|__WXMSW__|__WXMAC__|__WXQT__|__WXSTUBS__]"
#endif #endif
#if defined(__WXMOTIF__) || defined(__WXGTK__) || defined(__WXQT__) || defined(__WXSTUBS__) #if defined(__WXMOTIF__) || defined(__WXGTK__) || defined(__WXQT__) || defined(__WXSTUBS__)
// Bool is now obsolete, use bool instead
// typedef int Bool;
// Bool is now obsolete, use bool instead #ifndef TRUE
// typedef int Bool; #define TRUE 1
#define FALSE 0
#ifndef TRUE #define Bool_DEFINED
# define TRUE 1 #endif
# define FALSE 0
# define Bool_DEFINED
#endif
#elif defined(__WXMSW__) #elif defined(__WXMSW__)
#ifndef TRUE
#ifndef TRUE #define TRUE 1
# define TRUE 1 #define FALSE 0
# define FALSE 0 #endif
#endif #endif // TRUE/FALSE
#endif
// VC++ 4.0 is 1000. // VC++ 4.0 is 1000.
@ -172,12 +168,9 @@
#elif defined(__BORLANDC__) && (__BORLANDC__ < 0x500) #elif defined(__BORLANDC__) && (__BORLANDC__ < 0x500)
typedef unsigned int bool; typedef unsigned int bool;
#elif defined(__WATCOMC__) #elif defined(__WATCOMC__)
// typedef unsigned int bool; #if (__WATCOMC__ < 1100)
typedef unsigned int bool;
#if (__WATCOMC__ < 1100) #endif
typedef unsigned int bool;
#endif
#elif defined(__SUNCC__) || defined(__SUNPRO_CC) #elif defined(__SUNCC__) || defined(__SUNPRO_CC)
#ifdef __SUNPRO_CC #ifdef __SUNPRO_CC
// starting from version 5.0 Sun CC understands 'bool' // starting from version 5.0 Sun CC understands 'bool'
@ -188,12 +181,11 @@
#else #else
#error "Unknown compiler: only Sun's CC and gcc are currently recognised." #error "Unknown compiler: only Sun's CC and gcc are currently recognised."
#endif // Sun CC #endif // Sun CC
#endif #elif defined(__SGI_CC__)
// test is taken from SGI "C++ Programming Guide"
#if ( defined(__VISUALC__) && (__VISUALC__ <= 800) ) || defined(__GNUWIN32__) || (defined(__BORLANDC__) && defined(__WIN16__)) || defined(__SC__) || defined(__SALFORDC__) #ifndef _BOOL
// Not a good idea, because later system files (e.g. windows.h) typedef unsigned char bool;
// may try to define it. Use wxByte instead. #endif // _BOOL
// #define byte unsigned char
#endif #endif
typedef unsigned char wxByte; typedef unsigned char wxByte;

View File

@ -56,23 +56,26 @@ void wxDebugFree(void * buf, bool isVect = FALSE);
#define wxUSE_ARRAY_MEMORY_OPERATORS 0 #define wxUSE_ARRAY_MEMORY_OPERATORS 0
#elif !( defined (__VISUALC__) && (__VISUALC__ <= 1020) ) || defined( __MWERKS__) #elif !( defined (__VISUALC__) && (__VISUALC__ <= 1020) ) || defined( __MWERKS__)
#define wxUSE_ARRAY_MEMORY_OPERATORS 1 #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 #else
// ::operator new[] is a recent C++ feature, so assume it's not supported
#define wxUSE_ARRAY_MEMORY_OPERATORS 0 #define wxUSE_ARRAY_MEMORY_OPERATORS 0
#endif #endif
// Added JACS 25/11/98: needed for some compilers // Added JACS 25/11/98: needed for some compilers
void * operator new (size_t size); 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 new (size_t size, char * fileName, int lineNum);
void operator delete (void * buf); void operator delete (void * buf);
#if wxUSE_ARRAY_MEMORY_OPERATORS #if wxUSE_ARRAY_MEMORY_OPERATORS
void * operator new[] (size_t size, char * fileName, int lineNum); void * operator new[] (size_t size);
void operator delete[] (void * buf); void * operator new[] (size_t size, char * fileName, int lineNum);
void operator delete[] (void * buf);
#endif #endif
// VC++ 6.0 // VC++ 6.0