diff options
author | matz <matz@b2dd03c8-39d4-4d8f-98ff-823fe69b080e> | 1998-09-08 09:17:55 +0000 |
---|---|---|
committer | matz <matz@b2dd03c8-39d4-4d8f-98ff-823fe69b080e> | 1998-09-08 09:17:55 +0000 |
commit | b0e1436164e4004f048bac4babc220e0deccb4f9 (patch) | |
tree | 1e46ec5aa4b12c076ba9c535ff889a49b9a7b3c1 | |
parent | 48acbc5e03622f1eb0423a6c2a3a603f61acfac6 (diff) |
1.1c5
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/branches/v1_1r@300 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
-rw-r--r-- | ChangeLog | 22 | ||||
-rw-r--r-- | bignum.c | 19 | ||||
-rw-r--r-- | configure | 422 | ||||
-rw-r--r-- | configure.in | 1 | ||||
-rw-r--r-- | dln.c | 2 | ||||
-rw-r--r-- | eval.c | 1 | ||||
-rw-r--r-- | ext/extmk.rb.in | 24 | ||||
-rw-r--r-- | ext/kconv/kconv.c | 9 | ||||
-rw-r--r-- | gc.c | 5 | ||||
-rw-r--r-- | lib/ftools.rb | 2 | ||||
-rw-r--r-- | lib/jcode.rb | 10 | ||||
-rw-r--r-- | lib/mkmf.rb | 23 | ||||
-rw-r--r-- | regex.c | 2 | ||||
-rw-r--r-- | string.c | 47 | ||||
-rw-r--r-- | util.c | 252 | ||||
-rw-r--r-- | version.h | 4 | ||||
-rw-r--r-- | win32/config.h | 2 |
17 files changed, 356 insertions, 491 deletions
@@ -1,9 +1,31 @@ +Tue Sep 8 18:05:33 1998 Yukihiro Matsumoto <[email protected]> + + * version 1.1c5 released. + +Tue Sep 8 10:03:39 1998 Yukihiro Matsumoto <[email protected]> + + * string.c (str_each_line): wrong line splitting with newline at + top of the string. + + * string.c: non bang methods return copied string. + + * eval.c (f_END): needed to initialize frame->argc; + +Fri Sep 4 11:27:40 1998 Yukihiro Matsumoto <[email protected]> + + * bignum.c (bigadd): proper sign combination. + + * regex.c (re_search): wrong return value for \A. + Thu Sep 3 14:08:14 1998 Yukihiro Matsumoto <[email protected]> * version 1.1c4 released. Tue Sep 1 10:47:16 1998 Yukihiro Matsumoto <[email protected]> + * regex.c (slow_search): do not compare llen and blen. llen may + be longer than blen, if little contains 0xff. + * regex.c (mbctab_euc): set 0x8e as multibyte character. * string.c (str_inspect): mask character for octal output. @@ -557,22 +557,11 @@ bigadd(x, y, sign) long num; unsigned int i, len; - if (RBIGNUM(x)->sign == (RBIGNUM(y)->sign ^ sign)) { - if (RBIGNUM(y)->sign == sign) return bigsub(y, x); + sign = (sign == RBIGNUM(y)->sign); + if (RBIGNUM(x)->sign != sign) { + if (sign) return bigsub(y, x); return bigsub(x, y); } - else if (sign == 0) { - /* x - y */ - if ((RBIGNUM(x)->sign == 0) && (RBIGNUM(y)->sign == 1)) { - /* x is negative and y is positive. */ - /* return -(abs(x) + y) */ - VALUE ret; - RBIGNUM(x)->sign = 1; /* x = abs(x) */ - ret = bigadd(x, y, 1); /* ret = x + y (recursive call) */ - RBIGNUM(ret)->sign = 0; /* ret = -ret */ - return ret; - } - } if (RBIGNUM(x)->len > RBIGNUM(y)->len) { len = RBIGNUM(x)->len + 1; @@ -581,7 +570,7 @@ bigadd(x, y, sign) else { len = RBIGNUM(y)->len + 1; } - z = bignew(len, sign==RBIGNUM(y)->sign); + z = bignew(len, sign); len = RBIGNUM(x)->len; for (i = 0, num = 0; i < len; i++) { @@ -1050,8 +1050,68 @@ test -n "$AR" && break done test -n "$AR" || AR="ar" +# Find a good install program. We prefer a C program (faster), +# so one script is as good as another. But avoid the broken or +# incompatible versions: +# SysV /etc/install, /usr/sbin/install +# SunOS /usr/etc/install +# IRIX /sbin/install +# AIX /bin/install +# AFS /usr/afsws/bin/install, which mishandles nonexistent args +# 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:1065: 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 +else + IFS="${IFS= }"; ac_save_IFS="$IFS"; IFS="${IFS}:" + for ac_dir in $PATH; do + # Account for people who put trailing slashes in PATH elements. + case "$ac_dir/" in + /|./|.//|/etc/*|/usr/sbin/*|/usr/etc/*|/sbin/*|/usr/afsws/bin/*|/usr/ucb/*) ;; + *) + # OSF1 and SCO ODT 3.0 have their own names for install. + for ac_prog in ginstall installbsd scoinst install; do + if test -f $ac_dir/$ac_prog; then + if test $ac_prog = install && + grep dspmsg $ac_dir/$ac_prog >/dev/null 2>&1; then + # AIX install. It has an incompatible calling convention. + # OSF/1 installbsd also uses dspmsg, but is usable. + : + else + ac_cv_path_install="$ac_dir/$ac_prog -c" + break 2 + fi + fi + done + ;; + esac + done + IFS="$ac_save_IFS" + +fi + if test "${ac_cv_path_install+set}" = set; then + INSTALL="$ac_cv_path_install" + else + # As a last resort, use the slow shell script. We don't cache a + # path for INSTALL within a source directory, because that will + # break other packages using the cache if that directory is + # removed, or if the path is relative. + INSTALL="$ac_install_sh" + fi +fi +echo "$ac_t""$INSTALL" 1>&6 + +# Use test -z because SunOS4 sh mishandles braces in ${var-val}. +# It thinks the first close brace ends the variable substitution. +test -z "$INSTALL_PROGRAM" && INSTALL_PROGRAM='${INSTALL}' + +test -z "$INSTALL_DATA" && INSTALL_DATA='${INSTALL} -m 644' + echo $ac_n "checking whether ${MAKE-make} sets \${MAKE}""... $ac_c" 1>&6 -echo "configure:1055: checking whether ${MAKE-make} sets \${MAKE}" >&5 +echo "configure:1115: 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 @@ -1081,17 +1141,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:1085: checking for minix/config.h" >&5 +echo "configure:1145: 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 -#line 1090 "configure" +#line 1150 "configure" #include "confdefs.h" #include <minix/config.h> EOF ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out" -{ (eval echo configure:1095: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; } +{ (eval echo configure:1155: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; } ac_err=`grep -v '^ *+' conftest.out` if test -z "$ac_err"; then rm -rf conftest* @@ -1130,7 +1190,7 @@ fi echo $ac_n "checking size of int""... $ac_c" 1>&6 -echo "configure:1134: checking size of int" >&5 +echo "configure:1194: 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 @@ -1138,7 +1198,7 @@ else { echo "configure: error: can not run test program while cross compiling" 1>&2; exit 1; } else cat > conftest.$ac_ext <<EOF -#line 1142 "configure" +#line 1202 "configure" #include "confdefs.h" #include <stdio.h> main() @@ -1149,7 +1209,7 @@ main() exit(0); } EOF -if { (eval echo configure:1153: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest && (./conftest; exit) 2>/dev/null +if { (eval echo configure:1213: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest && (./conftest; exit) 2>/dev/null then ac_cv_sizeof_int=`cat conftestval` else @@ -1169,7 +1229,7 @@ EOF echo $ac_n "checking size of long""... $ac_c" 1>&6 -echo "configure:1173: checking size of long" >&5 +echo "configure:1233: 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 @@ -1177,7 +1237,7 @@ else { echo "configure: error: can not run test program while cross compiling" 1>&2; exit 1; } else cat > conftest.$ac_ext <<EOF -#line 1181 "configure" +#line 1241 "configure" #include "confdefs.h" #include <stdio.h> main() @@ -1188,7 +1248,7 @@ main() exit(0); } EOF -if { (eval echo configure:1192: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest && (./conftest; exit) 2>/dev/null +if { (eval echo configure:1252: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest && (./conftest; exit) 2>/dev/null then ac_cv_sizeof_long=`cat conftestval` else @@ -1208,7 +1268,7 @@ EOF echo $ac_n "checking size of void*""... $ac_c" 1>&6 -echo "configure:1212: checking size of void*" >&5 +echo "configure:1272: 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 @@ -1216,7 +1276,7 @@ else { echo "configure: error: can not run test program while cross compiling" 1>&2; exit 1; } else cat > conftest.$ac_ext <<EOF -#line 1220 "configure" +#line 1280 "configure" #include "confdefs.h" #include <stdio.h> main() @@ -1227,7 +1287,7 @@ main() exit(0); } EOF -if { (eval echo configure:1231: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest && (./conftest; exit) 2>/dev/null +if { (eval echo configure:1291: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest && (./conftest; exit) 2>/dev/null then ac_cv_sizeof_voidp=`cat conftestval` else @@ -1248,19 +1308,19 @@ EOF echo $ac_n "checking for prototypes""... $ac_c" 1>&6 -echo "configure:1252: checking for prototypes" >&5 +echo "configure:1312: 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 <<EOF -#line 1257 "configure" +#line 1317 "configure" #include "confdefs.h" int foo(int x) { return 0; } int main() { return foo(10); ; return 0; } EOF -if { (eval echo configure:1264: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then +if { (eval echo configure:1324: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then rm -rf conftest* rb_cv_have_prototypes=yes else @@ -1281,12 +1341,12 @@ EOF fi echo $ac_n "checking for variable length prototypes and stdarg.h""... $ac_c" 1>&6 -echo "configure:1285: checking for variable length prototypes and stdarg.h" >&5 +echo "configure:1345: 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 <<EOF -#line 1290 "configure" +#line 1350 "configure" #include "confdefs.h" #include <stdarg.h> @@ -1303,7 +1363,7 @@ int main() { return foo(10, "", 3.14); ; return 0; } EOF -if { (eval echo configure:1307: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then +if { (eval echo configure:1367: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then rm -rf conftest* rb_cv_stdarg=yes else @@ -1324,19 +1384,19 @@ EOF fi echo $ac_n "checking for gcc attribute noreturn""... $ac_c" 1>&6 -echo "configure:1328: checking for gcc attribute noreturn" >&5 +echo "configure:1388: 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 <<EOF -#line 1333 "configure" +#line 1393 "configure" #include "confdefs.h" void exit(int x) __attribute__ ((noreturn)); int main() { ; return 0; } EOF -if { (eval echo configure:1340: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then +if { (eval echo configure:1400: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then rm -rf conftest* rb_cv_have_attr_noreturn=yes else @@ -1365,7 +1425,7 @@ beos*) ;; *) LIBS="-lm $LIBS";; esac echo $ac_n "checking for crypt in -lcrypt""... $ac_c" 1>&6 -echo "configure:1369: checking for crypt in -lcrypt" >&5 +echo "configure:1429: 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 @@ -1373,7 +1433,7 @@ else ac_save_LIBS="$LIBS" LIBS="-lcrypt $LIBS" cat > conftest.$ac_ext <<EOF -#line 1377 "configure" +#line 1437 "configure" #include "confdefs.h" /* Override any gcc2 internal prototype to avoid an error. */ /* We use char because int might match the return type of a gcc2 @@ -1384,7 +1444,7 @@ int main() { crypt() ; return 0; } EOF -if { (eval echo configure:1388: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest; then +if { (eval echo configure:1448: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest; then rm -rf conftest* eval "ac_cv_lib_$ac_lib_var=yes" else @@ -1412,7 +1472,7 @@ else fi echo $ac_n "checking for dlopen in -ldl""... $ac_c" 1>&6 -echo "configure:1416: checking for dlopen in -ldl" >&5 +echo "configure:1476: 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 @@ -1420,7 +1480,7 @@ else ac_save_LIBS="$LIBS" LIBS="-ldl $LIBS" cat > conftest.$ac_ext <<EOF -#line 1424 "configure" +#line 1484 "configure" #include "confdefs.h" /* Override any gcc2 internal prototype to avoid an error. */ /* We use char because int might match the return type of a gcc2 @@ -1431,7 +1491,7 @@ int main() { dlopen() ; return 0; } EOF -if { (eval echo configure:1435: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest; then +if { (eval echo configure:1495: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest; then rm -rf conftest* eval "ac_cv_lib_$ac_lib_var=yes" else @@ -1459,7 +1519,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:1463: checking for shl_load in -ldld" >&5 +echo "configure:1523: 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 @@ -1467,7 +1527,7 @@ else ac_save_LIBS="$LIBS" LIBS="-ldld $LIBS" cat > conftest.$ac_ext <<EOF -#line 1471 "configure" +#line 1531 "configure" #include "confdefs.h" /* Override any gcc2 internal prototype to avoid an error. */ /* We use char because int might match the return type of a gcc2 @@ -1478,7 +1538,7 @@ int main() { shl_load() ; return 0; } EOF -if { (eval echo configure:1482: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest; then +if { (eval echo configure:1542: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest; then rm -rf conftest* eval "ac_cv_lib_$ac_lib_var=yes" else @@ -1511,12 +1571,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:1515: checking for $ac_hdr that defines DIR" >&5 +echo "configure:1575: 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 <<EOF -#line 1520 "configure" +#line 1580 "configure" #include "confdefs.h" #include <sys/types.h> #include <$ac_hdr> @@ -1524,7 +1584,7 @@ int main() { DIR *dirp = 0; ; return 0; } EOF -if { (eval echo configure:1528: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then +if { (eval echo configure:1588: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then rm -rf conftest* eval "ac_cv_header_dirent_$ac_safe=yes" else @@ -1549,7 +1609,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:1553: checking for opendir in -ldir" >&5 +echo "configure:1613: 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 @@ -1557,7 +1617,7 @@ else ac_save_LIBS="$LIBS" LIBS="-ldir $LIBS" cat > conftest.$ac_ext <<EOF -#line 1561 "configure" +#line 1621 "configure" #include "confdefs.h" /* Override any gcc2 internal prototype to avoid an error. */ /* We use char because int might match the return type of a gcc2 @@ -1568,7 +1628,7 @@ int main() { opendir() ; return 0; } EOF -if { (eval echo configure:1572: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest; then +if { (eval echo configure:1632: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest; then rm -rf conftest* eval "ac_cv_lib_$ac_lib_var=yes" else @@ -1590,7 +1650,7 @@ fi else echo $ac_n "checking for opendir in -lx""... $ac_c" 1>&6 -echo "configure:1594: checking for opendir in -lx" >&5 +echo "configure:1654: 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 @@ -1598,7 +1658,7 @@ else ac_save_LIBS="$LIBS" LIBS="-lx $LIBS" cat > conftest.$ac_ext <<EOF -#line 1602 "configure" +#line 1662 "configure" #include "confdefs.h" /* Override any gcc2 internal prototype to avoid an error. */ /* We use char because int might match the return type of a gcc2 @@ -1609,7 +1669,7 @@ int main() { opendir() ; return 0; } EOF -if { (eval echo configure:1613: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest; then +if { (eval echo configure:1673: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest; then rm -rf conftest* eval "ac_cv_lib_$ac_lib_var=yes" else @@ -1632,12 +1692,12 @@ fi fi echo $ac_n "checking for ANSI C header files""... $ac_c" 1>&6 -echo "configure:1636: checking for ANSI C header files" >&5 +echo "configure:1696: 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 <<EOF -#line 1641 "configure" +#line 1701 "configure" #include "confdefs.h" #include <stdlib.h> #include <stdarg.h> @@ -1645,7 +1705,7 @@ else #include <float.h> EOF ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out" -{ (eval echo configure:1649: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; } +{ (eval echo configure:1709: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; } ac_err=`grep -v '^ *+' conftest.out` if test -z "$ac_err"; then rm -rf conftest* @@ -1662,7 +1722,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 -#line 1666 "configure" +#line 1726 "configure" #include "confdefs.h" #include <string.h> EOF @@ -1680,7 +1740,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 -#line 1684 "configure" +#line 1744 "configure" #include "confdefs.h" #include <stdlib.h> EOF @@ -1701,7 +1761,7 @@ if test "$cross_compiling" = yes; then : else cat > conftest.$ac_ext <<EOF -#line 1705 "configure" +#line 1765 "configure" #include "confdefs.h" #include <ctype.h> #define ISLOWER(c) ('a' <= (c) && (c) <= 'z') @@ -1712,7 +1772,7 @@ if (XOR (islower (i), ISLOWER (i)) || toupper (i) != TOUPPER (i)) exit(2); exit (0); } EOF -if { (eval echo configure:1716: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest && (./conftest; exit) 2>/dev/null +if { (eval echo configure:1776: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest && (./conftest; exit) 2>/dev/null then : else @@ -1741,17 +1801,17 @@ for ac_hdr in stdlib.h unistd.h limits.h sys/file.h sys/ioctl.h pwd.h \ do ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'` echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6 -echo "configure:1745: checking for $ac_hdr" >&5 +echo "configure:1805: 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 -#line 1750 "configure" +#line 1810 "configure" #include "confdefs.h" #include <$ac_hdr> EOF ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out" -{ (eval echo configure:1755: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; } +{ (eval echo configure:1815: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; } ac_err=`grep -v '^ *+' conftest.out` if test -z "$ac_err"; then rm -rf conftest* @@ -1779,12 +1839,12 @@ done echo $ac_n "checking for uid_t in sys/types.h""... $ac_c" 1>&6 -echo "configure:1783: checking for uid_t in sys/types.h" >&5 +echo "configure:1843: 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 -#line 1788 "configure" +#line 1848 "configure" #include "confdefs.h" #include <sys/types.h> EOF @@ -1813,12 +1873,12 @@ EOF fi echo $ac_n "checking for size_t""... $ac_c" 1>&6 -echo "configure:1817: checking for size_t" >&5 +echo "configure:1877: 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 <<EOF -#line 1822 "configure" +#line 1882 "configure" #include "confdefs.h" #include <sys/types.h> #if STDC_HEADERS @@ -1846,12 +1906,12 @@ EOF fi echo $ac_n "checking for st_blksize in struct stat""... $ac_c" 1>&6 -echo "configure:1850: checking for st_blksize in struct stat" >&5 +echo "configure:1910: 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 <<EOF -#line 1855 "configure" +#line 1915 "configure" #include "confdefs.h" #include <sys/types.h> #include <sys/stat.h> @@ -1859,7 +1919,7 @@ int main() { struct stat s; s.st_blksize; ; return 0; } EOF -if { (eval echo configure:1863: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then +if { (eval echo configure:1923: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then rm -rf conftest* ac_cv_struct_st_blksize=yes else @@ -1881,12 +1941,12 @@ fi save_LIBOJBS="$LIBOBJS" echo $ac_n "checking for st_blocks in struct stat""... $ac_c" 1>&6 -echo "configure:1885: checking for st_blocks in struct stat" >&5 +echo "configure:1945: 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 <<EOF -#line 1890 "configure" +#line 1950 "configure" #include "confdefs.h" #include <sys/types.h> #include <sys/stat.h> @@ -1894,7 +1954,7 @@ int main() { struct stat s; s.st_blocks; ; return 0; } EOF -if { (eval echo configure:1898: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then +if { (eval echo configure:1958: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then rm -rf conftest* ac_cv_struct_st_blocks=yes else @@ -1918,12 +1978,12 @@ fi LIBOBJS="$save_LIBOBJS" echo $ac_n "checking for st_rdev in struct stat""... $ac_c" 1>&6 -echo "configure:1922: checking for st_rdev in struct stat" >&5 +echo "configure:1982: 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 <<EOF -#line 1927 "configure" +#line 1987 "configure" #include "confdefs.h" #include <sys/types.h> #include <sys/stat.h> @@ -1931,7 +1991,7 @@ int main() { struct stat s; s.st_rdev; ; return 0; } EOF -if { (eval echo configure:1935: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then +if { (eval echo configure:1995: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then rm -rf conftest* ac_cv_struct_st_rdev=yes else @@ -1953,7 +2013,7 @@ fi echo $ac_n "checking type of array argument to getgroups""... $ac_c" 1>&6 -echo "configure:1957: checking type of array argument to getgroups" >&5 +echo "configure:2017: 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 @@ -1961,7 +2021,7 @@ else ac_cv_type_getgroups=cross else cat > conftest.$ac_ext <<EOF -#line 1965 "configure" +#line 2025 "configure" #include "confdefs.h" /* Thanks to Mike Rendell for this test. */ @@ -1986,7 +2046,7 @@ main() } EOF -if { (eval echo configure:1990: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest && (./conftest; exit) 2>/dev/null +if { (eval echo configure:2050: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest && (./conftest; exit) 2>/dev/null then ac_cv_type_getgroups=gid_t else @@ -2000,7 +2060,7 @@ fi if test $ac_cv_type_getgroups = cross; then cat > conftest.$ac_ext <<EOF -#line 2004 "configure" +#line 2064 "configure" #include "confdefs.h" #include <unistd.h> EOF @@ -2024,12 +2084,12 @@ EOF echo $ac_n "checking return type of signal handlers""... $ac_c" 1>&6 -echo "configure:2028: checking return type of signal handlers" >&5 +echo "configure:2088: 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 <<EOF -#line 2033 "configure" +#line 2093 "configure" #include "confdefs.h" #include <sys/types.h> #include <signal.h> @@ -2046,7 +2106,7 @@ int main() { int i; ; return 0; } EOF -if { (eval echo configure:2050: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then +if { (eval echo configure:2110: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then rm -rf conftest* ac_cv_type_signal=void else @@ -2067,19 +2127,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:2071: checking for working alloca.h" >&5 +echo "configure:2131: 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 <<EOF -#line 2076 "configure" +#line 2136 "configure" #include "confdefs.h" #include <alloca.h> int main() { char *p = alloca(2 * sizeof(int)); ; return 0; } EOF -if { (eval echo configure:2083: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest; then +if { (eval echo configure:2143: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest; then rm -rf conftest* ac_cv_header_alloca_h=yes else @@ -2100,12 +2160,12 @@ EOF fi echo $ac_n "checking for alloca""... $ac_c" 1>&6 -echo "configure:2104: checking for alloca" >&5 +echo "configure:2164: 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 <<EOF -#line 2109 "configure" +#line 2169 "configure" #include "confdefs.h" #ifdef __GNUC__ @@ -2128,7 +2188,7 @@ int main() { char *p = (char *) alloca(1); ; return 0; } EOF -if { (eval echo configure:2132: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest; then +if { (eval echo configure:2192: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest; then rm -rf conftest* ac_cv_func_alloca_works=yes else @@ -2160,12 +2220,12 @@ EOF echo $ac_n "checking whether alloca needs Cray hooks""... $ac_c" 1>&6 -echo "configure:2164: checking whether alloca needs Cray hooks" >&5 +echo "configure:2224: 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 <<EOF -#line 2169 "configure" +#line 2229 "configure" #include "confdefs.h" #if defined(CRAY) && ! defined(CRAY2) webecray @@ -2190,12 +2250,12 @@ echo "$ac_t""$ac_cv_os_cray" 1>&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:2194: checking for $ac_func" >&5 +echo "configure:2254: 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 <<EOF -#line 2199 "configure" +#line 2259 "configure" #include "confdefs.h" /* System header to define __stub macros and hopefully few prototypes, which can conflict with char $ac_func(); below. */ @@ -2218,7 +2278,7 @@ $ac_func(); ; return 0; } EOF -if { (eval echo configure:2222: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest; then +if { (eval echo configure:2282: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest; then rm -rf conftest* eval "ac_cv_func_$ac_func=yes" else @@ -2245,7 +2305,7 @@ done fi echo $ac_n "checking stack direction for C alloca""... $ac_c" 1>&6 -echo "configure:2249: checking stack direction for C alloca" >&5 +echo "configure:2309: 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 @@ -2253,7 +2313,7 @@ else ac_cv_c_stack_direction=0 else cat > conftest.$ac_ext <<EOF -#line 2257 "configure" +#line 2317 "configure" #include "confdefs.h" find_stack_direction () { @@ -2272,7 +2332,7 @@ main () exit (find_stack_direction() < 0); } EOF -if { (eval echo configure:2276: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest && (./conftest; exit) 2>/dev/null +if { (eval echo configure:2336: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest && (./conftest; exit) 2>/dev/null then ac_cv_c_stack_direction=1 else @@ -2294,12 +2354,12 @@ EOF fi echo $ac_n "checking for pid_t""... $ac_c" 1>&6 -echo "configure:2298: checking for pid_t" >&5 +echo "configure:2358: 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 <<EOF -#line 2303 "configure" +#line 2363 "configure" #include "confdefs.h" #include <sys/types.h> #if STDC_HEADERS @@ -2328,17 +2388,17 @@ fi ac_safe=`echo "vfork.h" | sed 'y%./+-%__p_%'` echo $ac_n "checking for vfork.h""... $ac_c" 1>&6 -echo "configure:2332: checking for vfork.h" >&5 +echo "configure:2392: 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 -#line 2337 "configure" +#line 2397 "configure" #include "confdefs.h" #include <vfork.h> EOF ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out" -{ (eval echo configure:2342: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; } +{ (eval echo configure:2402: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; } ac_err=`grep -v '^ *+' conftest.out` if test -z "$ac_err"; then rm -rf conftest* @@ -2363,18 +2423,18 @@ else fi echo $ac_n "checking for working vfork""... $ac_c" 1>&6 -echo "configure:2367: checking for working vfork" >&5 +echo "configure:2427: 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:2373: checking for vfork" >&5 +echo "configure:2433: 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 <<EOF -#line 2378 "configure" +#line 2438 "configure" #include "confdefs.h" /* System header to define __stub macros and hopefully few prototypes, which can conflict with char vfork(); below. */ @@ -2397,7 +2457,7 @@ vfork(); ; return 0; } EOF -if { (eval echo configure:2401: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest; then +if { (eval echo configure:2461: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest; then rm -rf conftest* eval "ac_cv_func_vfork=yes" else @@ -2418,7 +2478,7 @@ fi else cat > conftest.$ac_ext <<EOF -#line 2422 "configure" +#line 2482 "configure" #include "confdefs.h" /* Thanks to Paul Eggert for this test. */ #include <stdio.h> @@ -2513,7 +2573,7 @@ main() { } } EOF -if { (eval echo configure:2517: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest && (./conftest; exit) 2>/dev/null +if { (eval echo configure:2577: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest && (./conftest; exit) 2>/dev/null then ac_cv_func_vfork_works=yes else @@ -2536,7 +2596,7 @@ EOF fi echo $ac_n "checking for 8-bit clean memcmp""... $ac_c" 1>&6 -echo "configure:2540: checking for 8-bit clean memcmp" >&5 +echo "configure:2600: 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 @@ -2544,7 +2604,7 @@ else ac_cv_func_memcmp_clean=no else cat > conftest.$ac_ext <<EOF -#line 2548 "configure" +#line 2608 "configure" #include "confdefs.h" main() @@ -2554,7 +2614,7 @@ main() } EOF -if { (eval echo configure:2558: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest && (./conftest; exit) 2>/dev/null +if { (eval echo configure:2618: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest && (./conftest; exit) 2>/dev/null then ac_cv_func_memcmp_clean=yes else @@ -2575,12 +2635,12 @@ for ac_func in dup2 setenv memmove mkdir strcasecmp strerror strftime\ strchr strstr strtoul strdup crypt flock snprintf do echo $ac_n "checking for $ac_func""... $ac_c" 1>&6 -echo "configure:2579: checking for $ac_func" >&5 +echo "configure:2639: 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 <<EOF -#line 2584 "configure" +#line 2644 "configure" #include "confdefs.h" /* System header to define __stub macros and hopefully few prototypes, which can conflict with char $ac_func(); below. */ @@ -2603,7 +2663,7 @@ $ac_func(); ; return 0; } EOF -if { (eval echo configure:2607: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest; then +if { (eval echo configure:2667: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest; then rm -rf conftest* eval "ac_cv_func_$ac_func=yes" else @@ -2636,12 +2696,12 @@ for ac_func in fmod killpg drand48 random wait4 waitpid syscall getcwd\ dlopen sigprocmask sigaction _setjmp setpgrp setsid do echo $ac_n "checking for $ac_func""... $ac_c" 1>&6 -echo "configure:2640: checking for $ac_func" >&5 +echo "configure:2700: 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 <<EOF -#line 2645 "configure" +#line 2705 "configure" #include "confdefs.h" /* System header to define __stub macros and hopefully few prototypes, which can conflict with char $ac_func(); below. */ @@ -2664,7 +2724,7 @@ $ac_func(); ; return 0; } EOF -if { (eval echo configure:2668: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest; then +if { (eval echo configure:2728: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest; then rm -rf conftest* eval "ac_cv_func_$ac_func=yes" else @@ -2690,12 +2750,12 @@ done if test "$ac_cv_func_strftime" = no; then echo $ac_n "checking whether struct tm is in sys/time.h or time.h""... $ac_c" 1>&6 -echo "configure:2694: checking whether struct tm is in sys/time.h or time.h" >&5 +echo "configure:2754: 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 <<EOF -#line 2699 "configure" +#line 2759 "configure" #include "confdefs.h" #include <sys/types.h> #include <time.h> @@ -2703,7 +2763,7 @@ int main() { struct tm *tp; tp->tm_sec; ; return 0; } EOF -if { (eval echo configure:2707: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then +if { (eval echo configure:2767: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then rm -rf conftest* ac_cv_struct_tm=time.h else @@ -2724,12 +2784,12 @@ EOF fi echo $ac_n "checking for tm_zone in struct tm""... $ac_c" 1>&6 -echo "configure:2728: checking for tm_zone in struct tm" >&5 +echo "configure:2788: 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 <<EOF -#line 2733 "configure" +#line 2793 "configure" #include "confdefs.h" #include <sys/types.h> #include <$ac_cv_struct_tm> @@ -2737,7 +2797,7 @@ int main() { struct tm tm; tm.tm_zone; ; return 0; } EOF -if { (eval echo configure:2741: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then +if { (eval echo configure:2801: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then rm -rf conftest* ac_cv_struct_tm_zone=yes else @@ -2757,12 +2817,12 @@ EOF else echo $ac_n "checking for tzname""... $ac_c" 1>&6 -echo "configure:2761: checking for tzname" >&5 +echo "configure:2821: 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 <<EOF -#line 2766 "configure" +#line 2826 "configure" #include "confdefs.h" #include <time.h> #ifndef tzname /* For SGI. */ @@ -2772,7 +2832,7 @@ int main() { atoi(*tzname); ; return 0; } EOF -if { (eval echo configure:2776: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest; then +if { (eval echo configure:2836: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest; then rm -rf conftest* ac_cv_var_tzname=yes else @@ -2794,14 +2854,14 @@ EOF fi cat > conftest.$ac_ext <<EOF -#line 2798 "configure" +#line 2858 "configure" #include "confdefs.h" int main() { extern int daylight; int i = daylight; ; return 0; } EOF -if { (eval echo configure:2805: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest; then +if { (eval echo configure:2865: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest; then rm -rf conftest* cat >> confdefs.h <<\EOF #define HAVE_DAYLIGHT 1 @@ -2821,7 +2881,7 @@ EOF else echo $ac_n "checking for BSD signal semantics""... $ac_c" 1>&6 -echo "configure:2825: checking for BSD signal semantics" >&5 +echo "configure:2885: 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 @@ -2829,7 +2889,7 @@ else { echo "configure: error: can not run test program while cross compiling" 1>&2; exit 1; } else cat > conftest.$ac_ext <<EOF -#line 2833 "configure" +#line 2893 "configure" #include "confdefs.h" #include <stdio.h> @@ -2851,7 +2911,7 @@ main() } EOF -if { (eval echo configure:2855: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest && (./conftest; exit) 2>/dev/null +if { (eval echo configure:2915: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest && (./conftest; exit) 2>/dev/null then rb_cv_bsd_signal=yes else @@ -2885,19 +2945,19 @@ EOF else echo $ac_n "checking whether getpgrp() has arg""... $ac_c" 1>&6 -echo "configure:2889: checking whether getpgrp() has arg" >&5 +echo "configure:2949: checking whether getpgrp() has arg" >&5 if eval "test \"`echo '$''{'rb_cv_bsdgetpgrp'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 else cat > conftest.$ac_ext <<EOF -#line 2894 "configure" +#line 2954 "configure" #include "confdefs.h" #include <unistd.h> int main() { getpgrp(0); ; return 0; } EOF -if { (eval echo configure:2901: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then +if { (eval echo configure:2961: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then rm -rf conftest* rb_cv_bsdgetpgrp=yes else @@ -2918,19 +2978,19 @@ EOF fi echo $ac_n "checking whether setpgrp() has args""... $ac_c" 1>&6 -echo "configure:2922: checking whether setpgrp() has args" >&5 +echo "configure:2982: checking whether setpgrp() has args" >&5 if eval "test \"`echo '$''{'rb_cv_bsdsetpgrp'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 else cat > conftest.$ac_ext <<EOF -#line 2927 "configure" +#line 2987 "configure" #include "confdefs.h" #include <unistd.h> int main() { setpgrp(1, 1); ; return 0; } EOF -if { (eval echo configure:2934: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then +if { (eval echo configure:2994: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then rm -rf conftest* rb_cv_bsdsetpgrp=yes else @@ -2952,14 +3012,14 @@ EOF fi echo $ac_n "checking whether byte ordering is bigendian""... $ac_c" 1>&6 -echo "configure:2956: checking whether byte ordering is bigendian" >&5 +echo "configure:3016: 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 <<EOF -#line 2963 "configure" +#line 3023 "configure" #include "confdefs.h" #include <sys/types.h> #include <sys/param.h> @@ -2970,11 +3030,11 @@ int main() { #endif ; return 0; } EOF -if { (eval echo configure:2974: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then +if { (eval echo configure:3034: \"$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 <<EOF -#line 2978 "configure" +#line 3038 "configure" #include "confdefs.h" #include <sys/types.h> #include <sys/param.h> @@ -2985,7 +3045,7 @@ int main() { #endif ; return 0; } EOF -if { (eval echo configure:2989: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then +if { (eval echo configure:3049: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then rm -rf conftest* ac_cv_c_bigendian=yes else @@ -3005,7 +3065,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 <<EOF -#line 3009 "configure" +#line 3069 "configure" #include "confdefs.h" main () { /* Are we little or big endian? From Harbison&Steele. */ @@ -3018,7 +3078,7 @@ main () { exit (u.c[sizeof (long) - 1] == 1); } EOF -if { (eval echo configure:3022: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest && (./conftest; exit) 2>/dev/null +if { (eval echo configure:3082: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest && (./conftest; exit) 2>/dev/null then ac_cv_c_bigendian=no else @@ -3042,14 +3102,14 @@ EOF fi echo $ac_n "checking whether char is unsigned""... $ac_c" 1>&6 -echo "configure:3046: checking whether char is unsigned" >&5 +echo "configure:3106: 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 <<EOF -#line 3053 "configure" +#line 3113 "configure" #include "confdefs.h" #ifdef __CHAR_UNSIGNED__ yes @@ -3071,7 +3131,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 <<EOF -#line 3075 "configure" +#line 3135 "configure" #include "confdefs.h" /* volatile prevents gcc2 from optimizing the test away on sparcs. */ #if !defined(__STDC__) || __STDC__ != 1 @@ -3081,7 +3141,7 @@ main() { volatile char c = 255; exit(c < 0); } EOF -if { (eval echo configure:3085: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest && (./conftest; exit) 2>/dev/null +if { (eval echo configure:3145: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest && (./conftest; exit) 2>/dev/null then ac_cv_c_char_unsigned=yes else @@ -3106,7 +3166,7 @@ fi echo $ac_n "checking whether right shift preserve sign bit""... $ac_c" 1>&6 -echo "configure:3110: checking whether right shift preserve sign bit" >&5 +echo "configure:3170: 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 @@ -3114,7 +3174,7 @@ else { echo "configure: error: can not run test program while cross compiling" 1>&2; exit 1; } else cat > conftest.$ac_ext <<EOF -#line 3118 "configure" +#line 3178 "configure" #include "confdefs.h" int @@ -3126,7 +3186,7 @@ main() } EOF -if { (eval echo configure:3130: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest && (./conftest; exit) 2>/dev/null +if { (eval echo configure:3190: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest && (./conftest; exit) 2>/dev/null then rb_cv_rshift_sign=yes else @@ -3154,19 +3214,19 @@ EOF fi echo $ac_n "checking count field in FILE structures""... $ac_c" 1>&6 -echo "configure:3158: checking count field in FILE structures" >&5 +echo "configure:3218: 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 <<EOF -#line 3163 "configure" +#line 3223 "configure" #include "confdefs.h" #include <stdio.h> int main() { FILE *f = stdin; f->_cnt = 0; ; return 0; } EOF -if { (eval echo configure:3170: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then +if { (eval echo configure:3230: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then rm -rf conftest* rb_cv_fcnt="_cnt" else @@ -3176,14 +3236,14 @@ fi rm -f conftest* if test "$rb_cv_fcnt" = ""; then cat > conftest.$ac_ext <<EOF -#line 3180 "configure" +#line 3240 "configure" #include "confdefs.h" #include <stdio.h> int main() { FILE *f = stdin; f->__cnt = 0; ; return 0; } EOF -if { (eval echo configure:3187: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then +if { (eval echo configure:3247: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then rm -rf conftest* rb_cv_fcnt="__cnt" else @@ -3194,14 +3254,14 @@ rm -f conftest* fi if test "$rb_cv_fcnt" = ""; then cat > conftest.$ac_ext <<EOF -#line 3198 "configure" +#line 3258 "configure" #include "confdefs.h" #include <stdio.h> int main() { FILE *f = stdin; f->_r = 0; ; return 0; } EOF -if { (eval echo configure:3205: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then +if { (eval echo configure:3265: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then rm -rf conftest* rb_cv_fcnt="_r" else @@ -3212,14 +3272,14 @@ rm -f conftest* fi if test "$rb_cv_fcnt" = ""; then cat > conftest.$ac_ext <<EOF -#line 3216 "configure" +#line 3276 "configure" #include "confdefs.h" #include <stdio.h> int main() { FILE *f = stdin; f->readCount = 0; ; return 0; } EOF -if { (eval echo configure:3223: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then +if { (eval echo configure:3283: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then rm -rf conftest* rb_cv_fcnt="readCount" else @@ -3244,9 +3304,9 @@ fi if test "$ac_cv_func_getpwent" = yes; then echo $ac_n "checking struct passwd""... $ac_c" 1>&6 -echo "configure:3248: checking struct passwd" >&5 +echo "configure:3308: checking struct passwd" >&5 cat > conftest.$ac_ext <<EOF -#line 3250 "configure" +#line 3310 "configure" #include "confdefs.h" #include <pwd.h> EOF @@ -3261,7 +3321,7 @@ fi rm -f conftest* cat > conftest.$ac_ext <<EOF -#line 3265 "configure" +#line 3325 "configure" #include "confdefs.h" #include <pwd.h> EOF @@ -3276,7 +3336,7 @@ fi rm -f conftest* cat > conftest.$ac_ext <<EOF -#line 3280 "configure" +#line 3340 "configure" #include "confdefs.h" #include <pwd.h> EOF @@ -3291,7 +3351,7 @@ fi rm -f conftest* cat > conftest.$ac_ext <<EOF -#line 3295 "configure" +#line 3355 "configure" #include "confdefs.h" #include <pwd.h> EOF @@ -3306,7 +3366,7 @@ fi rm -f conftest* cat > conftest.$ac_ext <<EOF -#line 3310 "configure" +#line 3370 "configure" #include "confdefs.h" #include <pwd.h> EOF @@ -3321,7 +3381,7 @@ fi rm -f conftest* cat > conftest.$ac_ext <<EOF -#line 3325 "configure" +#line 3385 "configure" #include "confdefs.h" #include <pwd.h> EOF @@ -3336,7 +3396,7 @@ fi rm -f conftest* cat > conftest.$ac_ext <<EOF -#line 3340 "configure" +#line 3400 "configure" #include "confdefs.h" #include <pwd.h> EOF @@ -3369,7 +3429,7 @@ fi case "$host_os" in linux*) echo $ac_n "checking whether ELF binaries are produced""... $ac_c" 1>&6 -echo "configure:3373: checking whether ELF binaries are produced" >&5 +echo "configure:3433: checking whether ELF binaries are produced" >&5 if eval "test \"`echo '$''{'rb_cv_linux_elf'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 else @@ -3377,7 +3437,7 @@ else : else cat > conftest.$ac_ext <<EOF -#line 3381 "configure" +#line 3441 "configure" #include "confdefs.h" /* Test for whether ELF binaries are produced */ @@ -3397,7 +3457,7 @@ main() { } EOF -if { (eval echo configure:3401: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest && (./conftest; exit) 2>/dev/null +if { (eval echo configure:3461: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest && (./conftest; exit) 2>/dev/null then rb_cv_linux_elf=yes else @@ -3427,7 +3487,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:3431: checking whether OS depend dynamic link works" >&5 +echo "configure:3491: checking whether OS depend dynamic link works" >&5 if test "$GCC" = yes; then case "$host_os" in nextstep*) ;; @@ -3505,13 +3565,13 @@ dln_a_out_works=no if test "$ac_cv_header_a_out_h" = yes; then if test "$with_dln_a_out" = yes || test "$rb_cv_dlopen" = unknown; then echo $ac_n "checking whether matz's dln works""... $ac_c" 1>&6 -echo "configure:3509: checking whether matz's dln works" >&5 +echo "configure:3569: checking whether matz's dln works" >&5 cat confdefs.h > config.h 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 <<EOF -#line 3515 "configure" +#line 3575 "configure" #include "confdefs.h" #define USE_DLN_A_OUT @@ -3521,7 +3581,7 @@ int main() { ; return 0; } EOF -if { (eval echo configure:3525: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then +if { (eval echo configure:3585: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then rm -rf conftest* rb_cv_dln_a_out=yes else @@ -3618,7 +3678,7 @@ fi case "$host_os" in human*) echo $ac_n "checking for _harderr in -lsignal""... $ac_c" 1>&6 -echo "configure:3622: checking for _harderr in -lsignal" >&5 +echo "configure:3682: 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 @@ -3626,7 +3686,7 @@ else ac_save_LIBS="$LIBS" LIBS="-lsignal $LIBS" cat > conftest.$ac_ext <<EOF -#line 3630 "configure" +#line 3690 "configure" #include "confdefs.h" /* Override any gcc2 internal prototype to avoid an error. */ /* We use char because int might match the return type of a gcc2 @@ -3637,7 +3697,7 @@ int main() { _harderr() ; return 0; } EOF -if { (eval echo configure:3641: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest; then +if { (eval echo configure:3701: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest; then rm -rf conftest* eval "ac_cv_lib_$ac_lib_var=yes" else @@ -3665,7 +3725,7 @@ else fi echo $ac_n "checking for hmemset in -lhmem""... $ac_c" 1>&6 -echo "configure:3669: checking for hmemset in -lhmem" >&5 +echo "configure:3729: 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 @@ -3673,7 +3733,7 @@ else ac_save_LIBS="$LIBS" LIBS="-lhmem $LIBS" cat > conftest.$ac_ext <<EOF -#line 3677 "configure" +#line 3737 "configure" #include "confdefs.h" /* Override any gcc2 internal prototype to avoid an error. */ /* We use char because int might match the return type of a gcc2 @@ -3684,7 +3744,7 @@ int main() { hmemset() ; return 0; } EOF -if { (eval echo configure:3688: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest; then +if { (eval echo configure:3748: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest; then rm -rf conftest* eval "ac_cv_lib_$ac_lib_var=yes" else @@ -3714,12 +3774,12 @@ fi for ac_func in select do echo $ac_n "checking for $ac_func""... $ac_c" 1>&6 -echo "configure:3718: checking for $ac_func" >&5 +echo "configure:3778: 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 <<EOF -#line 3723 "configure" +#line 3783 "configure" #include "confdefs.h" /* System header to define __stub macros and hopefully few prototypes, which can conflict with char $ac_func(); below. */ @@ -3742,7 +3802,7 @@ $ac_func(); ; return 0; } EOF -if { (eval echo configure:3746: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest; then +if { (eval echo configure:3806: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest; then rm -rf conftest* eval "ac_cv_func_$ac_func=yes" else @@ -3767,7 +3827,7 @@ fi done echo $ac_n "checking whether PD libc _dtos18 fail to convert big number""... $ac_c" 1>&6 -echo "configure:3771: checking whether PD libc _dtos18 fail to convert big number" >&5 +echo "configure:3831: 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 @@ -3775,7 +3835,7 @@ else { echo "configure: error: can not run test program while cross compiling" 1>&2; exit 1; } else cat > conftest.$ac_ext <<EOF -#line 3779 "configure" +#line 3839 "configure" #include "confdefs.h" #include <stdio.h> @@ -3787,7 +3847,7 @@ main () } EOF -if { (eval echo configure:3791: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest && (./conftest; exit) 2>/dev/null +if { (eval echo configure:3851: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest && (./conftest; exit) 2>/dev/null then rb_cv_missing__dtos18=yes else @@ -3809,7 +3869,7 @@ EOF fi echo $ac_n "checking whether PD libc fconvert fail to round""... $ac_c" 1>&6 -echo "configure:3813: checking whether PD libc fconvert fail to round" >&5 +echo "configure:3873: 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 @@ -3817,7 +3877,7 @@ else { echo "configure: error: can not run test program while cross compiling" 1>&2; exit 1; } else cat > conftest.$ac_ext <<EOF -#line 3821 "configure" +#line 3881 "configure" #include "confdefs.h" #include <stdio.h> @@ -3830,7 +3890,7 @@ main () } EOF -if { (eval echo configure:3834: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest && (./conftest; exit) 2>/dev/null +if { (eval echo configure:3894: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest && (./conftest; exit) 2>/dev/null then rb_cv_missing_fconvert=yes else @@ -4092,6 +4152,7 @@ do done ac_given_srcdir=$srcdir +ac_given_INSTALL="$INSTALL" trap 'rm -fr `echo "Makefile ext/extmk.rb" | sed "s/:[^ ]*//g"` conftest*; exit 1' 1 2 15 EOF @@ -4133,6 +4194,8 @@ s%@CPP@%$CPP%g s%@YACC@%$YACC%g s%@RANLIB@%$RANLIB%g s%@AR@%$AR%g +s%@INSTALL_PROGRAM@%$INSTALL_PROGRAM%g +s%@INSTALL_DATA@%$INSTALL_DATA%g s%@SET_MAKE@%$SET_MAKE%g s%@LIBOBJS@%$LIBOBJS%g s%@ALLOCA@%$ALLOCA%g @@ -4225,6 +4288,10 @@ for ac_file in .. $CONFIG_FILES; do if test "x$ac_file" != x..; then top_srcdir="$ac_dots$ac_given_srcdir" ;; esac + case "$ac_given_INSTALL" in + [/$]*) INSTALL="$ac_given_INSTALL" ;; + *) INSTALL="$ac_dots$ac_given_INSTALL" ;; + esac echo creating "$ac_file" rm -f "$ac_file" @@ -4240,6 +4307,7 @@ for ac_file in .. $CONFIG_FILES; do if test "x$ac_file" != x..; then s%@configure_input@%$configure_input%g s%@srcdir@%$srcdir%g s%@top_srcdir@%$top_srcdir%g +s%@INSTALL@%$INSTALL%g " $ac_file_inputs | (eval "$ac_sed_cmds") > $ac_file fi; done rm -f conftest.s* diff --git a/configure.in b/configure.in index ab5ef90961..b253e0f217 100644 --- a/configure.in +++ b/configure.in @@ -72,6 +72,7 @@ AC_PROG_YACC AC_PROG_RANLIB AC_SUBST(AR) AC_CHECK_PROGS(AR, ar aal, ar) +AC_PROG_INSTALL AC_PROG_MAKE_SET # checks for UNIX variants that set C preprocessor variables @@ -72,7 +72,7 @@ char *getenv(); int eaccess(); -#if defined(HAVE_DLOPEN) && !defined(USE_DLN_A_OUT) +#if defined(HAVE_DLOPEN) && !defined(USE_DLN_A_OUT) && !defined(__CYGWIN32__) /* dynamic load with dlopen() */ # define USE_DLN_DLOPEN #endif @@ -4685,6 +4685,7 @@ static void f_END() { PUSH_FRAME(); + the_frame->argc = 0; rb_set_end_proc(call_end_proc, f_lambda()); POP_FRAME(); } diff --git a/ext/extmk.rb.in b/ext/extmk.rb.in index 0c32954577..e0f16e116c 100644 --- a/ext/extmk.rb.in +++ b/ext/extmk.rb.in @@ -93,6 +93,24 @@ def try_cpp xsystem(format(CPP, $CFLAGS)) end +def install_rb(mfile) + path = [] + dir = [] + Find.find("lib") do |f| + next unless /\.rb$/ =~ f + f = f[4..-1] + path.push f + dir |= File.dirname(f) + end + for f in dir + next if f == "." + mfile.printf "\t@test -d $(libdir)/%s || mkdir $(libdir)/%s\n", f, f + end + for f in path + mfile.printf "\t$(INSTALL_DATA) %s $(libdir)/%s\n", f, f + end +end + def have_library(lib, func) if $lib_cache[lib] if $lib_cache[lib] == "yes" @@ -304,16 +322,14 @@ realclean: clean mfile.printf "\ install: + @test -d $(libdir) || mkdir $(libdir) " if !$static mfile.printf "\ - @test -d $(libdir) || mkdir $(libdir) $(INSTALL) $(TARGET) $(libdir)/$(TARGET) " end - for rb in Dir["lib/*.rb"] - mfile.printf "\t$(INSTALL_DATA) %s @libdir@/$(RUBY_INSTALL_NAME)\n", rb - end + install_rb(mfile) mfile.printf "\n" if !$static && "@DLEXT@" != "o" diff --git a/ext/kconv/kconv.c b/ext/kconv/kconv.c index fb229c6ef6..0cb9b10a0b 100644 --- a/ext/kconv/kconv.c +++ b/ext/kconv/kconv.c @@ -1891,10 +1891,15 @@ static VALUE kconv_guess(obj, src) VALUE obj, src; { - unsigned char *p = RSTRING(src)->ptr; - unsigned char *pend = p + RSTRING(src)->len; + unsigned char *p; + unsigned char *pend; int sequence_counter = 0; + Check_Type(src, T_STRING); + + p = RSTRING(src)->ptr; + pend = p + RSTRING(src)->len; + #define INCR do {\ p++;\ if (p==pend) return INT2FIX(_UNKNOWN);\ @@ -689,12 +689,9 @@ obj_free(obj) if ((long)RANY(obj)->as.data.dfree == -1) { free(DATA_PTR(obj)); } - if (RANY(obj)->as.data.dfree) { + else if (RANY(obj)->as.data.dfree) { (*RANY(obj)->as.data.dfree)(DATA_PTR(obj)); } - else { - free(DATA_PTR(obj)); - } } break; case T_MATCH: diff --git a/lib/ftools.rb b/lib/ftools.rb index 59bc81b365..ff487dc808 100644 --- a/lib/ftools.rb +++ b/lib/ftools.rb @@ -151,7 +151,7 @@ class << File o_chmod mode, *files end - def install(from, to, mode, verbose) + def install(from, to, mode = nil, verbose = false) to = catname(from, to) unless FileTest.exist? to and cmp from, to cp from, to, verbose diff --git a/lib/jcode.rb b/lib/jcode.rb index 6d71518c70..50b7beee9d 100644 --- a/lib/jcode.rb +++ b/lib/jcode.rb @@ -104,7 +104,7 @@ class String end def tr(from, to) - self.dup.tr!(from, to) + (str = self.dup).tr!(from, to) or str end def delete!(del) @@ -127,7 +127,7 @@ class String end def delete(del) - self.dup.delete!(del) + (str = self.dup).delete!(del) or str end def squeeze!(del=nil) @@ -155,7 +155,7 @@ class String end def squeeze(del=nil) - self.dup.squeeze!(del) + (str = self.dup).squeeze!(del) or str end def tr_s!(from, to) @@ -188,7 +188,7 @@ class String end def tr_s(from, to) - self.dup.tr_s!(from,to) + (str = self.dup).tr_s!(from,to) or str end alias original_chop! chop! @@ -202,7 +202,7 @@ class String end def chop - self.dup.chop! + (str = self.dup).chop! or str end end $VERBOSE = $vsave diff --git a/lib/mkmf.rb b/lib/mkmf.rb index e89ac7d507..21476cbd33 100644 --- a/lib/mkmf.rb +++ b/lib/mkmf.rb @@ -2,6 +2,7 @@ # invoke like: ruby -r mkmf extconf.rb require 'rbconfig' +require 'find' include Config @@ -83,6 +84,24 @@ def try_cpp xsystem(format(CPP, $CFLAGS)) end +def install_rb(mfile) + path = [] + dir = [] + Find.find("lib") do |f| + next unless /\.rb$/ =~ f + f = f[4..-1] + path.push f + dir |= File.dirname(f) + end + for f in dir + next if f == "." + mfile.printf "\t@test -d $(libdir)/%s || mkdir $(libdir)/%s\n", f, f + end + for f in path + mfile.printf "\t$(INSTALL_DATA) %s $(libdir)/%s\n", f, f + end +end + def have_library(lib, func) printf "checking for %s() in -l%s... ", func, lib STDOUT.flush @@ -299,9 +318,7 @@ $(libdir)/$(TARGET): $(TARGET) @test -d $(libdir) || mkdir $(libdir) $(INSTALL) $(TARGET) $(libdir)/$(TARGET) EOMF - for rb in Dir["lib/*.rb"] - mfile.printf "\t$(INSTALL_DATA) %s %s\n", rb, $libdir - end + install_rb(mfile) mfile.printf "\n" if CONFIG["DLEXT"] != "o" @@ -2329,7 +2329,7 @@ bm_search(little, llen, big, blen, skip, translate) unsigned char *big; int blen; int *skip; - char *translate; + unsigned char *translate; { int next[256]; int i, j, k; @@ -1588,7 +1588,7 @@ static VALUE str_upcase(str) VALUE str; { - VALUE val = str_upcase_bang(str_dup(str)); + VALUE val = str_upcase_bang(str = str_dup(str)); if (NIL_P(val)) return str; return val; @@ -1622,7 +1622,7 @@ static VALUE str_downcase(str) VALUE str; { - VALUE val = str_downcase_bang(str_dup(str)); + VALUE val = str_downcase_bang(str = str_dup(str)); if (NIL_P(val)) return str; return val; @@ -1658,7 +1658,7 @@ static VALUE str_capitalize(str) VALUE str; { - VALUE val = str_capitalize_bang(str_dup(str)); + VALUE val = str_capitalize_bang(str = str_dup(str)); if (NIL_P(val)) return str; return val; @@ -1696,7 +1696,7 @@ static VALUE str_swapcase(str) VALUE str; { - VALUE val = str_swapcase_bang(str_dup(str)); + VALUE val = str_swapcase_bang(str = str_dup(str)); if (NIL_P(val)) return str; return val; @@ -1851,7 +1851,7 @@ static VALUE str_tr(str, src, repl) VALUE str, src, repl; { - VALUE val = tr_trans(str_dup(str), src, repl, 0); + VALUE val = tr_trans(str = str_dup(str), src, repl, 0); if (NIL_P(val)) return str; return val; @@ -1914,7 +1914,7 @@ static VALUE str_delete(str1, str2) VALUE str1, str2; { - VALUE val = str_delete_bang(str_dup(str1), str2); + VALUE val = str_delete_bang(str1 = str_dup(str1), str2); if (NIL_P(val)) return str1; return val; @@ -1978,7 +1978,7 @@ str_squeeze(argc, argv, str) VALUE *argv; VALUE str; { - VALUE val = str_squeeze_bang(argc, argv, str_dup(str)); + VALUE val = str_squeeze_bang(argc, argv, str = str_dup(str)); if (NIL_P(val)) return str; return val; @@ -1995,7 +1995,7 @@ static VALUE str_tr_s(str, src, repl) VALUE str, src, repl; { - VALUE val = tr_trans(str_dup(str), src, repl, 1); + VALUE val = tr_trans(str = str_dup(str), src, repl, 1); if (NIL_P(val)) return str; return val; @@ -2192,17 +2192,16 @@ str_each_line(argc, argv, str) if (rslen == 0 && *p == '\n') { if (*(p+1) != '\n') continue; while (*p == '\n') p++; - p--; } - if (*p == newline && + if (p[-1] == newline && (rslen <= 1 || - memcmp(RSTRING(rs)->ptr, p-rslen+1, rslen) == 0)) { - line = str_new(s, p - s + 1); + memcmp(RSTRING(rs)->ptr, p-rslen, rslen) == 0)) { + line = str_new(s, p - s); lastline_set(line); rb_yield(line); if (RSTRING(str)->ptr != ptr || RSTRING(str)->len != len) Fail("string modified"); - s = p + 1; + s = p; } } @@ -2250,7 +2249,7 @@ static VALUE str_chop(str) VALUE str; { - VALUE val = str_chop_bang(str_dup(str)); + VALUE val = str_chop_bang(str = str_dup(str)); if (NIL_P(val)) return str; return val; @@ -2266,12 +2265,13 @@ f_chop_bang(str) static VALUE f_chop() { - VALUE str = uscore_get(); + VALUE str = str_dup(uscore_get()); + VALUE val; - str = str_chop_bang(str_dup(str)); - if (NIL_P(str)) return uscore_get(); - lastline_set(str); - return str; + val = str_chop_bang(str); + if (NIL_P(val)) return str; + lastline_set(val); + return val; } static VALUE @@ -2323,7 +2323,7 @@ str_chomp(argc, argv, str) VALUE *argv; VALUE str; { - VALUE val = str_chomp_bang(argc, argv, str_dup(str)); + VALUE val = str_chomp_bang(argc, argv, str = str_dup(str)); if (NIL_P(val)) return str; return val; @@ -2342,9 +2342,10 @@ f_chomp(argc, argv) int argc; VALUE *argv; { - VALUE val = str_chomp_bang(argc, argv, str_dup(uscore_get())); + VALUE str = str_dup(uscore_get()); + VALUE val = str_chomp_bang(argc, argv, str); - if (NIL_P(val)) return uscore_get(); + if (NIL_P(val)) return str; lastline_set(val); return val; } @@ -2389,7 +2390,7 @@ static VALUE str_strip(str) VALUE str; { - VALUE val = str_strip_bang(str_dup(str)); + VALUE val = str_strip_bang(str = str_dup(str)); if (NIL_P(val)) return str; return val; @@ -538,255 +538,3 @@ int main (int argc, char *argv[]) #endif #endif -/* mm.c */ - -static int mmkind, mmsize, high, low; - -#define A ((int*)a) -#define B ((int*)b) -#define C ((int*)c) -#define D ((int*)d) - -static void mmprepare( void *base, int size ) -{ -#ifdef DEBUG - if (sizeof(int) != 4) die("sizeof(int) != 4"); - if (size <= 0) die("mmsize <= 0"); -#endif - - if ( ((int)base & (4-1)) == 0 && (size & (4-1)) == 0 ) - if (size >= 16) mmkind = 1; - else mmkind = 0; - else mmkind = -1; - - mmsize = size; - high = (size & (-16)); - low = (size & 0x0C ); -} - -static void mmswap( register char *a, register char *b ) -{ - register int s; - if (a == b) return; - if (mmkind >= 0) { - if (mmkind > 0) { - register char *t = a + high; - do { - s = A[0]; A[0] = B[0]; B[0] = s; - s = A[1]; A[1] = B[1]; B[1] = s; - s = A[2]; A[2] = B[2]; B[2] = s; - s = A[3]; A[3] = B[3]; B[3] = s; a += 16; b += 16; - }while (a < t); - } - if (low != 0) { s = A[0]; A[0] = B[0]; B[0] = s; - if (low >= 8) { s = A[1]; A[1] = B[1]; B[1] = s; - if (low == 12) {s = A[2]; A[2] = B[2]; B[2] = s;}}} - }else{ - register char *t = a + mmsize; - do {s = *a; *a++ = *b; *b++ = s;} while (a < t); - } -} - -static void mmswapblock( register char *a, register char *b, int size ) -{ - register int s; - if (mmkind >= 0) { - register char *t = a + (size & (-16)); register int lo = (size & 0x0C); - if (size >= 16) { - do { - s = A[0]; A[0] = B[0]; B[0] = s; - s = A[1]; A[1] = B[1]; B[1] = s; - s = A[2]; A[2] = B[2]; B[2] = s; - s = A[3]; A[3] = B[3]; B[3] = s; a += 16; b += 16; - }while (a < t); - } - if (lo != 0) { s = A[0]; A[0] = B[0]; B[0] = s; - if (lo >= 8) { s = A[1]; A[1] = B[1]; B[1] = s; - if (lo == 12) {s = A[2]; A[2] = B[2]; B[2] = s;}}} - }else{ - register char *t = a + size; - do {s = *a; *a++ = *b; *b++ = s;} while (a < t); - } -} - -static void mmrot3( register char *a, register char *b, register char *c ) -{ - register int s; - if (mmkind >= 0) { - if (mmkind > 0) { - register char *t = a + high; - do { - s = A[0]; A[0] = B[0]; B[0] = C[0]; C[0] = s; - s = A[1]; A[1] = B[1]; B[1] = C[1]; C[1] = s; - s = A[2]; A[2] = B[2]; B[2] = C[2]; C[2] = s; - s = A[3]; A[3] = B[3]; B[3] = C[3]; C[3] = s; a += 16; b += 16; c += 16; - }while (a < t); - } - if (low != 0) { s = A[0]; A[0] = B[0]; B[0] = C[0]; C[0] = s; - if (low >= 8) { s = A[1]; A[1] = B[1]; B[1] = C[1]; C[1] = s; - if (low == 12) {s = A[2]; A[2] = B[2]; B[2] = C[2]; C[2] = s;}}} - }else{ - register char *t = a + mmsize; - do {s = *a; *a++ = *b; *b++ = *c; *c++ = s;} while (a < t); - } -} - -/* qs6.c */ -/*****************************************************/ -/* */ -/* qs6 (Quick sort function) */ -/* */ -/* by Tomoyuki Kawamura 1995.4.21 */ -/* [email protected] */ -/*****************************************************/ - -typedef struct { char *LL, *RR; } stack_node; /* Stack structure for L,l,R,r */ -#define PUSH(ll,rr) {top->LL = (ll); top->RR = (rr); ++top;} /* Push L,l,R,r */ -#define POP(ll,rr) {--top; ll = top->LL; rr = top->RR;} /* Pop L,l,R,r */ - -#define med3(a,b,c) ((*cmp)(a,b)<0 ? \ - ((*cmp)(b,c)<0 ? b : ((*cmp)(a,c)<0 ? c : a)) : \ - ((*cmp)(b,c)>0 ? b : ((*cmp)(a,c)<0 ? a : c)) ) - -void qsort (base, nel, size, cmp) void* base; size_t nel; size_t size; int (*cmp)(); -{ - register char *l, *r, *m; /*l,r:�����ν��Ĥ�ü m:���������ΰ���*/ - register int t, eq_l, eq_r; /*eq_l:���ν��Ĥ����ƣ�����������Ȥ�*/ - char *L = base; /*����ʬ�䤷�Ƥ����֤κ�ü�����Ǥ���Ƭ */ - char *R = base + size * (nel - 1); /*����ʬ�䤷�Ƥ����֤α�ü�����Ǥ���Ƭ */ - int chklim = 63; /*��(��)�縡�������ǿ��β���*/ - stack_node stack[32], *top = stack; /* 32 �����ӥåȥޥ���Ǥϣ����ǽ�ʬ*/ - - if (nel <= 1) return; /* need not to sort */ - mmprepare( base, size ); - goto start; - - nxt: - if (stack == top) return; /* return if stack is empty */ - POP(L,R); - - for (;;) { - start: - if (L + size == R) {if ((*cmp)(L,R) > 0) mmswap(L,R); goto nxt;}/* 2 elements */ - - l = L; r = R; - t = (r - l + size) / size; /* number of elements */ - m = l + size * (t >> 1); /* calculate median value */ - - if (t >= 60) { - register char *m1; - register char *m3; - if (t >= 200) { - t = size*(t>>3); /* number of bytes in splitting 8 */ - { - register char *p1 = l + t; - register char *p2 = p1 + t; - register char *p3 = p2 + t; - m1 = med3( p1, p2, p3 ); - p1 = m + t; - p2 = p1 + t; - p3 = p2 + t; - m3 = med3( p1, p2, p3 ); - } - }else{ - t = size*(t>>2); /* number of bytes in splitting 4 */ - m1 = l + t; - m3 = m + t; - } - m = med3( m1, m, m3 ); - } - - if ((t = (*cmp)(l,m)) < 0) { /*3-5-?*/ - if ((t = (*cmp)(m,r)) < 0) { /*3-5-7*/ - if (chklim && nel >= chklim) { /* check if already ascending order */ - char *p; - chklim = 0; - for (p=l; p<r; p+=size) if ((*cmp)(p,p+size) > 0) goto fail; - goto nxt; - } - fail: goto loopA; /*3-5-7*/ - } - if (t > 0) { - if ((*cmp)(l,r) <= 0) {mmswap(m,r); goto loopA;} /*3-5-4*/ - mmrot3(r,m,l); goto loopA; /*3-5-2*/ - } - goto loopB; /*3-5-5*/ - } - - if (t > 0) { /*7-5-?*/ - if ((t = (*cmp)(m,r)) > 0) { /*7-5-3*/ - if (chklim && nel >= chklim) { /* check if already ascending order */ - char *p; - chklim = 0; - for (p=l; p<r; p+=size) if ((*cmp)(p,p+size) < 0) goto fail2; - while (l<r) {mmswap(l,r); l+=size; r-=size;} /* reverse region */ - goto nxt; - } - fail2: mmswap(l,r); goto loopA; /*7-5-3*/ - } - if (t < 0) { - if ((*cmp)(l,r) <= 0) {mmswap(l,m); goto loopB;} /*7-5-8*/ - mmrot3(l,m,r); goto loopA; /*7-5-6*/ - } - mmswap(l,r); goto loopA; /*7-5-5*/ - } - - if ((t = (*cmp)(m,r)) < 0) {goto loopA;} /*5-5-7*/ - if (t > 0) {mmswap(l,r); goto loopB;} /*5-5-3*/ - - /* deteming splitting type in case 5-5-5 */ /*5-5-5*/ - for (;;) { - if ((l += size) == r) goto nxt; /*5-5-5*/ - if (l == m) continue; - if ((t = (*cmp)(l,m)) > 0) {mmswap(l,r); l = L; goto loopA;} /*575-5*/ - if (t < 0) {mmswap(L,l); l = L; goto loopB;} /*535-5*/ - } - - loopA: eq_l = 1; eq_r = 1; /* splitting type A */ /* left <= median < right��*/ - for (;;) { - for (;;) { - if ((l += size) == r) - {l -= size; if (l != m) mmswap(m,l); l -= size; goto fin;} - if (l == m) continue; - if ((t = (*cmp)(l,m)) > 0) {eq_r = 0; break;} - if (t < 0) eq_l = 0; - } - for (;;) { - if (l == (r -= size)) - {l -= size; if (l != m) mmswap(m,l); l -= size; goto fin;} - if (r == m) {m = l; break;} - if ((t = (*cmp)(r,m)) < 0) {eq_l = 0; break;} - if (t == 0) break; - } - mmswap(l,r); /* swap left and right */ - } - - loopB: eq_l = 1; eq_r = 1; /* splitting type B */ /* left < median <= right */ - for (;;) { - for (;;) { - if (l == (r -= size)) - {r += size; if (r != m) mmswap(r,m); r += size; goto fin;} - if (r == m) continue; - if ((t = (*cmp)(r,m)) < 0) {eq_l = 0; break;} - if (t > 0) eq_r = 0; - } - for (;;) { - if ((l += size) == r) - {r += size; if (r != m) mmswap(r,m); r += size; goto fin;} - if (l == m) {m = r; break;} - if ((t = (*cmp)(l,m)) > 0) {eq_r = 0; break;} - if (t == 0) break; - } - mmswap(l,r); /* swap left and right */ - } - - fin: - if (eq_l == 0) /* need to sort left side */ - if (eq_r == 0) /* need to sort right side */ - if (l-L < R-r) {PUSH(r,R); R = l;} /* sort left side first */ - else {PUSH(L,l); L = r;} /* sort right side first */ - else R = l; /* need to sort left side only */ - else if (eq_r == 0) L = r; /* need to sort right side only */ - else goto nxt; /* need not to sort both sides */ - } -} @@ -1,2 +1,2 @@ -#define RUBY_VERSION "1.1c4" -#define VERSION_DATE "98/09/03" +#define RUBY_VERSION "1.1c5" +#define VERSION_DATE "98/09/08" diff --git a/win32/config.h b/win32/config.h index de34e995d6..a14d037da0 100644 --- a/win32/config.h +++ b/win32/config.h @@ -1,4 +1,4 @@ -#define THREAD 1 +jjjjjj#define THREAD 1 #define SIZEOF_INT 4 #define SIZEOF_LONG 4 #define SIZEOF_VOIDP 4 |