X-Git-Url: https://git.saurik.com/wxWidgets.git/blobdiff_plain/3502e687e29f46c747be16a58d39fe79e7b1c7bc..dd3c394ae4e6f6a0041b69e036d4fdf0a085fe39:/include/wx/defs.h diff --git a/include/wx/defs.h b/include/wx/defs.h index ce89fa76a8..35c46f8e3a 100644 --- a/include/wx/defs.h +++ b/include/wx/defs.h @@ -26,7 +26,8 @@ // ---------------------------------------------------------------------------- // OS -#if defined(__HPUX__) || defined(____SVR4____) || defined(__LINUX__) || defined(__sgi ) || defined(__unix__) +#if defined(__HPUX__) || defined(____SVR4____) || defined(__LINUX__) || defined(__sgi ) || \ + defined(__unix__) || defined(sun) || defined(__SUN__) #ifndef __UNIX__ #define __UNIX__ #endif // Unix @@ -49,6 +50,8 @@ #endif // Sun CC #endif #endif // Sun +#elif defined(applec) || defined(THINK_C) || ( defined( __MWERKS__ ) && !defined(__INTEL__) ) + // MacOS #else // Windows #ifndef __WINDOWS__ #define __WINDOWS__ @@ -69,9 +72,9 @@ // suppress some Visual C++ warnings #ifdef __VISUALC__ -# pragma warning(disable:4244) // cobversion from double to float +# pragma warning(disable:4244) // conversion from double to float # pragma warning(disable:4100) // unreferenced formal parameter -#endif +#endif // __VISUALC__ // suppress some Salford C++ warnings #ifdef __SALFORDC__ @@ -80,7 +83,18 @@ # pragma suppress 61 // enum has no name (doesn't suppress!) # pragma suppress 106 // unnamed, unused parameter # pragma suppress 571 // Virtual function hiding -#endif +#endif // __SALFORDC__ + +// Digital Unix C++ compiler only defines this symbol for .cxx and .hxx files, +// so define it ourselves +#ifdef __DECCXX + #define __cplusplus +#endif // __DECCXX + +// Resolves linking problems under HP-UX +#if defined(__HPUX__) && !defined(__GNUG__) + #define va_list __gnuc_va_list +#endif // HP-UX ////////////////////////////////////////////////////////////////////////////////// // Currently Only MS-Windows/NT, XView and Motif are supported @@ -164,7 +178,7 @@ typedef unsigned int bool; #endif -#elif defined(__SUNCC__) +#elif defined(__SUNCC__) || defined(__SUNPRO_CC) #ifdef __SUNPRO_CC // starting from version 5.0 Sun CC understands 'bool' #if __SUNPRO_CC <= 0x0420 @@ -199,6 +213,7 @@ typedef int wxWindowID; #ifdef __WXMSW__ +/* #ifdef __BORLANDC__ # ifdef WXMAKINGDLL @@ -216,14 +231,18 @@ typedef int wxWindowID; # endif #else +*/ + +// _declspec works in BC++ 5 and later, as well as VC++ +#if defined(__VISUALC__) || defined(__BORLANDC__) # ifdef WXMAKINGDLL -# define WXDLLEXPORT __declspec( dllexport ) -# define WXDLLEXPORT_DATA(type) __declspec( dllexport ) type -# define WXDLLEXPORT_CTORFN // __declspec( dllexport ) +# define WXDLLEXPORT _declspec( dllexport ) +# define WXDLLEXPORT_DATA(type) _declspec( dllexport ) type +# define WXDLLEXPORT_CTORFN # elif defined(WXUSINGDLL) -# define WXDLLEXPORT __declspec( dllimport ) -# define WXDLLEXPORT_DATA(type) __declspec( dllimport ) type +# define WXDLLEXPORT _declspec( dllimport ) +# define WXDLLEXPORT_DATA(type) _declspec( dllimport ) type # define WXDLLEXPORT_CTORFN # else # define WXDLLEXPORT @@ -231,6 +250,10 @@ typedef int wxWindowID; # define WXDLLEXPORT_CTORFN # endif +#else +# define WXDLLEXPORT +# define WXDLLEXPORT_DATA(type) type +# define WXDLLEXPORT_CTORFN #endif #else