summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authormatz <matz@b2dd03c8-39d4-4d8f-98ff-823fe69b080e>1998-09-03 07:43:53 +0000
committermatz <matz@b2dd03c8-39d4-4d8f-98ff-823fe69b080e>1998-09-03 07:43:53 +0000
commitf5da3b6746dba18ab86d11aa49caf97b37ecc6ac (patch)
tree1c472d11ebd04c612140d228a7a5414d3a08e615
parent264c52f2e6abc33f09e6a891f67bdf7bddbae406 (diff)
1.1c4
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/branches/v1_1r@293 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
-rw-r--r--ChangeLog43
-rw-r--r--configure467
-rw-r--r--configure.in4
-rw-r--r--dir.c5
-rw-r--r--eval.c11
-rw-r--r--ext/socket/socket.c4
-rw-r--r--file.c6
-rw-r--r--gc.c2
-rw-r--r--glob.c7
-rw-r--r--lib/mkmf.rb3
-rw-r--r--lib/telnet.rb169
-rw-r--r--marshal.c2
-rw-r--r--missing/dir.h134
-rw-r--r--random.c4
-rw-r--r--re.c38
-rw-r--r--regex.c238
-rw-r--r--regex.h14
-rw-r--r--ruby.c12
-rw-r--r--sprintf.c3
-rw-r--r--util.c253
-rw-r--r--version.h4
21 files changed, 833 insertions, 590 deletions
diff --git a/ChangeLog b/ChangeLog
index a5c1d0a..177f1ae 100644
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,3 +1,46 @@
+Thu Sep 3 14:08:14 1998 Yukihiro Matsumoto <matz@netlab.co.jp>
+
+ * version 1.1c4 released.
+
+Tue Sep 1 10:47:16 1998 Yukihiro Matsumoto <matz@netlab.co.jp>
+
+ * regex.c (mbctab_euc): set 0x8e as multibyte character.
+
+ * string.c (str_inspect): mask character for octal output.
+
+Mon Aug 31 15:32:41 1998 Yukihiro Matsumoto <matz@netlab.co.jp>
+
+ * regex.c (re_search): use calculated offset if exactn is the
+ first opcode in the compiled regexp.
+
+ * regex.c (bm_search): use Boyer-Moore search for simple search.
+
+ * regex.c (must_instr): wrong length check if pattern includes
+ byte escape by 0xff.
+
+ * regex.c (re_compile_pattern): need not to check current_mbctype.
+
+Sat Aug 29 16:31:40 1998 Yukihiro Matsumoto <matz@netlab.co.jp>
+
+ * eval.c (rb_check_safe_str): avoid calling rb_id2name() in normal
+ cases to speed-up.
+
+ * eval.c (thread_raise): do not save context of terminated thread.
+
+ * regex.c (re_compile_pattern): mask \nnn over 256.
+
+Sat Aug 29 02:09:46 1998 1998 Koji Arai <JCA02266@nifty.ne.jp>
+
+ * sprintf.c (f_sprintf): wrong buffer size check.
+
+Fri Aug 28 01:57:04 1998 Yukihiro Matsumoto <matz@netlab.co.jp>
+
+ * regex.c (re_compile_pattern): accepts (?ix-ix) and (?ix-ix:...).
+
+Fri Aug 28 12:25:33 1998 Hiroshi Igarashi <igarashi@ueda.info.waseda.ac.jp>
+
+ * ruby.c (ruby_require_modules): load modules in appearing order.
+
Thu Aug 27 12:54:28 1998 Yukihiro Matsumoto <matz@netlab.co.jp>
* version 1.1c3 released.
diff --git a/configure b/configure
index b7fb512..e23cc9c 100644
--- a/configure
+++ b/configure
@@ -614,7 +614,6 @@ host_os=`echo $host | sed 's/^\([^-]*\)-\([^-]*\)-\(.*\)$/\3/'`
echo "$ac_t""$host" 1>&6
-
fat_binary=no
# Check whether --enable-fat-binary or --disable-fat-binary was given.
if test "${enable_fat_binary+set}" = set; then
@@ -625,7 +624,7 @@ fi
if test "$fat_binary" = yes ; then
echo $ac_n "checking target architecture ""... $ac_c" 1>&6
-echo "configure:629: checking target architecture " >&5
+echo "configure:628: checking target architecture " >&5
if test "$host_os" = "rhapsody" ; then
echo -n "Rhapsody: "
@@ -678,7 +677,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:682: checking for $ac_word" >&5
+echo "configure:681: 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
@@ -707,7 +706,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:711: checking for $ac_word" >&5
+echo "configure:710: 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
@@ -755,7 +754,7 @@ fi
fi
echo $ac_n "checking whether the C compiler ($CC $CFLAGS $LDFLAGS) works""... $ac_c" 1>&6
-echo "configure:759: checking whether the C compiler ($CC $CFLAGS $LDFLAGS) works" >&5
+echo "configure:758: 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.
@@ -765,11 +764,11 @@ ac_link='${CC-cc} -o conftest $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS
cross_compiling=$ac_cv_prog_cc_cross
cat > conftest.$ac_ext <<EOF
-#line 769 "configure"
+#line 768 "configure"
#include "confdefs.h"
main(){return(0);}
EOF
-if { (eval echo configure:773: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest; then
+if { (eval echo configure:772: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest; 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
@@ -789,12 +788,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:793: checking whether the C compiler ($CC $CFLAGS $LDFLAGS) is a cross-compiler" >&5
+echo "configure:792: 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:798: checking whether we are using GNU C" >&5
+echo "configure:797: 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
@@ -803,7 +802,7 @@ else
yes;
#endif
EOF
-if { ac_try='${CC-cc} -E conftest.c'; { (eval echo configure:807: \"$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:806: \"$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
@@ -818,7 +817,7 @@ if test $ac_cv_prog_gcc = yes; then
ac_save_CFLAGS="$CFLAGS"
CFLAGS=
echo $ac_n "checking whether ${CC-cc} accepts -g""... $ac_c" 1>&6
-echo "configure:822: checking whether ${CC-cc} accepts -g" >&5
+echo "configure:821: 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
@@ -846,7 +845,7 @@ else
fi
echo $ac_n "checking how to run the C preprocessor""... $ac_c" 1>&6
-echo "configure:850: checking how to run the C preprocessor" >&5
+echo "configure:849: checking how to run the C preprocessor" >&5
# On Suns, sometimes $CPP names a directory.
if test -n "$CPP" && test -d "$CPP"; then
CPP=
@@ -861,13 +860,13 @@ else
# On the NeXT, cc -E runs the code through the compiler's parser,
# not just through cpp.
cat > conftest.$ac_ext <<EOF
-#line 865 "configure"
+#line 864 "configure"
#include "confdefs.h"
#include <assert.h>
Syntax Error
EOF
ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
-{ (eval echo configure:871: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
+{ (eval echo configure:870: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
ac_err=`grep -v '^ *+' conftest.out`
if test -z "$ac_err"; then
:
@@ -878,13 +877,13 @@ else
rm -rf conftest*
CPP="${CC-cc} -E -traditional-cpp"
cat > conftest.$ac_ext <<EOF
-#line 882 "configure"
+#line 881 "configure"
#include "confdefs.h"
#include <assert.h>
Syntax Error
EOF
ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
-{ (eval echo configure:888: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
+{ (eval echo configure:887: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
ac_err=`grep -v '^ *+' conftest.out`
if test -z "$ac_err"; then
:
@@ -908,13 +907,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:912: checking whether ${CC-cc} needs -traditional" >&5
+echo "configure:911: 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 <<EOF
-#line 918 "configure"
+#line 917 "configure"
#include "confdefs.h"
#include <sgtty.h>
Autoconf TIOCGETP
@@ -932,7 +931,7 @@ rm -f conftest*
if test $ac_cv_prog_gcc_traditional = no; then
cat > conftest.$ac_ext <<EOF
-#line 936 "configure"
+#line 935 "configure"
#include "confdefs.h"
#include <termio.h>
Autoconf TCGETA
@@ -958,7 +957,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:962: checking for $ac_word" >&5
+echo "configure:961: 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
@@ -990,7 +989,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:994: checking for $ac_word" >&5
+echo "configure:993: 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
@@ -1022,7 +1021,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:1026: checking for $ac_word" >&5
+echo "configure:1025: 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
@@ -1051,68 +1050,8 @@ 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:1066: 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:1116: checking whether ${MAKE-make} sets \${MAKE}" >&5
+echo "configure:1055: 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
@@ -1142,17 +1081,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:1146: checking for minix/config.h" >&5
+echo "configure:1085: 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 1151 "configure"
+#line 1090 "configure"
#include "confdefs.h"
#include <minix/config.h>
EOF
ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
-{ (eval echo configure:1156: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
+{ (eval echo configure:1095: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
ac_err=`grep -v '^ *+' conftest.out`
if test -z "$ac_err"; then
rm -rf conftest*
@@ -1191,7 +1130,7 @@ fi
echo $ac_n "checking size of int""... $ac_c" 1>&6
-echo "configure:1195: checking size of int" >&5
+echo "configure:1134: 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
@@ -1199,7 +1138,7 @@ else
{ echo "configure: error: can not run test program while cross compiling" 1>&2; exit 1; }
else
cat > conftest.$ac_ext <<EOF
-#line 1203 "configure"
+#line 1142 "configure"
#include "confdefs.h"
#include <stdio.h>
main()
@@ -1210,7 +1149,7 @@ main()
exit(0);
}
EOF
-if { (eval echo configure:1214: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest && (./conftest; exit) 2>/dev/null
+if { (eval echo configure:1153: \"$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
@@ -1230,7 +1169,7 @@ EOF
echo $ac_n "checking size of long""... $ac_c" 1>&6
-echo "configure:1234: checking size of long" >&5
+echo "configure:1173: 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
@@ -1238,7 +1177,7 @@ else
{ echo "configure: error: can not run test program while cross compiling" 1>&2; exit 1; }
else
cat > conftest.$ac_ext <<EOF
-#line 1242 "configure"
+#line 1181 "configure"
#include "confdefs.h"
#include <stdio.h>
main()
@@ -1249,7 +1188,7 @@ main()
exit(0);
}
EOF
-if { (eval echo configure:1253: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest && (./conftest; exit) 2>/dev/null
+if { (eval echo configure:1192: \"$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
@@ -1269,7 +1208,7 @@ EOF
echo $ac_n "checking size of void*""... $ac_c" 1>&6
-echo "configure:1273: checking size of void*" >&5
+echo "configure:1212: 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
@@ -1277,7 +1216,7 @@ else
{ echo "configure: error: can not run test program while cross compiling" 1>&2; exit 1; }
else
cat > conftest.$ac_ext <<EOF
-#line 1281 "configure"
+#line 1220 "configure"
#include "confdefs.h"
#include <stdio.h>
main()
@@ -1288,7 +1227,7 @@ main()
exit(0);
}
EOF
-if { (eval echo configure:1292: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest && (./conftest; exit) 2>/dev/null
+if { (eval echo configure:1231: \"$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
@@ -1309,19 +1248,19 @@ EOF
echo $ac_n "checking for prototypes""... $ac_c" 1>&6
-echo "configure:1313: checking for prototypes" >&5
+echo "configure:1252: 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 1318 "configure"
+#line 1257 "configure"
#include "confdefs.h"
int foo(int x) { return 0; }
int main() {
return foo(10);
; return 0; }
EOF
-if { (eval echo configure:1325: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
+if { (eval echo configure:1264: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
rm -rf conftest*
rb_cv_have_prototypes=yes
else
@@ -1342,12 +1281,12 @@ EOF
fi
echo $ac_n "checking for variable length prototypes and stdarg.h""... $ac_c" 1>&6
-echo "configure:1346: checking for variable length prototypes and stdarg.h" >&5
+echo "configure:1285: 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 1351 "configure"
+#line 1290 "configure"
#include "confdefs.h"
#include <stdarg.h>
@@ -1364,7 +1303,7 @@ int main() {
return foo(10, "", 3.14);
; return 0; }
EOF
-if { (eval echo configure:1368: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
+if { (eval echo configure:1307: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
rm -rf conftest*
rb_cv_stdarg=yes
else
@@ -1385,19 +1324,19 @@ EOF
fi
echo $ac_n "checking for gcc attribute noreturn""... $ac_c" 1>&6
-echo "configure:1389: checking for gcc attribute noreturn" >&5
+echo "configure:1328: 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 1394 "configure"
+#line 1333 "configure"
#include "confdefs.h"
void exit(int x) __attribute__ ((noreturn));
int main() {
; return 0; }
EOF
-if { (eval echo configure:1401: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
+if { (eval echo configure:1340: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
rm -rf conftest*
rb_cv_have_attr_noreturn=yes
else
@@ -1426,7 +1365,7 @@ beos*) ;;
*) LIBS="-lm $LIBS";;
esac
echo $ac_n "checking for crypt in -lcrypt""... $ac_c" 1>&6
-echo "configure:1430: checking for crypt in -lcrypt" >&5
+echo "configure:1369: 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
@@ -1434,7 +1373,7 @@ else
ac_save_LIBS="$LIBS"
LIBS="-lcrypt $LIBS"
cat > conftest.$ac_ext <<EOF
-#line 1438 "configure"
+#line 1377 "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
@@ -1445,7 +1384,7 @@ int main() {
crypt()
; return 0; }
EOF
-if { (eval echo configure:1449: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest; then
+if { (eval echo configure:1388: \"$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
@@ -1473,7 +1412,7 @@ else
fi
echo $ac_n "checking for dlopen in -ldl""... $ac_c" 1>&6
-echo "configure:1477: checking for dlopen in -ldl" >&5
+echo "configure:1416: 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
@@ -1481,7 +1420,7 @@ else
ac_save_LIBS="$LIBS"
LIBS="-ldl $LIBS"
cat > conftest.$ac_ext <<EOF
-#line 1485 "configure"
+#line 1424 "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
@@ -1492,7 +1431,7 @@ int main() {
dlopen()
; return 0; }
EOF
-if { (eval echo configure:1496: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest; then
+if { (eval echo configure:1435: \"$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
@@ -1520,7 +1459,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:1524: checking for shl_load in -ldld" >&5
+echo "configure:1463: 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
@@ -1528,7 +1467,7 @@ else
ac_save_LIBS="$LIBS"
LIBS="-ldld $LIBS"
cat > conftest.$ac_ext <<EOF
-#line 1532 "configure"
+#line 1471 "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
@@ -1539,7 +1478,7 @@ int main() {
shl_load()
; return 0; }
EOF
-if { (eval echo configure:1543: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest; then
+if { (eval echo configure:1482: \"$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
@@ -1572,12 +1511,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:1576: checking for $ac_hdr that defines DIR" >&5
+echo "configure:1515: 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 1581 "configure"
+#line 1520 "configure"
#include "confdefs.h"
#include <sys/types.h>
#include <$ac_hdr>
@@ -1585,7 +1524,7 @@ int main() {
DIR *dirp = 0;
; return 0; }
EOF
-if { (eval echo configure:1589: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
+if { (eval echo configure:1528: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
rm -rf conftest*
eval "ac_cv_header_dirent_$ac_safe=yes"
else
@@ -1610,7 +1549,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:1614: checking for opendir in -ldir" >&5
+echo "configure:1553: 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
@@ -1618,7 +1557,7 @@ else
ac_save_LIBS="$LIBS"
LIBS="-ldir $LIBS"
cat > conftest.$ac_ext <<EOF
-#line 1622 "configure"
+#line 1561 "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
@@ -1629,7 +1568,7 @@ int main() {
opendir()
; return 0; }
EOF
-if { (eval echo configure:1633: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest; then
+if { (eval echo configure:1572: \"$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
@@ -1651,7 +1590,7 @@ fi
else
echo $ac_n "checking for opendir in -lx""... $ac_c" 1>&6
-echo "configure:1655: checking for opendir in -lx" >&5
+echo "configure:1594: 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
@@ -1659,7 +1598,7 @@ else
ac_save_LIBS="$LIBS"
LIBS="-lx $LIBS"
cat > conftest.$ac_ext <<EOF
-#line 1663 "configure"
+#line 1602 "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
@@ -1670,7 +1609,7 @@ int main() {
opendir()
; return 0; }
EOF
-if { (eval echo configure:1674: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest; then
+if { (eval echo configure:1613: \"$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
@@ -1693,12 +1632,12 @@ fi
fi
echo $ac_n "checking for ANSI C header files""... $ac_c" 1>&6
-echo "configure:1697: checking for ANSI C header files" >&5
+echo "configure:1636: 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 1702 "configure"
+#line 1641 "configure"
#include "confdefs.h"
#include <stdlib.h>
#include <stdarg.h>
@@ -1706,7 +1645,7 @@ else
#include <float.h>
EOF
ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
-{ (eval echo configure:1710: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
+{ (eval echo configure:1649: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
ac_err=`grep -v '^ *+' conftest.out`
if test -z "$ac_err"; then
rm -rf conftest*
@@ -1723,7 +1662,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 1727 "configure"
+#line 1666 "configure"
#include "confdefs.h"
#include <string.h>
EOF
@@ -1741,7 +1680,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 1745 "configure"
+#line 1684 "configure"
#include "confdefs.h"
#include <stdlib.h>
EOF
@@ -1762,7 +1701,7 @@ if test "$cross_compiling" = yes; then
:
else
cat > conftest.$ac_ext <<EOF
-#line 1766 "configure"
+#line 1705 "configure"
#include "confdefs.h"
#include <ctype.h>
#define ISLOWER(c) ('a' <= (c) && (c) <= 'z')
@@ -1773,7 +1712,7 @@ if (XOR (islower (i), ISLOWER (i)) || toupper (i) != TOUPPER (i)) exit(2);
exit (0); }
EOF
-if { (eval echo configure:1777: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest && (./conftest; exit) 2>/dev/null
+if { (eval echo configure:1716: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest && (./conftest; exit) 2>/dev/null
then
:
else
@@ -1798,21 +1737,21 @@ 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
+ syscall.h a.out.h string.h utime.h memory.h direct.h
do
ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'`
echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6
-echo "configure:1806: checking for $ac_hdr" >&5
+echo "configure:1745: 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 1811 "configure"
+#line 1750 "configure"
#include "confdefs.h"
#include <$ac_hdr>
EOF
ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
-{ (eval echo configure:1816: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
+{ (eval echo configure:1755: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
ac_err=`grep -v '^ *+' conftest.out`
if test -z "$ac_err"; then
rm -rf conftest*
@@ -1840,12 +1779,12 @@ done
echo $ac_n "checking for uid_t in sys/types.h""... $ac_c" 1>&6
-echo "configure:1844: checking for uid_t in sys/types.h" >&5
+echo "configure:1783: 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 1849 "configure"
+#line 1788 "configure"
#include "confdefs.h"
#include <sys/types.h>
EOF
@@ -1874,12 +1813,12 @@ EOF
fi
echo $ac_n "checking for size_t""... $ac_c" 1>&6
-echo "configure:1878: checking for size_t" >&5
+echo "configure:1817: 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 1883 "configure"
+#line 1822 "configure"
#include "confdefs.h"
#include <sys/types.h>
#if STDC_HEADERS
@@ -1907,12 +1846,12 @@ EOF
fi
echo $ac_n "checking for st_blksize in struct stat""... $ac_c" 1>&6
-echo "configure:1911: checking for st_blksize in struct stat" >&5
+echo "configure:1850: 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 1916 "configure"
+#line 1855 "configure"
#include "confdefs.h"
#include <sys/types.h>
#include <sys/stat.h>
@@ -1920,7 +1859,7 @@ int main() {
struct stat s; s.st_blksize;
; return 0; }
EOF
-if { (eval echo configure:1924: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
+if { (eval echo configure:1863: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
rm -rf conftest*
ac_cv_struct_st_blksize=yes
else
@@ -1942,12 +1881,12 @@ fi
save_LIBOJBS="$LIBOBJS"
echo $ac_n "checking for st_blocks in struct stat""... $ac_c" 1>&6
-echo "configure:1946: checking for st_blocks in struct stat" >&5
+echo "configure:1885: 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 1951 "configure"
+#line 1890 "configure"
#include "confdefs.h"
#include <sys/types.h>
#include <sys/stat.h>
@@ -1955,7 +1894,7 @@ int main() {
struct stat s; s.st_blocks;
; return 0; }
EOF
-if { (eval echo configure:1959: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
+if { (eval echo configure:1898: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
rm -rf conftest*
ac_cv_struct_st_blocks=yes
else
@@ -1979,12 +1918,12 @@ fi
LIBOBJS="$save_LIBOBJS"
echo $ac_n "checking for st_rdev in struct stat""... $ac_c" 1>&6
-echo "configure:1983: checking for st_rdev in struct stat" >&5
+echo "configure:1922: 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 1988 "configure"
+#line 1927 "configure"
#include "confdefs.h"
#include <sys/types.h>
#include <sys/stat.h>
@@ -1992,7 +1931,7 @@ int main() {
struct stat s; s.st_rdev;
; return 0; }
EOF
-if { (eval echo configure:1996: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
+if { (eval echo configure:1935: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
rm -rf conftest*
ac_cv_struct_st_rdev=yes
else
@@ -2014,7 +1953,7 @@ fi
echo $ac_n "checking type of array argument to getgroups""... $ac_c" 1>&6
-echo "configure:2018: checking type of array argument to getgroups" >&5
+echo "configure:1957: 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
@@ -2022,7 +1961,7 @@ else
ac_cv_type_getgroups=cross
else
cat > conftest.$ac_ext <<EOF
-#line 2026 "configure"
+#line 1965 "configure"
#include "confdefs.h"
/* Thanks to Mike Rendell for this test. */
@@ -2047,7 +1986,7 @@ main()
}
EOF
-if { (eval echo configure:2051: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest && (./conftest; exit) 2>/dev/null
+if { (eval echo configure:1990: \"$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
@@ -2061,7 +2000,7 @@ fi
if test $ac_cv_type_getgroups = cross; then
cat > conftest.$ac_ext <<EOF
-#line 2065 "configure"
+#line 2004 "configure"
#include "confdefs.h"
#include <unistd.h>
EOF
@@ -2085,12 +2024,12 @@ EOF
echo $ac_n "checking return type of signal handlers""... $ac_c" 1>&6
-echo "configure:2089: checking return type of signal handlers" >&5
+echo "configure:2028: 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 2094 "configure"
+#line 2033 "configure"
#include "confdefs.h"
#include <sys/types.h>
#include <signal.h>
@@ -2107,7 +2046,7 @@ int main() {
int i;
; return 0; }
EOF
-if { (eval echo configure:2111: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
+if { (eval echo configure:2050: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
rm -rf conftest*
ac_cv_type_signal=void
else
@@ -2128,19 +2067,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:2132: checking for working alloca.h" >&5
+echo "configure:2071: 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 2137 "configure"
+#line 2076 "configure"
#include "confdefs.h"
#include <alloca.h>
int main() {
char *p = alloca(2 * sizeof(int));
; return 0; }
EOF
-if { (eval echo configure:2144: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest; then
+if { (eval echo configure:2083: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest; then
rm -rf conftest*
ac_cv_header_alloca_h=yes
else
@@ -2161,12 +2100,12 @@ EOF
fi
echo $ac_n "checking for alloca""... $ac_c" 1>&6
-echo "configure:2165: checking for alloca" >&5
+echo "configure:2104: 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 2170 "configure"
+#line 2109 "configure"
#include "confdefs.h"
#ifdef __GNUC__
@@ -2189,7 +2128,7 @@ int main() {
char *p = (char *) alloca(1);
; return 0; }
EOF
-if { (eval echo configure:2193: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest; then
+if { (eval echo configure:2132: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest; then
rm -rf conftest*
ac_cv_func_alloca_works=yes
else
@@ -2221,12 +2160,12 @@ EOF
echo $ac_n "checking whether alloca needs Cray hooks""... $ac_c" 1>&6
-echo "configure:2225: checking whether alloca needs Cray hooks" >&5
+echo "configure:2164: 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 2230 "configure"
+#line 2169 "configure"
#include "confdefs.h"
#if defined(CRAY) && ! defined(CRAY2)
webecray
@@ -2251,12 +2190,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:2255: checking for $ac_func" >&5
+echo "configure:2194: 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 2260 "configure"
+#line 2199 "configure"
#include "confdefs.h"
/* System header to define __stub macros and hopefully few prototypes,
which can conflict with char $ac_func(); below. */
@@ -2279,7 +2218,7 @@ $ac_func();
; return 0; }
EOF
-if { (eval echo configure:2283: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest; then
+if { (eval echo configure:2222: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest; then
rm -rf conftest*
eval "ac_cv_func_$ac_func=yes"
else
@@ -2306,7 +2245,7 @@ done
fi
echo $ac_n "checking stack direction for C alloca""... $ac_c" 1>&6
-echo "configure:2310: checking stack direction for C alloca" >&5
+echo "configure:2249: 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
@@ -2314,7 +2253,7 @@ else
ac_cv_c_stack_direction=0
else
cat > conftest.$ac_ext <<EOF
-#line 2318 "configure"
+#line 2257 "configure"
#include "confdefs.h"
find_stack_direction ()
{
@@ -2333,7 +2272,7 @@ main ()
exit (find_stack_direction() < 0);
}
EOF
-if { (eval echo configure:2337: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest && (./conftest; exit) 2>/dev/null
+if { (eval echo configure:2276: \"$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
@@ -2355,12 +2294,12 @@ EOF
fi
echo $ac_n "checking for pid_t""... $ac_c" 1>&6
-echo "configure:2359: checking for pid_t" >&5
+echo "configure:2298: 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 2364 "configure"
+#line 2303 "configure"
#include "confdefs.h"
#include <sys/types.h>
#if STDC_HEADERS
@@ -2389,17 +2328,17 @@ fi
ac_safe=`echo "vfork.h" | sed 'y%./+-%__p_%'`
echo $ac_n "checking for vfork.h""... $ac_c" 1>&6
-echo "configure:2393: checking for vfork.h" >&5
+echo "configure:2332: 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 2398 "configure"
+#line 2337 "configure"
#include "confdefs.h"
#include <vfork.h>
EOF
ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
-{ (eval echo configure:2403: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
+{ (eval echo configure:2342: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
ac_err=`grep -v '^ *+' conftest.out`
if test -z "$ac_err"; then
rm -rf conftest*
@@ -2424,18 +2363,18 @@ else
fi
echo $ac_n "checking for working vfork""... $ac_c" 1>&6
-echo "configure:2428: checking for working vfork" >&5
+echo "configure:2367: 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:2434: checking for vfork" >&5
+echo "configure:2373: 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 2439 "configure"
+#line 2378 "configure"
#include "confdefs.h"
/* System header to define __stub macros and hopefully few prototypes,
which can conflict with char vfork(); below. */
@@ -2458,7 +2397,7 @@ vfork();
; return 0; }
EOF
-if { (eval echo configure:2462: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest; then
+if { (eval echo configure:2401: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest; then
rm -rf conftest*
eval "ac_cv_func_vfork=yes"
else
@@ -2479,7 +2418,7 @@ fi
else
cat > conftest.$ac_ext <<EOF
-#line 2483 "configure"
+#line 2422 "configure"
#include "confdefs.h"
/* Thanks to Paul Eggert for this test. */
#include <stdio.h>
@@ -2574,7 +2513,7 @@ main() {
}
}
EOF
-if { (eval echo configure:2578: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest && (./conftest; exit) 2>/dev/null
+if { (eval echo configure:2517: \"$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
@@ -2597,7 +2536,7 @@ EOF
fi
echo $ac_n "checking for 8-bit clean memcmp""... $ac_c" 1>&6
-echo "configure:2601: checking for 8-bit clean memcmp" >&5
+echo "configure:2540: 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
@@ -2605,7 +2544,7 @@ else
ac_cv_func_memcmp_clean=no
else
cat > conftest.$ac_ext <<EOF
-#line 2609 "configure"
+#line 2548 "configure"
#include "confdefs.h"
main()
@@ -2615,7 +2554,7 @@ main()
}
EOF
-if { (eval echo configure:2619: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest && (./conftest; exit) 2>/dev/null
+if { (eval echo configure:2558: \"$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
@@ -2636,12 +2575,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:2640: checking for $ac_func" >&5
+echo "configure:2579: 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 2584 "configure"
#include "confdefs.h"
/* System header to define __stub macros and hopefully few prototypes,
which can conflict with char $ac_func(); below. */
@@ -2664,7 +2603,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:2607: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest; then
rm -rf conftest*
eval "ac_cv_func_$ac_func=yes"
else
@@ -2697,12 +2636,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:2701: checking for $ac_func" >&5
+echo "configure:2640: 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 2706 "configure"
+#line 2645 "configure"
#include "confdefs.h"
/* System header to define __stub macros and hopefully few prototypes,
which can conflict with char $ac_func(); below. */
@@ -2725,7 +2664,7 @@ $ac_func();
; return 0; }
EOF
-if { (eval echo configure:2729: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest; then
+if { (eval echo configure:2668: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest; then
rm -rf conftest*
eval "ac_cv_func_$ac_func=yes"
else
@@ -2751,12 +2690,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:2755: checking whether struct tm is in sys/time.h or time.h" >&5
+echo "configure:2694: 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 2760 "configure"
+#line 2699 "configure"
#include "confdefs.h"
#include <sys/types.h>
#include <time.h>
@@ -2764,7 +2703,7 @@ int main() {
struct tm *tp; tp->tm_sec;
; return 0; }
EOF
-if { (eval echo configure:2768: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
+if { (eval echo configure:2707: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
rm -rf conftest*
ac_cv_struct_tm=time.h
else
@@ -2785,12 +2724,12 @@ EOF
fi
echo $ac_n "checking for tm_zone in struct tm""... $ac_c" 1>&6
-echo "configure:2789: checking for tm_zone in struct tm" >&5
+echo "configure:2728: 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 2794 "configure"
+#line 2733 "configure"
#include "confdefs.h"
#include <sys/types.h>
#include <$ac_cv_struct_tm>
@@ -2798,7 +2737,7 @@ int main() {
struct tm tm; tm.tm_zone;
; return 0; }
EOF
-if { (eval echo configure:2802: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
+if { (eval echo configure:2741: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
rm -rf conftest*
ac_cv_struct_tm_zone=yes
else
@@ -2818,12 +2757,12 @@ EOF
else
echo $ac_n "checking for tzname""... $ac_c" 1>&6
-echo "configure:2822: checking for tzname" >&5
+echo "configure:2761: 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 2827 "configure"
+#line 2766 "configure"
#include "confdefs.h"
#include <time.h>
#ifndef tzname /* For SGI. */
@@ -2833,7 +2772,7 @@ int main() {
atoi(*tzname);
; return 0; }
EOF
-if { (eval echo configure:2837: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest; then
+if { (eval echo configure:2776: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest; then
rm -rf conftest*
ac_cv_var_tzname=yes
else
@@ -2855,14 +2794,14 @@ EOF
fi
cat > conftest.$ac_ext <<EOF
-#line 2859 "configure"
+#line 2798 "configure"
#include "confdefs.h"
int main() {
extern int daylight; int i = daylight;
; return 0; }
EOF
-if { (eval echo configure:2866: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest; then
+if { (eval echo configure:2805: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest; then
rm -rf conftest*
cat >> confdefs.h <<\EOF
#define HAVE_DAYLIGHT 1
@@ -2882,7 +2821,7 @@ EOF
else
echo $ac_n "checking for BSD signal semantics""... $ac_c" 1>&6
-echo "configure:2886: checking for BSD signal semantics" >&5
+echo "configure:2825: 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
@@ -2890,7 +2829,7 @@ else
{ echo "configure: error: can not run test program while cross compiling" 1>&2; exit 1; }
else
cat > conftest.$ac_ext <<EOF
-#line 2894 "configure"
+#line 2833 "configure"
#include "confdefs.h"
#include <stdio.h>
@@ -2912,7 +2851,7 @@ main()
}
EOF
-if { (eval echo configure:2916: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest && (./conftest; exit) 2>/dev/null
+if { (eval echo configure:2855: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest && (./conftest; exit) 2>/dev/null
then
rb_cv_bsd_signal=yes
else
@@ -2946,19 +2885,19 @@ EOF
else
echo $ac_n "checking whether getpgrp() has arg""... $ac_c" 1>&6
-echo "configure:2950: checking whether getpgrp() has arg" >&5
+echo "configure:2889: 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 2955 "configure"
+#line 2894 "configure"
#include "confdefs.h"
#include <unistd.h>
int main() {
getpgrp(0);
; return 0; }
EOF
-if { (eval echo configure:2962: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
+if { (eval echo configure:2901: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
rm -rf conftest*
rb_cv_bsdgetpgrp=yes
else
@@ -2979,19 +2918,19 @@ EOF
fi
echo $ac_n "checking whether setpgrp() has args""... $ac_c" 1>&6
-echo "configure:2983: checking whether setpgrp() has args" >&5
+echo "configure:2922: 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 2988 "configure"
+#line 2927 "configure"
#include "confdefs.h"
#include <unistd.h>
int main() {
setpgrp(1, 1);
; return 0; }
EOF
-if { (eval echo configure:2995: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
+if { (eval echo configure:2934: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
rm -rf conftest*
rb_cv_bsdsetpgrp=yes
else
@@ -3013,14 +2952,14 @@ EOF
fi
echo $ac_n "checking whether byte ordering is bigendian""... $ac_c" 1>&6
-echo "configure:3017: checking whether byte ordering is bigendian" >&5
+echo "configure:2956: 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 3024 "configure"
+#line 2963 "configure"
#include "confdefs.h"
#include <sys/types.h>
#include <sys/param.h>
@@ -3031,11 +2970,11 @@ int main() {
#endif
; return 0; }
EOF
-if { (eval echo configure:3035: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
+if { (eval echo configure:2974: \"$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 3039 "configure"
+#line 2978 "configure"
#include "confdefs.h"
#include <sys/types.h>
#include <sys/param.h>
@@ -3046,7 +2985,7 @@ int main() {
#endif
; return 0; }
EOF
-if { (eval echo configure:3050: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
+if { (eval echo configure:2989: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
rm -rf conftest*
ac_cv_c_bigendian=yes
else
@@ -3066,7 +3005,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 3070 "configure"
+#line 3009 "configure"
#include "confdefs.h"
main () {
/* Are we little or big endian? From Harbison&Steele. */
@@ -3079,7 +3018,7 @@ main () {
exit (u.c[sizeof (long) - 1] == 1);
}
EOF
-if { (eval echo configure:3083: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest && (./conftest; exit) 2>/dev/null
+if { (eval echo configure:3022: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest && (./conftest; exit) 2>/dev/null
then
ac_cv_c_bigendian=no
else
@@ -3103,14 +3042,14 @@ EOF
fi
echo $ac_n "checking whether char is unsigned""... $ac_c" 1>&6
-echo "configure:3107: checking whether char is unsigned" >&5
+echo "configure:3046: 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 3114 "configure"
+#line 3053 "configure"
#include "confdefs.h"
#ifdef __CHAR_UNSIGNED__
yes
@@ -3132,7 +3071,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 3136 "configure"
+#line 3075 "configure"
#include "confdefs.h"
/* volatile prevents gcc2 from optimizing the test away on sparcs. */
#if !defined(__STDC__) || __STDC__ != 1
@@ -3142,7 +3081,7 @@ main() {
volatile char c = 255; exit(c < 0);
}
EOF
-if { (eval echo configure:3146: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest && (./conftest; exit) 2>/dev/null
+if { (eval echo configure:3085: \"$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
@@ -3167,7 +3106,7 @@ fi
echo $ac_n "checking whether right shift preserve sign bit""... $ac_c" 1>&6
-echo "configure:3171: checking whether right shift preserve sign bit" >&5
+echo "configure:3110: 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
@@ -3175,7 +3114,7 @@ else
{ echo "configure: error: can not run test program while cross compiling" 1>&2; exit 1; }
else
cat > conftest.$ac_ext <<EOF
-#line 3179 "configure"
+#line 3118 "configure"
#include "confdefs.h"
int
@@ -3187,7 +3126,7 @@ main()
}
EOF
-if { (eval echo configure:3191: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest && (./conftest; exit) 2>/dev/null
+if { (eval echo configure:3130: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest && (./conftest; exit) 2>/dev/null
then
rb_cv_rshift_sign=yes
else
@@ -3215,19 +3154,19 @@ EOF
fi
echo $ac_n "checking count field in FILE structures""... $ac_c" 1>&6
-echo "configure:3219: checking count field in FILE structures" >&5
+echo "configure:3158: 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 3224 "configure"
+#line 3163 "configure"
#include "confdefs.h"
#include <stdio.h>
int main() {
FILE *f = stdin; f->_cnt = 0;
; return 0; }
EOF
-if { (eval echo configure:3231: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
+if { (eval echo configure:3170: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
rm -rf conftest*
rb_cv_fcnt="_cnt"
else
@@ -3237,14 +3176,14 @@ fi
rm -f conftest*
if test "$rb_cv_fcnt" = ""; then
cat > conftest.$ac_ext <<EOF
-#line 3241 "configure"
+#line 3180 "configure"
#include "confdefs.h"
#include <stdio.h>
int main() {
FILE *f = stdin; f->__cnt = 0;
; return 0; }
EOF
-if { (eval echo configure:3248: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
+if { (eval echo configure:3187: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
rm -rf conftest*
rb_cv_fcnt="__cnt"
else
@@ -3255,14 +3194,14 @@ rm -f conftest*
fi
if test "$rb_cv_fcnt" = ""; then
cat > conftest.$ac_ext <<EOF
-#line 3259 "configure"
+#line 3198 "configure"
#include "confdefs.h"
#include <stdio.h>
int main() {
FILE *f = stdin; f->_r = 0;
; return 0; }
EOF
-if { (eval echo configure:3266: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
+if { (eval echo configure:3205: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
rm -rf conftest*
rb_cv_fcnt="_r"
else
@@ -3273,14 +3212,14 @@ rm -f conftest*
fi
if test "$rb_cv_fcnt" = ""; then
cat > conftest.$ac_ext <<EOF
-#line 3277 "configure"
+#line 3216 "configure"
#include "confdefs.h"
#include <stdio.h>
int main() {
FILE *f = stdin; f->readCount = 0;
; return 0; }
EOF
-if { (eval echo configure:3284: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
+if { (eval echo configure:3223: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
rm -rf conftest*
rb_cv_fcnt="readCount"
else
@@ -3305,9 +3244,9 @@ fi
if test "$ac_cv_func_getpwent" = yes; then
echo $ac_n "checking struct passwd""... $ac_c" 1>&6
-echo "configure:3309: checking struct passwd" >&5
+echo "configure:3248: checking struct passwd" >&5
cat > conftest.$ac_ext <<EOF
-#line 3311 "configure"
+#line 3250 "configure"
#include "confdefs.h"
#include <pwd.h>
EOF
@@ -3322,7 +3261,7 @@ fi
rm -f conftest*
cat > conftest.$ac_ext <<EOF
-#line 3326 "configure"
+#line 3265 "configure"
#include "confdefs.h"
#include <pwd.h>
EOF
@@ -3337,7 +3276,7 @@ fi
rm -f conftest*
cat > conftest.$ac_ext <<EOF
-#line 3341 "configure"
+#line 3280 "configure"
#include "confdefs.h"
#include <pwd.h>
EOF
@@ -3352,7 +3291,7 @@ fi
rm -f conftest*
cat > conftest.$ac_ext <<EOF
-#line 3356 "configure"
+#line 3295 "configure"
#include "confdefs.h"
#include <pwd.h>
EOF
@@ -3367,7 +3306,7 @@ fi
rm -f conftest*
cat > conftest.$ac_ext <<EOF
-#line 3371 "configure"
+#line 3310 "configure"
#include "confdefs.h"
#include <pwd.h>
EOF
@@ -3382,7 +3321,7 @@ fi
rm -f conftest*
cat > conftest.$ac_ext <<EOF
-#line 3386 "configure"
+#line 3325 "configure"
#include "confdefs.h"
#include <pwd.h>
EOF
@@ -3397,7 +3336,7 @@ fi
rm -f conftest*
cat > conftest.$ac_ext <<EOF
-#line 3401 "configure"
+#line 3340 "configure"
#include "confdefs.h"
#include <pwd.h>
EOF
@@ -3430,7 +3369,7 @@ fi
case "$host_os" in
linux*)
echo $ac_n "checking whether ELF binaries are produced""... $ac_c" 1>&6
-echo "configure:3434: checking whether ELF binaries are produced" >&5
+echo "configure:3373: 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
@@ -3438,7 +3377,7 @@ else
:
else
cat > conftest.$ac_ext <<EOF
-#line 3442 "configure"
+#line 3381 "configure"
#include "confdefs.h"
/* Test for whether ELF binaries are produced */
@@ -3458,7 +3397,7 @@ main() {
}
EOF
-if { (eval echo configure:3462: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest && (./conftest; exit) 2>/dev/null
+if { (eval echo configure:3401: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest && (./conftest; exit) 2>/dev/null
then
rb_cv_linux_elf=yes
else
@@ -3488,7 +3427,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:3492: checking whether OS depend dynamic link works" >&5
+echo "configure:3431: checking whether OS depend dynamic link works" >&5
if test "$GCC" = yes; then
case "$host_os" in
nextstep*) ;;
@@ -3566,13 +3505,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:3570: checking whether matz's dln works" >&5
+echo "configure:3509: 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 3576 "configure"
+#line 3515 "configure"
#include "confdefs.h"
#define USE_DLN_A_OUT
@@ -3582,7 +3521,7 @@ int main() {
; return 0; }
EOF
-if { (eval echo configure:3586: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
+if { (eval echo configure:3525: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
rm -rf conftest*
rb_cv_dln_a_out=yes
else
@@ -3679,7 +3618,7 @@ fi
case "$host_os" in
human*)
echo $ac_n "checking for _harderr in -lsignal""... $ac_c" 1>&6
-echo "configure:3683: checking for _harderr in -lsignal" >&5
+echo "configure:3622: 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
@@ -3687,7 +3626,7 @@ else
ac_save_LIBS="$LIBS"
LIBS="-lsignal $LIBS"
cat > conftest.$ac_ext <<EOF
-#line 3691 "configure"
+#line 3630 "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
@@ -3698,7 +3637,7 @@ int main() {
_harderr()
; return 0; }
EOF
-if { (eval echo configure:3702: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest; then
+if { (eval echo configure:3641: \"$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
@@ -3726,7 +3665,7 @@ else
fi
echo $ac_n "checking for hmemset in -lhmem""... $ac_c" 1>&6
-echo "configure:3730: checking for hmemset in -lhmem" >&5
+echo "configure:3669: 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
@@ -3734,7 +3673,7 @@ else
ac_save_LIBS="$LIBS"
LIBS="-lhmem $LIBS"
cat > conftest.$ac_ext <<EOF
-#line 3738 "configure"
+#line 3677 "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
@@ -3745,7 +3684,7 @@ int main() {
hmemset()
; return 0; }
EOF
-if { (eval echo configure:3749: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest; then
+if { (eval echo configure:3688: \"$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
@@ -3775,12 +3714,12 @@ fi
for ac_func in select
do
echo $ac_n "checking for $ac_func""... $ac_c" 1>&6
-echo "configure:3779: checking for $ac_func" >&5
+echo "configure:3718: 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 3784 "configure"
+#line 3723 "configure"
#include "confdefs.h"
/* System header to define __stub macros and hopefully few prototypes,
which can conflict with char $ac_func(); below. */
@@ -3803,7 +3742,7 @@ $ac_func();
; return 0; }
EOF
-if { (eval echo configure:3807: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest; then
+if { (eval echo configure:3746: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest; then
rm -rf conftest*
eval "ac_cv_func_$ac_func=yes"
else
@@ -3828,7 +3767,7 @@ fi
done
echo $ac_n "checking whether PD libc _dtos18 fail to convert big number""... $ac_c" 1>&6
-echo "configure:3832: checking whether PD libc _dtos18 fail to convert big number" >&5
+echo "configure:3771: 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
@@ -3836,7 +3775,7 @@ else
{ echo "configure: error: can not run test program while cross compiling" 1>&2; exit 1; }
else
cat > conftest.$ac_ext <<EOF
-#line 3840 "configure"
+#line 3779 "configure"
#include "confdefs.h"
#include <stdio.h>
@@ -3848,7 +3787,7 @@ main ()
}
EOF
-if { (eval echo configure:3852: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest && (./conftest; exit) 2>/dev/null
+if { (eval echo configure:3791: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest && (./conftest; exit) 2>/dev/null
then
rb_cv_missing__dtos18=yes
else
@@ -3870,7 +3809,7 @@ EOF
fi
echo $ac_n "checking whether PD libc fconvert fail to round""... $ac_c" 1>&6
-echo "configure:3874: checking whether PD libc fconvert fail to round" >&5
+echo "configure:3813: 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
@@ -3878,7 +3817,7 @@ else
{ echo "configure: error: can not run test program while cross compiling" 1>&2; exit 1; }
else
cat > conftest.$ac_ext <<EOF
-#line 3882 "configure"
+#line 3821 "configure"
#include "confdefs.h"
#include <stdio.h>
@@ -3891,7 +3830,7 @@ main ()
}
EOF
-if { (eval echo configure:3895: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest && (./conftest; exit) 2>/dev/null
+if { (eval echo configure:3834: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest && (./conftest; exit) 2>/dev/null
then
rb_cv_missing_fconvert=yes
else
@@ -4153,7 +4092,6 @@ 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
@@ -4195,8 +4133,6 @@ 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
@@ -4289,10 +4225,6 @@ 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"
@@ -4308,7 +4240,6 @@ 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 dbf6c58..ab5ef90 100644
--- a/configure.in
+++ b/configure.in
@@ -29,7 +29,6 @@ fi
AC_CANONICAL_HOST
-
dnl checks for fat-binary
fat_binary=no
AC_ARG_ENABLE( fat-binary,
@@ -73,7 +72,6 @@ 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
@@ -141,7 +139,7 @@ AC_HEADER_DIRENT
AC_HEADER_STDC
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)
+ syscall.h a.out.h string.h utime.h memory.h direct.h)
dnl Checks for typedefs, structures, and compiler characteristics.
AC_TYPE_UID_T
diff --git a/dir.c b/dir.c
index b92a5f6..31524dd 100644
--- a/dir.c
+++ b/dir.c
@@ -27,6 +27,9 @@
#if HAVE_DIRENT_H
# include <dirent.h>
# define NAMLEN(dirent) strlen((dirent)->d_name)
+#elif HAVE_DIRECT_H
+# include <direct.h>
+# define NAMLEN(dirent) strlen((dirent)->d_name)
#else
# define dirent direct
# define NAMLEN(dirent) (dirent)->d_namlen
@@ -39,7 +42,7 @@
# if HAVE_NDIR_H
# include <ndir.h>
# endif
-# ifdef NT
+# if defined(NT) && defined(_MSC_VER)
# include "missing/dir.h"
# endif
#endif
diff --git a/eval.c b/eval.c
index 6c11410..7697213 100644
--- a/eval.c
+++ b/eval.c
@@ -704,8 +704,10 @@ rb_check_safe_str(x)
Raise(eSecurityError, "Insecure operation - %s",
rb_id2name(the_frame->last_func));
}
- Warning("Insecure operation - %s",
- rb_id2name(the_frame->last_func));
+ if (verbose) {
+ Warning("Insecure operation - %s",
+ rb_id2name(the_frame->last_func));
+ }
}
}
@@ -6124,7 +6126,7 @@ thread_sleep_forever()
{
if (curr_thread == curr_thread->next) {
TRAP_BEG;
- sleep((32767<<16)+32767);
+ sleep((32767L<<16)+32767);
TRAP_END;
return;
}
@@ -6466,7 +6468,8 @@ thread_raise(argc, argv, thread)
f_raise(argc, argv);
}
- thread_save_context(curr_thread);
+ if (curr_thread->status != THREAD_KILLED)
+ thread_save_context(curr_thread);
if (setjmp(curr_thread->context)) {
return thread;
}
diff --git a/ext/socket/socket.c b/ext/socket/socket.c
index d235da1..bd9bae8 100644
--- a/ext/socket/socket.c
+++ b/ext/socket/socket.c
@@ -408,11 +408,7 @@ thread_connect(fd, sockaddr, len, type)
#endif
FD_ZERO(&fds);
FD_SET(fd, &fds);
-#ifndef USE_CWGUSI
- thread_select(fd+1, 0, &fds, 0, 0, 0);
-#else
thread_select(fd+1, 0, &fds, 0, 0);
-#endif
continue;
#endif
diff --git a/file.c b/file.c
index 9232578..2d616a6 100644
--- a/file.c
+++ b/file.c
@@ -966,8 +966,14 @@ file_s_utime(argc, argv)
#ifndef HAVE_UTIME_H
# ifdef NT
+# if defined(__BORLANDC__)
+# include <utime.h>
+# else
# include <sys/utime.h>
+# endif
+# if defined(_MSC_VER)
# define utimbuf _utimbuf
+# endif
# else
struct utimbuf {
long actime;
diff --git a/gc.c b/gc.c
index e21f221..21c719f 100644
--- a/gc.c
+++ b/gc.c
@@ -681,7 +681,7 @@ obj_free(obj)
st_free_table(RANY(obj)->as.hash.tbl);
break;
case T_REGEXP:
- if (RANY(obj)->as.regexp.ptr) reg_free(RANY(obj)->as.regexp.ptr);
+ if (RANY(obj)->as.regexp.ptr) re_free_pattern(RANY(obj)->as.regexp.ptr);
if (RANY(obj)->as.regexp.str) free(RANY(obj)->as.regexp.str);
break;
case T_DATA:
diff --git a/glob.c b/glob.c
index 543ca0c..09a47e0 100644
--- a/glob.c
+++ b/glob.c
@@ -46,6 +46,9 @@
#if defined (HAVE_DIRENT_H)
# include <dirent.h>
# define D_NAMLEN(d) strlen ((d)->d_name)
+#elif HAVE_DIRECT_H
+# include <direct.h>
+# define D_NAMLEN(d) strlen ((d)->d_name)
#else /* !HAVE_DIRENT_H */
# define D_NAMLEN(d) ((d)->d_namlen)
# if defined (HAVE_SYS_NDIR_H)
@@ -66,6 +69,8 @@
/* Posix does not require that the d_ino field be present, and some
systems do not provide it. */
# define REAL_DIR_ENTRY(dp) 1
+#elif defined (__BORLANDC__)
+# define REAL_DIR_ENTRY(dp) 1
#else
# define REAL_DIR_ENTRY(dp) (dp->d_ino != 0)
#endif /* _POSIX_SOURCE */
@@ -111,7 +116,7 @@ extern void throw_to_top_level ();
extern int interrupt_state;
#endif /* SHELL */
-#if defined(NT)
+#if defined(NT) && defined(_MSC_VER)
#include "missing/dir.h"
#endif
diff --git a/lib/mkmf.rb b/lib/mkmf.rb
index c650b49..e89ac7d 100644
--- a/lib/mkmf.rb
+++ b/lib/mkmf.rb
@@ -244,7 +244,7 @@ def create_makefile(target)
end
unless $objs then
- $objs = Dir["*.c"]
+ $objs = Dir["*.{c,cc}"]
for f in $objs
f.sub!(/\.(c|cc)$/, ".o")
end
@@ -264,6 +264,7 @@ CC = #{CONFIG["CC"]}
prefix = #{CONFIG["prefix"]}
CFLAGS = #{CONFIG["CCDLFLAGS"]} -I$(hdrdir) -I#{CONFIG["includedir"]} #{CFLAGS} #{$CFLAGS} #{$defs.join(" ")}
+CXXFLAGS = $(CFLAGS)
DLDFLAGS = #{$DLDFLAGS} #{$LDFLAGS}
LDSHARED = #{CONFIG["LDSHARED"]}
diff --git a/lib/telnet.rb b/lib/telnet.rb
index ca68e1b..9c99e02 100644
--- a/lib/telnet.rb
+++ b/lib/telnet.rb
@@ -1,8 +1,14 @@
#
# telnet.rb
-# ver0.13 1998/08/25
+# ver0.14 1998/09/01
# Wakou Aoyama <wakou@fsinet.or.jp>
#
+# ver0.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.
+#
# ver0.13 1998/08/25
# add print method.
#
@@ -26,6 +32,7 @@
# host = Telnet.new({"Binmode" => TRUE, default: TRUE
# "Host" => "localhost", default: "localhost"
# "Output_log" => "output_log", default: not output
+# "Dump_log" => "dump_log", default: not output
# "Port" => 23, default: 23
# "Prompt" => /[$%#>] $/, default: /[$%#>] $/
# "Telnetmode" => TRUE, default: TRUE
@@ -131,29 +138,73 @@ class Telnet < SimpleDelegator
is_timeout
end
- # For those who are curious, here are some of the special characters
- # interpretted by the telnet protocol:
- # Name Octal Dec. Description
- CR = "\015"
- LF = "\012"
- EOL = CR + LF # /* end of line */
- IAC = "\377" # 255 /* interpret as command: */
- DONT = "\376" # 254 /* you are not to use option */
- DO = "\375" # 253 /* please, you use option */
- WONT = "\374" # 252 /* I won't use option */
- WILL = "\373" # 251 /* I will use option */
- # SB = "\372" # 250 /* interpret as subnegotiation */
- # GA = "\371" # 249 /* you may reverse the line */
- # EL = "\370" # 248 /* erase the current line */
- # EC = "\367" # 247 /* erase the current character */
- AYT = "\366" # 246 /* are you there */
- # AO = "\365" # 245 /* abort output--but let prog finish */
- # IP = "\364" # 244 /* interrupt process--permanently */
- # BREAK = "\363" # 243 /* break */
- # DM = "\362" # 242 /* data mark--for connect. cleaning */
- # NOP = "\361" # 241 /* nop */
- # SE = "\360" # 240 /* end sub negotiation */
- # EOR = "\357" # 239 /* end of record (transparent mode) */
+ IAC = 255.chr # interpret as command:
+ DONT = 254.chr # you are not to use option
+ DO = 253.chr # please, you use option
+ WONT = 252.chr # I won't use option
+ WILL = 251.chr # I will use option
+ SB = 250.chr # interpret as subnegotiation
+ GA = 249.chr # you may reverse the line
+ EL = 248.chr # erase the current line
+ EC = 247.chr # erase the current character
+ AYT = 246.chr # are you there
+ AO = 245.chr # abort output--but let prog finish
+ IP = 244.chr # interrupt process--permanently
+ BREAK = 243.chr # break
+ DM = 242.chr # data mark--for connect. cleaning
+ NOP = 241.chr # nop
+ SE = 240.chr # end sub negotiation
+ EOR = 239.chr # end of record (transparent mode)
+ ABORT = 238.chr # Abort process
+ SUSP = 237.chr # Suspend process
+ EOF = 236.chr # End of file
+ SYNCH = 242.chr # for telfunc calls
+
+ OPT_BINARY = 0.chr # Binary Transmission
+ OPT_ECHO = 1.chr # Echo
+ OPT_RCP = 2.chr # Reconnection
+ OPT_SGA = 3.chr # Suppress Go Ahead
+ OPT_NAMS = 4.chr # Approx Message Size Negotiation
+ OPT_STATUS = 5.chr # Status
+ OPT_TM = 6.chr # Timing Mark
+ OPT_RCTE = 7.chr # Remote Controlled Trans and Echo
+ OPT_NAOL = 8.chr # Output Line Width
+ OPT_NAOP = 9.chr # Output Page Size
+ OPT_NAOCRD = 10.chr # Output Carriage-Return Disposition
+ OPT_NAOHTS = 11.chr # Output Horizontal Tab Stops
+ OPT_NAOHTD = 12.chr # Output Horizontal Tab Disposition
+ OPT_NAOFFD = 13.chr # Output Formfeed Disposition
+ OPT_NAOVTS = 14.chr # Output Vertical Tabstops
+ OPT_NAOVTD = 15.chr # Output Vertical Tab Disposition
+ OPT_NAOLFD = 16.chr # Output Linefeed Disposition
+ OPT_XASCII = 17.chr # Extended ASCII
+ OPT_LOGOUT = 18.chr # Logout
+ OPT_BM = 19.chr # Byte Macro
+ OPT_DET = 20.chr # Data Entry Terminal
+ OPT_SUPDUP = 21.chr # SUPDUP
+ OPT_SUPDUPOUTPUT = 22.chr # SUPDUP Output
+ OPT_SNDLOC = 23.chr # Send Location
+ OPT_TTYPE = 24.chr # Terminal Type
+ OPT_EOR = 25.chr # End of Record
+ OPT_TUID = 26.chr # TACACS User Identification
+ OPT_OUTMRK = 27.chr # Output Marking
+ OPT_TTYLOC = 28.chr # Terminal Location Number
+ OPT_3270REGIME = 29.chr # Telnet 3270 Regime
+ OPT_X3PAD = 30.chr # X.3 PAD
+ OPT_NAWS = 31.chr # Negotiate About Window Size
+ OPT_TSPEED = 32.chr # Terminal Speed
+ OPT_LFLOW = 33.chr # Remote Flow Control
+ OPT_LINEMODE = 34.chr # Linemode
+ OPT_XDISPLOC = 35.chr # X Display Location
+ OPT_OLD_ENVIRON = 36.chr # Environment Option
+ OPT_AUTHENTICATION = 37.chr # Authentication Option
+ OPT_ENCRYPT = 38.chr # Encryption Option
+ OPT_NEW_ENVIRON = 39.chr # New Environment Option
+
+ NULL = "\000"
+ CR = "\015"
+ LF = "\012"
+ EOL = CR + LF
def initialize(options)
@options = options
@@ -165,21 +216,31 @@ class Telnet < SimpleDelegator
@options["Timeout"] = 10 if not @options.include?("Timeout")
@options["Waittime"] = 0 if not @options.include?("Waittime")
+ @telnet_option = { "SGA" => FALSE, "BINARY" => FALSE }
+
if @options.include?("Output_log")
@log = File.open(@options["Output_log"], 'a+')
@log.sync = TRUE
@log.binmode if @options["Binmode"]
end
+ if @options.include?("Dump_log")
+ @dumplog = File.open(@options["Dump_log"], 'a+')
+ @dumplog.sync = TRUE
+ @dumplog.binmode
+ end
+
message = "Trying " + @options["Host"] + "...\n"
STDOUT.write(message)
@log.write(message) if @options.include?("Output_log")
+ @dumplog.write(message) if @options.include?("Dump_log")
is_timeout = timeout(@options["Timeout"]){
begin
@sock = TCPsocket.open(@options["Host"], @options["Port"])
rescue
@log.write($! + "\n") if @options.include?("Output_log")
+ @dumplog.write($! + "\n") if @options.include?("Dump_log")
raise
end
}
@@ -190,26 +251,51 @@ class Telnet < SimpleDelegator
message = "Connected to " + @options["Host"] + ".\n"
STDOUT.write(message)
@log.write(message) if @options.include?("Output_log")
+ @dumplog.write(message) if @options.include?("Dump_log")
super(@sock)
end
def preprocess(str)
- str.gsub!(/#{EOL}/no, "\n") # combine EOL into "\n"
+ str.gsub!(/#{CR}#{NULL}/no, CR) # combine CR+NULL into CR
+ str.gsub!(/#{EOL}/no, "\n") # combine EOL into "\n"
- # respond to "IAC DO x" or "IAC DON'T x" with "IAC WON'T x"
- str.gsub!(/([^#{IAC}])?#{IAC}[#{DO}#{DONT}](.|\n)/no){
+ # respond to "IAC DO x"
+ str.gsub!(/([^#{IAC}])?#{IAC}#{DO}(.|\n)/no){
+ if OPT_BINARY == $2
+ @telnet_option["BINARY"] = TRUE
+ @sock.write(IAC + WILL + OPT_BINARY)
+ $1
+ else
@sock.write(IAC + WONT + $2)
$1
+ end
}
- # ignore "IAC WILL x" or "IAC WON'T x"
- str.gsub!(/([^#{IAC}])?#{IAC}[#{WILL}#{WONT}](.|\n)/no, '\1')
+ # respond to "IAC DON'T x" with "IAC WON'T x"
+ str.gsub!(/([^#{IAC}])?#{IAC}#{DONT}(.|\n)/no){
+ @sock.write(IAC + WONT + $2)
+ $1
+ }
+
+ # respond to "IAC WILL x"
+ str.gsub!(/([^#{IAC}])?#{IAC}#{WILL}(.|\n)/no){
+ if OPT_SGA == $2
+ @telnet_option["SGA"] = TRUE
+ @sock.write(IAC + DO + OPT_SGA)
+ $1
+ else
+ $1
+ end
+ }
+
+ # ignore "IAC WON'T x"
+ str.gsub!(/([^#{IAC}])?#{IAC}#{WONT}(.|\n)/no, '\1')
# respond to "IAC AYT" (are you there)
str.gsub!(/([^#{IAC}])?#{IAC}#{AYT}/no){
- @sock.write("nobody here but us pigeons" + EOL)
- $1
+ @sock.write("nobody here but us pigeons" + EOL)
+ $1
}
str.gsub(/#{IAC}#{IAC}/no, IAC) # handle escaped IAC characters
@@ -235,11 +321,9 @@ class Telnet < SimpleDelegator
not select([@sock], nil, nil, timeout)
buf = ''
begin
- buf = if @options["Telnetmode"]
- preprocess( @sock.sysread(1024 * 1024) )
- else
- @sock.sysread(1024 * 1024)
- end
+ buf = @sock.sysread(1024 * 1024)
+ @dumplog.print(buf) if @options.include?("Dump_log")
+ buf = preprocess(buf) if @options["Telnetmode"]
rescue EOFError # End of file reached
break
ensure
@@ -252,7 +336,16 @@ class Telnet < SimpleDelegator
end
def print(string)
- @sock.write(string.gsub(/\n/, EOL) + EOL)
+ if @telnet_option["BINARY"] and @telnet_option["SGA"]
+ # IAC WILL SGA IAC DO BIN send EOL --> CR
+ @sock.write(string.gsub(/\n/, CR) + CR)
+ elsif @telnet_option["SGA"]
+ # IAC WILL SGA send EOL --> CR+NULL
+ @sock.write(string.gsub(/\n/, CR + NULL) + CR + NULL)
+ else
+ # NONE send EOL --> LF
+ @sock.write(string.gsub(/\n/, LF) + LF)
+ end
end
def cmd(options)
@@ -268,7 +361,7 @@ class Telnet < SimpleDelegator
end
select(nil, [@sock])
- @sock.write(string.gsub(/\n/, EOL) + EOL)
+ print(string)
if iterator?
waitfor({"Prompt" => match, "Timeout" => timeout}){|c| yield c }
else
diff --git a/marshal.c b/marshal.c
index f726dfc..8263e48 100644
--- a/marshal.c
+++ b/marshal.c
@@ -665,7 +665,7 @@ r_object(arg)
}
big = RBIGNUM(big_norm((VALUE)big));
if (TYPE(big) == T_BIGNUM) {
- r_regist(big, arg);
+ r_regist((VALUE)big, arg);
}
return (VALUE)big;
}
diff --git a/missing/dir.h b/missing/dir.h
index 8c29869..2e61f04 100644
--- a/missing/dir.h
+++ b/missing/dir.h
@@ -61,137 +61,3 @@ void rewinddir(DIR *dirp);
void closedir(DIR *dirp);
#endif /* __DIR_INCLUDED */
-/* $RCSfile: dir.h,v $$Revision: 1.1.1.2.2.1 $$Date: 1998/01/16 12:36:08 $
- *
- * (C) Copyright 1987, 1990 Diomidis Spinellis.
- *
- * You may distribute under the terms of either the GNU General Public
- * License or the Artistic License, as specified in the README file.
- *
- * $Log: dir.h,v $
- * Revision 1.1.1.2.2.1 1998/01/16 12:36:08 matz
- * *** empty log message ***
- *
- * Revision 1.1.1.2 1998/01/16 04:14:54 matz
- * *** empty log message ***
- *
- * Revision 4.0.1.1 91/06/07 11:22:10 lwall
- * patch4: new copyright notice
- *
- * Revision 4.0 91/03/20 01:34:20 lwall
- * 4.0 baseline.
- *
- * Revision 3.0.1.1 90/03/27 16:07:08 lwall
- * patch16: MSDOS support
- *
- * Revision 1.1 90/03/18 20:32:29 dds
- * Initial revision
- *
- *
- */
-
-/*
- * defines the type returned by the directory(3) functions
- */
-
-#ifndef __DIR_INCLUDED
-#define __DIR_INCLUDED
-
-/*Directory entry size */
-#ifdef DIRSIZ
-#undef DIRSIZ
-#endif
-#define DIRSIZ(rp) (sizeof(struct direct))
-
-/*
- * Structure of a directory entry
- */
-struct direct {
- ino_t d_ino; /* inode number (not used by MS-DOS) */
- int d_namlen; /* Name length */
- char d_name[256]; /* file name */
-};
-
-struct _dir_struc { /* Structure used by dir operations */
- char *start; /* Starting position */
- char *curr; /* Current position */
- struct direct dirstr; /* Directory structure to return */
-};
-
-typedef struct _dir_struc DIR; /* Type returned by dir operations */
-
-DIR *cdecl opendir(char *filename);
-struct direct *readdir(DIR *dirp);
-long telldir(DIR *dirp);
-void seekdir(DIR *dirp,long loc);
-void rewinddir(DIR *dirp);
-void closedir(DIR *dirp);
-
-#endif /* __DIR_INCLUDED */
-/* $RCSfile: dir.h,v $$Revision: 1.1.1.2.2.1 $$Date: 1998/01/16 12:36:08 $
- *
- * (C) Copyright 1987, 1990 Diomidis Spinellis.
- *
- * You may distribute under the terms of either the GNU General Public
- * License or the Artistic License, as specified in the README file.
- *
- * $Log: dir.h,v $
- * Revision 1.1.1.2.2.1 1998/01/16 12:36:08 matz
- * *** empty log message ***
- *
- * Revision 1.1.1.2 1998/01/16 04:14:54 matz
- * *** empty log message ***
- *
- * Revision 4.0.1.1 91/06/07 11:22:10 lwall
- * patch4: new copyright notice
- *
- * Revision 4.0 91/03/20 01:34:20 lwall
- * 4.0 baseline.
- *
- * Revision 3.0.1.1 90/03/27 16:07:08 lwall
- * patch16: MSDOS support
- *
- * Revision 1.1 90/03/18 20:32:29 dds
- * Initial revision
- *
- *
- */
-
-/*
- * defines the type returned by the directory(3) functions
- */
-
-#ifndef __DIR_INCLUDED
-#define __DIR_INCLUDED
-
-/*Directory entry size */
-#ifdef DIRSIZ
-#undef DIRSIZ
-#endif
-#define DIRSIZ(rp) (sizeof(struct direct))
-
-/*
- * Structure of a directory entry
- */
-struct direct {
- ino_t d_ino; /* inode number (not used by MS-DOS) */
- int d_namlen; /* Name length */
- char d_name[256]; /* file name */
-};
-
-struct _dir_struc { /* Structure used by dir operations */
- char *start; /* Starting position */
- char *curr; /* Current position */
- struct direct dirstr; /* Directory structure to return */
-};
-
-typedef struct _dir_struc DIR; /* Type returned by dir operations */
-
-DIR *cdecl opendir(char *filename);
-struct direct *readdir(DIR *dirp);
-long telldir(DIR *dirp);
-void seekdir(DIR *dirp,long loc);
-void rewinddir(DIR *dirp);
-void closedir(DIR *dirp);
-
-#endif /* __DIR_INCLUDED */
diff --git a/random.c b/random.c
index 6adfc59..e9dbf3e 100644
--- a/random.c
+++ b/random.c
@@ -119,7 +119,7 @@ static VALUE
f_rand(obj, vmax)
VALUE obj, vmax;
{
- int val, max;
+ long val, max;
switch (TYPE(vmax)) {
case T_BIGNUM:
@@ -131,7 +131,7 @@ f_rand(obj, vmax)
break;
}
- max = NUM2INT(vmax);
+ max = NUM2LONG(vmax);
if (max == 0) {
return float_new(RANDOM_NUMBER);
}
diff --git a/re.c b/re.c
index fe84ca9..c334397 100644
--- a/re.c
+++ b/re.c
@@ -142,13 +142,13 @@ kcode_set_option(reg)
switch ((RBASIC(reg)->flags & KCODE_MASK)) {
case KCODE_NONE:
- mbcinit(MBCTYPE_ASCII);
+ re_mbcinit(MBCTYPE_ASCII);
break;
case KCODE_EUC:
- mbcinit(MBCTYPE_EUC);
+ re_mbcinit(MBCTYPE_EUC);
break;
case KCODE_SJIS:
- mbcinit(MBCTYPE_SJIS);
+ re_mbcinit(MBCTYPE_SJIS);
break;
}
}
@@ -158,13 +158,13 @@ kcode_reset_option()
{
switch (reg_kcode) {
case KCODE_NONE:
- mbcinit(MBCTYPE_ASCII);
+ re_mbcinit(MBCTYPE_ASCII);
break;
case KCODE_EUC:
- mbcinit(MBCTYPE_EUC);
+ re_mbcinit(MBCTYPE_EUC);
break;
case KCODE_SJIS:
- mbcinit(MBCTYPE_SJIS);
+ re_mbcinit(MBCTYPE_SJIS);
break;
}
}
@@ -602,15 +602,6 @@ match_to_s(match)
return str;
}
-void
-reg_free(rp)
-Regexp *rp;
-{
- free(rp->buffer);
- free(rp->fastmap);
- free(rp);
-}
-
VALUE cRegexp;
static VALUE
@@ -648,7 +639,7 @@ reg_new_1(klass, s, len, options)
break;
}
- kcode_set_option(re);
+ kcode_set_option((VALUE)re);
if (RTEST(ignorecase)) {
options |= RE_OPTION_IGNORECASE;
FL_SET(re, REG_CASESTATE);
@@ -658,6 +649,9 @@ reg_new_1(klass, s, len, options)
memcpy(re->str, s, len);
re->str[len] = '\0';
re->len = len;
+ if (options & ~0x3) {
+ kcode_reset_option();
+ }
obj_call_init((VALUE)re);
return (VALUE)re;
@@ -975,12 +969,12 @@ rb_set_kcode(code)
case 'E':
case 'e':
reg_kcode = KCODE_EUC;
- mbcinit(MBCTYPE_EUC);
+ re_mbcinit(MBCTYPE_EUC);
break;
case 'S':
case 's':
reg_kcode = KCODE_SJIS;
- mbcinit(MBCTYPE_SJIS);
+ re_mbcinit(MBCTYPE_SJIS);
break;
default:
case 'N':
@@ -989,7 +983,7 @@ rb_set_kcode(code)
case 'a':
set_no_conversion:
reg_kcode = KCODE_NONE;
- mbcinit(MBCTYPE_ASCII);
+ re_mbcinit(MBCTYPE_ASCII);
break;
}
}
@@ -1029,12 +1023,12 @@ Init_Regexp()
re_set_casetable(casetable);
#ifdef RUBY_USE_EUC
- mbcinit(MBCTYPE_EUC);
+ re_mbcinit(MBCTYPE_EUC);
#else
#ifdef RUBY_USE_SJIS
- mbcinit(MBCTYPE_SJIS);
+ re_mbcinit(MBCTYPE_SJIS);
#else
- mbcinit(MBCTYPE_ASCII);
+ re_mbcinit(MBCTYPE_ASCII);
#endif
#endif
diff --git a/regex.c b/regex.c
index 2eefc9d..40b22bc 100644
--- a/regex.c
+++ b/regex.c
@@ -143,7 +143,7 @@ static int group_match_null_string_p ();
/* Define the syntax stuff, so we can do the \<, \>, etc. */
/* This must be nonzero for the wordchar and notwordchar pattern
- commands in re_match_2. */
+ commands in re_match. */
#ifndef Sword
#define Sword 1
#endif
@@ -153,6 +153,8 @@ static int group_match_null_string_p ();
static char re_syntax_table[256];
static void init_syntax_once P((void));
static unsigned char *translate = 0;
+static void init_regs P((struct re_registers*, unsigned int));
+static void bm_init_skip P((int *, unsigned char*, int, char *));
#undef P
@@ -247,6 +249,7 @@ enum regexpcode
begbuf, /* Succeeds if at beginning of buffer (if emacs) or at beginning
of string to be matched (if not). */
endbuf, /* Analogously, for end of buffer/string. */
+ endbuf2, /* End of buffer/string, or newline just before it. */
jump, /* Followed by two bytes giving relative address to jump to. */
jump_past_alt,/* Same as jump, but marks the end of an alternative. */
on_failure_jump, /* Followed by two bytes giving relative address of
@@ -386,7 +389,7 @@ long re_syntax_options = 0;
/* Macros for re_compile_pattern, which is found below these definitions. */
#define TRANSLATE_P() ((options&RE_OPTION_IGNORECASE) && translate)
-#define TRY_TRANSLATE() ((bufp->options&(RE_OPTION_IGNORECASE|RE_MAY_IGNORECASE)) && translate)
+#define MAY_TRANSLATE() ((bufp->options&(RE_OPTION_IGNORECASE|RE_MAY_IGNORECASE)) && translate)
/* Fetch the next character in the uncompiled pattern---translating it
if necessary. Also cast from a signed character in the constant
string passed to us by the user to an unsigned char that we can use
@@ -836,6 +839,10 @@ print_partial_compiled_pattern(start, end)
printf ("/endbuf");
break;
+ case endbuf2:
+ printf ("/endbuf2");
+ break;
+
default:
printf ("?%d", *(p-1));
}
@@ -908,6 +915,7 @@ calculate_must_string(start, end)
case notwordchar:
case begbuf:
case endbuf:
+ case endbuf2:
case push_dummy_failure:
break;
@@ -1060,6 +1068,7 @@ re_compile_pattern(pattern, size, bufp)
bufp->fastmap_accurate = 0;
bufp->must = 0;
+ bufp->must_skip = 0;
/* Initialize the syntax table. */
init_syntax_once();
@@ -1449,41 +1458,49 @@ re_compile_pattern(pattern, size, bufp)
case '(':
PATFETCH(c);
if (c == '?') {
+ int negative = 0;
PATFETCH_RAW(c);
switch (c) {
- case 'x': case 'X':
- case 'i': case 'I':
+ case 'x': case 'i': case '-':
for (;;) {
switch (c) {
+ case '-':
+ negative = 1;
+ break;
+
case ')':
+ case ':':
break;
case 'x':
- options |= RE_OPTION_EXTENDED;
- break;
- case 'X':
- options &= ~RE_OPTION_EXTENDED;
+ if (negative)
+ options &= ~RE_OPTION_EXTENDED;
+ else
+ options |= RE_OPTION_EXTENDED;
break;
case 'i':
- if (!(options&RE_OPTION_IGNORECASE)) {
+ if (negative) {
+ if (options&RE_OPTION_IGNORECASE) {
+ options &= ~RE_OPTION_IGNORECASE;
+ BUFPUSH(casefold_off);
+ }
+ }
+ else if (!(options&RE_OPTION_IGNORECASE)) {
options |= RE_OPTION_IGNORECASE;
BUFPUSH(casefold_on);
}
break;
- case 'I':
- if (options&RE_OPTION_IGNORECASE) {
- options &= ~RE_OPTION_IGNORECASE;
- BUFPUSH(casefold_off);
- }
- break;
default:
FREE_AND_RETURN(stackb, "undefined (?...) inline option");
}
- if (c == ')') break;
+ if (c == ')') {
+ c = '#'; /* read whole in-line options */
+ break;
+ }
+ if (c == ':') break;
PATFETCH_RAW(c);
}
- c = '#'; /* read whole in-line options */
break;
case '#':
@@ -1577,7 +1594,7 @@ re_compile_pattern(pattern, size, bufp)
{ /* Push a dummy failure point at the end of the
alternative for a possible future
`finalize_jump' to pop. See comments at
- `push_dummy_failure' in `re_match_2'. */
+ `push_dummy_failure' in `re_match'. */
BUFPUSH(push_dummy_failure);
/* We allocated space for this jump when we assigned
@@ -1881,6 +1898,10 @@ re_compile_pattern(pattern, size, bufp)
break;
case 'Z':
+ BUFPUSH(endbuf2);
+ break;
+
+ case 'z':
BUFPUSH(endbuf);
break;
@@ -2025,9 +2046,11 @@ re_compile_pattern(pattern, size, bufp)
bufp->used = b - bufp->buffer;
bufp->re_nsub = regnum;
- if (*bufp->buffer == exactn) {
+ laststart = bufp->buffer;
+ if (*laststart == start_memory) laststart += 3;
+ if (*laststart == exactn) {
bufp->options |= RE_OPTIMIZE_EXACTN;
- bufp->must = bufp->buffer+1;
+ bufp->must = laststart+1;
}
else {
bufp->must = calculate_must_string(bufp->buffer, b);
@@ -2044,6 +2067,12 @@ re_compile_pattern(pattern, size, bufp)
break;
}
}
+ if (!(bufp->options & RE_OPTIMIZE_NO_BM)) {
+ bufp->must_skip = (int *) xmalloc((1 << BYTEWIDTH)*sizeof(int));
+ bm_init_skip(bufp->must_skip, bufp->must+1,
+ (unsigned char)bufp->must[0],
+ MAY_TRANSLATE()?translate:0);
+ }
}
FREE_AND_RETURN(stackb, 0);
@@ -2064,6 +2093,15 @@ re_compile_pattern(pattern, size, bufp)
FREE_AND_RETURN(stackb, "nested *?+ in regexp");
}
+void
+re_free_pattern(bufp)
+ struct re_pattern_buffer *bufp;
+{
+ free(bufp->buffer);
+ free(bufp->fastmap);
+ if (bufp->must_skip) free(bufp->must_skip);
+ free(bufp);
+}
/* Store a jump of the form <OPCODE> <relative address>.
Store in the location FROM a jump operation to jump to relative
@@ -2189,7 +2227,7 @@ insert_op_2(op, there, current_end, num_1, num_2)
#define trans_eq(c1, c2, translate) (translate?(translate[c1]==translate[c2]):((c1)==(c2)))
static int
-must_match(little, lend, big, bend, translate)
+slow_match(little, lend, big, bend, translate)
unsigned char *little, *lend;
unsigned char *big, *bend;
unsigned char *translate;
@@ -2198,10 +2236,8 @@ must_match(little, lend, big, bend, translate)
while (little < lend && big < bend) {
c = *little++;
- if (c == 0xff) {
- if (!trans_eq(*big++, *little++, translate)) break;
- continue;
- }
+ if (c == 0xff)
+ c = *little++;
if (!trans_eq(*big++, c, translate)) break;
}
if (little == lend) return 1;
@@ -2209,7 +2245,7 @@ must_match(little, lend, big, bend, translate)
}
static int
-must_instr(little, llen, big, blen, translate)
+slow_search(little, llen, big, blen, translate)
unsigned char *little;
int llen;
unsigned char *big;
@@ -2253,7 +2289,7 @@ must_instr(little, llen, big, blen, translate)
}
}
- if (must_match(little, little+llen, big, bend, translate))
+ if (slow_match(little, little+llen, big, bend, translate))
return big - bsave;
if (ismbchar(*big)) big++;
@@ -2263,84 +2299,69 @@ must_instr(little, llen, big, blen, translate)
}
static void
-bm_init_skip(skip, pat, m)
+bm_init_skip(skip, pat, m, translate)
int *skip;
unsigned char *pat;
int m;
+ char *translate;
{
int j, c;
for (c=0; c<256; c++) {
skip[c] = m;
}
- for (j=0; j<m-1; j++) {
- skip[pat[j]] = m-1-j;
+ if (translate) {
+ for (j=0; j<m-1; j++) {
+ skip[translate[pat[j]]] = m-1-j;
+ }
}
-}
-
-static void
-bm_init_next(next, pat, m)
- int *next;
- unsigned char *pat;
- int m;
-{
- int s, j;
-
- for (s=m-1; s>=0; s--) {
- j = m;
- while (j >= 0 && pat[j-s] == pat[j]) {
- j--;
- }
- if (j > s) {
- next[j] = m-j+s;
- }
- else {
- while (j > 0) {
- next[j] = m-j+s;
- j--;
- }
- }
+ else {
+ for (j=0; j<m-1; j++) {
+ skip[pat[j]] = m-1-j;
+ }
}
}
static int
-bm_search(little, llen, big, blen, translate)
+bm_search(little, llen, big, blen, skip, translate)
unsigned char *little;
int llen;
unsigned char *big;
int blen;
+ int *skip;
char *translate;
{
- int skip[256], next[256];
- int i, j;
+ int next[256];
+ int i, j, k;
+ unsigned char c;
- bm_init_skip(skip, little, llen);
- bm_init_next(next, little, llen);
- i = llen-1;
- if (translate) {
- while (i < blen) {
- j = llen-1;
- while (j >= 0 && translate[big[i]] == translate[little[j]]) {
- i--;
- j--;
- }
- if (j < 0) return i+1;
-
- i += skip[big[i]] > next[j] ? skip[big[i]] : next[j];
- }
- return -1;
- }
+ i = llen-1;
+ if (translate) {
while (i < blen) {
- j = llen-1;
- while (j >= 0 && big[i] == little[j]) {
- i--;
- j--;
- }
- if (j < 0) return i+1;
+ k = i;
+ j = llen-1;
+ while (j >= 0 && translate[big[k]] == translate[little[j]]) {
+ k--;
+ j--;
+ }
+ if (j < 0) return k+1;
- i += skip[big[i]] > next[j] ? skip[big[i]] : next[j];
+ i += skip[translate[big[i]]];
}
return -1;
+ }
+ while (i < blen) {
+ k = i;
+ j = llen-1;
+ while (j >= 0 && big[k] == little[j]) {
+ k--;
+ j--;
+ }
+ if (j < 0) return k+1;
+
+ i += skip[big[i]];
+ }
+ return -1;
}
/* Given a pattern, compute a fastmap from it. The fastmap records
@@ -2402,6 +2423,7 @@ re_compile_fastmap(bufp)
case begline:
case begbuf:
case endbuf:
+ case endbuf2:
case wordbound:
case notwordbound:
case wordbeg:
@@ -2602,18 +2624,20 @@ re_compile_fastmap(bufp)
{
unsigned short size;
unsigned char c, beg;
+ int byte_match = 0;
p += p[-1] + 2;
size = EXTRACT_UNSIGNED(&p[-2]);
if (size == 0) {
- for (j = 0x80; j < (1 << BYTEWIDTH); j++)
- if (ismbchar(j))
- fastmap[j] = 1;
+ for (j = 0x80; j < (1 << BYTEWIDTH); j++)
+ if (ismbchar(j))
+ fastmap[j] = 1;
}
for (j = 0,c = 0x80;j < (int)size; j++) {
if ((unsigned char)p[j*4] == 0xff) {
+ byte_match = 1;
for (beg = (unsigned char)p[j*4+1]; c < beg; c++)
- fastmap[c] = 2;
+ fastmap[c] = 1;
c = (unsigned char)p[j*4+3] + 1;
}
else {
@@ -2623,6 +2647,18 @@ re_compile_fastmap(bufp)
c = (unsigned char)p[j*4 + 2] + 1;
}
}
+ if (byte_match) {
+ for (j = c; j < (1 << BYTEWIDTH); j++)
+ fastmap[j] = 1;
+ for (j = 0; j < (1 << BYTEWIDTH); j++)
+ if (fastmap[j])
+ fastmap[j] = 2;
+ }
+ else {
+ for (j = c; j < (1 << BYTEWIDTH); j++)
+ if (ismbchar(j))
+ fastmap[j] = 1;
+ }
}
break;
@@ -2708,18 +2744,20 @@ re_search(bufp, string, size, startpos, range, regs)
r = 0;
}
if (bufp->options & RE_OPTIMIZE_NO_BM) {
- pos = must_instr(bufp->must+1, len,
- string+startpos, size-startpos-r,
- TRY_TRANSLATE()?translate:0);
+ pos = slow_search(bufp->must+1, len,
+ string+startpos, size-startpos-r,
+ MAY_TRANSLATE()?translate:0);
}
else {
pos = bm_search(bufp->must+1, len,
string+startpos, size-startpos-r,
- TRY_TRANSLATE()?translate:0);
+ bufp->must_skip,
+ MAY_TRANSLATE()?translate:0);
}
if (pos == -1) return -1;
- if (bufp->options & RE_OPTIMIZE_EXACTN)
+ if (bufp->options & RE_OPTIMIZE_EXACTN) {
startpos += pos;
+ }
}
for (;;)
@@ -2751,7 +2789,7 @@ re_search(bufp, string, size, startpos, range, regs)
break;
}
else
- if (fastmap[TRY_TRANSLATE() ? translate[c] : c])
+ if (fastmap[MAY_TRANSLATE() ? translate[c] : c])
break;
range--;
}
@@ -2763,7 +2801,7 @@ re_search(bufp, string, size, startpos, range, regs)
c = string[startpos];
c &= 0xff;
- if (TRY_TRANSLATE() ? !fastmap[translate[c]] : !fastmap[c])
+ if (MAY_TRANSLATE() ? !fastmap[translate[c]] : !fastmap[c])
goto advance;
}
}
@@ -2781,9 +2819,9 @@ re_search(bufp, string, size, startpos, range, regs)
return -2;
#ifndef NO_ALLOCA
-#ifdef cALLOCA
+#ifdef C_ALLOCA
alloca(0);
-#endif /* cALLOCA */
+#endif /* C_ALLOCA */
#endif /* NO_ALLOCA */
if (range > 0) {
@@ -2807,7 +2845,7 @@ re_search(bufp, string, size, startpos, range, regs)
if (fastmap[c] != 2) break;
}
else
- if (!fastmap[TRY_TRANSLATE() ? translate[c] : c])
+ if (!fastmap[MAY_TRANSLATE() ? translate[c] : c])
break;
range--;
}
@@ -2997,7 +3035,7 @@ typedef union
static void
init_regs(regs, num_regs)
struct re_registers *regs;
- unsigned num_regs;
+ unsigned int num_regs;
{
int i;
@@ -3478,6 +3516,12 @@ re_match(bufp, string_arg, size, pos, regs)
case endbuf:
if (AT_STRINGS_END(d))
break;
+ goto fail;
+
+ /* Match at the very end of the data. */
+ case endbuf2:
+ if (AT_STRINGS_END(d))
+ break;
/* .. or newline just before the end of the data. */
if (*d == '\n' && AT_STRINGS_END(d+1))
break;
@@ -4047,6 +4091,7 @@ common_op_match_null_string_p (p, end, reg_info)
case endline:
case begbuf:
case endbuf:
+ case endbuf2:
case wordbeg:
case wordend:
case wordbound:
@@ -4200,6 +4245,7 @@ static const unsigned char mbctab_euc[] = { /* 0xA1-0xFE */
0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 1, 0,
+ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
0, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1,
1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1,
1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1,
@@ -4231,7 +4277,7 @@ const unsigned char *mbctab = mbctab_ascii;
int current_mbctype = MBCTYPE_ASCII;
void
-mbcinit(mbctype)
+re_mbcinit(mbctype)
int mbctype;
{
switch (mbctype) {
diff --git a/regex.h b/regex.h
index e3c6b3b..f04171c 100644
--- a/regex.h
+++ b/regex.h
@@ -181,10 +181,10 @@ extern int current_mbctype;
#ifdef __STDC__
extern const unsigned char *mbctab;
-void mbcinit (int);
+void re_mbcinit (int);
#else
extern unsigned char *mbctab;
-void mbcinit ();
+void re_mbcinit ();
#endif
#undef ismbchar
@@ -202,7 +202,7 @@ struct re_pattern_buffer
to skip over totally implausible characters. */
char *must; /* Pointer to exact pattern which strings should have
to be matched. */
-
+ int *must_skip; /* Pointer to exact pattern skip table for bm_search */
long options; /* Flags for options such as extended_pattern. */
long re_nsub; /* Number of subexpressions found by the compiler. */
char fastmap_accurate;
@@ -245,6 +245,7 @@ struct re_registers
#ifdef __STDC__
extern char *re_compile_pattern (char *, size_t, struct re_pattern_buffer *);
+void re_free_pattern (struct re_pattern_buffer *);
/* Is this really advertised? */
extern void re_compile_fastmap (struct re_pattern_buffer *);
extern int re_search (struct re_pattern_buffer *, char*, int, int, int,
@@ -252,7 +253,7 @@ extern int re_search (struct re_pattern_buffer *, char*, int, int, int,
extern int re_match (struct re_pattern_buffer *, char *, int, int,
struct re_registers *);
extern long re_set_syntax (long syntax);
-extern void re_set_casetable(char *table);
+extern void re_set_casetable (char *table);
extern void re_copy_registers (struct re_registers*, struct re_registers*);
extern void re_free_registers (struct re_registers*);
@@ -265,12 +266,13 @@ extern int re_exec (char *);
#else /* !__STDC__ */
extern char *re_compile_pattern ();
+void re_free_regexp ();
/* Is this really advertised? */
extern void re_compile_fastmap ();
extern int re_search ();
extern int re_match ();
-extern long re_set_syntax();
-extern void re_set_casetable();
+extern long re_set_syntax ();
+extern void re_set_casetable ();
extern void re_copy_registers ();
extern void re_free_registers ();
diff --git a/ruby.c b/ruby.c
index d39830d..6f2b1d8 100644
--- a/ruby.c
+++ b/ruby.c
@@ -134,7 +134,8 @@ addpath(path)
struct req_list {
char *name;
struct req_list *next;
-} *req_list;
+} req_list_head;
+struct req_list *req_list_last = &req_list_head;
static void
add_modules(mod)
@@ -144,17 +145,18 @@ add_modules(mod)
list = ALLOC(struct req_list);
list->name = mod;
- list->next = req_list;
- req_list = list;
+ list->next = 0;
+ req_list_last->next = list;
+ req_list_last = list;
}
void
ruby_require_modules()
{
- struct req_list *list = req_list;
+ struct req_list *list = req_list_head.next;
struct req_list *tmp;
- req_list = 0;
+ req_list_last = 0;
while (list) {
f_require(Qnil, str_new2(list->name));
tmp = list->next;
diff --git a/sprintf.c b/sprintf.c
index 0eb5faa..ce357e3 100644
--- a/sprintf.c
+++ b/sprintf.c
@@ -287,8 +287,8 @@ f_sprintf(argc, argv)
}
if (flags&FWIDTH) {
if (width > len) {
- width -= len;
CHECK(width);
+ width -= len;
if (!(flags&FMINUS)) {
while (width--) {
buf[blen++] = ' ';
@@ -357,6 +357,7 @@ f_sprintf(argc, argv)
break;
case T_FLOAT:
val = dbl2big(RFLOAT(val)->value);
+ if (FIXNUM_P(val)) goto bin_retry;
bignum = 1;
break;
case T_STRING:
diff --git a/util.c b/util.c
index d886d41..2e7cd98 100644
--- a/util.c
+++ b/util.c
@@ -537,3 +537,256 @@ 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 */
+/* kawamura@tokuyama.ac.jp */
+/*****************************************************/
+
+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:左の集団が全てsに等しいことを示す*/
+ char *L = base; /*現在分割している区間の左端の要素の先頭 */
+ char *R = base + size * (nel - 1); /*現在分割している区間の右端の要素の先頭 */
+ int chklim = 63; /*昇(降)順検査をする要素数の下限*/
+ stack_node stack[32], *top = stack; /* 32 32ビットマシンでは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 */
+ }
+}
diff --git a/version.h b/version.h
index f710f28..011c6c4 100644
--- a/version.h
+++ b/version.h
@@ -1,2 +1,2 @@
-#define RUBY_VERSION "1.1c3"
-#define VERSION_DATE "98/08/27"
+#define RUBY_VERSION "1.1c4"
+#define VERSION_DATE "98/09/03"