From c719c38403f70f1d1aec6445381336c6845e2af7 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Tor=20Arne=20Vestb=C3=B8?= Date: Mon, 6 Jan 2014 14:07:40 +0100 Subject: [PATCH] Don't define MAC_OS_X_VERSION_MIN_REQUIRED on iOS Lack of the define is commonly used (and recommended by Apple) as a way to distinguish iOS from OS X. Task-number: QTBUG-35888 Change-Id: I5f3327e001c0af630984fbfde780d9b0c3e30754 Reviewed-by: Simon Hausmann Reviewed-by: Jake Petroules --- src/corelib/global/qsystemdetection.h | 17 ++++++++++------- 1 file changed, 10 insertions(+), 7 deletions(-) diff --git a/src/corelib/global/qsystemdetection.h b/src/corelib/global/qsystemdetection.h index 7b1c32663b..0431e10133 100644 --- a/src/corelib/global/qsystemdetection.h +++ b/src/corelib/global/qsystemdetection.h @@ -210,14 +210,17 @@ #ifdef Q_OS_DARWIN # include -# if !defined(__MAC_OS_X_VERSION_MIN_REQUIRED) || __MAC_OS_X_VERSION_MIN_REQUIRED < __MAC_10_6 -# undef __MAC_OS_X_VERSION_MIN_REQUIRED -# define __MAC_OS_X_VERSION_MIN_REQUIRED __MAC_10_6 -# endif # include -# if !defined(MAC_OS_X_VERSION_MIN_REQUIRED) || MAC_OS_X_VERSION_MIN_REQUIRED < MAC_OS_X_VERSION_10_6 -# undef MAC_OS_X_VERSION_MIN_REQUIRED -# define MAC_OS_X_VERSION_MIN_REQUIRED MAC_OS_X_VERSION_10_6 +# +# ifdef Q_OS_OSX +# if !defined(__MAC_OS_X_VERSION_MIN_REQUIRED) || __MAC_OS_X_VERSION_MIN_REQUIRED < __MAC_10_6 +# undef __MAC_OS_X_VERSION_MIN_REQUIRED +# define __MAC_OS_X_VERSION_MIN_REQUIRED __MAC_10_6 +# endif +# if !defined(MAC_OS_X_VERSION_MIN_REQUIRED) || MAC_OS_X_VERSION_MIN_REQUIRED < MAC_OS_X_VERSION_10_6 +# undef MAC_OS_X_VERSION_MIN_REQUIRED +# define MAC_OS_X_VERSION_MIN_REQUIRED MAC_OS_X_VERSION_10_6 +# endif # endif # # // Numerical checks are preferred to named checks, but to be safe