eina,ecore_cocoa: fix detection of the macOS SDK version
authorJean Guyomarc'h <jean@guyomarch.bzh>
Tue, 27 Jun 2017 21:09:09 +0000 (23:09 +0200)
committerJean Guyomarc'h <jean@guyomarch.bzh>
Tue, 27 Jun 2017 21:14:31 +0000 (23:14 +0200)
There was trouble with Homebrew's CI to build EFL on a macOS < 10.12
which uses a 10.12 SDK. See PR #13252 on github, Homebrew/homebrew-core
for details.

@fix

src/lib/ecore_cocoa/ecore_cocoa_private.h
src/lib/eina/eina_lock.c

index a97d278..d2c67ac 100644 (file)
@@ -30,9 +30,10 @@ extern int _ecore_cocoa_log_domain;
 
 /*
  * macOS Sierra (10.12) deprecated enumeration types in profit to others,
- * more meaningful ones.
+ * more meaningful ones. We define aliases to these new types to use the
+ * most recent API while being retro-compatible.
  */
-#ifndef __MAC_10_12
+#if __MAC_OS_X_VERSION_MIN_REQUIRED < 1012 /* Before 10.12 */
 # define NSWindowStyleMaskTitled NSTitledWindowMask
 # define NSWindowStyleMaskClosable NSClosableWindowMask
 # define NSWindowStyleMaskResizable NSResizableWindowMask
index 5cb834e..e8872a6 100644 (file)
@@ -17,7 +17,7 @@
  * stdbool.h, which is not wanted: it would introduce new macros,
  * and break compilation of existing programs.
  */
-# ifdef __MAC_10_12
+# if __MAC_OS_X_VERSION_MIN_REQUIRED >= 1012
 #  include <os/lock.h>
 #  define SPINLOCK_GET(LCK) ((os_unfair_lock_t)(LCK))
 # else