Skip to content

Commit b91903e

Browse files
Fix 10.9 Ruby.framework detection/compilation
Mac OS X Mavericks ships with Ruby.framework 2.0 which requires some fixes to enable proper header inclusion and version defines.
1 parent df7b6fb commit b91903e

File tree

3 files changed

+7
-3
lines changed

3 files changed

+7
-3
lines changed

src/auto/configure

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -7228,7 +7228,7 @@ echo "${ECHO_T}$rubyhdrdir" >&6; }
72287228
RUBY_LIBS="$RUBY_LIBS -L$rubylibdir"
72297229
elif test -d "/System/Library/Frameworks/Ruby.framework"; then
72307230
RUBY_LIBS="-framework Ruby"
7231-
RUBY_CFLAGS=
7231+
RUBY_CFLAGS="-DRUBY_VERSION=$rubyversion"
72327232
librubyarg=
72337233
fi
72347234

src/configure.in

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1734,7 +1734,7 @@ if test "$enable_rubyinterp" = "yes" -o "$enable_rubyinterp" = "dynamic"; then
17341734
dnl On Mac OS X it is safer to just use the -framework flag
17351735
RUBY_LIBS="-framework Ruby"
17361736
dnl Don't include the -I flag when -framework is set
1737-
RUBY_CFLAGS=
1737+
RUBY_CFLAGS="-DRUBY_VERSION=$rubyversion"
17381738
librubyarg=
17391739
fi
17401740

src/if_ruby.c

Lines changed: 5 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -102,7 +102,11 @@
102102
# include <ruby.h>
103103
#endif
104104
#ifdef RUBY19_OR_LATER
105-
# include <ruby/encoding.h>
105+
# ifdef FEAT_GUI_MACVIM
106+
# include <Ruby/ruby/encoding.h>
107+
# else
108+
# include <ruby/encoding.h>
109+
# endif
106110
#endif
107111

108112
#undef off_t /* ruby defines off_t as _int64, Mingw uses long */

0 commit comments

Comments
 (0)