From 2b1b53f5d9674c6fc41eab86178e3dcfd948d297 Mon Sep 17 00:00:00 2001
From: Bram Moolenaar <Bram@vim.org>
Date: Sat, 2 Nov 2013 21:04:38 +0100
Subject: [PATCH] =?UTF-8?q?updated=20for=20version=207.4.055=20Problem:=20?=
 =?UTF-8?q?=20=20=20Mac:=20Where=20availability=20macros=20are=20defined?=
 =?UTF-8?q?=20depends=20on=20the=20system.=20Solution:=20=20=20Add=20a=20c?=
 =?UTF-8?q?onfigure=20check.=20(Felix=20B=C3=BCnemann)?=
MIME-Version: 1.0
Content-Type: text/plain; charset=UTF-8
Content-Transfer-Encoding: 8bit

---
 src/auto/configure | 13 +++++++++++--
 src/config.h.in    |  3 +++
 src/configure.in   |  4 ++++
 src/os_mac.h       |  7 ++++++-
 src/version.c      |  2 ++
 5 files changed, 26 insertions(+), 3 deletions(-)

diff --git a/src/auto/configure b/src/auto/configure
index 07f794e8fc..9f43e8de27 100755
--- a/src/auto/configure
+++ b/src/auto/configure
@@ -4223,7 +4223,7 @@ rm -f core conftest.err conftest.$ac_objext \
     OS_EXTRA_OBJ="objects/os_macosx.o objects/os_mac_conv.o"
         CPPFLAGS="$CPPFLAGS -DMACOS_X_UNIX -no-cpp-precomp"
 
-                # On IRIX 5.3, sys/types and inttypes.h are conflicting.
+            # On IRIX 5.3, sys/types and inttypes.h are conflicting.
 for ac_header in sys/types.h sys/stat.h stdlib.h string.h memory.h strings.h \
 		  inttypes.h stdint.h unistd.h
 do :
@@ -4241,7 +4241,16 @@ fi
 done
 
 
-ac_fn_c_check_header_mongrel "$LINENO" "Carbon/Carbon.h" "ac_cv_header_Carbon_Carbon_h" "$ac_includes_default"
+ac_fn_c_check_header_mongrel "$LINENO" "AvailabilityMacros.h" "ac_cv_header_AvailabilityMacros_h" "$ac_includes_default"
+if test "x$ac_cv_header_AvailabilityMacros_h" = x""yes; then :
+
+$as_echo "#define HAVE_AVAILABILITYMACROS_H 1" >>confdefs.h
+
+fi
+
+
+
+                ac_fn_c_check_header_mongrel "$LINENO" "Carbon/Carbon.h" "ac_cv_header_Carbon_Carbon_h" "$ac_includes_default"
 if test "x$ac_cv_header_Carbon_Carbon_h" = x""yes; then :
   CARBON=yes
 fi
diff --git a/src/config.h.in b/src/config.h.in
index 422fd1fc79..a4e216bbcc 100644
--- a/src/config.h.in
+++ b/src/config.h.in
@@ -442,3 +442,6 @@
 
 /* Define if you want Cygwin to use the WIN32 clipboard, not compatible with X11*/
 #undef FEAT_CYGWIN_WIN32_CLIPBOARD
+
+/* Define if we have AvailabilityMacros.h on Mac OS X */
+#undef HAVE_AVAILABILITYMACROS_H
diff --git a/src/configure.in b/src/configure.in
index 11e1d63d96..73470fc7db 100644
--- a/src/configure.in
+++ b/src/configure.in
@@ -206,6 +206,10 @@ if test "`(uname) 2>/dev/null`" = Darwin; then
     dnl TODO: use -arch i386 on Intel machines
     CPPFLAGS="$CPPFLAGS -DMACOS_X_UNIX -no-cpp-precomp"
 
+    dnl Mac OS X 10.9+ no longer include AvailabilityMacros.h in Carbon
+    dnl so we need to include it to have access to version macros.
+    AC_CHECK_HEADER(AvailabilityMacros.h, [AC_DEFINE(HAVE_AVAILABILITYMACROS_H, 1, [ Define if we have AvailabilityMacros.h on Mac OS X ])])
+
     dnl If Carbon is found, assume we don't want X11
     dnl unless it was specifically asked for (--with-x)
     dnl or Motif, Athena or GTK GUI is used.
diff --git a/src/os_mac.h b/src/os_mac.h
index 78b79c2e16..c13a30158c 100644
--- a/src/os_mac.h
+++ b/src/os_mac.h
@@ -16,6 +16,11 @@
 # define OPAQUE_TOOLBOX_STRUCTS 0
 #endif
 
+/* Include MAC_OS_X_VERSION_* macros */
+#ifdef HAVE_AVAILABILITYMACROS_H
+# include <AvailabilityMacros.h>
+#endif
+
 /*
  * Macintosh machine-dependent things.
  *
@@ -263,7 +268,7 @@
 #endif
 
 /* Some "prep work" definition to be able to compile the MacOS X
- * version with os_unix.x instead of os_mac.c. Based on the result
+ * version with os_unix.c instead of os_mac.c. Based on the result
  * of ./configure for console MacOS X.
  */
 
diff --git a/src/version.c b/src/version.c
index c22172525d..184aee76d1 100644
--- a/src/version.c
+++ b/src/version.c
@@ -738,6 +738,8 @@ static char *(features[]) =
 
 static int included_patches[] =
 {   /* Add new patch number below this line */
+/**/
+    55,
 /**/
     54,
 /**/
-- 
GitLab