To: vim-dev@vim.org Subject: Patch 6.2.233 Fcc: outbox From: Bram Moolenaar Mime-Version: 1.0 Content-Type: text/plain; charset=ISO-8859-1 Content-Transfer-Encoding: 8bit ------------ Patch 6.2.233 Problem: On Mac OSX adding -pthread for Python only generates a warning. The test for Perl threads rejects Perl while it's OK. Tcl doesn't work at all. The test for Ruby fails if ruby exists but there are no header files. The Ruby library isn't detected properly Solution: Avoid adding -pthread on Mac OSX. Accept Perl threads when it's not the 5.5 threads. Use the Tcl framework for header files. For Ruby rename cWindow to cVimWindow to avoid a name clash. (Ken Scott) Only enable Ruby when the header files can be found. Use "-lruby" instead of "libruby.a" when it can't be found. Files: src/auto/configure, src/configure.in, src/if_ruby.c *** ../vim-6.2.232/src/auto/configure Mon Dec 29 21:00:25 2003 --- src/auto/configure Tue Feb 3 22:38:27 2004 *************** *** 1570,1579 **** if test "X$vi_cv_path_perl" != "X"; then echo $ac_n "checking Perl version""... $ac_c" 1>&6 ! echo "configure:1480: checking Perl version" >&5 if $vi_cv_path_perl -e 'require 5.003_01' >/dev/null 2>/dev/null; then eval `$vi_cv_path_perl -V:usethreads` if test "X$usethreads" = "XUNKNOWN" -o "X$usethreads" = "Xundef"; then echo "$ac_t""OK" 1>&6 eval `$vi_cv_path_perl -V:shrpenv` if test "X$shrpenv" = "XUNKNOWN"; then # pre 5.003_04 --- 1570,1595 ---- if test "X$vi_cv_path_perl" != "X"; then echo $ac_n "checking Perl version""... $ac_c" 1>&6 ! echo "configure:1574: checking Perl version" >&5 if $vi_cv_path_perl -e 'require 5.003_01' >/dev/null 2>/dev/null; then eval `$vi_cv_path_perl -V:usethreads` if test "X$usethreads" = "XUNKNOWN" -o "X$usethreads" = "Xundef"; then + badthreads=no + else + if $vi_cv_path_perl -e 'require 5.6.0' >/dev/null 2>/dev/null; then + eval `$vi_cv_path_perl -V:use5005threads` + if test "X$use5005threads" = "XUNKNOWN" -o "X$use5005threads" = "Xundef"; then + badthreads=no + else + badthreads=yes + echo "$ac_t"">>> Perl > 5.6 with 5.5 threads cannot be used <<<" 1>&6 + fi + else + badthreads=yes + echo "$ac_t"">>> Perl 5.5 with threads cannot be used <<<" 1>&6 + fi + fi + if test $badthreads = no; then echo "$ac_t""OK" 1>&6 eval `$vi_cv_path_perl -V:shrpenv` if test "X$shrpenv" = "XUNKNOWN"; then # pre 5.003_04 *************** *** 1602,1609 **** #define FEAT_PERL 1 EOF - else - echo "$ac_t"">>> Perl with threads cannot be used <<<" 1>&6 fi else echo "$ac_t"">>> too old; need Perl version 5.003_01 or later <<<" 1>&6 --- 1618,1623 ---- *************** *** 1623,1632 **** fi fi if test -n "$PERL"; then ! PERL_DIR=$dir ! PERL_CFLAGS=-DFEAT_PERL -I$darwindir/CORE ! PERL_OBJ=if_perl.o if_perlsfio.o $darwindir/auto/DynaLoader/DynaLoader.a ! PERL_LIBS=-L$darwindir/CORE -lperl fi fi fi --- 1637,1646 ---- fi fi if test -n "$PERL"; then ! PERL_DIR="$dir" ! PERL_CFLAGS="-DFEAT_PERL -I$darwindir/CORE" ! PERL_OBJ="objects/if_perl.o objects/if_perlsfio.o $darwindir/auto/DynaLoader/DynaLoader.a" ! PERL_LIBS="-L$darwindir/CORE -lperl" fi fi fi *************** *** 1810,1829 **** PYTHON_CFLAGS="-I${vi_cv_path_python_pfx}/include/python${vi_cv_var_python_version} -I${vi_cv_path_python_epfx}/include/python${vi_cv_var_python_version}" fi PYTHON_SRC="if_python.c" ! PYTHON_OBJ="objects/if_python.o objects/py_config.o" if test "${vi_cv_var_python_version}" = "1.4"; then PYTHON_OBJ="$PYTHON_OBJ objects/py_getpath.o" fi PYTHON_GETPATH_CFLAGS="-DPYTHONPATH='\"${vi_cv_path_pythonpath}\"' -DPREFIX='\"${vi_cv_path_python_pfx}\"' -DEXEC_PREFIX='\"${vi_cv_path_python_epfx}\"'" ! echo $ac_n "checking if -pthread should be used""... $ac_c" 1>&6 ! echo "configure:1702: checking if -pthread should be used" >&5 threadsafe_flag= thread_lib= ! test "$GCC" = yes && threadsafe_flag="-pthread" ! if test "`(uname) 2>/dev/null`" = FreeBSD; then ! threadsafe_flag="-D_THREAD_SAFE" ! thread_lib="-pthread" fi if test -n "$threadsafe_flag"; then cflags_save=$CFLAGS --- 1824,1849 ---- PYTHON_CFLAGS="-I${vi_cv_path_python_pfx}/include/python${vi_cv_var_python_version} -I${vi_cv_path_python_epfx}/include/python${vi_cv_var_python_version}" fi PYTHON_SRC="if_python.c" ! if test "x$MACOSX" = "xyes"; then ! PYTHON_OBJ="objects/if_python.o" ! else ! PYTHON_OBJ="objects/if_python.o objects/py_config.o" ! fi if test "${vi_cv_var_python_version}" = "1.4"; then PYTHON_OBJ="$PYTHON_OBJ objects/py_getpath.o" fi PYTHON_GETPATH_CFLAGS="-DPYTHONPATH='\"${vi_cv_path_pythonpath}\"' -DPREFIX='\"${vi_cv_path_python_pfx}\"' -DEXEC_PREFIX='\"${vi_cv_path_python_epfx}\"'" ! echo $ac_n "checking if -pthread should be used""... $ac_c" 1>&6 ! echo "configure:1839: checking if -pthread should be used" >&5 threadsafe_flag= thread_lib= ! if test "x$MACOSX" != "xyes"; then ! test "$GCC" = yes && threadsafe_flag="-pthread" ! if test "`(uname) 2>/dev/null`" = FreeBSD; then ! threadsafe_flag="-D_THREAD_SAFE" ! thread_lib="-pthread" ! fi fi if test -n "$threadsafe_flag"; then cflags_save=$CFLAGS *************** *** 2011,2025 **** fi if test "X$vi_cv_path_tcl" != "X"; then echo $ac_n "checking Tcl version""... $ac_c" 1>&6 ! echo "configure:1896: checking Tcl version" >&5 if echo 'exit [expr [info tclversion] < 8.0]' | $vi_cv_path_tcl - ; then tclver=`echo 'puts [info tclversion]' | $vi_cv_path_tcl -` echo "$ac_t""$tclver - OK" 1>&6; tclloc=`echo 'set l [info library];set i [string last lib $l];incr i -2;puts [string range $l 0 $i]' | $vi_cv_path_tcl -` echo $ac_n "checking for location of Tcl include""... $ac_c" 1>&6 ! echo "configure:1903: checking for location of Tcl include" >&5 ! tclinc="$tclloc/include $tclloc/include/tcl $tclloc/include/tcl$tclver /usr/local/include" for try in $tclinc; do if test -f "$try/tcl.h"; then echo "$ac_t""$try/tcl.h" 1>&6 --- 2031,2049 ---- fi if test "X$vi_cv_path_tcl" != "X"; then echo $ac_n "checking Tcl version""... $ac_c" 1>&6 ! echo "configure:2035: checking Tcl version" >&5 if echo 'exit [expr [info tclversion] < 8.0]' | $vi_cv_path_tcl - ; then tclver=`echo 'puts [info tclversion]' | $vi_cv_path_tcl -` echo "$ac_t""$tclver - OK" 1>&6; tclloc=`echo 'set l [info library];set i [string last lib $l];incr i -2;puts [string range $l 0 $i]' | $vi_cv_path_tcl -` echo $ac_n "checking for location of Tcl include""... $ac_c" 1>&6 ! echo "configure:2042: checking for location of Tcl include" >&5 ! if test "x$MACOSX" != "xyes"; then ! tclinc="$tclloc/include $tclloc/include/tcl $tclloc/include/tcl$tclver /usr/local/include" ! else ! tclinc="/System/Library/Frameworks/Tcl.framework/Headers" ! fi for try in $tclinc; do if test -f "$try/tcl.h"; then echo "$ac_t""$try/tcl.h" 1>&6 *************** *** 2033,2040 **** fi if test -z "$SKIP_TCL"; then echo $ac_n "checking for location of tclConfig.sh script""... $ac_c" 1>&6 ! echo "configure:1918: checking for location of tclConfig.sh script" >&5 ! tclcnf=`echo $tclinc | sed s/include/lib/g` for try in $tclcnf; do if test -f $try/tclConfig.sh; then echo "$ac_t""$try/tclConfig.sh" 1>&6 --- 2057,2068 ---- fi if test -z "$SKIP_TCL"; then echo $ac_n "checking for location of tclConfig.sh script""... $ac_c" 1>&6 ! echo "configure:2061: checking for location of tclConfig.sh script" >&5 ! if test "x$MACOSX" != "xyes"; then ! tclcnf=`echo $tclinc | sed s/include/lib/g` ! else ! tclcnf="/System/Library/Frameworks/Tcl.framework" ! fi for try in $tclcnf; do if test -f $try/tclConfig.sh; then echo "$ac_t""$try/tclConfig.sh" 1>&6 *************** *** 2141,2176 **** if test "X$vi_cv_path_ruby" != "X"; then echo $ac_n "checking Ruby version""... $ac_c" 1>&6 ! echo "configure:2026: checking Ruby version" >&5 if $vi_cv_path_ruby -e 'VERSION >= "1.6.0" or exit 1' >/dev/null 2>/dev/null; then echo "$ac_t""OK" 1>&6 ! rubyhdrdir=`$vi_cv_path_ruby -r mkmf -e 'print Config::CONFIG["archdir"] || $hdrdir'` ! RUBY_CFLAGS="-I$rubyhdrdir" ! rubylibs=`$vi_cv_path_ruby -r rbconfig -e 'print Config::CONFIG["LIBS"]'` ! if test "X$rubylibs" != "X"; then ! RUBY_LIBS="$rubylibs" ! fi ! librubyarg=`$vi_cv_path_ruby -r rbconfig -e 'print Config.expand(Config::CONFIG["LIBRUBYARG"])'` ! if test -f "$rubyhdrdir/$librubyarg"; then ! librubyarg="$rubyhdrdir/$librubyarg" ! else ! librubyarg=`$vi_cv_path_ruby -r rbconfig -e "print '$librubyarg'.gsub(/-L\./, %'-L#{Config.expand(Config::CONFIG[\"libdir\"])}')"` ! fi ! if test "X$librubyarg" != "X"; then ! RUBY_LIBS="$librubyarg $RUBY_LIBS" ! fi ! rubyldflags=`$vi_cv_path_ruby -r rbconfig -e 'print Config::CONFIG["LDFLAGS"]'` ! if test "X$rubyldflags" != "X"; then ! LDFLAGS="$rubyldflags $LDFLAGS" ! fi ! RUBY_SRC="if_ruby.c" ! RUBY_OBJ="objects/if_ruby.o" ! RUBY_PRO="if_ruby.pro" ! cat >> confdefs.h <<\EOF #define FEAT_RUBY 1 EOF else echo "$ac_t""too old; need Ruby version 1.6.0 or later" 1>&6 fi --- 2169,2218 ---- if test "X$vi_cv_path_ruby" != "X"; then echo $ac_n "checking Ruby version""... $ac_c" 1>&6 ! echo "configure:2173: checking Ruby version" >&5 if $vi_cv_path_ruby -e 'VERSION >= "1.6.0" or exit 1' >/dev/null 2>/dev/null; then echo "$ac_t""OK" 1>&6 ! echo $ac_n "checking Ruby header files""... $ac_c" 1>&6 ! echo "configure:2177: checking Ruby header files" >&5 ! rubyhdrdir=`$vi_cv_path_ruby -r mkmf -e 'print Config::CONFIG["archdir"] || $hdrdir' 2>/dev/null` ! if test "X$rubyhdrdir" != "X"; then ! echo "$ac_t""$rubyhdrdir" 1>&6 ! RUBY_CFLAGS="-I$rubyhdrdir" ! rubylibs=`$vi_cv_path_ruby -r rbconfig -e 'print Config::CONFIG["LIBS"]'` ! if test "X$rubylibs" != "X"; then ! RUBY_LIBS="$rubylibs" ! fi ! librubyarg=`$vi_cv_path_ruby -r rbconfig -e 'print Config.expand(Config::CONFIG["LIBRUBYARG"])'` ! if test -f "$rubyhdrdir/$librubyarg"; then ! librubyarg="$rubyhdrdir/$librubyarg" ! else ! rubylibdir=`$vi_cv_path_ruby -r rbconfig -e 'print Config.expand(Config::CONFIG["libdir"])'` ! if test -f "$rubylibdir/$librubyarg"; then ! librubyarg="$rubylibdir/$librubyarg" ! elif test "$librubyarg" = "libruby.a"; then ! librubyarg="-lruby" ! else ! librubyarg=`$vi_cv_path_ruby -r rbconfig -e "print '$librubyarg'.gsub(/-L\./, %'-L#{Config.expand(Config::CONFIG[\"libdir\"])}')"` ! fi ! fi ! if test "X$librubyarg" != "X"; then ! RUBY_LIBS="$librubyarg $RUBY_LIBS" ! fi ! rubyldflags=`$vi_cv_path_ruby -r rbconfig -e 'print Config::CONFIG["LDFLAGS"]'` ! if test "X$rubyldflags" != "X"; then ! LDFLAGS="$rubyldflags $LDFLAGS" ! fi ! RUBY_SRC="if_ruby.c" ! RUBY_OBJ="objects/if_ruby.o" ! RUBY_PRO="if_ruby.pro" ! cat >> confdefs.h <<\EOF #define FEAT_RUBY 1 EOF + else + echo "$ac_t""not found" 1>&6 + fi else echo "$ac_t""too old; need Ruby version 1.6.0 or later" 1>&6 fi *** ../vim-6.2.232/src/configure.in Mon Dec 29 21:00:25 2003 --- src/configure.in Tue Feb 3 22:38:25 2004 *************** *** 305,310 **** --- 305,326 ---- if $vi_cv_path_perl -e 'require 5.003_01' >/dev/null 2>/dev/null; then eval `$vi_cv_path_perl -V:usethreads` if test "X$usethreads" = "XUNKNOWN" -o "X$usethreads" = "Xundef"; then + badthreads=no + else + if $vi_cv_path_perl -e 'require 5.6.0' >/dev/null 2>/dev/null; then + eval `$vi_cv_path_perl -V:use5005threads` + if test "X$use5005threads" = "XUNKNOWN" -o "X$use5005threads" = "Xundef"; then + badthreads=no + else + badthreads=yes + AC_MSG_RESULT(>>> Perl > 5.6 with 5.5 threads cannot be used <<<) + fi + else + badthreads=yes + AC_MSG_RESULT(>>> Perl 5.5 with threads cannot be used <<<) + fi + fi + if test $badthreads = no; then AC_MSG_RESULT(OK) eval `$vi_cv_path_perl -V:shrpenv` if test "X$shrpenv" = "XUNKNOWN"; then # pre 5.003_04 *************** *** 334,341 **** PERL_OBJ="objects/if_perl.o objects/if_perlsfio.o" PERL_PRO="if_perl.pro if_perlsfio.pro" AC_DEFINE(FEAT_PERL) - else - AC_MSG_RESULT(>>> Perl with threads cannot be used <<<) fi else AC_MSG_RESULT(>>> too old; need Perl version 5.003_01 or later <<<) --- 350,355 ---- *************** *** 357,366 **** fi fi if test -n "$PERL"; then ! PERL_DIR=$dir ! PERL_CFLAGS=-DFEAT_PERL -I$darwindir/CORE ! PERL_OBJ=if_perl.o if_perlsfio.o $darwindir/auto/DynaLoader/DynaLoader.a ! PERL_LIBS=-L$darwindir/CORE -lperl fi fi fi --- 371,380 ---- fi fi if test -n "$PERL"; then ! PERL_DIR="$dir" ! PERL_CFLAGS="-DFEAT_PERL -I$darwindir/CORE" ! PERL_OBJ="objects/if_perl.o objects/if_perlsfio.o $darwindir/auto/DynaLoader/DynaLoader.a" ! PERL_LIBS="-L$darwindir/CORE -lperl" fi fi fi *************** *** 475,481 **** PYTHON_CFLAGS="-I${vi_cv_path_python_pfx}/include/python${vi_cv_var_python_version} -I${vi_cv_path_python_epfx}/include/python${vi_cv_var_python_version}" fi PYTHON_SRC="if_python.c" ! PYTHON_OBJ="objects/if_python.o objects/py_config.o" if test "${vi_cv_var_python_version}" = "1.4"; then PYTHON_OBJ="$PYTHON_OBJ objects/py_getpath.o" fi --- 489,500 ---- PYTHON_CFLAGS="-I${vi_cv_path_python_pfx}/include/python${vi_cv_var_python_version} -I${vi_cv_path_python_epfx}/include/python${vi_cv_var_python_version}" fi PYTHON_SRC="if_python.c" ! dnl For Mac OSX 10.2 config.o is included in the Python library. ! if test "x$MACOSX" = "xyes"; then ! PYTHON_OBJ="objects/if_python.o" ! else ! PYTHON_OBJ="objects/if_python.o objects/py_config.o" ! fi if test "${vi_cv_var_python_version}" = "1.4"; then PYTHON_OBJ="$PYTHON_OBJ objects/py_getpath.o" fi *************** *** 487,499 **** dnl sigaltstack() will look in libc_r (it's there in libc!). dnl Otherwise, when using GCC, try adding -pthread to $CFLAGS. GCC dnl will then define target-specific defines, e.g., -D_REENTRANT. AC_MSG_CHECKING([if -pthread should be used]) threadsafe_flag= thread_lib= ! test "$GCC" = yes && threadsafe_flag="-pthread" ! if test "`(uname) 2>/dev/null`" = FreeBSD; then ! threadsafe_flag="-D_THREAD_SAFE" ! thread_lib="-pthread" fi if test -n "$threadsafe_flag"; then cflags_save=$CFLAGS --- 506,521 ---- dnl sigaltstack() will look in libc_r (it's there in libc!). dnl Otherwise, when using GCC, try adding -pthread to $CFLAGS. GCC dnl will then define target-specific defines, e.g., -D_REENTRANT. + dnl Don't do this for Mac OSX, -pthread will generate a warning. AC_MSG_CHECKING([if -pthread should be used]) threadsafe_flag= thread_lib= ! if test "x$MACOSX" != "xyes"; then ! test "$GCC" = yes && threadsafe_flag="-pthread" ! if test "`(uname) 2>/dev/null`" = FreeBSD; then ! threadsafe_flag="-D_THREAD_SAFE" ! thread_lib="-pthread" ! fi fi if test -n "$threadsafe_flag"; then cflags_save=$CFLAGS *************** *** 558,564 **** tclloc=`echo 'set l [[info library]];set i [[string last lib $l]];incr i -2;puts [[string range $l 0 $i]]' | $vi_cv_path_tcl -` AC_MSG_CHECKING(for location of Tcl include) ! tclinc="$tclloc/include $tclloc/include/tcl $tclloc/include/tcl$tclver /usr/local/include" for try in $tclinc; do if test -f "$try/tcl.h"; then AC_MSG_RESULT($try/tcl.h) --- 580,591 ---- tclloc=`echo 'set l [[info library]];set i [[string last lib $l]];incr i -2;puts [[string range $l 0 $i]]' | $vi_cv_path_tcl -` AC_MSG_CHECKING(for location of Tcl include) ! if test "x$MACOSX" != "xyes"; then ! tclinc="$tclloc/include $tclloc/include/tcl $tclloc/include/tcl$tclver /usr/local/include" ! else ! dnl For Mac OS X 10.3, use the OS-provided framework location ! tclinc="/System/Library/Frameworks/Tcl.framework/Headers" ! fi for try in $tclinc; do if test -f "$try/tcl.h"; then AC_MSG_RESULT($try/tcl.h) *************** *** 572,578 **** fi if test -z "$SKIP_TCL"; then AC_MSG_CHECKING(for location of tclConfig.sh script) ! tclcnf=`echo $tclinc | sed s/include/lib/g` for try in $tclcnf; do if test -f $try/tclConfig.sh; then AC_MSG_RESULT($try/tclConfig.sh) --- 599,610 ---- fi if test -z "$SKIP_TCL"; then AC_MSG_CHECKING(for location of tclConfig.sh script) ! if test "x$MACOSX" != "xyes"; then ! tclcnf=`echo $tclinc | sed s/include/lib/g` ! else ! dnl For Mac OS X 10.3, use the OS-provided framework location ! tclcnf="/System/Library/Frameworks/Tcl.framework" ! fi for try in $tclcnf; do if test -f $try/tclConfig.sh; then AC_MSG_RESULT($try/tclConfig.sh) *************** *** 638,667 **** AC_MSG_CHECKING(Ruby version) if $vi_cv_path_ruby -e 'VERSION >= "1.6.0" or exit 1' >/dev/null 2>/dev/null; then AC_MSG_RESULT(OK) ! rubyhdrdir=`$vi_cv_path_ruby -r mkmf -e 'print Config::CONFIG[["archdir"]] || $hdrdir'` ! RUBY_CFLAGS="-I$rubyhdrdir" ! rubylibs=`$vi_cv_path_ruby -r rbconfig -e 'print Config::CONFIG[["LIBS"]]'` ! if test "X$rubylibs" != "X"; then ! RUBY_LIBS="$rubylibs" ! fi ! librubyarg=`$vi_cv_path_ruby -r rbconfig -e 'print Config.expand(Config::CONFIG[["LIBRUBYARG"]])'` ! if test -f "$rubyhdrdir/$librubyarg"; then ! librubyarg="$rubyhdrdir/$librubyarg" ! else ! librubyarg=`$vi_cv_path_ruby -r rbconfig -e "print '$librubyarg'.gsub(/-L\./, %'-L#{Config.expand(Config::CONFIG[\"libdir\"])}')"` ! fi ! if test "X$librubyarg" != "X"; then ! RUBY_LIBS="$librubyarg $RUBY_LIBS" ! fi ! rubyldflags=`$vi_cv_path_ruby -r rbconfig -e 'print Config::CONFIG[["LDFLAGS"]]'` ! if test "X$rubyldflags" != "X"; then ! LDFLAGS="$rubyldflags $LDFLAGS" fi - RUBY_SRC="if_ruby.c" - RUBY_OBJ="objects/if_ruby.o" - RUBY_PRO="if_ruby.pro" - AC_DEFINE(FEAT_RUBY) else AC_MSG_RESULT(too old; need Ruby version 1.6.0 or later) fi --- 670,713 ---- AC_MSG_CHECKING(Ruby version) if $vi_cv_path_ruby -e 'VERSION >= "1.6.0" or exit 1' >/dev/null 2>/dev/null; then AC_MSG_RESULT(OK) ! AC_MSG_CHECKING(Ruby header files) ! rubyhdrdir=`$vi_cv_path_ruby -r mkmf -e 'print Config::CONFIG[["archdir"]] || $hdrdir' 2>/dev/null` ! if test "X$rubyhdrdir" != "X"; then ! AC_MSG_RESULT($rubyhdrdir) ! RUBY_CFLAGS="-I$rubyhdrdir" ! rubylibs=`$vi_cv_path_ruby -r rbconfig -e 'print Config::CONFIG[["LIBS"]]'` ! if test "X$rubylibs" != "X"; then ! RUBY_LIBS="$rubylibs" ! fi ! librubyarg=`$vi_cv_path_ruby -r rbconfig -e 'print Config.expand(Config::CONFIG[["LIBRUBYARG"]])'` ! if test -f "$rubyhdrdir/$librubyarg"; then ! librubyarg="$rubyhdrdir/$librubyarg" ! else ! rubylibdir=`$vi_cv_path_ruby -r rbconfig -e 'print Config.expand(Config::CONFIG[["libdir"]])'` ! if test -f "$rubylibdir/$librubyarg"; then ! librubyarg="$rubylibdir/$librubyarg" ! elif test "$librubyarg" = "libruby.a"; then ! dnl required on Mac OS 10.3 where libruby.a doesn't exist ! librubyarg="-lruby" ! else ! librubyarg=`$vi_cv_path_ruby -r rbconfig -e "print '$librubyarg'.gsub(/-L\./, %'-L#{Config.expand(Config::CONFIG[\"libdir\"])}')"` ! fi ! fi ! if test "X$librubyarg" != "X"; then ! RUBY_LIBS="$librubyarg $RUBY_LIBS" ! fi ! rubyldflags=`$vi_cv_path_ruby -r rbconfig -e 'print Config::CONFIG[["LDFLAGS"]]'` ! if test "X$rubyldflags" != "X"; then ! LDFLAGS="$rubyldflags $LDFLAGS" ! fi ! 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) fi else AC_MSG_RESULT(too old; need Ruby version 1.6.0 or later) fi *** ../vim-6.2.232/src/if_ruby.c Sun Aug 10 22:37:55 2003 --- src/if_ruby.c Wed Feb 4 10:19:53 2004 *************** *** 50,55 **** --- 50,63 ---- #undef EXTERN #undef _ + + /* T_DATA defined both by Ruby and Mac header files, hack around it... */ + #ifdef FEAT_GUI_MAC + # define __OPENTRANSPORT__ + # define __OPENTRANSPORTPROTOCOL__ + # define __OPENTRANSPORTPROVIDERS__ + #endif + #include "vim.h" #include "version.h" *************** *** 64,70 **** static VALUE mVIM; static VALUE cBuffer; ! static VALUE cWindow; static VALUE eDeletedBufferError; static VALUE eDeletedWindowError; --- 72,78 ---- static VALUE mVIM; static VALUE cBuffer; ! static VALUE cVimWindow; static VALUE eDeletedBufferError; static VALUE eDeletedWindowError; *************** *** 682,688 **** return (VALUE) win->ruby_ref; } else { ! VALUE obj = Data_Wrap_Struct(cWindow, 0, 0, win); win->ruby_ref = (void *) obj; rb_hash_aset(objtbl, rb_obj_id(obj), obj); return obj; --- 690,696 ---- return (VALUE) win->ruby_ref; } else { ! VALUE obj = Data_Wrap_Struct(cVimWindow, 0, 0, win); win->ruby_ref = (void *) obj; rb_hash_aset(objtbl, rb_obj_id(obj), obj); return obj; *************** *** 843,857 **** rb_define_method(cBuffer, "delete", buffer_delete, 1); rb_define_method(cBuffer, "append", buffer_append, 2); ! cWindow = rb_define_class_under(mVIM, "Window", rb_cObject); ! rb_define_singleton_method(cWindow, "current", window_s_current, 0); ! rb_define_singleton_method(cWindow, "count", window_s_count, 0); ! rb_define_singleton_method(cWindow, "[]", window_s_aref, 1); ! rb_define_method(cWindow, "buffer", window_buffer, 0); ! rb_define_method(cWindow, "height", window_height, 0); ! rb_define_method(cWindow, "height=", window_set_height, 1); ! rb_define_method(cWindow, "cursor", window_cursor, 0); ! rb_define_method(cWindow, "cursor=", window_set_cursor, 1); rb_define_virtual_variable("$curbuf", buffer_s_current, 0); rb_define_virtual_variable("$curwin", window_s_current, 0); --- 851,865 ---- rb_define_method(cBuffer, "delete", buffer_delete, 1); rb_define_method(cBuffer, "append", buffer_append, 2); ! cVimWindow = rb_define_class_under(mVIM, "Window", rb_cObject); ! rb_define_singleton_method(cVimWindow, "current", window_s_current, 0); ! rb_define_singleton_method(cVimWindow, "count", window_s_count, 0); ! rb_define_singleton_method(cVimWindow, "[]", window_s_aref, 1); ! rb_define_method(cVimWindow, "buffer", window_buffer, 0); ! rb_define_method(cVimWindow, "height", window_height, 0); ! rb_define_method(cVimWindow, "height=", window_set_height, 1); ! rb_define_method(cVimWindow, "cursor", window_cursor, 0); ! rb_define_method(cVimWindow, "cursor=", window_set_cursor, 1); rb_define_virtual_variable("$curbuf", buffer_s_current, 0); rb_define_virtual_variable("$curwin", window_s_current, 0); *** ../vim-6.2.232/src/version.c Tue Feb 3 19:59:05 2004 --- src/version.c Wed Feb 4 12:04:53 2004 *************** *** 639,640 **** --- 639,642 ---- { /* Add new patch number below this line */ + /**/ + 233, /**/ -- Everyone has a photographic memory. Some don't have film. /// Bram Moolenaar -- Bram@Moolenaar.net -- http://www.Moolenaar.net \\\ /// Sponsor Vim, vote for features -- http://www.Vim.org/sponsor/ \\\ \\\ Project leader for A-A-P -- http://www.A-A-P.org /// \\\ Help AIDS victims, buy here: http://ICCF-Holland.org/click1.html ///