summaryrefslogtreecommitdiffstats
path: root/src
diff options
context:
space:
mode:
authorJake Petroules <jake.petroules@petroules.com>2014-06-02 22:12:06 (GMT)
committerJake Petroules <jake.petroules@petroules.com>2014-06-13 20:07:15 (GMT)
commitdf35604ff944e935bd07c8ca417ae24ed458908b (patch)
tree387da42224ebae64d0dff4b0c3cd49042e79be63 /src
parent8fa348a0500719264ed07ca323f740645ebead9e (diff)
downloadQt-df35604ff944e935bd07c8ca417ae24ed458908b.zip
Qt-df35604ff944e935bd07c8ca417ae24ed458908b.tar.gz
Qt-df35604ff944e935bd07c8ca417ae24ed458908b.tar.bz2
Use correct values for MAC_OS_X_VERSION_10_* defines.
Change-Id: I1951fd6447a3d9d20feea99408174d4993a81f5c Reviewed-by: Thiago Macieira <thiago.macieira@intel.com>
Diffstat (limited to 'src')
-rw-r--r--src/corelib/global/qglobal.h59
1 files changed, 47 insertions, 12 deletions
diff --git a/src/corelib/global/qglobal.h b/src/corelib/global/qglobal.h
index d11202e..158ef78 100644
--- a/src/corelib/global/qglobal.h
+++ b/src/corelib/global/qglobal.h
@@ -304,31 +304,66 @@ namespace QT_NAMESPACE {}
#endif
#ifdef Q_OS_DARWIN
-# ifdef MAC_OS_X_VERSION_MIN_REQUIRED
-# undef MAC_OS_X_VERSION_MIN_REQUIRED
-# endif
-# define MAC_OS_X_VERSION_MIN_REQUIRED MAC_OS_X_VERSION_10_4
# include <AvailabilityMacros.h>
-# if !defined(MAC_OS_X_VERSION_10_3)
-# define MAC_OS_X_VERSION_10_3 MAC_OS_X_VERSION_10_2 + 1
+#
+# // Availability.h was introduced with the OS X 10.6 SDK
+# if (defined(__MAC_OS_X_VERSION_MAX_ALLOWED) && __MAC_OS_X_VERSION_MAX_ALLOWED >= 1060) || \
+ (defined(MAC_OS_X_VERSION_MAX_ALLOWED) && MAC_OS_X_VERSION_MAX_ALLOWED >= 1060)
+# include <Availability.h>
+# endif
+#
+# ifdef Q_OS_MACX
+# if !defined(__MAC_OS_X_VERSION_MIN_REQUIRED) || __MAC_OS_X_VERSION_MIN_REQUIRED < 1040
+# undef __MAC_OS_X_VERSION_MIN_REQUIRED
+# define __MAC_OS_X_VERSION_MIN_REQUIRED 1040
+# endif
+# if !defined(MAC_OS_X_VERSION_MIN_REQUIRED) || MAC_OS_X_VERSION_MIN_REQUIRED < 1040
+# undef MAC_OS_X_VERSION_MIN_REQUIRED
+# define MAC_OS_X_VERSION_MIN_REQUIRED 1040
+# endif
+# endif
+#
+# // Numerical checks are preferred to named checks, but to be safe
+# // we define the missing version names in case Qt uses them.
+#
+# if !defined(__MAC_10_4)
+# define __MAC_10_4 1040
+# endif
+# if !defined(__MAC_10_5)
+# define __MAC_10_5 1050
+# endif
+# if !defined(__MAC_10_6)
+# define __MAC_10_6 1060
+# endif
+# if !defined(__MAC_10_7)
+# define __MAC_10_7 1070
+# endif
+# if !defined(__MAC_10_8)
+# define __MAC_10_8 1080
+# endif
+# if !defined(__MAC_10_9)
+# define __MAC_10_9 1090
+# endif
+# if !defined(__MAC_10_10)
+# define __MAC_10_10 101000
# endif
# if !defined(MAC_OS_X_VERSION_10_4)
-# define MAC_OS_X_VERSION_10_4 MAC_OS_X_VERSION_10_3 + 1
+# define MAC_OS_X_VERSION_10_4 1040
# endif
# if !defined(MAC_OS_X_VERSION_10_5)
-# define MAC_OS_X_VERSION_10_5 MAC_OS_X_VERSION_10_4 + 1
+# define MAC_OS_X_VERSION_10_5 1050
# endif
# if !defined(MAC_OS_X_VERSION_10_6)
-# define MAC_OS_X_VERSION_10_6 MAC_OS_X_VERSION_10_5 + 1
+# define MAC_OS_X_VERSION_10_6 1060
# endif
# if !defined(MAC_OS_X_VERSION_10_7)
-# define MAC_OS_X_VERSION_10_7 MAC_OS_X_VERSION_10_6 + 1
+# define MAC_OS_X_VERSION_10_7 1070
# endif
# if !defined(MAC_OS_X_VERSION_10_8)
-# define MAC_OS_X_VERSION_10_8 MAC_OS_X_VERSION_10_7 + 1
+# define MAC_OS_X_VERSION_10_8 1080
# endif
# if !defined(MAC_OS_X_VERSION_10_9)
-# define MAC_OS_X_VERSION_10_9 MAC_OS_X_VERSION_10_8 + 1
+# define MAC_OS_X_VERSION_10_9 1090
# endif
# if !defined(MAC_OS_X_VERSION_10_10)
# define MAC_OS_X_VERSION_10_10 101000