diff --git a/ChangeLog b/ChangeLog index 280aedf68f..82fb3d3427 100644 --- a/ChangeLog +++ b/ChangeLog @@ -1,6 +1,136 @@ -Fri Jun 25 13:07:20 1999 Koji Oda +Thu Jul 15 16:54:16 1999 Yukihiro Matsumoto - * missing/isinf.c: include "config.h" added. + * version 1.3.5 - version 1.4 alpha + +Wed Jul 14 23:45:33 1999 Katsuyuki Komatsu + + * eval.c (ruby_init): initialize for the first time only. + +Tue Jul 13 00:15:19 1999 Yukihiro Matsumoto + + * hash.c (rb_hash_index): re-defined; method to retrieve a key + from the value. + + * hash.c (Init_Hash): member? should be re-defined for Hash. + +Tue Jul 12 13:54:51 1999 EGUCHI Osamu + + * io.c (rb_file_sysopen): wrong number of argument. + +Mon Jul 12 11:52:35 1999 Yukihiro Matsumoto + + * eval.c (rb_f_missing): class name included in message. + + * eval.c (print_undef): better error message. + +Sun Jul 11 05:36:17 1999 NAKAMURA, Hiroshi + + * lib/debug.rb: patch to show proper position. + +Fri Jul 9 23:56:14 1999 WATANABE Hirofumi + + * dln.c (dln_find_1): path conv. moved to conv_to_posix_path. + + * dln.c (conv_to_posix_path): path conv. should be done. + +Fri Jul 9 10:26:47 1999 WATANABE Hirofumi + + * random.c (RANDOM_NUMBER): should place parentheses. + +Fri Jul 8 11:00:51 1999 Shugo Maeda + + * numeric.c (fix_div): division may be out of fixnum range. + + * bignum.c (bigdivmod): proper sign calculation to result. + +Wed Jul 7 18:27:41 1999 Yukihiro Matsumoto + + * st.c (st_delete_safe): was modifying wrong slot. + +Mon Jul 5 13:17:46 1999 Yukihiro Matsumoto + + * gc.c (rb_gc_call_finalizer_at_exit): close all files at exit. + +Fri Jul 2 18:00:21 1999 Minero Aoki + + * lib/Mail/README: Mail-0.3.0 added to the distribution. + +Fri Jul 2 01:45:32 1999 Yukihiro Matsumoto + + * regex.c (re_compile_fastmap): avoid allocation of register + variables for each invocation of re_match(). Suggested by + Zasukhin Ruslan . Thanks. + +Tue Jun 29 20:39:24 1999 Koji Arai + + * ext/tk/lib/tk.rb (TkVariable): bug fix; should value type check + be added? + + * string.c (rb_str_each_line): a bug in paragraph mode. + + * ruby.c (load_file): shifted too much to skip #!. + +Tue Jun 29 06:50:21 1999 Wakou Aoyama + + * lib/CGI.rb: 0.30 - cleanup release, incompatible. + + * lib/telnet.rb: 0.22 - timeout added. + +Tue Jun 29 10:49:25 1999 SHIROYAMA Takayuki + + * configure.in: better Rhapsody support. + + * lib/mkmf.rb: Rhapsody/NEXTSTEP support. + +Tue Jun 29 01:42:13 1999 Yukihiro Matsumoto + + * ext/pty/pty.c (chld_changed): should use POSIX.1 style wait. + +Mon Jun 28 21:07:36 1999 KIMURA Koichi + + * ext/extmk.rb.nt: wrong result for have_library(). + +Mon Jun 28 15:24:05 1999 Yukihiro Matsumoto + + * missing/isinf.c: OSF/1 raises SIGFPE on one()/zero(). + + * regex.c (re_search): should search til EOS, for patterns may + match beyond the end of range. + +Mon Jun 28 12:49:12 1999 Yukihiro Matsumoto + + * io.c (rb_f_select): should not accept Time objects as an + argument for it is time interval. + + * process.c (rb_f_sleep): ditto. + + * file.c (test_s): should return nil for false condition. + +Mon Jun 28 12:23:52 1999 Katsuyuki Komatsu + + * bignum.c (rb_dbl2big): typo. + + * file.c (rb_f_test): ditto. + + * string.c (rb_str_crypt): wrong message. + +Sun Jun 27 19:50:11 1999 Tadayoshi Funaba + + * eval.c (rb_f_exit): should have treat signed integer status, not + VALUE. + + * process.c (rb_f_exit_bang): should work like exit(). + +Sun Jun 27 16:21:32 1999 WATANABE Hirofumi + + * string.c (rb_str_rindex): wrong position to search. + +Sat Jun 26 04:05:30 1999 Takaaki Tateishi + + * configure.in (configure_args): --with-search-path to specify + additional ruby search path. + + * ruby.c (ruby_prog_init): additional search path. Fri Jun 25 13:09:12 1999 Yukihiro Matsumoto @@ -9,6 +139,10 @@ Fri Jun 25 13:09:12 1999 Yukihiro Matsumoto * regex.c (re_compile_pattern): add start_paren to avoid too much finalization on maybe_finalize_jump. +Fri Jun 25 13:07:20 1999 Koji Oda + + * missing/isinf.c: include "config.h" added. + Fri Jun 25 07:25:05 1999 Katsuyuki Komatsu * lib/mkmf.rb: initialize $(topdir). diff --git a/MANIFEST b/MANIFEST index e9a2bfca0f..1b563921b2 100644 --- a/MANIFEST +++ b/MANIFEST @@ -89,6 +89,21 @@ ext/extmk.rb.nt lib/CGI.rb lib/English.rb lib/Env.rb +lib/Mail/README +lib/Mail/README.jp +lib/Mail/doc.jp/changes.html +lib/Mail/doc.jp/index.html +lib/Mail/doc.jp/pop.html +lib/Mail/doc.jp/session.html +lib/Mail/doc.jp/smtp.html +lib/Mail/doc/changes.html +lib/Mail/doc/index.html +lib/Mail/doc/pop.html +lib/Mail/doc/session.html +lib/Mail/doc/smtp.html +lib/Mail/pop.rb +lib/Mail/session.rb +lib/Mail/smtp.rb lib/README lib/base64.rb lib/cgi-lib.rb diff --git a/ToDo b/ToDo index d792e1dc5e..fe3c498353 100644 --- a/ToDo +++ b/ToDo @@ -1,11 +1,13 @@ Language Spec. +* %w(a\ b\ c abc) => ["a b c", "abc"] * package or access control for global variables -* named arguments like foo(nation:="german" or nation: "german"). +* named arguments like foo(nation:="german") or foo(nation: "german"). * method to retrieve argument information (need new C API) -* multiple return values, yield values. maybe imcompatible -* cascading method invocation. -* def Class#method .. end +* multiple return values, yield values. maybe incompatible +* cascading method invocation ??? +* def Class#method .. end ?? +* class Foo::Bar bytecode ??? * scrambled script, or script filter +* setuid ruby Standard Libraries -* IO/File to call initialize * String#scanf(?) * Object#fmt(?) * Integer[num], Float[num] (String[str]?, Array[obj]??) -* Stream or Port, abstract superclass of IO. +* method to detect non-number trailer for to_i/to_f. +* Stream or Port, abstract superclass of IO ? +* String#{pred,prev}, String#downto +* optional stepsize argument for succ() Extension Libraries @@ -31,6 +36,7 @@ Extension Libraries Ruby Libraries +* maillib {pop3,smtp} * httplib.rb, urllib.rb, nttplib.rb, etc. * format like perl's diff --git a/bignum.c b/bignum.c index 82b0244681..36a46af3fd 100644 --- a/bignum.c +++ b/bignum.c @@ -404,7 +404,7 @@ rb_dbl2big(d) double u = (d < 0)?-d:d; if (isinf(d)) { - rb_raise(rb_eFloatDomainError, d < 0 ? "-Inifinity" : "Inifinity"); + rb_raise(rb_eFloatDomainError, d < 0 ? "-Infinity" : "Infinity"); } if (isnan(d)) { rb_raise(rb_eFloatDomainError, "NaN"); @@ -725,6 +725,7 @@ bigdivmod(x, y, div, mod, modulo) zds[i] = (USHORT)(t2 / dd); t2 %= dd; } + RBIGNUM(z)->sign = RBIGNUM(x)->sign==RBIGNUM(y)->sign; if (div) *div = bignorm(z); if (mod) { if (!RBIGNUM(y)->sign) t2 = -(long)t2; diff --git a/configure b/configure index bca443db68..1ed255a507 100644 --- a/configure +++ b/configure @@ -16,13 +16,15 @@ ac_help="$ac_help ac_help="$ac_help --enable-fat-binary build a NeXT/Apple Multi Architecture Binary. " ac_help="$ac_help ---with-default-kcode=CODE speficy default value for \$KCODE (utf8|euc|sjis|none)" +--with-default-kcode=CODE specify default value for \$KCODE (utf8|euc|sjis|none)" ac_help="$ac_help --with-dln-a-out use dln_a_out if possible" ac_help="$ac_help --with-static-linked-ext link external modules statically" ac_help="$ac_help --enable-shared build a shared library for Ruby. " +ac_help="$ac_help +--with-search-path specify the additional search path" # Initialize some variables set by options. # The variables have the same names as the options, with @@ -589,7 +591,7 @@ else { echo "configure: error: can not run $ac_config_sub" 1>&2; exit 1; } fi echo $ac_n "checking host system type""... $ac_c" 1>&6 -echo "configure:593: checking host system type" >&5 +echo "configure:595: checking host system type" >&5 host_alias=$host case "$host_alias" in @@ -620,24 +622,16 @@ fi if test "$fat_binary" = yes ; then echo $ac_n "checking target architecture""... $ac_c" 1>&6 -echo "configure:624: checking target architecture" >&5 +echo "configure:626: checking target architecture" >&5 case "$host_os" in rhapsody*) echo -n "MacOS X Server: " - if test "$TARGET_ARCHS" = "" ; then - TARGET_ARCHS="ppc i386" - fi + if test "$TARGET_ARCHS" = "" ; then + TARGET_ARCHS="ppc i386" + fi ;; nextstep*|openstep*) - echo -n "NeXTSTEP/OPENSTEP: " - - if test "$host_os" = "rhapsody" ; then - echo -n "Rhapsody: " - if test "$TARGET_ARCHS" = "" ; then - TARGET_ARCHS="ppc i486" - fi - else echo -n "NeXTSTEP/OPENSTEP: " if test "$TARGET_ARCHS" = "" ; then if test `/usr/bin/arch` = "m68k" ; then @@ -646,7 +640,6 @@ echo "configure:624: checking target architecture" >&5 TARGET_ARCHS="m68k `/usr/bin/arch`" fi fi - fi ;; esac # /usr/lib/arch_tool -archify_list $TARGET_ARCHS @@ -685,7 +678,7 @@ test "$program_transform_name" = "" && program_transform_name="s,x,x," # Extract the first word of "gcc", so it can be a program name with args. set dummy gcc; ac_word=$2 echo $ac_n "checking for $ac_word""... $ac_c" 1>&6 -echo "configure:689: checking for $ac_word" >&5 +echo "configure:682: checking for $ac_word" >&5 if eval "test \"`echo '$''{'ac_cv_prog_CC'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 else @@ -715,7 +708,7 @@ if test -z "$CC"; then # Extract the first word of "cc", so it can be a program name with args. set dummy cc; ac_word=$2 echo $ac_n "checking for $ac_word""... $ac_c" 1>&6 -echo "configure:719: checking for $ac_word" >&5 +echo "configure:712: checking for $ac_word" >&5 if eval "test \"`echo '$''{'ac_cv_prog_CC'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 else @@ -766,7 +759,7 @@ fi # Extract the first word of "cl", so it can be a program name with args. set dummy cl; ac_word=$2 echo $ac_n "checking for $ac_word""... $ac_c" 1>&6 -echo "configure:770: checking for $ac_word" >&5 +echo "configure:763: checking for $ac_word" >&5 if eval "test \"`echo '$''{'ac_cv_prog_CC'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 else @@ -798,7 +791,7 @@ fi fi echo $ac_n "checking whether the C compiler ($CC $CFLAGS $LDFLAGS) works""... $ac_c" 1>&6 -echo "configure:802: checking whether the C compiler ($CC $CFLAGS $LDFLAGS) works" >&5 +echo "configure:795: checking whether the C compiler ($CC $CFLAGS $LDFLAGS) works" >&5 ac_ext=c # CFLAGS is not in ac_cpp because -g, -O, etc. are not valid cpp options. @@ -809,12 +802,12 @@ cross_compiling=$ac_cv_prog_cc_cross cat > conftest.$ac_ext << EOF -#line 813 "configure" +#line 806 "configure" #include "confdefs.h" main(){return(0);} EOF -if { (eval echo configure:818: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then +if { (eval echo configure:811: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then ac_cv_prog_cc_works=yes # If we can't run a trivial program, we are probably using a cross compiler. if (./conftest; exit) 2>/dev/null; then @@ -840,12 +833,12 @@ if test $ac_cv_prog_cc_works = no; then { echo "configure: error: installation or configuration problem: C compiler cannot create executables." 1>&2; exit 1; } fi echo $ac_n "checking whether the C compiler ($CC $CFLAGS $LDFLAGS) is a cross-compiler""... $ac_c" 1>&6 -echo "configure:844: checking whether the C compiler ($CC $CFLAGS $LDFLAGS) is a cross-compiler" >&5 +echo "configure:837: checking whether the C compiler ($CC $CFLAGS $LDFLAGS) is a cross-compiler" >&5 echo "$ac_t""$ac_cv_prog_cc_cross" 1>&6 cross_compiling=$ac_cv_prog_cc_cross echo $ac_n "checking whether we are using GNU C""... $ac_c" 1>&6 -echo "configure:849: checking whether we are using GNU C" >&5 +echo "configure:842: checking whether we are using GNU C" >&5 if eval "test \"`echo '$''{'ac_cv_prog_gcc'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 else @@ -854,7 +847,7 @@ else yes; #endif EOF -if { ac_try='${CC-cc} -E conftest.c'; { (eval echo configure:858: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }; } | egrep yes >/dev/null 2>&1; then +if { ac_try='${CC-cc} -E conftest.c'; { (eval echo configure:851: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }; } | egrep yes >/dev/null 2>&1; then ac_cv_prog_gcc=yes else ac_cv_prog_gcc=no @@ -873,7 +866,7 @@ ac_test_CFLAGS="${CFLAGS+set}" ac_save_CFLAGS="$CFLAGS" CFLAGS= echo $ac_n "checking whether ${CC-cc} accepts -g""... $ac_c" 1>&6 -echo "configure:877: checking whether ${CC-cc} accepts -g" >&5 +echo "configure:870: checking whether ${CC-cc} accepts -g" >&5 if eval "test \"`echo '$''{'ac_cv_prog_cc_g'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 else @@ -905,7 +898,7 @@ else fi echo $ac_n "checking how to run the C preprocessor""... $ac_c" 1>&6 -echo "configure:909: checking how to run the C preprocessor" >&5 +echo "configure:902: checking how to run the C preprocessor" >&5 # On Suns, sometimes $CPP names a directory. if test -n "$CPP" && test -d "$CPP"; then CPP= @@ -920,13 +913,13 @@ else # On the NeXT, cc -E runs the code through the compiler's parser, # not just through cpp. cat > conftest.$ac_ext < Syntax Error EOF ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out" -{ (eval echo configure:930: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; } +{ (eval echo configure:923: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; } ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"` if test -z "$ac_err"; then : @@ -937,13 +930,13 @@ else rm -rf conftest* CPP="${CC-cc} -E -traditional-cpp" cat > conftest.$ac_ext < Syntax Error EOF ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out" -{ (eval echo configure:947: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; } +{ (eval echo configure:940: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; } ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"` if test -z "$ac_err"; then : @@ -954,13 +947,13 @@ else rm -rf conftest* CPP="${CC-cc} -nologo -E" cat > conftest.$ac_ext < Syntax Error EOF ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out" -{ (eval echo configure:964: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; } +{ (eval echo configure:957: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; } ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"` if test -z "$ac_err"; then : @@ -986,13 +979,13 @@ echo "$ac_t""$CPP" 1>&6 if test $ac_cv_prog_gcc = yes; then echo $ac_n "checking whether ${CC-cc} needs -traditional""... $ac_c" 1>&6 -echo "configure:990: checking whether ${CC-cc} needs -traditional" >&5 +echo "configure:983: checking whether ${CC-cc} needs -traditional" >&5 if eval "test \"`echo '$''{'ac_cv_prog_gcc_traditional'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 else ac_pattern="Autoconf.*'x'" cat > conftest.$ac_ext < Autoconf TIOCGETP @@ -1010,7 +1003,7 @@ rm -f conftest* if test $ac_cv_prog_gcc_traditional = no; then cat > conftest.$ac_ext < Autoconf TCGETA @@ -1036,7 +1029,7 @@ do # Extract the first word of "$ac_prog", so it can be a program name with args. set dummy $ac_prog; ac_word=$2 echo $ac_n "checking for $ac_word""... $ac_c" 1>&6 -echo "configure:1040: checking for $ac_word" >&5 +echo "configure:1033: checking for $ac_word" >&5 if eval "test \"`echo '$''{'ac_cv_prog_YACC'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 else @@ -1069,7 +1062,7 @@ test -n "$YACC" || YACC="yacc" # Extract the first word of "ranlib", so it can be a program name with args. set dummy ranlib; ac_word=$2 echo $ac_n "checking for $ac_word""... $ac_c" 1>&6 -echo "configure:1073: checking for $ac_word" >&5 +echo "configure:1066: checking for $ac_word" >&5 if eval "test \"`echo '$''{'ac_cv_prog_RANLIB'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 else @@ -1102,7 +1095,7 @@ do # Extract the first word of "$ac_prog", so it can be a program name with args. set dummy $ac_prog; ac_word=$2 echo $ac_n "checking for $ac_word""... $ac_c" 1>&6 -echo "configure:1106: checking for $ac_word" >&5 +echo "configure:1099: checking for $ac_word" >&5 if eval "test \"`echo '$''{'ac_cv_prog_AR'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 else @@ -1144,7 +1137,7 @@ test -n "$AR" || AR="ar" # SVR4 /usr/ucb/install, which tries to use the nonexistent group "staff" # ./install, which can be erroneously created by make from ./install.sh. echo $ac_n "checking for a BSD compatible install""... $ac_c" 1>&6 -echo "configure:1148: checking for a BSD compatible install" >&5 +echo "configure:1141: checking for a BSD compatible install" >&5 if test -z "$INSTALL"; then if eval "test \"`echo '$''{'ac_cv_path_install'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 @@ -1200,7 +1193,7 @@ test -z "$INSTALL_DLLIB" && INSTALL_DLLIB='${INSTALL} -m 555' echo $ac_n "checking whether ln -s works""... $ac_c" 1>&6 -echo "configure:1204: checking whether ln -s works" >&5 +echo "configure:1197: checking whether ln -s works" >&5 if eval "test \"`echo '$''{'ac_cv_prog_LN_S'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 else @@ -1221,7 +1214,7 @@ else fi echo $ac_n "checking whether ${MAKE-make} sets \${MAKE}""... $ac_c" 1>&6 -echo "configure:1225: checking whether ${MAKE-make} sets \${MAKE}" >&5 +echo "configure:1218: checking whether ${MAKE-make} sets \${MAKE}" >&5 set dummy ${MAKE-make}; ac_make=`echo "$2" | sed 'y%./+-%__p_%'` if eval "test \"`echo '$''{'ac_cv_prog_make_${ac_make}_set'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 @@ -1251,17 +1244,17 @@ fi # checks for UNIX variants that set C preprocessor variables ac_safe=`echo "minix/config.h" | sed 'y%./+-%__p_%'` echo $ac_n "checking for minix/config.h""... $ac_c" 1>&6 -echo "configure:1255: checking for minix/config.h" >&5 +echo "configure:1248: checking for minix/config.h" >&5 if eval "test \"`echo '$''{'ac_cv_header_$ac_safe'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 else cat > conftest.$ac_ext < EOF ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out" -{ (eval echo configure:1265: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; } +{ (eval echo configure:1258: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; } ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"` if test -z "$ac_err"; then rm -rf conftest* @@ -1300,7 +1293,7 @@ fi echo $ac_n "checking size of int""... $ac_c" 1>&6 -echo "configure:1304: checking size of int" >&5 +echo "configure:1297: checking size of int" >&5 if eval "test \"`echo '$''{'ac_cv_sizeof_int'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 else @@ -1308,7 +1301,7 @@ else { echo "configure: error: can not run test program while cross compiling" 1>&2; exit 1; } else cat > conftest.$ac_ext < main() @@ -1319,7 +1312,7 @@ main() exit(0); } EOF -if { (eval echo configure:1323: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null +if { (eval echo configure:1316: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null then ac_cv_sizeof_int=`cat conftestval` else @@ -1339,7 +1332,7 @@ EOF echo $ac_n "checking size of short""... $ac_c" 1>&6 -echo "configure:1343: checking size of short" >&5 +echo "configure:1336: checking size of short" >&5 if eval "test \"`echo '$''{'ac_cv_sizeof_short'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 else @@ -1347,7 +1340,7 @@ else { echo "configure: error: can not run test program while cross compiling" 1>&2; exit 1; } else cat > conftest.$ac_ext < main() @@ -1358,7 +1351,7 @@ main() exit(0); } EOF -if { (eval echo configure:1362: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null +if { (eval echo configure:1355: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null then ac_cv_sizeof_short=`cat conftestval` else @@ -1378,7 +1371,7 @@ EOF echo $ac_n "checking size of long""... $ac_c" 1>&6 -echo "configure:1382: checking size of long" >&5 +echo "configure:1375: checking size of long" >&5 if eval "test \"`echo '$''{'ac_cv_sizeof_long'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 else @@ -1386,7 +1379,7 @@ else { echo "configure: error: can not run test program while cross compiling" 1>&2; exit 1; } else cat > conftest.$ac_ext < main() @@ -1397,7 +1390,7 @@ main() exit(0); } EOF -if { (eval echo configure:1401: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null +if { (eval echo configure:1394: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null then ac_cv_sizeof_long=`cat conftestval` else @@ -1417,7 +1410,7 @@ EOF echo $ac_n "checking size of void*""... $ac_c" 1>&6 -echo "configure:1421: checking size of void*" >&5 +echo "configure:1414: checking size of void*" >&5 if eval "test \"`echo '$''{'ac_cv_sizeof_voidp'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 else @@ -1425,7 +1418,7 @@ else { echo "configure: error: can not run test program while cross compiling" 1>&2; exit 1; } else cat > conftest.$ac_ext < main() @@ -1436,7 +1429,7 @@ main() exit(0); } EOF -if { (eval echo configure:1440: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null +if { (eval echo configure:1433: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null then ac_cv_sizeof_voidp=`cat conftestval` else @@ -1456,7 +1449,7 @@ EOF echo $ac_n "checking size of float""... $ac_c" 1>&6 -echo "configure:1460: checking size of float" >&5 +echo "configure:1453: checking size of float" >&5 if eval "test \"`echo '$''{'ac_cv_sizeof_float'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 else @@ -1464,7 +1457,7 @@ else { echo "configure: error: can not run test program while cross compiling" 1>&2; exit 1; } else cat > conftest.$ac_ext < main() @@ -1475,7 +1468,7 @@ main() exit(0); } EOF -if { (eval echo configure:1479: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null +if { (eval echo configure:1472: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null then ac_cv_sizeof_float=`cat conftestval` else @@ -1495,7 +1488,7 @@ EOF echo $ac_n "checking size of double""... $ac_c" 1>&6 -echo "configure:1499: checking size of double" >&5 +echo "configure:1492: checking size of double" >&5 if eval "test \"`echo '$''{'ac_cv_sizeof_double'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 else @@ -1503,7 +1496,7 @@ else { echo "configure: error: can not run test program while cross compiling" 1>&2; exit 1; } else cat > conftest.$ac_ext < main() @@ -1514,7 +1507,7 @@ main() exit(0); } EOF -if { (eval echo configure:1518: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null +if { (eval echo configure:1511: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null then ac_cv_sizeof_double=`cat conftestval` else @@ -1535,19 +1528,19 @@ EOF echo $ac_n "checking for prototypes""... $ac_c" 1>&6 -echo "configure:1539: checking for prototypes" >&5 +echo "configure:1532: checking for prototypes" >&5 if eval "test \"`echo '$''{'rb_cv_have_prototypes'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 else cat > conftest.$ac_ext <&5; (eval $ac_compile) 2>&5; }; then +if { (eval echo configure:1544: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then rm -rf conftest* rb_cv_have_prototypes=yes else @@ -1568,19 +1561,19 @@ EOF fi echo $ac_n "checking token paste string""... $ac_c" 1>&6 -echo "configure:1572: checking token paste string" >&5 +echo "configure:1565: checking token paste string" >&5 if eval "test \"`echo '$''{'rb_cv_tokenpaste'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 else cat > conftest.$ac_ext <&5; (eval $ac_compile) 2>&5; }; then +if { (eval echo configure:1577: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then rm -rf conftest* rb_cv_tokenpaste=ansi else @@ -1606,12 +1599,12 @@ EOF fi echo $ac_n "checking for variable length prototypes and stdarg.h""... $ac_c" 1>&6 -echo "configure:1610: checking for variable length prototypes and stdarg.h" >&5 +echo "configure:1603: checking for variable length prototypes and stdarg.h" >&5 if eval "test \"`echo '$''{'rb_cv_stdarg'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 else cat > conftest.$ac_ext < @@ -1628,7 +1621,7 @@ int main() { return foo(10, "", 3.14); ; return 0; } EOF -if { (eval echo configure:1632: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then +if { (eval echo configure:1625: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then rm -rf conftest* rb_cv_stdarg=yes else @@ -1649,19 +1642,19 @@ EOF fi echo $ac_n "checking for gcc attribute noreturn""... $ac_c" 1>&6 -echo "configure:1653: checking for gcc attribute noreturn" >&5 +echo "configure:1646: checking for gcc attribute noreturn" >&5 if eval "test \"`echo '$''{'rb_cv_have_attr_noreturn'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 else cat > conftest.$ac_ext <&5; (eval $ac_compile) 2>&5; }; then +if { (eval echo configure:1658: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then rm -rf conftest* rb_cv_have_attr_noreturn=yes else @@ -1691,7 +1684,7 @@ cygwin*) ;; *) LIBS="-lm $LIBS";; esac echo $ac_n "checking for crypt in -lcrypt""... $ac_c" 1>&6 -echo "configure:1695: checking for crypt in -lcrypt" >&5 +echo "configure:1688: checking for crypt in -lcrypt" >&5 ac_lib_var=`echo crypt'_'crypt | sed 'y%./+-%__p_%'` if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 @@ -1699,7 +1692,7 @@ else ac_save_LIBS="$LIBS" LIBS="-lcrypt $LIBS" cat > conftest.$ac_ext <&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then +if { (eval echo configure:1707: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then rm -rf conftest* eval "ac_cv_lib_$ac_lib_var=yes" else @@ -1738,7 +1731,7 @@ else fi echo $ac_n "checking for dlopen in -ldl""... $ac_c" 1>&6 -echo "configure:1742: checking for dlopen in -ldl" >&5 +echo "configure:1735: checking for dlopen in -ldl" >&5 ac_lib_var=`echo dl'_'dlopen | sed 'y%./+-%__p_%'` if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 @@ -1746,7 +1739,7 @@ else ac_save_LIBS="$LIBS" LIBS="-ldl $LIBS" cat > conftest.$ac_ext <&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then +if { (eval echo configure:1754: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then rm -rf conftest* eval "ac_cv_lib_$ac_lib_var=yes" else @@ -1785,7 +1778,7 @@ else fi # Dynamic linking for SunOS/Solaris and SYSV echo $ac_n "checking for shl_load in -ldld""... $ac_c" 1>&6 -echo "configure:1789: checking for shl_load in -ldld" >&5 +echo "configure:1782: checking for shl_load in -ldld" >&5 ac_lib_var=`echo dld'_'shl_load | sed 'y%./+-%__p_%'` if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 @@ -1793,7 +1786,7 @@ else ac_save_LIBS="$LIBS" LIBS="-ldld $LIBS" cat > conftest.$ac_ext <&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then +if { (eval echo configure:1801: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then rm -rf conftest* eval "ac_cv_lib_$ac_lib_var=yes" else @@ -1832,7 +1825,7 @@ else fi # Dynamic linking for HP-UX echo $ac_n "checking for setlocale in -lxpg4""... $ac_c" 1>&6 -echo "configure:1836: checking for setlocale in -lxpg4" >&5 +echo "configure:1829: checking for setlocale in -lxpg4" >&5 ac_lib_var=`echo xpg4'_'setlocale | sed 'y%./+-%__p_%'` if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 @@ -1840,7 +1833,7 @@ else ac_save_LIBS="$LIBS" LIBS="-lxpg4 $LIBS" cat > conftest.$ac_ext <&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then +if { (eval echo configure:1848: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then rm -rf conftest* eval "ac_cv_lib_$ac_lib_var=yes" else @@ -1884,12 +1877,12 @@ for ac_hdr in dirent.h sys/ndir.h sys/dir.h ndir.h do ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'` echo $ac_n "checking for $ac_hdr that defines DIR""... $ac_c" 1>&6 -echo "configure:1888: checking for $ac_hdr that defines DIR" >&5 +echo "configure:1881: checking for $ac_hdr that defines DIR" >&5 if eval "test \"`echo '$''{'ac_cv_header_dirent_$ac_safe'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 else cat > conftest.$ac_ext < #include <$ac_hdr> @@ -1897,7 +1890,7 @@ int main() { DIR *dirp = 0; ; return 0; } EOF -if { (eval echo configure:1901: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then +if { (eval echo configure:1894: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then rm -rf conftest* eval "ac_cv_header_dirent_$ac_safe=yes" else @@ -1922,7 +1915,7 @@ done # Two versions of opendir et al. are in -ldir and -lx on SCO Xenix. if test $ac_header_dirent = dirent.h; then echo $ac_n "checking for opendir in -ldir""... $ac_c" 1>&6 -echo "configure:1926: checking for opendir in -ldir" >&5 +echo "configure:1919: checking for opendir in -ldir" >&5 ac_lib_var=`echo dir'_'opendir | sed 'y%./+-%__p_%'` if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 @@ -1930,7 +1923,7 @@ else ac_save_LIBS="$LIBS" LIBS="-ldir $LIBS" cat > conftest.$ac_ext <&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then +if { (eval echo configure:1938: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then rm -rf conftest* eval "ac_cv_lib_$ac_lib_var=yes" else @@ -1963,7 +1956,7 @@ fi else echo $ac_n "checking for opendir in -lx""... $ac_c" 1>&6 -echo "configure:1967: checking for opendir in -lx" >&5 +echo "configure:1960: checking for opendir in -lx" >&5 ac_lib_var=`echo x'_'opendir | sed 'y%./+-%__p_%'` if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 @@ -1971,7 +1964,7 @@ else ac_save_LIBS="$LIBS" LIBS="-lx $LIBS" cat > conftest.$ac_ext <&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then +if { (eval echo configure:1979: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then rm -rf conftest* eval "ac_cv_lib_$ac_lib_var=yes" else @@ -2005,12 +1998,12 @@ fi fi echo $ac_n "checking for ANSI C header files""... $ac_c" 1>&6 -echo "configure:2009: checking for ANSI C header files" >&5 +echo "configure:2002: checking for ANSI C header files" >&5 if eval "test \"`echo '$''{'ac_cv_header_stdc'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 else cat > conftest.$ac_ext < #include @@ -2018,7 +2011,7 @@ else #include EOF ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out" -{ (eval echo configure:2022: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; } +{ (eval echo configure:2015: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; } ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"` if test -z "$ac_err"; then rm -rf conftest* @@ -2035,7 +2028,7 @@ rm -f conftest* if test $ac_cv_header_stdc = yes; then # SunOS 4.x string.h does not declare mem*, contrary to ANSI. cat > conftest.$ac_ext < EOF @@ -2053,7 +2046,7 @@ fi if test $ac_cv_header_stdc = yes; then # ISC 2.0.2 stdlib.h does not declare free, contrary to ANSI. cat > conftest.$ac_ext < EOF @@ -2074,7 +2067,7 @@ if test "$cross_compiling" = yes; then : else cat > conftest.$ac_ext < #define ISLOWER(c) ('a' <= (c) && (c) <= 'z') @@ -2085,7 +2078,7 @@ if (XOR (islower (i), ISLOWER (i)) || toupper (i) != TOUPPER (i)) exit(2); exit (0); } EOF -if { (eval echo configure:2089: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null +if { (eval echo configure:2082: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null then : else @@ -2108,23 +2101,65 @@ EOF fi +echo $ac_n "checking for sys/wait.h that is POSIX.1 compatible""... $ac_c" 1>&6 +echo "configure:2106: checking for sys/wait.h that is POSIX.1 compatible" >&5 +if eval "test \"`echo '$''{'ac_cv_header_sys_wait_h'+set}'`\" = set"; then + echo $ac_n "(cached) $ac_c" 1>&6 +else + cat > conftest.$ac_ext < +#include +#ifndef WEXITSTATUS +#define WEXITSTATUS(stat_val) ((unsigned)(stat_val) >> 8) +#endif +#ifndef WIFEXITED +#define WIFEXITED(stat_val) (((stat_val) & 255) == 0) +#endif +int main() { +int s; +wait (&s); +s = WIFEXITED (s) ? WEXITSTATUS (s) : 1; +; return 0; } +EOF +if { (eval echo configure:2127: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then + rm -rf conftest* + ac_cv_header_sys_wait_h=yes +else + echo "configure: failed program was:" >&5 + cat conftest.$ac_ext >&5 + rm -rf conftest* + ac_cv_header_sys_wait_h=no +fi +rm -f conftest* +fi + +echo "$ac_t""$ac_cv_header_sys_wait_h" 1>&6 +if test $ac_cv_header_sys_wait_h = yes; then + cat >> confdefs.h <<\EOF +#define HAVE_SYS_WAIT_H 1 +EOF + +fi + for ac_hdr in stdlib.h unistd.h limits.h sys/file.h sys/ioctl.h pwd.h \ - sys/select.h sys/time.h sys/times.h sys/param.h sys/wait.h\ - syscall.h a.out.h string.h utime.h memory.h direct.h fnmatch.h + sys/select.h sys/time.h sys/times.h sys/param.h syscall.h\ + a.out.h string.h utime.h memory.h direct.h fnmatch.h do ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'` echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6 -echo "configure:2118: checking for $ac_hdr" >&5 +echo "configure:2153: checking for $ac_hdr" >&5 if eval "test \"`echo '$''{'ac_cv_header_$ac_safe'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 else cat > conftest.$ac_ext < EOF ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out" -{ (eval echo configure:2128: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; } +{ (eval echo configure:2163: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; } ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"` if test -z "$ac_err"; then rm -rf conftest* @@ -2152,12 +2187,12 @@ done echo $ac_n "checking for uid_t in sys/types.h""... $ac_c" 1>&6 -echo "configure:2156: checking for uid_t in sys/types.h" >&5 +echo "configure:2191: checking for uid_t in sys/types.h" >&5 if eval "test \"`echo '$''{'ac_cv_type_uid_t'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 else cat > conftest.$ac_ext < EOF @@ -2186,12 +2221,12 @@ EOF fi echo $ac_n "checking for size_t""... $ac_c" 1>&6 -echo "configure:2190: checking for size_t" >&5 +echo "configure:2225: checking for size_t" >&5 if eval "test \"`echo '$''{'ac_cv_type_size_t'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 else cat > conftest.$ac_ext < #if STDC_HEADERS @@ -2219,12 +2254,12 @@ EOF fi echo $ac_n "checking for st_blksize in struct stat""... $ac_c" 1>&6 -echo "configure:2223: checking for st_blksize in struct stat" >&5 +echo "configure:2258: checking for st_blksize in struct stat" >&5 if eval "test \"`echo '$''{'ac_cv_struct_st_blksize'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 else cat > conftest.$ac_ext < #include @@ -2232,7 +2267,7 @@ int main() { struct stat s; s.st_blksize; ; return 0; } EOF -if { (eval echo configure:2236: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then +if { (eval echo configure:2271: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then rm -rf conftest* ac_cv_struct_st_blksize=yes else @@ -2254,12 +2289,12 @@ fi save_LIBOJBS="$LIBOBJS" echo $ac_n "checking for st_blocks in struct stat""... $ac_c" 1>&6 -echo "configure:2258: checking for st_blocks in struct stat" >&5 +echo "configure:2293: checking for st_blocks in struct stat" >&5 if eval "test \"`echo '$''{'ac_cv_struct_st_blocks'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 else cat > conftest.$ac_ext < #include @@ -2267,7 +2302,7 @@ int main() { struct stat s; s.st_blocks; ; return 0; } EOF -if { (eval echo configure:2271: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then +if { (eval echo configure:2306: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then rm -rf conftest* ac_cv_struct_st_blocks=yes else @@ -2291,12 +2326,12 @@ fi LIBOBJS="$save_LIBOBJS" echo $ac_n "checking for st_rdev in struct stat""... $ac_c" 1>&6 -echo "configure:2295: checking for st_rdev in struct stat" >&5 +echo "configure:2330: checking for st_rdev in struct stat" >&5 if eval "test \"`echo '$''{'ac_cv_struct_st_rdev'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 else cat > conftest.$ac_ext < #include @@ -2304,7 +2339,7 @@ int main() { struct stat s; s.st_rdev; ; return 0; } EOF -if { (eval echo configure:2308: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then +if { (eval echo configure:2343: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then rm -rf conftest* ac_cv_struct_st_rdev=yes else @@ -2326,7 +2361,7 @@ fi echo $ac_n "checking type of array argument to getgroups""... $ac_c" 1>&6 -echo "configure:2330: checking type of array argument to getgroups" >&5 +echo "configure:2365: checking type of array argument to getgroups" >&5 if eval "test \"`echo '$''{'ac_cv_type_getgroups'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 else @@ -2334,7 +2369,7 @@ else ac_cv_type_getgroups=cross else cat > conftest.$ac_ext <&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null +if { (eval echo configure:2398: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null then ac_cv_type_getgroups=gid_t else @@ -2373,7 +2408,7 @@ fi if test $ac_cv_type_getgroups = cross; then cat > conftest.$ac_ext < EOF @@ -2397,12 +2432,12 @@ EOF echo $ac_n "checking return type of signal handlers""... $ac_c" 1>&6 -echo "configure:2401: checking return type of signal handlers" >&5 +echo "configure:2436: checking return type of signal handlers" >&5 if eval "test \"`echo '$''{'ac_cv_type_signal'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 else cat > conftest.$ac_ext < #include @@ -2419,7 +2454,7 @@ int main() { int i; ; return 0; } EOF -if { (eval echo configure:2423: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then +if { (eval echo configure:2458: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then rm -rf conftest* ac_cv_type_signal=void else @@ -2440,19 +2475,19 @@ EOF # The Ultrix 4.2 mips builtin alloca declared by alloca.h only works # for constant arguments. Useless! echo $ac_n "checking for working alloca.h""... $ac_c" 1>&6 -echo "configure:2444: checking for working alloca.h" >&5 +echo "configure:2479: checking for working alloca.h" >&5 if eval "test \"`echo '$''{'ac_cv_header_alloca_h'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 else cat > conftest.$ac_ext < int main() { char *p = alloca(2 * sizeof(int)); ; return 0; } EOF -if { (eval echo configure:2456: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then +if { (eval echo configure:2491: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then rm -rf conftest* ac_cv_header_alloca_h=yes else @@ -2473,12 +2508,12 @@ EOF fi echo $ac_n "checking for alloca""... $ac_c" 1>&6 -echo "configure:2477: checking for alloca" >&5 +echo "configure:2512: checking for alloca" >&5 if eval "test \"`echo '$''{'ac_cv_func_alloca_works'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 else cat > conftest.$ac_ext <&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then +if { (eval echo configure:2545: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then rm -rf conftest* ac_cv_func_alloca_works=yes else @@ -2538,12 +2573,12 @@ EOF echo $ac_n "checking whether alloca needs Cray hooks""... $ac_c" 1>&6 -echo "configure:2542: checking whether alloca needs Cray hooks" >&5 +echo "configure:2577: checking whether alloca needs Cray hooks" >&5 if eval "test \"`echo '$''{'ac_cv_os_cray'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 else cat > conftest.$ac_ext <&6 if test $ac_cv_os_cray = yes; then for ac_func in _getb67 GETB67 getb67; do echo $ac_n "checking for $ac_func""... $ac_c" 1>&6 -echo "configure:2572: checking for $ac_func" >&5 +echo "configure:2607: checking for $ac_func" >&5 if eval "test \"`echo '$''{'ac_cv_func_$ac_func'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 else cat > conftest.$ac_ext <&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then +if { (eval echo configure:2635: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then rm -rf conftest* eval "ac_cv_func_$ac_func=yes" else @@ -2623,7 +2658,7 @@ done fi echo $ac_n "checking stack direction for C alloca""... $ac_c" 1>&6 -echo "configure:2627: checking stack direction for C alloca" >&5 +echo "configure:2662: checking stack direction for C alloca" >&5 if eval "test \"`echo '$''{'ac_cv_c_stack_direction'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 else @@ -2631,7 +2666,7 @@ else ac_cv_c_stack_direction=0 else cat > conftest.$ac_ext <&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null +if { (eval echo configure:2689: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null then ac_cv_c_stack_direction=1 else @@ -2672,12 +2707,12 @@ EOF fi echo $ac_n "checking for pid_t""... $ac_c" 1>&6 -echo "configure:2676: checking for pid_t" >&5 +echo "configure:2711: checking for pid_t" >&5 if eval "test \"`echo '$''{'ac_cv_type_pid_t'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 else cat > conftest.$ac_ext < #if STDC_HEADERS @@ -2706,17 +2741,17 @@ fi ac_safe=`echo "vfork.h" | sed 'y%./+-%__p_%'` echo $ac_n "checking for vfork.h""... $ac_c" 1>&6 -echo "configure:2710: checking for vfork.h" >&5 +echo "configure:2745: checking for vfork.h" >&5 if eval "test \"`echo '$''{'ac_cv_header_$ac_safe'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 else cat > conftest.$ac_ext < EOF ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out" -{ (eval echo configure:2720: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; } +{ (eval echo configure:2755: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; } ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"` if test -z "$ac_err"; then rm -rf conftest* @@ -2741,18 +2776,18 @@ else fi echo $ac_n "checking for working vfork""... $ac_c" 1>&6 -echo "configure:2745: checking for working vfork" >&5 +echo "configure:2780: checking for working vfork" >&5 if eval "test \"`echo '$''{'ac_cv_func_vfork_works'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 else if test "$cross_compiling" = yes; then echo $ac_n "checking for vfork""... $ac_c" 1>&6 -echo "configure:2751: checking for vfork" >&5 +echo "configure:2786: checking for vfork" >&5 if eval "test \"`echo '$''{'ac_cv_func_vfork'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 else cat > conftest.$ac_ext <&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then +if { (eval echo configure:2814: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then rm -rf conftest* eval "ac_cv_func_vfork=yes" else @@ -2797,7 +2832,7 @@ fi ac_cv_func_vfork_works=$ac_cv_func_vfork else cat > conftest.$ac_ext < @@ -2892,7 +2927,7 @@ main() { } } EOF -if { (eval echo configure:2896: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null +if { (eval echo configure:2931: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null then ac_cv_func_vfork_works=yes else @@ -2915,7 +2950,7 @@ EOF fi echo $ac_n "checking for 8-bit clean memcmp""... $ac_c" 1>&6 -echo "configure:2919: checking for 8-bit clean memcmp" >&5 +echo "configure:2954: checking for 8-bit clean memcmp" >&5 if eval "test \"`echo '$''{'ac_cv_func_memcmp_clean'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 else @@ -2923,7 +2958,7 @@ else ac_cv_func_memcmp_clean=no else cat > conftest.$ac_ext <&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null +if { (eval echo configure:2972: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null then ac_cv_func_memcmp_clean=yes else @@ -2955,12 +2990,12 @@ for ac_func in dup2 memmove mkdir strcasecmp strncasecmp strerror strftime\ fnmatch isinf isnan finite do echo $ac_n "checking for $ac_func""... $ac_c" 1>&6 -echo "configure:2959: checking for $ac_func" >&5 +echo "configure:2994: checking for $ac_func" >&5 if eval "test \"`echo '$''{'ac_cv_func_$ac_func'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 else cat > conftest.$ac_ext <&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then +if { (eval echo configure:3022: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then rm -rf conftest* eval "ac_cv_func_$ac_func=yes" else @@ -3016,12 +3051,12 @@ for ac_func in fmod killpg drand48 random wait4 waitpid syscall getcwd\ dlopen sigprocmask sigaction _setjmp setsid do echo $ac_n "checking for $ac_func""... $ac_c" 1>&6 -echo "configure:3020: checking for $ac_func" >&5 +echo "configure:3055: checking for $ac_func" >&5 if eval "test \"`echo '$''{'ac_cv_func_$ac_func'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 else cat > conftest.$ac_ext <&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then +if { (eval echo configure:3083: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then rm -rf conftest* eval "ac_cv_func_$ac_func=yes" else @@ -3069,12 +3104,12 @@ fi done echo $ac_n "checking whether struct tm is in sys/time.h or time.h""... $ac_c" 1>&6 -echo "configure:3073: checking whether struct tm is in sys/time.h or time.h" >&5 +echo "configure:3108: checking whether struct tm is in sys/time.h or time.h" >&5 if eval "test \"`echo '$''{'ac_cv_struct_tm'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 else cat > conftest.$ac_ext < #include @@ -3082,7 +3117,7 @@ int main() { struct tm *tp; tp->tm_sec; ; return 0; } EOF -if { (eval echo configure:3086: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then +if { (eval echo configure:3121: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then rm -rf conftest* ac_cv_struct_tm=time.h else @@ -3103,12 +3138,12 @@ EOF fi echo $ac_n "checking for tm_zone in struct tm""... $ac_c" 1>&6 -echo "configure:3107: checking for tm_zone in struct tm" >&5 +echo "configure:3142: checking for tm_zone in struct tm" >&5 if eval "test \"`echo '$''{'ac_cv_struct_tm_zone'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 else cat > conftest.$ac_ext < #include <$ac_cv_struct_tm> @@ -3116,7 +3151,7 @@ int main() { struct tm tm; tm.tm_zone; ; return 0; } EOF -if { (eval echo configure:3120: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then +if { (eval echo configure:3155: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then rm -rf conftest* ac_cv_struct_tm_zone=yes else @@ -3136,12 +3171,12 @@ EOF else echo $ac_n "checking for tzname""... $ac_c" 1>&6 -echo "configure:3140: checking for tzname" >&5 +echo "configure:3175: checking for tzname" >&5 if eval "test \"`echo '$''{'ac_cv_var_tzname'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 else cat > conftest.$ac_ext < #ifndef tzname /* For SGI. */ @@ -3151,7 +3186,7 @@ int main() { atoi(*tzname); ; return 0; } EOF -if { (eval echo configure:3155: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then +if { (eval echo configure:3190: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then rm -rf conftest* ac_cv_var_tzname=yes else @@ -3174,14 +3209,14 @@ fi if test "$ac_cv_func_strftime" = no; then cat > conftest.$ac_ext <&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then +if { (eval echo configure:3220: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then rm -rf conftest* cat >> confdefs.h <<\EOF #define HAVE_DAYLIGHT 1 @@ -3201,7 +3236,7 @@ EOF else echo $ac_n "checking for BSD signal semantics""... $ac_c" 1>&6 -echo "configure:3205: checking for BSD signal semantics" >&5 +echo "configure:3240: checking for BSD signal semantics" >&5 if eval "test \"`echo '$''{'rb_cv_bsd_signal'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 else @@ -3209,7 +3244,7 @@ else rb_cv_bsd_signal=no else cat > conftest.$ac_ext < @@ -3231,7 +3266,7 @@ main() } EOF -if { (eval echo configure:3235: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null +if { (eval echo configure:3270: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null then rb_cv_bsd_signal=yes else @@ -3255,7 +3290,7 @@ EOF fi echo $ac_n "checking whether getpgrp takes no argument""... $ac_c" 1>&6 -echo "configure:3259: checking whether getpgrp takes no argument" >&5 +echo "configure:3294: checking whether getpgrp takes no argument" >&5 if eval "test \"`echo '$''{'ac_cv_func_getpgrp_void'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 else @@ -3263,7 +3298,7 @@ else { echo "configure: error: cannot check getpgrp if cross compiling" 1>&2; exit 1; } else cat > conftest.$ac_ext <&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null +if { (eval echo configure:3357: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null then ac_cv_func_getpgrp_void=yes else @@ -3342,7 +3377,7 @@ EOF fi echo $ac_n "checking whether setpgrp takes no argument""... $ac_c" 1>&6 -echo "configure:3346: checking whether setpgrp takes no argument" >&5 +echo "configure:3381: checking whether setpgrp takes no argument" >&5 if eval "test \"`echo '$''{'ac_cv_func_setpgrp_void'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 else @@ -3350,7 +3385,7 @@ else { echo "configure: error: cannot check setpgrp if cross compiling" 1>&2; exit 1; } else cat > conftest.$ac_ext <&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null +if { (eval echo configure:3409: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null then ac_cv_func_setpgrp_void=no else @@ -3395,7 +3430,7 @@ fi echo $ac_n "checking for working strtod""... $ac_c" 1>&6 -echo "configure:3399: checking for working strtod" >&5 +echo "configure:3434: checking for working strtod" >&5 if eval "test \"`echo '$''{'rb_cv_func_strtod'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 else @@ -3403,7 +3438,7 @@ else rb_cv_func_strtod=no else cat > conftest.$ac_ext <&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null +if { (eval echo configure:3472: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null then rb_cv_func_strtod=yes else @@ -3451,14 +3486,14 @@ echo "$ac_t""$rb_cv_func_strtod" 1>&6 test $rb_cv_func_strtod = no && LIBOBJS="$LIBOBJS strtod.o" echo $ac_n "checking whether byte ordering is bigendian""... $ac_c" 1>&6 -echo "configure:3455: checking whether byte ordering is bigendian" >&5 +echo "configure:3490: checking whether byte ordering is bigendian" >&5 if eval "test \"`echo '$''{'ac_cv_c_bigendian'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 else ac_cv_c_bigendian=unknown # See if sys/param.h defines the BYTE_ORDER macro. cat > conftest.$ac_ext < #include @@ -3469,11 +3504,11 @@ int main() { #endif ; return 0; } EOF -if { (eval echo configure:3473: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then +if { (eval echo configure:3508: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then rm -rf conftest* # It does; now see whether it defined to BIG_ENDIAN or not. cat > conftest.$ac_ext < #include @@ -3484,7 +3519,7 @@ int main() { #endif ; return 0; } EOF -if { (eval echo configure:3488: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then +if { (eval echo configure:3523: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then rm -rf conftest* ac_cv_c_bigendian=yes else @@ -3504,7 +3539,7 @@ if test "$cross_compiling" = yes; then { echo "configure: error: can not run test program while cross compiling" 1>&2; exit 1; } else cat > conftest.$ac_ext <&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null +if { (eval echo configure:3556: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null then ac_cv_c_bigendian=no else @@ -3541,12 +3576,12 @@ EOF fi echo $ac_n "checking for working const""... $ac_c" 1>&6 -echo "configure:3545: checking for working const" >&5 +echo "configure:3580: checking for working const" >&5 if eval "test \"`echo '$''{'ac_cv_c_const'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 else cat > conftest.$ac_ext <&5; (eval $ac_compile) 2>&5; }; then +if { (eval echo configure:3634: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then rm -rf conftest* ac_cv_c_const=yes else @@ -3616,14 +3651,14 @@ EOF fi echo $ac_n "checking whether char is unsigned""... $ac_c" 1>&6 -echo "configure:3620: checking whether char is unsigned" >&5 +echo "configure:3655: checking whether char is unsigned" >&5 if eval "test \"`echo '$''{'ac_cv_c_char_unsigned'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 else if test "$GCC" = yes; then # GCC predefines this symbol on systems where it applies. cat > conftest.$ac_ext <&2; exit 1; } else cat > conftest.$ac_ext <&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null +if { (eval echo configure:3694: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null then ac_cv_c_char_unsigned=yes else @@ -3680,7 +3715,7 @@ fi echo $ac_n "checking whether right shift preserve sign bit""... $ac_c" 1>&6 -echo "configure:3684: checking whether right shift preserve sign bit" >&5 +echo "configure:3719: checking whether right shift preserve sign bit" >&5 if eval "test \"`echo '$''{'rb_cv_rshift_sign'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 else @@ -3688,7 +3723,7 @@ else rb_cv_rshift_sign=yes else cat > conftest.$ac_ext <&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null +if { (eval echo configure:3739: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null then rb_cv_rshift_sign=yes else @@ -3728,19 +3763,19 @@ EOF fi echo $ac_n "checking count field in FILE structures""... $ac_c" 1>&6 -echo "configure:3732: checking count field in FILE structures" >&5 +echo "configure:3767: checking count field in FILE structures" >&5 if eval "test \"`echo '$''{'rb_cv_fcnt'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 else cat > conftest.$ac_ext < int main() { FILE *f = stdin; f->_cnt = 0; ; return 0; } EOF -if { (eval echo configure:3744: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then +if { (eval echo configure:3779: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then rm -rf conftest* rb_cv_fcnt="_cnt" else @@ -3750,14 +3785,14 @@ fi rm -f conftest* if test "$rb_cv_fcnt" = ""; then cat > conftest.$ac_ext < int main() { FILE *f = stdin; f->__cnt = 0; ; return 0; } EOF -if { (eval echo configure:3761: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then +if { (eval echo configure:3796: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then rm -rf conftest* rb_cv_fcnt="__cnt" else @@ -3768,14 +3803,14 @@ rm -f conftest* fi if test "$rb_cv_fcnt" = ""; then cat > conftest.$ac_ext < int main() { FILE *f = stdin; f->_r = 0; ; return 0; } EOF -if { (eval echo configure:3779: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then +if { (eval echo configure:3814: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then rm -rf conftest* rb_cv_fcnt="_r" else @@ -3786,14 +3821,14 @@ rm -f conftest* fi if test "$rb_cv_fcnt" = ""; then cat > conftest.$ac_ext < int main() { FILE *f = stdin; f->readCount = 0; ; return 0; } EOF -if { (eval echo configure:3797: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then +if { (eval echo configure:3832: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then rm -rf conftest* rb_cv_fcnt="readCount" else @@ -3804,14 +3839,14 @@ rm -f conftest* fi if test "$rb_cv_fcnt" = ""; then cat > conftest.$ac_ext < int main() { FILE *f = stdin; f->_rcount = 0; ; return 0; } EOF -if { (eval echo configure:3815: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then +if { (eval echo configure:3850: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then rm -rf conftest* rb_cv_fcnt="_rcount" else @@ -3877,7 +3912,7 @@ fi case "$host_os" in linux*) echo $ac_n "checking whether ELF binaries are produced""... $ac_c" 1>&6 -echo "configure:3881: checking whether ELF binaries are produced" >&5 +echo "configure:3916: checking whether ELF binaries are produced" >&5 if eval "test \"`echo '$''{'rb_cv_binary_elf'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 else @@ -3885,7 +3920,7 @@ else rb_cv_binary_elf=yes else cat > conftest.$ac_ext <&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null +if { (eval echo configure:3944: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null then rb_cv_binary_elf=yes else @@ -3935,7 +3970,7 @@ STATIC= if test "$with_dln_a_out" != yes; then rb_cv_dlopen=unknown echo $ac_n "checking whether OS depend dynamic link works""... $ac_c" 1>&6 -echo "configure:3939: checking whether OS depend dynamic link works" >&5 +echo "configure:3974: checking whether OS depend dynamic link works" >&5 if test "$GCC" = yes; then case "$host_os" in nextstep*) ;; @@ -4049,12 +4084,12 @@ if test "$ac_cv_header_a_out_h" = yes; then if test "$with_dln_a_out" = yes || test "$rb_cv_dlopen" = unknown; then cat confdefs.h > config.h echo $ac_n "checking whether matz's dln works""... $ac_c" 1>&6 -echo "configure:4053: checking whether matz's dln works" >&5 +echo "configure:4088: checking whether matz's dln works" >&5 if eval "test \"`echo '$''{'rb_cv_dln_a_out'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 else cat > conftest.$ac_ext <&5; (eval $ac_compile) 2>&5; }; then +if { (eval echo configure:4103: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then rm -rf conftest* rb_cv_dln_a_out=yes else @@ -4171,7 +4206,7 @@ fi case "$host_os" in human*) echo $ac_n "checking for _harderr in -lsignal""... $ac_c" 1>&6 -echo "configure:4175: checking for _harderr in -lsignal" >&5 +echo "configure:4210: checking for _harderr in -lsignal" >&5 ac_lib_var=`echo signal'_'_harderr | sed 'y%./+-%__p_%'` if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 @@ -4179,7 +4214,7 @@ else ac_save_LIBS="$LIBS" LIBS="-lsignal $LIBS" cat > conftest.$ac_ext <&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then +if { (eval echo configure:4229: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then rm -rf conftest* eval "ac_cv_lib_$ac_lib_var=yes" else @@ -4218,7 +4253,7 @@ else fi echo $ac_n "checking for hmemset in -lhmem""... $ac_c" 1>&6 -echo "configure:4222: checking for hmemset in -lhmem" >&5 +echo "configure:4257: checking for hmemset in -lhmem" >&5 ac_lib_var=`echo hmem'_'hmemset | sed 'y%./+-%__p_%'` if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 @@ -4226,7 +4261,7 @@ else ac_save_LIBS="$LIBS" LIBS="-lhmem $LIBS" cat > conftest.$ac_ext <&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then +if { (eval echo configure:4276: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then rm -rf conftest* eval "ac_cv_lib_$ac_lib_var=yes" else @@ -4267,12 +4302,12 @@ fi for ac_func in select do echo $ac_n "checking for $ac_func""... $ac_c" 1>&6 -echo "configure:4271: checking for $ac_func" >&5 +echo "configure:4306: checking for $ac_func" >&5 if eval "test \"`echo '$''{'ac_cv_func_$ac_func'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 else cat > conftest.$ac_ext <&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then +if { (eval echo configure:4334: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then rm -rf conftest* eval "ac_cv_func_$ac_func=yes" else @@ -4320,7 +4355,7 @@ fi done echo $ac_n "checking whether PD libc _dtos18 fail to convert big number""... $ac_c" 1>&6 -echo "configure:4324: checking whether PD libc _dtos18 fail to convert big number" >&5 +echo "configure:4359: checking whether PD libc _dtos18 fail to convert big number" >&5 if eval "test \"`echo '$''{'rb_cv_missing__dtos18'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 else @@ -4328,7 +4363,7 @@ else rb_cv_missing__dtos18=no else cat > conftest.$ac_ext < @@ -4340,7 +4375,7 @@ main () } EOF -if { (eval echo configure:4344: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null +if { (eval echo configure:4379: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null then rb_cv_missing__dtos18=yes else @@ -4362,7 +4397,7 @@ EOF fi echo $ac_n "checking whether PD libc fconvert fail to round""... $ac_c" 1>&6 -echo "configure:4366: checking whether PD libc fconvert fail to round" >&5 +echo "configure:4401: checking whether PD libc fconvert fail to round" >&5 if eval "test \"`echo '$''{'rb_cv_missing_fconvert'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 else @@ -4370,7 +4405,7 @@ else rb_cv_missing_fconvert=no else cat > conftest.$ac_ext < @@ -4383,7 +4418,7 @@ main () } EOF -if { (eval echo configure:4387: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null +if { (eval echo configure:4422: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null then rb_cv_missing_fconvert=yes else @@ -4610,6 +4645,17 @@ cat >> confdefs.h <> confdefs.h < config.h diff --git a/configure.in b/configure.in index 127a8efc20..3969fedfae 100644 --- a/configure.in +++ b/configure.in @@ -39,19 +39,11 @@ AC_ARG_ENABLE(fat-binary, case "$host_os" in rhapsody*) echo -n "MacOS X Server: " - if test "$TARGET_ARCHS" = "" ; then - TARGET_ARCHS="ppc i386" - fi + if test "$TARGET_ARCHS" = "" ; then + TARGET_ARCHS="ppc i386" + fi ;; nextstep*|openstep*) - echo -n "NeXTSTEP/OPENSTEP: " - - if test "$host_os" = "rhapsody" ; then - echo -n "Rhapsody: " - if test "$TARGET_ARCHS" = "" ; then - TARGET_ARCHS="ppc i486" - fi - else echo -n "NeXTSTEP/OPENSTEP: " if test "$TARGET_ARCHS" = "" ; then if test `/usr/bin/arch` = "m68k" ; then @@ -60,7 +52,6 @@ AC_ARG_ENABLE(fat-binary, TARGET_ARCHS="m68k `/usr/bin/arch`" fi fi - fi ;; esac # /usr/lib/arch_tool -archify_list $TARGET_ARCHS @@ -162,9 +153,10 @@ AC_CHECK_LIB(xpg4, setlocale) # FreeBSD needs this dnl Checks for header files. AC_HEADER_DIRENT AC_HEADER_STDC +AC_HEADER_SYS_WAIT AC_CHECK_HEADERS(stdlib.h unistd.h limits.h sys/file.h sys/ioctl.h pwd.h \ - sys/select.h sys/time.h sys/times.h sys/param.h sys/wait.h\ - syscall.h a.out.h string.h utime.h memory.h direct.h fnmatch.h) + sys/select.h sys/time.h sys/times.h sys/param.h syscall.h\ + a.out.h string.h utime.h memory.h direct.h fnmatch.h) dnl Checks for typedefs, structures, and compiler characteristics. AC_TYPE_UID_T @@ -315,7 +307,7 @@ fi dnl default value for $KANJI AC_SUBST(DEFAULT_KCODE) AC_ARG_WITH(default-kcode, - [--with-default-kcode=CODE speficy default value for \$KCODE (utf8|euc|sjis|none)], + [--with-default-kcode=CODE specify default value for \$KCODE (utf8|euc|sjis|none)], [case $withval in utf8) AC_DEFINE(DEFAULT_KCODE, KCODE_UTF8);; euc) AC_DEFINE(DEFAULT_KCODE, KCODE_EUC);; @@ -786,6 +778,11 @@ fi AC_DEFINE_UNQUOTED(RUBY_ARCHLIB, "${RUBY_LIB_PATH}/${arch}") AC_DEFINE_UNQUOTED(RUBY_SITE_ARCHLIB, "${RUBY_SITE_LIB_PATH}/${arch}") +AC_ARG_WITH(search-path, + [--with-search-path specify the additional search path], + [search_path=$withval]) +AC_DEFINE_UNQUOTED(RUBY_SEARCH_PATH,"$search_path") + echo "creating config.h" cat confdefs.h > config.h diff --git a/dln.c b/dln.c index 9829b6425b..15c2a2e2e7 100644 --- a/dln.c +++ b/dln.c @@ -1565,7 +1565,7 @@ conv_to_posix_path(win32, posix, len) if (len < strlen(first)) fprintf(stderr, "PATH length too long: %s\n", first); else - strcpy(posix, first); + cygwin32_conv_to_posix_path(first, posix); return dst; } #endif @@ -1587,13 +1587,6 @@ dln_find_1(fname, path, exe_flag) const char* mac_fullpath; #endif -#if defined(__CYGWIN32__) - int pathlen = 2 * strlen(path); - int rubypathlen = pathlen > MAXPATHLEN ? pathlen : MAXPATHLEN; - char *rubypath = alloca(rubypathlen); - conv_to_posix_path(path, rubypath, rubypathlen); - path = rubypath; -#endif if (fname[0] == '/') return fname; if (strncmp("./", fname, 2) == 0 || strncmp("../", fname, 3) == 0) return fname; diff --git a/eval.c b/eval.c index 2695d84dc3..a1c56e228f 100644 --- a/eval.c +++ b/eval.c @@ -68,6 +68,19 @@ static int scope_vmode; #define SCOPE_SET(f) do {scope_vmode=(f);} while(0) #define SCOPE_TEST(f) (scope_vmode&(f)) +static void print_undef _((VALUE, ID)) NORETURN; +static void +print_undef(klass, id) + VALUE klass; + ID id; +{ + rb_raise(rb_eNameError, "undefined method `%s' for %s `%s'", + rb_id2name(id), + (TYPE(klass) == T_MODULE)?"module":"class", + rb_class2name(klass)); +} + + #define CACHE_SIZE 0x800 #define CACHE_MASK 0x7ff #define EXPR1(c,m) ((((c)>>3)^(m))&CACHE_MASK) @@ -202,8 +215,7 @@ rb_alias(klass, name, def) } } if (!orig || !orig->nd_body) { - rb_raise(rb_eNameError, "undefined method `%s' for `%s'", - rb_id2name(def), rb_class2name(klass)); + print_undef(klass, def); } body = orig->nd_body; if (nd_type(body) == NODE_FBODY) { /* was alias */ @@ -252,8 +264,7 @@ rb_disable_super(klass, name) body = search_method(klass, mid, &origin); if (!body || !body->nd_body) { - rb_raise(rb_eNameError, "undefined method `%s' for `%s'", - rb_id2name(mid), rb_class2name(klass)); + print_undef(klass, mid); } if (origin == klass) { body->nd_noex |= NOEX_UNDEF; @@ -275,8 +286,7 @@ rb_enable_super(klass, name) body = search_method(klass, mid, &origin); if (!body || !body->nd_body || origin != klass) { - rb_raise(rb_eNameError, "undefined method `%s' for `%s'", - rb_id2name(mid), rb_class2name(klass)); + print_undef(klass, mid); } body->nd_noex &= ~NOEX_UNDEF; } @@ -298,8 +308,7 @@ rb_export_method(klass, name, noex) body = search_method(rb_cObject, name, &origin); } if (!body) { - rb_raise(rb_eNameError, "undefined method `%s' for `%s'", - rb_id2name(name), rb_class2name(klass)); + print_undef(klass, name); } if (body->nd_noex != noex) { if (klass == origin) { @@ -370,7 +379,7 @@ rb_attr(klass, id, read, write, ex) } } -static ID init, eqq, each, aref, aset, match; +static ID init, eqq, each, aref, aset, match, missing; VALUE ruby_errinfo = Qnil; extern NODE *ruby_eval_tree_begin; extern NODE *ruby_eval_tree; @@ -886,10 +895,15 @@ void Init_ext _((void)); void ruby_init() { + static int initialized = 0; static struct FRAME frame; static struct iter iter; int state; + if (initialized) + return; + initialized = 1; + ruby_frame = top_frame = &frame; ruby_iter = &iter; @@ -2648,6 +2662,9 @@ rb_eval(self, node) s0 = ""; } } + else if (TYPE(klass) == T_MODULE) { + s0 = " module"; + } rb_raise(rb_eNameError, "undefined method `%s' for%s `%s'", rb_id2name(node->nd_mid),s0,rb_class2name(klass)); } @@ -2935,15 +2952,16 @@ rb_f_exit(argc, argv, obj) VALUE obj; { VALUE status; + int istatus; rb_secure(4); if (rb_scan_args(argc, argv, "01", &status) == 1) { - status = NUM2INT(status); + istatus = NUM2INT(status); } else { - status = 0; + istatus = 0; } - rb_exit(status); + rb_exit(istatus); return Qnil; /* not reached */ } @@ -3526,23 +3544,20 @@ rb_f_missing(argc, argv, obj) } if (d) { if (last_call_status & CSTAT_PRIV) { - format = "private method `%s' called for %s"; + format = "private method `%s' called for %s%s%s"; } if (last_call_status & CSTAT_PROT) { - format = "protected method `%s' called for %s"; - } - else if (rb_iterator_p()) { - format = "undefined iterator `%s' for %s"; + format = "protected method `%s' called for %s%s%s"; } else if (last_call_status & CSTAT_VCALL) { const char *mname = rb_id2name(id); if (('a' <= mname[0] && mname[0] <= 'z') || mname[0] == '_') { - format = "undefined local variable or method `%s' for %s"; + format = "undefined local variable or method `%s' for %s%s%s"; } } if (!format) { - format = "undefined method `%s' for %s"; + format = "undefined method `%s' for %s%s%s"; } if (RSTRING(d)->len > 65) { d = rb_any_to_s(obj); @@ -3555,7 +3570,9 @@ rb_f_missing(argc, argv, obj) PUSH_FRAME(); /* fake frame */ *ruby_frame = *_frame.prev->prev; - rb_raise(rb_eNameError, format, rb_id2name(id), desc); + rb_raise(rb_eNameError, format, rb_id2name(id), + desc, desc[0]=='#'?"":":", + desc[0]=='#'?"":rb_class2name(CLASS_OF(obj))); POP_FRAME(); return Qnil; /* not reached */ @@ -3577,7 +3594,7 @@ rb_undefined(obj, id, argc, argv, call_status) last_call_status = call_status; - return rb_funcall2(obj, rb_intern("method_missing"), argc+1, nargv); + return rb_funcall2(obj, missing, argc+1, nargv); } #ifdef DJGPP @@ -3941,17 +3958,19 @@ rb_call(klass, recv, mid, argc, argv, scope) return rb_undefined(recv, mid, argc, argv, scope==2?CSTAT_VCALL:0); } - /* receiver specified form for private method */ - if ((noex & NOEX_PRIVATE) && scope == 0) - return rb_undefined(recv, mid, argc, argv, CSTAT_PRIV); + if (mid != missing) { + /* receiver specified form for private method */ + if ((noex & NOEX_PRIVATE) && scope == 0) + return rb_undefined(recv, mid, argc, argv, CSTAT_PRIV); - /* self must be kind of a specified form for private method */ - if ((noex & NOEX_PROTECTED)) { - VALUE defined_class = klass; - while (TYPE(defined_class) == T_ICLASS) - defined_class = RBASIC(defined_class)->klass; - if (!rb_obj_is_kind_of(ruby_frame->self, defined_class)) - return rb_undefined(recv, mid, argc, argv, CSTAT_PROT); + /* self must be kind of a specified form for private method */ + if ((noex & NOEX_PROTECTED)) { + VALUE defined_class = klass; + while (TYPE(defined_class) == T_ICLASS) + defined_class = RBASIC(defined_class)->klass; + if (!rb_obj_is_kind_of(ruby_frame->self, defined_class)) + return rb_undefined(recv, mid, argc, argv, CSTAT_PROT); + } } return rb_call0(klass, recv, id, argc, argv, body, noex & NOEX_UNDEF); @@ -4859,8 +4878,7 @@ rb_mod_modfunc(argc, argv, module) id = rb_to_id(argv[i]); body = search_method(module, id, 0); if (body == 0 || body->nd_body == 0) { - rb_raise(rb_eNameError, "undefined method `%s' for module `%s'", - rb_id2name(id), rb_class2name(module)); + rb_bug("undefined method `%s'; can't happen", rb_id2name(id)); } rb_clear_cache_by_id(id); rb_add_method(rb_singleton_class(module), id, body->nd_body, NOEX_PUBLIC); @@ -5109,6 +5127,7 @@ Init_eval() aref = rb_intern("[]"); aset = rb_intern("[]="); match = rb_intern("=~"); + missing = rb_intern("method_missing"); rb_global_variable((VALUE*)&top_scope); rb_global_variable((VALUE*)&ruby_eval_tree_begin); @@ -5873,10 +5892,10 @@ struct thread { VALUE thread; }; -static thread_t curr_thread; -static int num_waiting_on_fd; -static int num_waiting_on_timer; -static int num_waiting_on_join; +static thread_t curr_thread = 0; +static int num_waiting_on_fd = 0; +static int num_waiting_on_timer = 0; +static int num_waiting_on_join = 0; #define FOREACH_THREAD_FROM(f,x) x = f; do { x = x->next; #define END_FOREACH_FROM(f,x) } while (x != f) @@ -7281,7 +7300,7 @@ Init_Thread() rb_cContinuation = rb_define_class("Continuation", rb_cObject); rb_undef_method(CLASS_OF(rb_cContinuation), "new"); rb_define_method(rb_cContinuation, "call", rb_continuation_call, -1); - rb_define_method(rb_mKernel, "callcc", rb_callcc, 0); + rb_define_global_function("callcc", rb_callcc, 0); } static VALUE diff --git a/ext/extmk.rb.in b/ext/extmk.rb.in index d3ff174894..0d1d5af276 100644 --- a/ext/extmk.rb.in +++ b/ext/extmk.rb.in @@ -438,11 +438,6 @@ $(DLLIB): $(OBJS) mfile.printf "\ $(DLLIB): $(OBJS) ar cru $(DLLIB) $(OBJS) -" - elsif PLATFORM =~ "-nextstep" || PLATFORM =~ "-openstep" || PLATFORM =~ "-rhapsody" - mfile.printf "\ -$(DLLIB): $(OBJS) - cc -r $(CFLAGS) -o $(DLLIB) $(OBJS) " else mfile.printf "\ diff --git a/ext/extmk.rb.nt b/ext/extmk.rb.nt index 509bca398d..531abf7b29 100644 --- a/ext/extmk.rb.nt +++ b/ext/extmk.rb.nt @@ -61,8 +61,8 @@ end CFLAGS = "" #LINK = "cl -o conftest.exe -I../.. -Zi -O -I. %s conftest.c %s > nul" -LINK = "cl -o conftest.exe -Zi -O %s conftest.c %s > nul" -CPP = "cl -E -I../.. -I../../missing -I../../win32 -I. -Zi -O %s conftest.c > nul" +LINK = "cl -o conftest.exe -Zi -O %s conftest.c %s %s > nul" +CPP = "cl -E -I#{$ruby_inc} -I#{$ruby_inc}/missing -I#{$ruby_inc}/win32 -I. -Zi -O %s conftest.c > nul" $null = open("nul", "w") $orgerr = $stderr.dup @@ -322,7 +322,7 @@ VPATH = . CC = cl -CFLAGS = %s -I../.. -I../../missing -I../../win32 -I. -O -DNT %s #{CFLAGS} #{$CFLAGS} %s +CFLAGS = %s -I#{$ruby_inc} -I#{$ruby_inc}/missing -I#{$ruby_inc}/win32 -I. -O -DNT %s #{CFLAGS} #{$CFLAGS} %s RUBYLIB = ../../ruby.lib DLDFLAGS = /DLL diff --git a/ext/pty/pty.c b/ext/pty/pty.c index 0438ca7e9b..2cd8d6f9a4 100644 --- a/ext/pty/pty.c +++ b/ext/pty/pty.c @@ -8,7 +8,11 @@ #if !defined(HAVE_OPENPTY) && !defined(HAVE__GETPTY) #include #endif +#ifdef HAVE_SYS_WAIT_H #include +#else +#define WIFSTOPPED(status) (((status) & 0xff) == 0x7f) +#endif #include #include @@ -160,7 +164,7 @@ chld_changed() #ifdef HAVE_WAITPID cpid = waitpid(-1, &statusp, WUNTRACED|WNOHANG); #else - cpid = wait3((int *) &statusp, WUNTRACED|WNOHANG, 0); + cpid = wait3(&statusp, WUNTRACED|WNOHANG, 0); #endif if (cpid == 0 || cpid == -1) return; diff --git a/ext/tk/lib/tk.rb b/ext/tk/lib/tk.rb index 1a1c6557d4..2b4b504b0a 100644 --- a/ext/tk/lib/tk.rb +++ b/ext/tk/lib/tk.rb @@ -753,10 +753,9 @@ class TkVariable if INTERP._eval(format('global %s; array exists %s', @id, @id)) != "1" raise else - INTERP._eval(format('global %s; unset %s'), @id, @id) if val == [] - INTERP._eval(format('global %s; set %s(0) 0; unset %s(0)', - @id, @id, @id)) + INTERP._eval(format('global %s; unset %s; set %s(0) 0; unset %s(0)', + @id, @id, @id, @id)) elsif val.kind_of?(Array) a = [] val.each_with_index{|e,i| a.push(i); a.push(array2tk_list(e))} @@ -857,7 +856,7 @@ class TkVariable Tk.tk_call('trace', 'variable', @id, @trace_opts, 'rb_var') else newopts = @trace_opts.dup - opts.each_byte{|c| newopts += c.chr unless @newopts.index(c)} + opts.each_byte{|c| newopts += c.chr unless newopts.index(c)} if newopts != @trace_opts Tk.tk_call('trace', 'vdelete', @id, @trace_opts, 'rb_var') @trace_opts.replace(newopts) @@ -877,7 +876,7 @@ class TkVariable Tk.tk_call('trace', 'variable', @id, @trace_opts, 'rb_var') else newopts = @trace_opts.dup - opts.each_byte{|c| newopts += c.chr unless @newopts.index(c)} + opts.each_byte{|c| newopts += c.chr unless newopts.index(c)} if newopts != @trace_opts Tk.tk_call('trace', 'vdelete', @id, @trace_opts, 'rb_var') @trace_opts.replace(newopts) @@ -2191,12 +2190,12 @@ class TkListboxas.data.dfree) + DATA_PTR(p) && RANY(p)->as.data.dfree) { (*RANY(p)->as.data.dfree)(DATA_PTR(p)); -#if 0 - else if (BUILTIN_TYPE(p)) - obj_free((VALUE)p); -#endif + } + else if (BUILTIN_TYPE(p) == T_FILE) { + rb_io_fptr_finalize(RANY(p)->as.file.fptr); + } p++; } } diff --git a/hash.c b/hash.c index 72222626a9..3cfd2cc455 100644 --- a/hash.c +++ b/hash.c @@ -148,14 +148,6 @@ rb_hash_foreach_call(arg) return Qnil; } -static int -rb_hash_delete_nil(key, value) - VALUE key, value; -{ - if (value == Qnil) return ST_DELETE; - return ST_CONTINUE; -} - static VALUE rb_hash_foreach_ensure(hash) VALUE hash; @@ -164,7 +156,7 @@ rb_hash_foreach_ensure(hash) if (RHASH(hash)->iter_lev == 0) { if (FL_TEST(hash, HASH_DELETED)) { - st_foreach(RHASH(hash)->tbl, rb_hash_delete_nil, 0); + st_cleanup_safe(RHASH(hash)->tbl, Qnil); FL_UNSET(hash, HASH_DELETED); } } @@ -381,6 +373,32 @@ rb_hash_set_default(hash, ifnone) return hash; } +static int +index_i(key, value, args) + VALUE key, value; + VALUE *args; +{ + if (rb_equal(value, args[0])) { + args[1] = key; + return ST_STOP; + } + return ST_CONTINUE; +} + +static VALUE +rb_hash_index(hash, value) + VALUE hash, value; +{ + VALUE args[2]; + + args[0] = value; + args[1] = Qnil; + + st_foreach(RHASH(hash)->tbl, index_i, args); + + return args[1]; +} + static VALUE rb_hash_indexes(argc, argv, hash) int argc; @@ -1314,10 +1332,8 @@ env_has_value(dmy, value) VALUE dmy, value; { char **env; - volatile VALUE ary; if (TYPE(value) != T_STRING) return Qfalse; - ary = rb_ary_new(); env = environ; while (*env) { char *s = strchr(*env, '=')+1; @@ -1330,6 +1346,26 @@ env_has_value(dmy, value) return Qfalse; } +static VALUE +env_index(dmy, value) + VALUE dmy, value; +{ + char **env; + + if (TYPE(value) != T_STRING) return Qnil; + env = environ; + while (*env) { + char *s = strchr(*env, '=')+1; + if (s) { + if (strncmp(s, RSTRING(value)->ptr, strlen(s)) == 0) { + return rb_tainted_str_new(*env, s-*env); + } + } + env++; + } + return Qnil; +} + static VALUE env_indexes(argc, argv) int argc; @@ -1405,6 +1441,7 @@ Init_Hash() rb_define_method(rb_cHash,"store", rb_hash_aset, 2); rb_define_method(rb_cHash,"default", rb_hash_default, 0); rb_define_method(rb_cHash,"default=", rb_hash_set_default, 1); + rb_define_method(rb_cHash,"index", rb_hash_index, 1); rb_define_method(rb_cHash,"indexes", rb_hash_indexes, -1); rb_define_method(rb_cHash,"indices", rb_hash_indexes, -1); rb_define_method(rb_cHash,"length", rb_hash_length, 0); @@ -1430,6 +1467,7 @@ Init_Hash() rb_define_method(rb_cHash,"replace", rb_hash_replace, 1); rb_define_method(rb_cHash,"include?", rb_hash_has_key, 1); + rb_define_method(rb_cHash,"member?", rb_hash_has_key, 1); rb_define_method(rb_cHash,"has_key?", rb_hash_has_key, 1); rb_define_method(rb_cHash,"has_value?", rb_hash_has_value, 1); rb_define_method(rb_cHash,"key?", rb_hash_has_key, 1); @@ -1452,6 +1490,7 @@ Init_Hash() rb_define_singleton_method(envtbl,"to_s", env_to_s, 0); rb_define_singleton_method(envtbl,"rehash", env_none, 0); rb_define_singleton_method(envtbl,"to_a", env_to_a, 0); + rb_define_singleton_method(envtbl,"index", env_index, 1); rb_define_singleton_method(envtbl,"indexes", env_indexes, -1); rb_define_singleton_method(envtbl,"indices", env_indexes, -1); rb_define_singleton_method(envtbl,"length", env_size, 0); @@ -1459,6 +1498,7 @@ Init_Hash() rb_define_singleton_method(envtbl,"keys", env_keys, 0); rb_define_singleton_method(envtbl,"values", env_values, 0); rb_define_singleton_method(envtbl,"include?", env_has_key, 1); + rb_define_singleton_method(envtbl,"member?", env_has_key, 1); rb_define_singleton_method(envtbl,"has_key?", env_has_key, 1); rb_define_singleton_method(envtbl,"has_value?", env_has_value, 1); rb_define_singleton_method(envtbl,"key?", env_has_key, 1); diff --git a/io.c b/io.c index 7249a4bd63..1b1c21cc09 100644 --- a/io.c +++ b/io.c @@ -90,7 +90,7 @@ static ID id_write; extern char *ruby_inplace_mode; -struct timeval rb_time_timeval _((VALUE)); +struct timeval rb_time_interval _((VALUE)); static VALUE filename, file; static int gets_lineno; @@ -1296,10 +1296,10 @@ rb_file_sysopen_internal(klass, fname, flags, mode) VALUE rb_file_sysopen(fname, flags, mode) - char *fname; + const char *fname; int flags, mode; { - return rb_file_sysopen_internal(rb_cFile, flags, mode); + return rb_file_sysopen_internal(rb_cFile, fname, flags, mode); } #if defined (NT) || defined(DJGPP) || defined(__CYGWIN32__) || defined(__human68k__) @@ -2438,7 +2438,7 @@ rb_f_select(argc, argv, obj) tp = NULL; } else { - timerec = rb_time_timeval(timeout); + timerec = rb_time_interval(timeout); tp = &timerec; } diff --git a/lib/cgi-lib.rb b/lib/cgi-lib.rb index 35b766ece0..3692b655c1 100644 --- a/lib/cgi-lib.rb +++ b/lib/cgi-lib.rb @@ -157,7 +157,7 @@ class CGI < SimpleDelegator when "GET" ENV['QUERY_STRING'] or "" when "POST" - input.read Integer(ENV['CONTENT_LENGTH']) + input.read(Integer(ENV['CONTENT_LENGTH'])) or "" else read_from_cmdline end.split(/&/).each do |x| diff --git a/lib/debug.rb b/lib/debug.rb index e5c305db77..4c3ad2f099 100644 --- a/lib/debug.rb +++ b/lib/debug.rb @@ -1,12 +1,21 @@ class DEBUGGER__ + + def max(a,b) + if (a frame %d:%s\n", i, tb[i] + else + STDOUT.printf " frame %d:%s\n", i, tb[i] + end + } + + when /^l(ist)?$/ + fs = @frames.size + tb = caller(0)[-fs..-1].reverse + unless @frame_pos; @frame_pos = fs - 1; end + + file, line, func = tb[@frame_pos].split(":") + line = line.to_i + b = line - 1 + e = line + 9 + line_at(file, line) + if lines = @scripts[file] and lines != TRUE + lines = [0] + lines # Simple offset adjust + b = max(0, b); e = min(lines.size-1, e) + for l in b..e + if (l == line) + STDOUT.printf "--> %5d %s", l, lines[l] + else + STDOUT.printf " %5d %s", l, lines[l] + end + end else - lev = 1 - end - unless @frame_pos - @frame_pos = @frames.size - 1 + STDOUT.printf "no sourcefile available for %s\n", file end + + when /^d(?:own)?\s*(\d+)??$/ + if $1; lev = Integer($1); else lev = 1; end + unless @frame_pos; @frame_pos = 0; end @frame_pos -= lev if @frame_pos < 0 - STDOUT.print "at toplevel\n" + STDOUT.print "at stack bottom\n" @frame_pos = 0 else - binding = @frames[@frame_pos] + STDOUT.printf "at level %d\n", @frame_pos end - when /^down\s*(\d+)??$/ - if $1 - lev = Integer($1) - else - lev = 1 - end - unless @frame_pos - @frame_pos = @frames.size - 1 - end - if lev >= @frames.size or @frame_pos and @frame_pos+lev >= @frames.size - STDOUT.print "at stack bottom\n" + binding = @frames[@frame_pos] + + when /^u(?:p)?\s*(\d+)?$/ + if $1; lev = Integer($1); else lev = 1; end + unless @frame_pos; @frame_pos = @frames.size - 1; end + @frame_pos += lev + p @frame_pos + if @frame_pos >= @frames.size + STDOUT.print "at toplevel\n" @frame_pos = nil else - @frame_pos += lev + binding = @frames[@frame_pos] + frame_info = caller(4)[-(@frame_pos+1)] + STDOUT.print "at #{frame_info}\n" + frame_info.sub( /:in `.*'$/, '' ) =~ /^(.*):(\d+)$/ #` + binding_file, binding_line = $1, $2.to_i binding = @frames[@frame_pos] end - when /^fin(ish)?$/ + + when /^f(inish)?/ @finish_pos = @frames.size return + when /^q(uit)?$/ STDOUT.print "really quit? (y/n) " STDOUT.flush input = STDIN.gets.chop! exit if input == "y" - when /^where$/ - at = caller(4) - for i in at - printf " %s\n", i - end - when /^l(ist)?(\s+(.*))?$/ - if $3 - b, e = $3.split(/[-,]/) - b = Integer(b)-1 - if e - e = Integer(e)-1 - else - e = b + 10 - end - end - unless b - b = line - 1 - e = line + 9 - end - p [b,e] - line_at(file, line) - if lines = @scripts[file] and lines != TRUE - n = b+1 - for l in lines[b..e] - printf "%4d %s", n, l - n += 1 - end - else - printf "no sourcefile available for %s\n", file - end + when /^p\s+/ - p debug_eval($', binding) #' + p debug_eval($', binding) + else v = debug_eval(input, binding) p v unless v == nil @@ -224,13 +252,26 @@ class DEBUGGER__ file = File.basename(file) if @break_points.include? [file, pos] index = @break_points.index([file, pos]) - printf "Breakpoint %d, %s at %s:%s\n", + STDOUT.printf "Breakpoint %d, %s at %s:%s\n", index, debug_funcname(id), file, pos return TRUE end return FALSE end + def excn_handle(file, line, id, binding) + fs = @frames.size + tb = caller(0)[-fs..-1] + unless @frame_pos; @frame_pos = fs - 1; end + + STDOUT.printf "%s\n", $! + for i in tb + STDOUT.printf "\tfrom %s\n", i + end + debug_command(file, line, id, binding) + end + + def trace_func(event, file, line, id, binding) if event == 'line' if @no_step == nil or @no_step >= @frames.size @@ -249,21 +290,30 @@ class DEBUGGER__ debug_command(file, line, id, binding) end end + if event == 'call' @frames.push binding if check_break_points(file, id.id2name, binding, id) debug_command(file, line, id, binding) end end + if event == 'class' @frames.push binding end + if event == 'return' or event == 'end' if @finish_pos == @frames.size @stop_next = 1 end @frames.pop end + + if event == 'raise' + # @frames.push binding + excn_handle(file, line, id, binding) + end + @last_file = file end diff --git a/lib/mkmf.rb b/lib/mkmf.rb index 82beea6b4f..d2cde95912 100644 --- a/lib/mkmf.rb +++ b/lib/mkmf.rb @@ -54,6 +54,8 @@ end CFLAGS = CONFIG["CFLAGS"] if PLATFORM == "m68k-human" CFLAGS.gsub!(/-c..-stack=[0-9]+ */, '') +elsif PLATFORM =~ /-nextstep|-rhapsody/ + CFLAGS.gsub!( /-arch\s\w*/, '' ); end if /win32|djgpp|mingw32|m68k-human|i386-os2_emx/i =~ PLATFORM $null = open("nul", "w") @@ -98,6 +100,7 @@ def try_cpp(src, opt="") cfile.print src cfile.close begin + xsystem(format(CPP, $CFLAGS, opt)) ensure system "rm -f conftest*" @@ -335,9 +338,9 @@ def create_makefile(target) end unless $objs then - $objs = Dir["*.{c,cc}"] + $objs = Dir["*.{c,cc,m}"] for f in $objs - f.sub!(/\.(c|cc)$/, ".o") + f.sub!(/\.(c|cc|m)$/, ".o") end end $objs = $objs.join(" ") @@ -402,13 +405,11 @@ EOMF $(DLLIB): $(OBJS) $(LDSHARED) $(DLDFLAGS) -o $(DLLIB) $(OBJS) $(LIBS) $(LOCAL_LIBS) EOMF - elsif not File.exist?(target + ".c") and not File.exist?(target + ".cc") or + elsif not File.exist?(target + ".c") and not File.exist?(target + ".cc") mfile.print "$(DLLIB): $(OBJS)\n" case PLATFORM when "m68k-human" mfile.printf "ar cru $(DLLIB) $(OBJS)\n" - when /-nextstep/ - mfile.printf "cc -r $(CFLAGS) -o $(DLLIB) $(OBJS)\n" else mfile.printf "ld $(DLDFLAGS) -r -o $(DLLIB) $(OBJS)\n" end @@ -459,7 +460,7 @@ EOMF end end -$libs = PLATFORM =~ /cygwin32|beos/ ? nil : "-lc" +$libs = PLATFORM =~ /cygwin32|beos|rhapsody|nextstep/ ? nil : "-lc" $objs = nil $LOCAL_LIBS = "" $CFLAGS = "" diff --git a/lib/telnet.rb b/lib/telnet.rb index 4251de1ee9..ac624fd257 100644 --- a/lib/telnet.rb +++ b/lib/telnet.rb @@ -1,11 +1,11 @@ =begin -$Date: 1999/06/04 06:24:58 $ +$Date: 1999/06/29 09:08:51 $ == SIMPLE TELNET CLIANT LIBRARY telnet.rb -Version 0.20 +Version 0.22 Wakou Aoyama @@ -20,6 +20,7 @@ Wakou Aoyama "Prompt" => /[$%#>] \z/n, # default: /[$%#>] \z/n "Telnetmode" => TRUE, # default: TRUE "Timeout" => 10, # default: 10 + # if ignore timeout then set "Timeout" to FALSE. "Waittime" => 0, # default: 0 "Proxy" => proxy}) # default: nil # proxy is Telnet or TCPsocket object @@ -49,6 +50,7 @@ example line = host.waitfor({"Match" => /match/, "String" => "string", "Timeout" => secs}) + # if ignore timeout then set "Timeout" to FALSE. if set "String" option. Match = Regexp.new(quote(string)) @@ -145,76 +147,128 @@ of cource, set sync=TRUE or flush is necessary. == HISTORY +=== Version 0.22 + +1999/06/29 09:08:51 + +- new, waitfor, cmd: {"Timeout" => FALSE} # ignore timeout + +=== Version 0.21 + +1999/06/28 18:18:55 + +- waitfor: not rescue (EOFError) + === Version 0.20 -waitfor: support for divided telnet command -=== Version 0.181 1999/05/22 -bug fix: print method +1999/06/04 06:24:58 -=== Version 0.18 1999/05/14 -respond to "IAC WON'T SGA" with "IAC DON'T SGA" +- waitfor: support for divided telnet command -DON'T SGA : end of line --> CR + LF +=== Version 0.181 -bug fix: preprocess method +1999/05/22 -=== Version 0.17 1999/04/30 -bug fix: $! + "\n" --> $!.to_s + "\n" +- bug fix: print method -=== Version 0.163 1999/04/11 -STDOUT.write(message) --> yield(message) if iterator? +=== Version 0.18 -=== Version 0.162 1999/03/17 -add "Proxy" option +1999/05/14 -required timeout.rb +- respond to "IAC WON'T SGA" with "IAC DON'T SGA" +- DON'T SGA : end of line --> CR + LF +- bug fix: preprocess method -=== Version 0.161 1999/02/03 -select --> IO::select +=== Version 0.17 -=== Version 0.16 1998/10/09 -preprocess method change for the better +1999/04/30 -add binmode method. +- bug fix: $! + "\n" --> $!.to_s + "\n" -change default Binmode -TRUE --> FALSE +=== Version 0.163 -=== Version 0.15 1998/10/04 -add telnetmode method. +1999/04/11 -=== Version 0.141 1998/09/22 -change default prompt - /[$%#>] $/ --> /[$%#>] \Z/ +- STDOUT.write(message) --> yield(message) if iterator? -=== Version 0.14 1998/09/01 -IAC WILL SGA send EOL --> CR+NULL +=== Version 0.162 -IAC WILL SGA IAC DO BIN send EOL --> CR +1999/03/17 -NONE send EOL --> LF +- add "Proxy" option +- required timeout.rb -add Dump_log option. +=== Version 0.161 -=== Version 0.13 1998/08/25 -add print method. +1999/02/03 -=== Version 0.122 1998/08/05 -support for HP-UX 10.20 thanks to WATANABE Tetsuya +- select --> IO::select -socket.<< --> socket.write +=== Version 0.16 -=== Version 0.121 1998/07/15 -string.+= --> string.concat +1998/10/09 -=== Version 0.12 1998/06/01 -add timeout, waittime. +- preprocess method change for the better +- add binmode method. +- change default Binmode. TRUE --> FALSE -=== Version 0.11 1998/04/21 -add realtime output. +=== Version 0.15 -=== Version 0.10 1998/04/13 -first release. +1998/10/04 + +- add telnetmode method. + +=== Version 0.141 + +1998/09/22 + +- change default prompt. /[$%#>] $/ --> /[$%#>] \Z/ + +=== Version 0.14 + +1998/09/01 + +- IAC WILL SGA send EOL --> CR+NULL +- IAC WILL SGA IAC DO BIN send EOL --> CR +- NONE send EOL --> LF +- add Dump_log option. + +=== Version 0.13 + +1998/08/25 + +- add print method. + +=== Version 0.122 + +1998/08/05 + +- support for HP-UX 10.20 thanks to WATANABE Tetsuya +- socket.<< --> socket.write + +=== Version 0.121 + +1998/07/15 + +- string.+= --> string.concat + +=== Version 0.12 + +1998/06/01 + +- add timeout, waittime. + +=== Version 0.11 + +1998/04/21 + +- add realtime output. + +=== Version 0.10 + +1998/04/13 + +- first release. =end @@ -296,35 +350,35 @@ class Telnet < SimpleDelegator EOL = CR + LF v = $-v $-v = false - VERSION = "0.20" - RELEASE_DATE = "$Date: 1999/06/04 06:24:58 $" + VERSION = "0.22" + RELEASE_DATE = "$Date: 1999/06/29 09:08:51 $" $-v = v def initialize(options) @options = options - @options["Binmode"] = FALSE if not @options.include?("Binmode") - @options["Host"] = "localhost" if not @options.include?("Host") - @options["Port"] = 23 if not @options.include?("Port") - @options["Prompt"] = /[$%#>] \z/n if not @options.include?("Prompt") - @options["Telnetmode"] = TRUE if not @options.include?("Telnetmode") - @options["Timeout"] = 10 if not @options.include?("Timeout") - @options["Waittime"] = 0 if not @options.include?("Waittime") + @options["Binmode"] = FALSE unless @options.key?("Binmode") + @options["Host"] = "localhost" unless @options.key?("Host") + @options["Port"] = 23 unless @options.key?("Port") + @options["Prompt"] = /[$%#>] \z/n unless @options.key?("Prompt") + @options["Telnetmode"] = TRUE unless @options.key?("Telnetmode") + @options["Timeout"] = 10 unless @options.key?("Timeout") + @options["Waittime"] = 0 unless @options.key?("Waittime") @telnet_option = { "SGA" => FALSE, "BINARY" => FALSE } - if @options.include?("Output_log") + if @options.key?("Output_log") @log = File.open(@options["Output_log"], 'a+') @log.sync = TRUE @log.binmode end - if @options.include?("Dump_log") + if @options.key?("Dump_log") @dumplog = File.open(@options["Dump_log"], 'a+') @dumplog.sync = TRUE @dumplog.binmode end - if @options.include?("Proxy") + if @options.key?("Proxy") if @options["Proxy"].kind_of?(Telnet) @sock = @options["Proxy"].sock elsif @options["Proxy"].kind_of?(TCPsocket) @@ -335,18 +389,22 @@ $-v = v else message = "Trying " + @options["Host"] + "...\n" yield(message) if iterator? - @log.write(message) if @options.include?("Output_log") - @dumplog.write(message) if @options.include?("Dump_log") + @log.write(message) if @options.key?("Output_log") + @dumplog.write(message) if @options.key?("Dump_log") begin - timeout(@options["Timeout"]){ + if @options["Timeout"] == FALSE @sock = TCPsocket.open(@options["Host"], @options["Port"]) - } + else + timeout(@options["Timeout"]){ + @sock = TCPsocket.open(@options["Host"], @options["Port"]) + } + end rescue TimeoutError raise TimeOut, "timed-out; opening of the host" rescue - @log.write($!.to_s + "\n") if @options.include?("Output_log") - @dumplog.write($!.to_s + "\n") if @options.include?("Dump_log") + @log.write($!.to_s + "\n") if @options.key?("Output_log") + @dumplog.write($!.to_s + "\n") if @options.key?("Dump_log") raise end @sock.sync = TRUE @@ -354,8 +412,8 @@ $-v = v message = "Connected to " + @options["Host"] + ".\n" yield(message) if iterator? - @log.write(message) if @options.include?("Output_log") - @dumplog.write(message) if @options.include?("Dump_log") + @log.write(message) if @options.key?("Output_log") + @dumplog.write(message) if @options.key?("Dump_log") end super(@sock) @@ -386,7 +444,7 @@ $-v = v str.gsub!(/#{CR}#{NULL}/no, CR) if @options["Telnetmode"] # combine EOL into "\n" - str.gsub!(/#{EOL}/no, "\n") if not @options["Binmode"] + str.gsub!(/#{EOL}/no, "\n") unless @options["Binmode"] # respond to "IAC DO x" str.gsub!(/([^#{IAC}]?)#{IAC}#{DO}([#{OPT_BINARY}-#{OPT_NEW_ENVIRON}#{OPT_EXOPL}])/no){ @@ -443,41 +501,42 @@ $-v = v waittime = @options["Waittime"] if options.kind_of?(Hash) - prompt = if options.include?("Match") + prompt = if options.key?("Match") options["Match"] - elsif options.include?("Prompt") + elsif options.key?("Prompt") options["Prompt"] - elsif options.include?("String") + elsif options.key?("String") Regexp.new( Regexp.quote(options["String"]) ) end - time_out = options["Timeout"] if options.include?("Timeout") - waittime = options["Waittime"] if options.include?("Waittime") + time_out = options["Timeout"] if options.key?("Timeout") + waittime = options["Waittime"] if options.key?("Waittime") else prompt = options end + if time_out == FALSE + time_out = nil + end + line = '' buf = '' until(not IO::select([@sock], nil, nil, waittime) and prompt === line) - raise TimeOut, "timed-out; wait for the next data" if - not IO::select([@sock], nil, nil, time_out) - begin - c = @sock.sysread(1024 * 1024) - @dumplog.print(c) if @options.include?("Dump_log") - buf.concat c - if @options["Telnetmode"] - buf = preprocess(buf) - if /#{IAC}.?\z/no === buf - next - end - end - @log.print(buf) if @options.include?("Output_log") - yield buf if iterator? - line.concat(buf) - buf = '' - rescue EOFError # End of file reached - break + unless IO::select([@sock], nil, nil, time_out) + raise TimeOut, "timed-out; wait for the next data" end + c = @sock.sysread(1024 * 1024) + @dumplog.print(c) if @options.key?("Dump_log") + buf.concat c + if @options["Telnetmode"] + buf = preprocess(buf) + if /#{IAC}.?\z/no === buf + next + end + end + @log.print(buf) if @options.key?("Output_log") + yield buf if iterator? + line.concat(buf) + buf = '' end line end @@ -487,7 +546,7 @@ $-v = v str.gsub!(/#{IAC}/no, IAC + IAC) if @options["Telnetmode"] - if not @options["Binmode"] + unless @options["Binmode"] if @telnet_option["BINARY"] and @telnet_option["SGA"] # IAC WILL SGA IAC DO BIN send EOL --> CR str.gsub!(/\n/n, CR) @@ -509,8 +568,8 @@ $-v = v if options.kind_of?(Hash) string = options["String"] - match = options["Match"] if options.include?("Match") - time_out = options["Timeout"] if options.include?("Timeout") + match = options["Match"] if options.key?("Match") + time_out = options["Timeout"] if options.key?("Timeout") else string = options end diff --git a/misc/inf-ruby.el b/misc/inf-ruby.el index 025ef2fb2a..e9853b4903 100644 --- a/misc/inf-ruby.el +++ b/misc/inf-ruby.el @@ -1,4 +1,4 @@ -;;; -*-Emacs-Lisp-*- +;;; -*-Emacs-Lisp-*- ;;; ;;; $Id$ ;;; $Author$ @@ -35,9 +35,12 @@ ;;; HISTORY ;;; senda - 8 Apr 1998: Created. ;;; $Log$ +;;; Revision 1.1.1.1.2.1 1999/07/15 07:59:59 matz +;;; 990715 +;;; ;;; Revision 1.1.1.1 1999/01/20 04:59:36 matz ;;; ruby 1.3 cycle -;;; +;;; ;;; Revision 1.1.2.1 1998/12/16 07:30:36 matz ;;; first public release of 1.1d (pre1.2) series ;;; diff --git a/misc/rubydb3x.el b/misc/rubydb3x.el index 197dd5327c..4493a93f77 100644 --- a/misc/rubydb3x.el +++ b/misc/rubydb3x.el @@ -7,8 +7,11 @@ ;;; History of argument lists passed to rubydb. (defvar gud-rubydb-history nil) -(defun gud-rubydb-massage-args (file args) - (cons "-r" (cons "debug" (cons file args)))) +(if (fboundp 'gud-overload-functions) + (defun gud-rubydb-massage-args (file args) + (cons "-r" (cons "debug" (cons file args)))) + (defun gud-rubydb-massage-args (file args) + (cons "-r" (cons "debug" args)))) ;; There's no guarantee that Emacs will hand the filter the entire ;; marker at once; it could be broken up across several strings. We @@ -17,6 +20,7 @@ ;; beginning of a marker, we save it here between calls to the ;; filter. (defvar gud-rubydb-marker-acc "") +(make-variable-buffer-local 'gud-rubydb-marker-acc) (defun gud-rubydb-marker-filter (string) (setq gud-rubydb-marker-acc (concat gud-rubydb-marker-acc string)) @@ -85,10 +89,13 @@ and source-file directory for your debugger." nil nil '(gud-rubydb-history . 1)))) - (gud-overload-functions '((gud-massage-args . gud-rubydb-massage-args) - (gud-marker-filter . gud-rubydb-marker-filter) - (gud-find-file . gud-rubydb-find-file))) - (gud-common-init command-line rubydb-command-name) + (if (not (fboundp 'gud-overload-functions)) + (gud-common-init command-line 'gud-rubydb-massage-args + 'gud-rubydb-marker-filter 'gud-rubydb-find-file) + (gud-overload-functions '((gud-massage-args . gud-rubydb-massage-args) + (gud-marker-filter . gud-rubydb-marker-filter) + (gud-find-file . gud-rubydb-find-file))) + (gud-common-init command-line rubydb-command-name)) (gud-def gud-break "b %l" "\C-b" "Set breakpoint at current line.") ; (gud-def gud-remove "clear %l" "\C-d" "Remove breakpoint at current line") diff --git a/missing/isinf.c b/missing/isinf.c index 3e1e410455..e0cd6ac1a2 100644 --- a/missing/isinf.c +++ b/missing/isinf.c @@ -1,3 +1,21 @@ +#ifdef __osf__ + +#define _IEEE 1 +#include + +int +isinf(n) + double n; +{ + if (IsNANorINF(n) && IsINF(n)) { + return 1; + } else { + return 0; + } +} + +#else + #include "config.h" #ifdef HAVE_STRING_H # include @@ -23,3 +41,4 @@ isinf(n) return memcmp(&n, &pinf, sizeof n) == 0 || memcmp(&n, &ninf, sizeof n) == 0; } +#endif diff --git a/missing/isnan.c b/missing/isnan.c index 8b3bc2b57c..96bb93ba6a 100644 --- a/missing/isnan.c +++ b/missing/isnan.c @@ -14,5 +14,3 @@ double_ne(n1, n2) { return n1 != n2; } - - diff --git a/numeric.c b/numeric.c index 91d5c97edb..d1f5905458 100644 --- a/numeric.c +++ b/numeric.c @@ -950,7 +950,7 @@ fix_div(x, y) i = FIX2LONG(y); if (i == 0) rb_num_zerodiv(); i = FIX2LONG(x)/i; - return INT2FIX(i); + return INT2NUM(i); /* FIXNUM_MIN / -1 > FIXNUM_MAX */ } return rb_num_coerce_bin(x, y); } diff --git a/parse.y b/parse.y index 06d79a914d..3206eccc19 100644 --- a/parse.y +++ b/parse.y @@ -178,7 +178,7 @@ static void top_local_setup(); %type array assoc_list assocs assoc undef_list backref %type block_var opt_block_var brace_block do_block lhs none %type mlhs mlhs_head mlhs_tail mlhs_basic mlhs_entry mlhs_item mlhs_node -%type variable symbol operation operation2 operation3 +%type fitem variable sym symbol operation operation2 operation3 %type cname fname op f_rest_arg %type f_norm_arg f_arg %token tUPLUS /* unary+ */ @@ -283,7 +283,7 @@ stmts : none } stmt : block_call - | kALIAS fname {lex_state = EXPR_FNAME;} fname + | kALIAS fitem {lex_state = EXPR_FNAME;} fitem { if (cur_mid || in_single) yyerror("alias within method"); @@ -561,11 +561,14 @@ fname : tIDENTIFIER $$ = $1; } -undef_list : fname +fitem : fname + | symbol + +undef_list : fitem { $$ = NEW_UNDEF($1); } - | undef_list ',' {lex_state = EXPR_FNAME;} fname + | undef_list ',' {lex_state = EXPR_FNAME;} fitem { $$ = block_append($1, NEW_UNDEF($4)); } @@ -1411,17 +1414,23 @@ ensure : none } literal : numeric - | tSYMBEG symbol + | symbol { - lex_state = EXPR_END; - $$ = INT2FIX($2); + $$ = INT2FIX($1); } | tREGEXP -symbol : fname +symbol : tSYMBEG sym + { + lex_state = EXPR_END; + $$ = $2; + } + +sym : fname | tIVAR | tGVAR + numeric : tINTEGER | tFLOAT @@ -1811,6 +1820,9 @@ rb_compile_file(f, file, start) return yycompile(strdup(f)); } +#if defined(__GNUC__) && __GNUC__ >= 2 +__inline__ +#endif static int nextc() { diff --git a/process.c b/process.c index 1f663beba5..1258e93b58 100644 --- a/process.c +++ b/process.c @@ -30,7 +30,7 @@ struct timeval { #endif /* NT */ #include -struct timeval rb_time_timeval _((VALUE)); +struct timeval rb_time_interval _((VALUE)); #ifdef HAVE_SYS_WAIT_H # include @@ -539,23 +539,27 @@ rb_f_fork(obj) } static VALUE -rb_f_exit_bang(obj, status) - VALUE obj, status; +rb_f_exit_bang(argc, argv, obj) + int argc; + VALUE *argv; + VALUE obj; { - int code = -1; + VALUE status; + int istatus; rb_secure(4); - if (FIXNUM_P(status)) { - code = INT2FIX(status); + if (rb_scan_args(argc, argv, "01", &status) == 1) { + istatus = NUM2INT(status); + } + else { + istatus = -1; } - #ifdef USE_CWGUSI - exit(code); + exit(istatus); #else - _exit(code); + _exit(istatus); #endif - - /* not reached */ + return Qnil; /* not reached */ } void @@ -732,7 +736,7 @@ rb_f_sleep(argc, argv) rb_thread_sleep_forever(); } else if (argc == 1) { - rb_thread_wait_for(rb_time_timeval(argv[0])); + rb_thread_wait_for(rb_time_interval(argv[0])); } else { rb_raise(rb_eArgError, "wrong # of arguments"); @@ -1007,7 +1011,7 @@ Init_process() rb_define_global_function("exec", rb_f_exec, -1); #endif rb_define_global_function("fork", rb_f_fork, 0); - rb_define_global_function("exit!", rb_f_exit_bang, 1); + rb_define_global_function("exit!", rb_f_exit_bang, -1); rb_define_global_function("system", rb_f_system, -1); rb_define_global_function("sleep", rb_f_sleep, -1); @@ -1029,7 +1033,7 @@ Init_process() #if !defined(NT) rb_define_singleton_method(rb_mProcess, "fork", rb_f_fork, 0); #endif - rb_define_singleton_method(rb_mProcess, "exit!", rb_f_exit_bang, 1); + rb_define_singleton_method(rb_mProcess, "exit!", rb_f_exit_bang, -1); #ifndef USE_CWGUSI rb_define_module_function(rb_mProcess, "kill", rb_f_kill, -1); #endif diff --git a/random.c b/random.c index 081d31ed00..8dfa6729f4 100644 --- a/random.c +++ b/random.c @@ -69,7 +69,7 @@ void srand48 _((long)); #endif /* HAVE_RANDOM */ /* 0 <= RANDOM_NUMBER <= 1 */ -#define RANDOM_NUMBER (((double)RANDOM())/(double)RANDOM_MAX+1) +#define RANDOM_NUMBER (((double)RANDOM())/((double)RANDOM_MAX+1)) #endif /* not HAVE_DRAND48 */ diff --git a/regex.c b/regex.c index fd06aca153..cf36f45740 100644 --- a/regex.c +++ b/regex.c @@ -108,7 +108,7 @@ char *alloca(); #define FREE_AND_RETURN_VOID(stackb) return #define FREE_AND_RETURN(stackb,val) return(val) -#define DOUBLE_STACK(stackx,stackb,len,type) \ +#define DOUBLE_STACK(stackx,stackb,len,type) \ (stackx = (type*)alloca(2 * len * sizeof(type)), \ /* Only copy what is in use. */ \ (type*)memcpy(stackx, stackb, len * sizeof (type))) @@ -117,16 +117,7 @@ char *alloca(); #define RE_ALLOCATE xmalloc #define FREE_VAR(var) if (var) free(var); var = NULL -#define FREE_VARIABLES() \ - do { \ - FREE_VAR(regstart); \ - FREE_VAR(regend); \ - FREE_VAR(old_regstart) \ - FREE_VAR(old_regend); \ - FREE_VAR(best_regstart); \ - FREE_VAR(best_regend); \ - FREE_VAR(reg_info); \ - } while (0) +#define FREE_VARIABLES() #define FREE_AND_RETURN_VOID(stackb) free(stackb);return #define FREE_AND_RETURN(stackb,val) free(stackb);return(val) @@ -2278,6 +2269,13 @@ re_compile_pattern(pattern, size, bufp) } } + bufp->regstart = TMALLOC(regnum, unsigned char*); + bufp->regend = TMALLOC(regnum, unsigned char*); + bufp->old_regstart = TMALLOC(regnum, unsigned char*); + bufp->old_regend = TMALLOC(regnum, unsigned char*); + bufp->reg_info = TMALLOC(regnum, register_info_type); + bufp->best_regstart = TMALLOC(regnum, unsigned char*); + bufp->best_regend = TMALLOC(regnum, unsigned char*); FREE_AND_RETURN(stackb, 0); invalid_pattern: @@ -2303,6 +2301,14 @@ re_free_pattern(bufp) free(bufp->buffer); free(bufp->fastmap); if (bufp->must_skip) free(bufp->must_skip); + + free(bufp->regstart); + free(bufp->regend); + free(bufp->old_regstart); + free(bufp->old_regend); + free(bufp->best_regstart); + free(bufp->best_regend); + free(bufp->reg_info); free(bufp); } @@ -2584,7 +2590,7 @@ re_compile_fastmap(bufp) register int j, k; unsigned is_a_succeed_n; - unsigned char **stackb = RE_TALLOC(NFAILURES, unsigned char*); + unsigned char **stackb = TMALLOC(NFAILURES, unsigned char*); unsigned char **stackp = stackb; unsigned char **stacke = stackb + NFAILURES; int options = bufp->options; @@ -2932,9 +2938,7 @@ re_search(bufp, string, size, startpos, range, regs) if (range > 0) { if (startpos > 0) return -1; - else if (re_match(bufp, string, size, 0, regs) >= 0) - return 0; - return -1; + return re_match(bufp, string, size, 0, regs); } break; @@ -2962,7 +2966,7 @@ re_search(bufp, string, size, startpos, range, regs) if (pbeg > pend) { /* swap pbeg,pend */ pos = pend; pend = pbeg; pbeg = pos; } - if (pend > size) pend = size; + pend = size; if (bufp->options & RE_OPTIMIZE_NO_BM) { pos = slow_search(bufp->must+1, len, string+pbeg, pend-pbeg, @@ -3118,18 +3122,7 @@ re_search(bufp, string, size, startpos, range, regs) /* The following are used for re_match, defined below: */ -/* Routine used by re_match. */ - -/* Structure and accessing macros used in re_match: */ - -typedef union -{ - unsigned char *word; - struct { - unsigned is_active : 1; - unsigned matched_something : 1; - } bits; -} register_info_type; +/* Accessing macros used in re_match: */ #define IS_ACTIVE(R) ((R).bits.is_active) #define MATCHED_SOMETHING(R) ((R).bits.matched_something) @@ -3161,7 +3154,7 @@ typedef union \ /* Find out how many registers are active or have been matched. \ (Aside from register zero, which is only set at the end.) */ \ - for (last_used_reg = num_regs - 1; last_used_reg > 0; last_used_reg--)\ + for (last_used_reg = num_regs-1; last_used_reg > 0; last_used_reg--)\ if (!REG_UNSET(regstart[last_used_reg])) \ break; \ \ @@ -3323,16 +3316,16 @@ re_match(bufp, string_arg, size, pos, regs) stopped matching the regnum-th subexpression. (The zeroth register keeps track of what the whole pattern matches.) */ - unsigned char **regstart = RE_TALLOC(num_regs, unsigned char*); - unsigned char **regend = RE_TALLOC(num_regs, unsigned char*); + unsigned char **regstart = bufp->regstart; + unsigned char **regend = bufp->regend; /* If a group that's operated upon by a repetition operator fails to match anything, then the register for its start will need to be restored because it will have been set to wherever in the string we are when we last see its open-group operator. Similarly for a register's end. */ - unsigned char **old_regstart = RE_TALLOC(num_regs, unsigned char*); - unsigned char **old_regend = RE_TALLOC(num_regs, unsigned char*); + unsigned char **old_regstart = bufp->old_regstart; + unsigned char **old_regend = bufp->old_regend; /* The is_active field of reg_info helps us keep track of which (possibly nested) subexpressions we are currently in. The matched_something @@ -3341,7 +3334,7 @@ re_match(bufp, string_arg, size, pos, regs) subexpression. These two fields get reset each time through any loop their register is in. */ - register_info_type *reg_info = RE_TALLOC(num_regs, register_info_type); + register_info_type *reg_info = bufp->reg_info; /* The following record the register info as found in the above variables when we find a match better than any we've seen before. @@ -3349,8 +3342,8 @@ re_match(bufp, string_arg, size, pos, regs) turn happens only if we have not yet matched the entire string. */ unsigned best_regs_set = 0; - unsigned char **best_regstart = RE_TALLOC(num_regs, unsigned char*); - unsigned char **best_regend = RE_TALLOC(num_regs, unsigned char*); + unsigned char **best_regstart = bufp->best_regstart; + unsigned char **best_regend = bufp->best_regend; if (regs) { init_regs(regs, num_regs); @@ -3540,8 +3533,13 @@ re_match(bufp, string_arg, size, pos, regs) case start_nowidth: PUSH_FAILURE_POINT(0, d); + if (stackp - stackb > RE_DUP_MAX) { + FREE_VARIABLES(); + FREE_AND_RETURN(stackb,(-2)); + } EXTRACT_NUMBER_AND_INCR(mcnt, p); STORE_NUMBER(p+mcnt, stackp - stackb); + printf("%d\n", stackp - stackb); continue; case stop_nowidth: @@ -4106,6 +4104,7 @@ re_match(bufp, string_arg, size, pos, regs) if (best_regs_set) goto restore_best_regs; + FREE_VARIABLES(); FREE_AND_RETURN(stackb,(-1)); /* Failure to match. */ } diff --git a/regex.h b/regex.h index 3e0ebd26a7..b9619a7dbf 100644 --- a/regex.h +++ b/regex.h @@ -33,6 +33,7 @@ # define re_mbcinit ruby_re_mbcinit # define re_search ruby_re_search # define re_set_casetable ruby_re_set_casetable +# define register_info_type ruby_register_info_type #endif #include @@ -90,6 +91,17 @@ void re_mbcinit (); #define ismbchar(c) re_mbctab[(unsigned char)(c)] #define mbclen(c) (re_mbctab[(unsigned char)(c)]+1) +/* Structure used in re_match() */ + +typedef union +{ + unsigned char *word; + struct { + unsigned is_active : 1; + unsigned matched_something : 1; + } bits; +} register_info_type; + /* This data structure is used to represent a compiled pattern. */ struct re_pattern_buffer @@ -116,6 +128,15 @@ struct re_pattern_buffer 2 as value means can match null string but at end of range or before a character listed in the fastmap. */ + + /* stack & working area for re_match() */ + unsigned char **regstart; + unsigned char **regend; + unsigned char **old_regstart; + unsigned char **old_regend; + register_info_type *reg_info; + unsigned char **best_regstart; + unsigned char **best_regend; }; typedef struct re_pattern_buffer regex_t; diff --git a/ruby.c b/ruby.c index 004dc1fe90..5f53da2a18 100644 --- a/ruby.c +++ b/ruby.c @@ -634,7 +634,7 @@ load_file(fname, script) char *path; char *pend = RSTRING(line)->ptr + RSTRING(line)->len; - p = RSTRING(line)->ptr + 2; /* skip `#!' */ + p = RSTRING(line)->ptr + 1; /* skip `#!' */ if (pend[-1] == '\n') pend--; /* chomp line */ if (pend[-1] == '\r') pend--; *pend = '\0'; @@ -884,6 +884,10 @@ ruby_prog_init() addpath(RUBY_SITE_THIN_ARCHLIB); #endif +#ifdef RUBY_SEARCH_PATH + addpath(RUBY_SEARCH_PATH); +#endif + if (rb_safe_level() == 0) { addpath(getenv("RUBYLIB")); } diff --git a/ruby.h b/ruby.h index b973105a8b..25c8fc6e7a 100644 --- a/ruby.h +++ b/ruby.h @@ -87,7 +87,7 @@ extern "C" { #if SIZEOF_LONG != SIZEOF_VOIDP ---->> ruby requires sizeof(void*) == sizeof(long) to be compiled. <<---- -# endif +#endif typedef unsigned long VALUE; typedef unsigned int ID; diff --git a/rubytest.rb b/rubytest.rb index 3bf11b3ba5..32b2844a9f 100644 --- a/rubytest.rb +++ b/rubytest.rb @@ -1,12 +1,27 @@ #! ./miniruby -I. -x = ENV["LD_LIBRARY_PATH"] -x = x ? x+":." : "." -ENV["LD_LIBRARY_PATH"] = x - require 'rbconfig' include Config +if File.exist? CONFIG['LIBRUBY_SO'] + case RUBY_PLATFORM + when /-hpux/ + dldpath = "SHLIB_PATH" + when /-aix/ + dldpath = "LIBPATH" + else + dldpath = "LD_LIBRARY_PATH" + end + x = ENV[dldpath] + x = x ? ".:"+x : "." + ENV[dldpath] = x +end + +if File.exist? CONFIG['LIBRUBY_SO'] + ENV["LD_PRELOAD"] ||= "" + ENV["LD_PRELOAD"] += " ./#{CONFIG['LIBRUBY_SO']}" +end + $stderr.reopen($stdout) error = '' `./#{CONFIG["ruby_install_name"]} #{CONFIG["srcdir"]}/sample/test.rb`.each do |line| diff --git a/st.c b/st.c index bb2646e49e..f481355875 100644 --- a/st.c +++ b/st.c @@ -403,16 +403,8 @@ st_delete_safe(table, key, value, never) return 0; } - if (EQUAL(table, *key, ptr->key)) { - table->num_entries--; - *key = ptr->key; - if (value != 0) *value = ptr->record; - ptr->key = ptr->record = never; - return 1; - } - - for(; ptr->next != 0; ptr = ptr->next) { - if (EQUAL(table, ptr->next->key, *key)) { + for(; ptr != 0; ptr = ptr->next) { + if (EQUAL(table, ptr->key, *key)) { table->num_entries--; *key = ptr->key; if (value != 0) *value = ptr->record; @@ -424,6 +416,25 @@ st_delete_safe(table, key, value, never) return 0; } +static int +delete_never(key, value, never) + char *key, *value, *never; +{ + if (value == never) return ST_DELETE; + return ST_CONTINUE; +} + +void +st_cleanup_safe(table, never) + st_table *table; + char *never; +{ + int num_entries = table->num_entries; + + st_foreach(table, delete_never, never); + table->num_entries = num_entries; +} + void st_foreach(table, func, arg) st_table *table; diff --git a/st.h b/st.h index ce87df6011..b626969f83 100644 --- a/st.h +++ b/st.h @@ -32,7 +32,7 @@ st_table *st_init_strtable(); st_table *st_init_strtable_with_size(); int st_delete(), st_delete_safe(); int st_insert(), st_lookup(); -void st_foreach(), st_add_direct(), st_free_table(); +void st_foreach(), st_add_direct(), st_free_table(), st_cleanup_safe(); st_table *st_copy(); #define ST_NUMCMP ((int (*)()) 0) diff --git a/string.c b/string.c index f191bd1f4d..b9a0918edc 100644 --- a/string.c +++ b/string.c @@ -631,29 +631,39 @@ rb_str_rindex(argc, argv, str) switch (TYPE(sub)) { case T_REGEXP: - pos = rb_reg_search(sub, str, pos, 1); - if (pos >= 0) return INT2NUM(pos); + if (RREGEXP(sub)->len) { + pos = rb_reg_search(sub, str, pos, 1); + } + if (pos >= 0) return INT2NUM(pos); break; case T_STRING: - /* substring longer than string */ - if (pos < RSTRING(sub)->len) return Qnil; - sbeg = RSTRING(str)->ptr; - s = RSTRING(str)->ptr + pos - RSTRING(sub)->len; - t = RSTRING(sub)->ptr; len = RSTRING(sub)->len; - while (sbeg <= s) { - if (*s == *t && memcmp(s, t, len) == 0) { - return INT2NUM(s - RSTRING(str)->ptr); + /* substring longer than string */ + if (RSTRING(str)->len < len) return Qnil; + if (RSTRING(str)->len - pos < len) { + pos = RSTRING(str)->len - len; + } + sbeg = RSTRING(str)->ptr; + s = RSTRING(str)->ptr + pos; + t = RSTRING(sub)->ptr; + if (len) { + while (sbeg <= s) { + if (*s == *t && memcmp(s, t, len) == 0) { + return INT2NUM(s - RSTRING(str)->ptr); + } + s--; } - s--; + } + else { + return INT2NUM(pos); } break; case T_FIXNUM: { int c = FIX2INT(sub); - char *p = RSTRING(str)->ptr + pos - 1; + char *p = RSTRING(str)->ptr + pos; char *pbeg = RSTRING(str)->ptr; while (pbeg <= p) { @@ -1945,7 +1955,6 @@ rb_str_count(argc, argv, str) VALUE *argv; VALUE str; { - VALUE a1, a2; char table[256]; char *s, *send; int init = 1; @@ -2165,7 +2174,7 @@ rb_str_each_line(argc, argv, str) for (s = p, p += rslen; p < pend; p++) { if (rslen == 0 && *p == '\n') { - if (p[1] != '\n') continue; + if (*++p != '\n') continue; while (*p == '\n') p++; } if (p[-1] == newline && @@ -2462,7 +2471,7 @@ rb_str_crypt(str, salt) if (TYPE(salt) != T_STRING) salt = rb_str_to_str(salt); if (RSTRING(salt)->len < 2) - rb_raise(rb_eArgError, "salt too short(need >2 bytes)"); + rb_raise(rb_eArgError, "salt too short(need >=2 bytes)"); return rb_str_new2(crypt(RSTRING(str)->ptr, RSTRING(salt)->ptr)); } diff --git a/time.c b/time.c index 113f34cccb..dc295a7ed7 100644 --- a/time.c +++ b/time.c @@ -101,7 +101,7 @@ rb_time_new(sec, usec) } struct timeval -rb_time_timeval(time) +rb_time_interval(time) VALUE time; { struct time_object *tobj; @@ -130,17 +130,28 @@ rb_time_timeval(time) break; default: - if (!rb_obj_is_kind_of(time, rb_cTime)) { - rb_raise(rb_eTypeError, "can't convert %s into Time", - rb_class2name(CLASS_OF(time))); - } - GetTimeval(time, tobj); - t = tobj->tv; + rb_raise(rb_eTypeError, "can't convert %s into Time interval", + rb_class2name(CLASS_OF(time))); break; } return t; } +struct timeval +rb_time_timeval(time) + VALUE time; +{ + struct time_object *tobj; + struct timeval t; + + if (rb_obj_is_kind_of(time, rb_cTime)) { + GetTimeval(time, tobj); + t = tobj->tv; + return t; + } + return rb_time_interval(time); +} + static VALUE time_s_at(klass, time) VALUE klass, time; diff --git a/version.c b/version.c index 42d2ef84ca..57039d5cfe 100644 --- a/version.c +++ b/version.c @@ -35,12 +35,7 @@ Init_version() void ruby_show_version() { -#if RUBY_VERSION_CODE < 140 - printf("ruby %s-%d [%s]\n", RUBY_VERSION, RUBY_RELEASE_CODE % 1000000, - RUBY_PLATFORM); -#else printf("ruby %s (%s) [%s]\n", RUBY_VERSION, RUBY_RELEASE_DATE, RUBY_PLATFORM); -#endif } void diff --git a/version.h b/version.h index d6d3aa2974..7f50463e03 100644 --- a/version.h +++ b/version.h @@ -1,4 +1,4 @@ -#define RUBY_VERSION "1.3.4" -#define RUBY_RELEASE_DATE "1999-06-25" -#define RUBY_VERSION_CODE 134 -#define RUBY_RELEASE_CODE 19990625 +#define RUBY_VERSION "1.3.5" +#define RUBY_RELEASE_DATE "1999-07-15" +#define RUBY_VERSION_CODE 135 +#define RUBY_RELEASE_CODE 19990715