From: Bjorn Winckler Date: Mon, 1 Mar 2010 18:32:44 +0000 (+0100) Subject: Merge branch 'vim' X-Git-Tag: snapshot-52~1 X-Git-Url: https://repo.or.cz/w/MacVim.git/commitdiff_plain/595a0ac2b9cc9005c2ffb87bff7eb69527941e57 Merge branch 'vim' Conflicts: src/auto/configure src/eval.c src/if_ruby.c --- 595a0ac2b9cc9005c2ffb87bff7eb69527941e57 diff --cc src/auto/configure index 75e773af,0362c5a8..16374664 --- a/src/auto/configure +++ b/src/auto/configure @@@ -5693,16 -5702,28 +5694,28 @@@ els enable_rubyinterp="no" fi -{ $as_echo "$as_me:$LINENO: result: $enable_rubyinterp" >&5 -$as_echo "$enable_rubyinterp" >&6; } +{ echo "$as_me:$LINENO: result: $enable_rubyinterp" >&5 +echo "${ECHO_T}$enable_rubyinterp" >&6; } if test "$enable_rubyinterp" = "yes"; then - { $as_echo "$as_me:$LINENO: checking --with-ruby-command argument" >&5 -$as_echo_n "checking --with-ruby-command argument... " >&6; } ++ { echo "$as_me:$LINENO: checking --with-ruby-command argument" >&5 ++echo $ECHO_N "checking --with-ruby-command argument... $ECHO_C" >&6; } - # Extract the first word of "ruby", so it can be a program name with args. - set dummy ruby; ac_word=$2 + # Check whether --with-ruby-command was given. + if test "${with_ruby_command+set}" = set; then - withval=$with_ruby_command; RUBY_CMD="$withval"; { $as_echo "$as_me:$LINENO: result: $RUBY_CMD" >&5 -$as_echo "$RUBY_CMD" >&6; } ++ withval=$with_ruby_command; RUBY_CMD="$withval"; { echo "$as_me:$LINENO: result: $RUBY_CMD" >&5 ++echo "${ECHO_T}$RUBY_CMD" >&6; } + else - RUBY_CMD="ruby"; { $as_echo "$as_me:$LINENO: result: defaulting to $RUBY_CMD" >&5 -$as_echo "defaulting to $RUBY_CMD" >&6; } ++ RUBY_CMD="ruby"; { echo "$as_me:$LINENO: result: defaulting to $RUBY_CMD" >&5 ++echo "${ECHO_T}defaulting to $RUBY_CMD" >&6; } + fi + + + # Extract the first word of "$RUBY_CMD", so it can be a program name with args. + set dummy $RUBY_CMD; ac_word=$2 -{ $as_echo "$as_me:$LINENO: checking for $ac_word" >&5 -$as_echo_n "checking for $ac_word... " >&6; } +{ echo "$as_me:$LINENO: checking for $ac_word" >&5 +echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6; } if test "${ac_cv_path_vi_cv_path_ruby+set}" = set; then - $as_echo_n "(cached) " >&6 + echo $ECHO_N "(cached) $ECHO_C" >&6 else case $vi_cv_path_ruby in [\\/]* | ?:[\\/]*) @@@ -5738,18 -5759,24 +5751,24 @@@ f if test "X$vi_cv_path_ruby" != "X"; then - { $as_echo "$as_me:$LINENO: checking Ruby version" >&5 -$as_echo_n "checking Ruby version... " >&6; } + { echo "$as_me:$LINENO: checking Ruby version" >&5 +echo $ECHO_N "checking Ruby version... $ECHO_C" >&6; } if $vi_cv_path_ruby -e '(VERSION rescue RUBY_VERSION) >= "1.6.0" or exit 1' >/dev/null 2>/dev/null; then - { $as_echo "$as_me:$LINENO: result: OK" >&5 -$as_echo "OK" >&6; } - { $as_echo "$as_me:$LINENO: checking Ruby header files" >&5 -$as_echo_n "checking Ruby header files... " >&6; } + { echo "$as_me:$LINENO: result: OK" >&5 +echo "${ECHO_T}OK" >&6; } + { echo "$as_me:$LINENO: checking Ruby header files" >&5 +echo $ECHO_N "checking Ruby header files... $ECHO_C" >&6; } - rubyhdrdir=`$vi_cv_path_ruby -r mkmf -e 'print Config::CONFIG["archdir"] || $hdrdir' 2>/dev/null` + rubyhdrdir=`$vi_cv_path_ruby -r mkmf -e 'print Config::CONFIG["rubyhdrdir"] || Config::CONFIG["archdir"] || $hdrdir' 2>/dev/null` if test "X$rubyhdrdir" != "X"; then - { $as_echo "$as_me:$LINENO: result: $rubyhdrdir" >&5 -$as_echo "$rubyhdrdir" >&6; } + { echo "$as_me:$LINENO: result: $rubyhdrdir" >&5 +echo "${ECHO_T}$rubyhdrdir" >&6; } RUBY_CFLAGS="-I$rubyhdrdir" + rubyarch=`$vi_cv_path_ruby -r rbconfig -e 'print Config::CONFIG["arch"]'` + if test -d "$rubyhdrdir/$rubyarch"; then + RUBY_CFLAGS="$RUBY_CFLAGS -I$rubyhdrdir/$rubyarch" + fi + rubyversion=`$vi_cv_path_ruby -r rbconfig -e 'print Config::CONFIG["ruby_version"].gsub(/\./, "")[0,2]'` + RUBY_CFLAGS="$RUBY_CFLAGS -DRUBY_VERSION=$rubyversion" rubylibs=`$vi_cv_path_ruby -r rbconfig -e 'print Config::CONFIG["LIBS"]'` if test "X$rubylibs" != "X"; then RUBY_LIBS="$rubylibs" @@@ -5791,12 -5813,12 +5810,12 @@@ _ACEOF else - { echo "$as_me:$LINENO: result: not found" >&5 - echo "${ECHO_T}not found" >&6; } - { $as_echo "$as_me:$LINENO: result: not found; disabling Ruby" >&5 -$as_echo "not found; disabling Ruby" >&6; } ++ { echo "$as_me:$LINENO: result: not found; disabling Ruby" >&5 ++echo "${ECHO_T}not found; disabling Ruby" >&6; } fi else - { $as_echo "$as_me:$LINENO: result: too old; need Ruby version 1.6.0 or later" >&5 -$as_echo "too old; need Ruby version 1.6.0 or later" >&6; } + { echo "$as_me:$LINENO: result: too old; need Ruby version 1.6.0 or later" >&5 +echo "${ECHO_T}too old; need Ruby version 1.6.0 or later" >&6; } fi fi fi @@@ -13661,9 -14144,141 +13678,129 @@@ _ACEO fi done -{ $as_echo "$as_me:$LINENO: checking for _LARGEFILE_SOURCE value needed for large files" >&5 -$as_echo_n "checking for _LARGEFILE_SOURCE value needed for large files... " >&6; } ++{ echo "$as_me:$LINENO: checking for _LARGEFILE_SOURCE value needed for large files" >&5 ++echo $ECHO_N "checking for _LARGEFILE_SOURCE value needed for large files... $ECHO_C" >&6; } + if test "${ac_cv_sys_largefile_source+set}" = set; then - $as_echo_n "(cached) " >&6 ++ echo $ECHO_N "(cached) $ECHO_C" >&6 + else + while :; do + cat >conftest.$ac_ext <<_ACEOF + /* confdefs.h. */ + _ACEOF + cat confdefs.h >>conftest.$ac_ext + cat >>conftest.$ac_ext <<_ACEOF + /* end confdefs.h. */ -#include /* for off_t */ - #include ++#include + int + main () + { -int (*fp) (FILE *, off_t, int) = fseeko; - return fseeko (stdin, 0, 0) && fp (stdin, 0, 0); ++return fseeko (stdin, 0, 0) && (fseeko) (stdin, 0, 0); + ; + return 0; + } + _ACEOF + rm -f conftest.$ac_objext conftest$ac_exeext + if { (ac_try="$ac_link" + case "(($ac_try" in + *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; + *) ac_try_echo=$ac_try;; + esac -eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\"" -$as_echo "$ac_try_echo") >&5 ++eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5 + (eval "$ac_link") 2>conftest.er1 + ac_status=$? + grep -v '^ *+' conftest.er1 >conftest.err + rm -f conftest.er1 + cat conftest.err >&5 - $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5 ++ echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); } && { + test -z "$ac_c_werror_flag" || + test ! -s conftest.err - } && test -s conftest$ac_exeext && { - test "$cross_compiling" = yes || - $as_test_x conftest$ac_exeext - }; then ++ } && test -s conftest$ac_exeext && ++ $as_test_x conftest$ac_exeext; then + ac_cv_sys_largefile_source=no; break + else - $as_echo "$as_me: failed program was:" >&5 ++ echo "$as_me: failed program was:" >&5 + sed 's/^/| /' conftest.$ac_ext >&5 + + + fi + -rm -rf conftest.dSYM + rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \ + conftest$ac_exeext conftest.$ac_ext + cat >conftest.$ac_ext <<_ACEOF + /* confdefs.h. */ + _ACEOF + cat confdefs.h >>conftest.$ac_ext + cat >>conftest.$ac_ext <<_ACEOF + /* end confdefs.h. */ + #define _LARGEFILE_SOURCE 1 -#include /* for off_t */ - #include ++#include + int + main () + { -int (*fp) (FILE *, off_t, int) = fseeko; - return fseeko (stdin, 0, 0) && fp (stdin, 0, 0); ++return fseeko (stdin, 0, 0) && (fseeko) (stdin, 0, 0); + ; + return 0; + } + _ACEOF + rm -f conftest.$ac_objext conftest$ac_exeext + if { (ac_try="$ac_link" + case "(($ac_try" in + *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; + *) ac_try_echo=$ac_try;; + esac -eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\"" -$as_echo "$ac_try_echo") >&5 ++eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5 + (eval "$ac_link") 2>conftest.er1 + ac_status=$? + grep -v '^ *+' conftest.er1 >conftest.err + rm -f conftest.er1 + cat conftest.err >&5 - $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5 ++ echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); } && { + test -z "$ac_c_werror_flag" || + test ! -s conftest.err - } && test -s conftest$ac_exeext && { - test "$cross_compiling" = yes || - $as_test_x conftest$ac_exeext - }; then ++ } && test -s conftest$ac_exeext && ++ $as_test_x conftest$ac_exeext; then + ac_cv_sys_largefile_source=1; break + else - $as_echo "$as_me: failed program was:" >&5 ++ echo "$as_me: failed program was:" >&5 + sed 's/^/| /' conftest.$ac_ext >&5 + + + fi + -rm -rf conftest.dSYM + rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \ + conftest$ac_exeext conftest.$ac_ext + ac_cv_sys_largefile_source=unknown + break + done + fi -{ $as_echo "$as_me:$LINENO: result: $ac_cv_sys_largefile_source" >&5 -$as_echo "$ac_cv_sys_largefile_source" >&6; } ++{ echo "$as_me:$LINENO: result: $ac_cv_sys_largefile_source" >&5 ++echo "${ECHO_T}$ac_cv_sys_largefile_source" >&6; } + case $ac_cv_sys_largefile_source in #( + no | unknown) ;; + *) + cat >>confdefs.h <<_ACEOF + #define _LARGEFILE_SOURCE $ac_cv_sys_largefile_source + _ACEOF + ;; + esac -rm -rf conftest* ++rm -f -r conftest* + + # We used to try defining _XOPEN_SOURCE=500 too, to work around a bug + # in glibc 2.1.3, but that breaks too many other things. + # If you want fseeko and ftello with glibc, upgrade to a fixed glibc. + if test $ac_cv_sys_largefile_source != unknown; then + + cat >>confdefs.h <<\_ACEOF + #define HAVE_FSEEKO 1 + _ACEOF + + fi + -{ $as_echo "$as_me:$LINENO: checking for st_blksize" >&5 -$as_echo_n "checking for st_blksize... " >&6; } +{ echo "$as_me:$LINENO: checking for st_blksize" >&5 +echo $ECHO_N "checking for st_blksize... $ECHO_C" >&6; } cat >conftest.$ac_ext <<_ACEOF /* confdefs.h. */ _ACEOF diff --cc src/configure.in index 3ee21ae5,177fa885..a233de18 --- a/src/configure.in +++ b/src/configure.in @@@ -1029,10 -1005,9 +1039,10 @@@ if test "$enable_rubyinterp" = "yes"; t RUBY_SRC="if_ruby.c" RUBY_OBJ="objects/if_ruby.o" RUBY_PRO="if_ruby.pro" + AC_DEFINE(FEAT_RUBY) else - AC_MSG_RESULT(not found, disabling Ruby) + AC_MSG_RESULT(not found; disabling Ruby) fi else AC_MSG_RESULT(too old; need Ruby version 1.6.0 or later) diff --cc src/eval.c index fc20263e,87333c2b..141a12aa --- a/src/eval.c +++ b/src/eval.c @@@ -5872,8 -5872,8 +5872,8 @@@ list_equal(l1, l2, ic return item1 == NULL && item2 == NULL; } - #if defined(FEAT_PYTHON) || defined(FEAT_MZSCHEME) || defined(PROTO) \ - || defined(FEAT_GUI_MACVIM) + #if defined(FEAT_RUBY) || defined(FEAT_PYTHON) || defined(FEAT_MZSCHEME) \ - || defined(PROTO) ++ || defined(PROTO) || defined(FEAT_GUI_MACVIM) /* * Return the dictitem that an entry in a hashtable points to. */ diff --cc src/if_ruby.c index 2b52133d,6d28de37..ef8af721 --- a/src/if_ruby.c +++ b/src/if_ruby.c @@@ -48,11 -48,15 +48,19 @@@ # endif #endif + /* suggested by Ariya Mizutani */ + #if (_MSC_VER == 1200) + # undef _WIN32_WINNT + #endif + -#include +#ifdef FEAT_GUI_MACVIM +# include +#else +# include +#endif + #if defined(RUBY_VERSION) && RUBY_VERSION >= 19 + # include + #endif #undef EXTERN #undef _