]> git.saurik.com Git - wxWidgets.git/blobdiff - include/wx/defs.h
wxPython version 2.0b5
[wxWidgets.git] / include / wx / defs.h
index ce89fa76a83fbc2cccff7a4dbbab9e18d289c6b6..394a4e1d37852d5eb743ba4609660fe854a34c74 100644 (file)
@@ -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__
     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 +202,7 @@ typedef int wxWindowID;
 
 #ifdef __WXMSW__
 
+/*
 #ifdef __BORLANDC__
 
 #  ifdef WXMAKINGDLL
@@ -216,14 +220,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 +239,10 @@ typedef int wxWindowID;
 #    define WXDLLEXPORT_CTORFN
 #  endif
 
+#else
+#  define WXDLLEXPORT
+#  define WXDLLEXPORT_DATA(type) type
+#  define WXDLLEXPORT_CTORFN
 #endif
 
 #else