X-Git-Url: https://git.saurik.com/wxWidgets.git/blobdiff_plain/ce3ed50dbe32d118321082db84c3a9abb047d5b7..90186e524e347a3a779c928a44fb7d744b3efcf7:/include/wx/defs.h diff --git a/include/wx/defs.h b/include/wx/defs.h index eb288dc3d6..2c3b71ec0c 100644 --- a/include/wx/defs.h +++ b/include/wx/defs.h @@ -79,6 +79,10 @@ #define __WIN95__ #endif +#if defined(TWIN32) && !defined(__TWIN32__) +#define __TWIN32__ +#endif + #endif // wxMSW // Make sure the environment is set correctly @@ -129,14 +133,24 @@ #elif defined(__WATCOMC__) typedef unsigned int bool; #elif defined(__SUNCC__) - // If we use int, we get identically overloaded functions in config.cpp - typedef unsigned char bool; + #ifdef __SUNPRO_CC + // starting from version 5.0 Sun CC understands 'bool' + #if __SUNPRO_CC <= 0x0420 + // If we use int, we get identically overloaded functions in config.cpp + typedef unsigned char bool; + #endif // Sun CC version + #else + #error "Unknown compiler: only Sun's CC and gcc are currently reckognized." + #endif // Sun CC #endif #if ( defined(_MSC_VER) && (_MSC_VER <= 800) ) || defined(__GNUWIN32__) || (defined(__BORLANDC__) && defined(__WIN16__)) || defined(__SC__) || defined(__SALFORDC__) - #define byte unsigned char +// Not a good idea, because later system files (e.g. windows.h) +// may try to define it. Use wxByte instead. +// #define byte unsigned char #endif +typedef unsigned char wxByte; typedef short int WXTYPE; typedef int wxWindowID; @@ -212,6 +226,10 @@ class WXDLLEXPORT wxEvent; // Error codes // ---------------------------------------------------------------------------- +#ifdef ERR_PARAM +#undef ERR_PARAM +#endif + /// Standard error codes enum ErrCode { @@ -738,6 +756,8 @@ typedef enum // Don't do parent client adjustments (for implementation only) #define wxSIZE_NO_ADJUSTMENTS 0x0008 +#ifndef __WXGTK__ + enum wxDataFormat { wxDF_INVALID = 0, @@ -760,6 +780,8 @@ enum wxDataFormat wxDF_PRIVATE = 20 }; +#endif + /* Virtual keycodes */ enum wxKeyCode