Skip to content

Instantly share code, notes, and snippets.

@felixbuenemann
Last active December 20, 2015 14:58
Show Gist options
  • Save felixbuenemann/6150257 to your computer and use it in GitHub Desktop.
Save felixbuenemann/6150257 to your computer and use it in GitHub Desktop.
diff -r 92c9748e0ccb src/config.h.in
--- a/src/config.h.in Sun Oct 06 17:46:56 2013 +0200
+++ b/src/config.h.in Sun Oct 13 23:11:37 2013 +0200
@@ -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 -r 92c9748e0ccb src/configure.in
--- a/src/configure.in Sun Oct 06 17:46:56 2013 +0200
+++ b/src/configure.in Sun Oct 13 23:11:37 2013 +0200
@@ -206,6 +206,10 @@
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 -r 92c9748e0ccb src/os_mac.h
--- a/src/os_mac.h Sun Oct 06 17:46:56 2013 +0200
+++ b/src/os_mac.h Sun Oct 13 23:11:37 2013 +0200
@@ -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.
*
@felixbuenemann
Copy link
Author

This fixes the compilation problem related to signaltstack definition os Mac OS X 10.9, because Mavericks no longer includes the required version macros from AvailabilityMacros.h by default.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment