]> git.saurik.com Git - wxWidgets.git/blobdiff - include/wx/platform.h
compilation fix for wxUSE_CONSTRAINTS==0
[wxWidgets.git] / include / wx / platform.h
index 005719486bc88962e5a8ea9866d572f1c054f22f..c49935f8c43f7fea8c5a96928e078bffb94a1652 100644 (file)
@@ -18,7 +18,7 @@
    first define Windows symbols if they're not defined on the command line: we
    can autodetect everything we need if _WIN32 is defined
  */
-#if defined(_WIN32) || defined(WIN32) || defined(__NT__)
+#if defined(_WIN32) || defined(WIN32) || defined(__NT__) || defined(__WXWINCE__)
     #ifndef __WXMSW__
         #define __WXMSW__
     #endif
     #endif
 #endif
 
-#ifdef __WXWINE__
-    #ifndef __WIN32__
-        #define __WIN32__
-    #endif
+#ifdef __WINE__
     #ifndef __WIN95__
         #define __WIN95__
     #endif
-    #ifndef STRICT
-        #define STRICT
-    #endif
 #endif /* WINE */
 
 #if defined(TWIN32) && !defined(__TWIN32__)
         #define __HPUX__
     #endif /* HP-UX */
 
-    #if defined(__CYGWIN__)
+    #if defined(__CYGWIN__) || defined(__WINE__)
         #if !defined(wxSIZE_T_IS_UINT)
             #define wxSIZE_T_IS_UINT
         #endif
       defined(THINK_C) || \
       (defined(__MWERKS__) && !defined(__INTEL__))
       /* MacOS */
+    #if !defined(wxSIZE_T_IS_UINT) && !defined(wxSIZE_T_IS_ULONG)
+        #define wxSIZE_T_IS_ULONG
+    #endif
 #elif defined(__WXMAC__) && defined(__APPLE__)
     /* Mac OS X */
     #define __UNIX_LIKE__
         #define __POWERPC__ 1
     #endif
 
+    #if !defined(wxSIZE_T_IS_UINT) && !defined(wxSIZE_T_IS_ULONG)
+        #define wxSIZE_T_IS_ULONG
+    #endif
     /*
        Some code has been added to workaround defects(?) in the
        bundled gcc compiler. These corrections are identified by
     #define __X__
 #endif
 
+/*
+   This macro can be used to test the gcc version and can be used like this:
+
+    #if wxCHECK_GCC_VERSION(3, 1)
+        ... we have gcc 3.1 or later ...
+    #else
+        ... no gcc at all or gcc < 3.1 ...
+    #endif
+*/
+#define wxCHECK_GCC_VERSION( major, minor ) \
+    ( defined(__GNUC__) && defined(__GNUC_MINOR__) \
+    && ( ( __GNUC__ > (major) ) \
+        || ( __GNUC__ == (major) && __GNUC_MINOR__ >= (minor) ) ) )
+
 /*
    This macro can be used to check that the version of mingw32 compiler is
    at least maj.min