Skip to content

Commit

Permalink
vim: Fix compilation on Mac OS X 10.9
Browse files Browse the repository at this point in the history
- The required macro MAC_OS_X_VERSION_MAX_ALLOWED requires
  AvailabilityMacros.h to be defined.

Closes Homebrew/legacy-homebrew#20831.

Signed-off-by: Misty De Meo <mistydemeo@gmail.com>
  • Loading branch information
felixbuenemann authored and mistydemeo committed Oct 21, 2013
1 parent d93a531 commit 92cea13
Showing 1 changed file with 18 additions and 1 deletion.
19 changes: 18 additions & 1 deletion Formula/vim.rb
Original file line number Diff line number Diff line change
Expand Up @@ -31,9 +31,12 @@ class Vim < Formula
depends_on 'lua' => :optional
depends_on 'gtk+' if build.with? 'client-server'

# vim uses the obsolete Apple-only -no-cpp-precomp flag, which
# First patch: vim uses the obsolete Apple-only -no-cpp-precomp flag, which
# FSF GCC can't understand; reported upstream:
# https://groups.google.com/forum/#!topic/vim_dev/X5yG3-IiUp8
#
# Second patch: includes Mac OS X version macros not included by default on 10.9
# Reported upstream: https://groups.google.com/forum/#!topic/vim_mac/5kVAMSPb6uU
def patches; DATA; end

def install
Expand Down Expand Up @@ -130,3 +133,17 @@ def install
esac


diff --git a/src/os_mac.h b/src/os_mac.h
index 78b79c2..54009ab 100644
--- a/src/os_mac.h
+++ b/src/os_mac.h
@@ -16,6 +16,9 @@
# define OPAQUE_TOOLBOX_STRUCTS 0
#endif

+/* Include MAC_OS_X_VERSION_* macros */
+#include <AvailabilityMacros.h>
+
/*
* Macintosh machine-dependent things.
*

0 comments on commit 92cea13

Please sign in to comment.