summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authormatz <matz@b2dd03c8-39d4-4d8f-98ff-823fe69b080e>1999-02-03 09:48:00 +0000
committermatz <matz@b2dd03c8-39d4-4d8f-98ff-823fe69b080e>1999-02-03 09:48:00 +0000
commit06d4e3b42d836b762c29cdc9dc7181caf14dcdec (patch)
tree4c85b1a55d024c59143e193b17e2444cb6873c6e
parent99839272a3cf1dfe69bd3bad26d96a915b905ef1 (diff)
990203
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/branches/ruby_1_3@389 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
-rw-r--r--ChangeLog23
-rw-r--r--Makefile.in2
-rw-r--r--array.c1
-rw-r--r--configure417
-rw-r--r--configure.in16
-rw-r--r--enum.c23
-rw-r--r--hash.c2
-rw-r--r--lib/telnet.rb6
-rw-r--r--numeric.c4
-rw-r--r--pack.c340
-rw-r--r--parse.c30
-rw-r--r--parse.y30
-rw-r--r--regex.c34
-rw-r--r--ruby.c2
-rw-r--r--version.h2
-rw-r--r--win32/Makefile2
16 files changed, 704 insertions, 230 deletions
diff --git a/ChangeLog b/ChangeLog
index 64a329f..4a1491b 100644
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,3 +1,26 @@
+Tue Feb 2 23:41:42 1999 Yoshida Masato <yoshidam@yoshidam.net>
+
+ * regex.c (re_match): wrong boundary.
+
+ * regex.c (IS_A_LETTER): re_mbctab[c] may not be 1 for mbc.
+
+ * regex.c (re_search): mbchar support for shifting ranges.
+
+ * regex.c (MBC2WC): wrong conversion.
+
+Wed Feb 3 15:03:16 1999 Yukihiro Matsumoto <matz@netlab.co.jp>
+
+ * parse.y (parse_regx): need to escape parens if terminators are
+ not any kind of parenthesis.
+
+ * parse.y (parse_qstring): ditto.
+
+ * parse.y (parse_string): ditto.
+
+Tue Feb 2 17:11:26 1999 WATANABE Tetsuya <tetsu@jpn.hp.com>
+
+ * string.c (rb_str_gsub_bang): too small realoc condition.
+
Mon Feb 1 10:01:17 1999 EGUCHI Osamu <eguchi@shizuokanet.ne.jp>
* parse.y (yylex): range check for the float literal.
diff --git a/Makefile.in b/Makefile.in
index 4019945..25a0aca 100644
--- a/Makefile.in
+++ b/Makefile.in
@@ -18,7 +18,7 @@ AUTOCONF = autoconf
@SET_MAKE@
prefix = @prefix@
-CFLAGS = @CFLAGS@ -I. -I@srcdir@ -I@includedir@
+CFLAGS = @CFLAGS@ -I@srcdir@ -I@includedir@
LDFLAGS = @STATIC@ $(CFLAGS) @LDFLAGS@
EXTLIBS =
LIBS = @LIBS@ $(EXTLIBS)
diff --git a/array.c b/array.c
index 25ea483..a9de53f 100644
--- a/array.c
+++ b/array.c
@@ -1509,6 +1509,7 @@ Init_Array()
rb_define_method(rb_cArray, "delete", rb_ary_delete, 1);
rb_define_method(rb_cArray, "delete_at", rb_ary_delete_at, 1);
rb_define_method(rb_cArray, "delete_if", rb_ary_delete_if, 0);
+ rb_define_method(rb_cArray, "reject!", rb_ary_delete_if, 0);
rb_define_method(rb_cArray, "filter", rb_ary_filter, 0);
rb_define_method(rb_cArray, "replace", rb_ary_replace_method, 1);
rb_define_method(rb_cArray, "clear", rb_ary_clear, 0);
diff --git a/configure b/configure
index bc935dc..c1d34d4 100644
--- a/configure
+++ b/configure
@@ -1349,8 +1349,47 @@ cat >> confdefs.h <<EOF
EOF
+echo $ac_n "checking size of short""... $ac_c" 1>&6
+echo "configure:1354: checking size of short" >&5
+if eval "test \"`echo '$''{'ac_cv_sizeof_short'+set}'`\" = set"; then
+ echo $ac_n "(cached) $ac_c" 1>&6
+else
+ 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 1362 "configure"
+#include "confdefs.h"
+#include <stdio.h>
+main()
+{
+ FILE *f=fopen("conftestval", "w");
+ if (!f) exit(1);
+ fprintf(f, "%d\n", sizeof(short));
+ exit(0);
+}
+EOF
+if { (eval echo configure:1373: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null
+then
+ ac_cv_sizeof_short=`cat conftestval`
+else
+ echo "configure: failed program was:" >&5
+ cat conftest.$ac_ext >&5
+ rm -fr conftest*
+ ac_cv_sizeof_short=0
+fi
+rm -fr conftest*
+fi
+
+fi
+echo "$ac_t""$ac_cv_sizeof_short" 1>&6
+cat >> confdefs.h <<EOF
+#define SIZEOF_SHORT $ac_cv_sizeof_short
+EOF
+
+
echo $ac_n "checking size of long""... $ac_c" 1>&6
-echo "configure:1354: checking size of long" >&5
+echo "configure:1393: 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
@@ -1358,7 +1397,7 @@ else
{ echo "configure: error: can not run test program while cross compiling" 1>&2; exit 1; }
else
cat > conftest.$ac_ext <<EOF
-#line 1362 "configure"
+#line 1401 "configure"
#include "confdefs.h"
#include <stdio.h>
main()
@@ -1369,7 +1408,7 @@ main()
exit(0);
}
EOF
-if { (eval echo configure:1373: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null
+if { (eval echo configure:1412: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null
then
ac_cv_sizeof_long=`cat conftestval`
else
@@ -1389,7 +1428,7 @@ EOF
echo $ac_n "checking size of void*""... $ac_c" 1>&6
-echo "configure:1393: checking size of void*" >&5
+echo "configure:1432: 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
@@ -1397,7 +1436,7 @@ else
{ echo "configure: error: can not run test program while cross compiling" 1>&2; exit 1; }
else
cat > conftest.$ac_ext <<EOF
-#line 1401 "configure"
+#line 1440 "configure"
#include "confdefs.h"
#include <stdio.h>
main()
@@ -1408,7 +1447,7 @@ main()
exit(0);
}
EOF
-if { (eval echo configure:1412: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null
+if { (eval echo configure:1451: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null
then
ac_cv_sizeof_voidp=`cat conftestval`
else
@@ -1428,7 +1467,7 @@ EOF
echo $ac_n "checking size of float""... $ac_c" 1>&6
-echo "configure:1432: checking size of float" >&5
+echo "configure:1471: checking size of float" >&5
if eval "test \"`echo '$''{'ac_cv_sizeof_float'+set}'`\" = set"; then
echo $ac_n "(cached) $ac_c" 1>&6
else
@@ -1436,7 +1475,7 @@ else
{ echo "configure: error: can not run test program while cross compiling" 1>&2; exit 1; }
else
cat > conftest.$ac_ext <<EOF
-#line 1440 "configure"
+#line 1479 "configure"
#include "confdefs.h"
#include <stdio.h>
main()
@@ -1447,7 +1486,7 @@ main()
exit(0);
}
EOF
-if { (eval echo configure:1451: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null
+if { (eval echo configure:1490: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null
then
ac_cv_sizeof_float=`cat conftestval`
else
@@ -1467,7 +1506,7 @@ EOF
echo $ac_n "checking size of double""... $ac_c" 1>&6
-echo "configure:1471: checking size of double" >&5
+echo "configure:1510: checking size of double" >&5
if eval "test \"`echo '$''{'ac_cv_sizeof_double'+set}'`\" = set"; then
echo $ac_n "(cached) $ac_c" 1>&6
else
@@ -1475,7 +1514,7 @@ else
{ echo "configure: error: can not run test program while cross compiling" 1>&2; exit 1; }
else
cat > conftest.$ac_ext <<EOF
-#line 1479 "configure"
+#line 1518 "configure"
#include "confdefs.h"
#include <stdio.h>
main()
@@ -1486,7 +1525,7 @@ main()
exit(0);
}
EOF
-if { (eval echo configure:1490: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null
+if { (eval echo configure:1529: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null
then
ac_cv_sizeof_double=`cat conftestval`
else
@@ -1507,19 +1546,19 @@ EOF
echo $ac_n "checking for prototypes""... $ac_c" 1>&6
-echo "configure:1511: checking for prototypes" >&5
+echo "configure:1550: 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 1516 "configure"
+#line 1555 "configure"
#include "confdefs.h"
int foo(int x) { return 0; }
int main() {
return foo(10);
; return 0; }
EOF
-if { (eval echo configure:1523: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
+if { (eval echo configure:1562: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
rm -rf conftest*
rb_cv_have_prototypes=yes
else
@@ -1539,13 +1578,40 @@ EOF
fi
+echo $ac_n "checking token paste string""... $ac_c" 1>&6
+echo "configure:1583: checking token paste string" >&5
+cat > conftest.$ac_ext <<EOF
+#line 1585 "configure"
+#include "confdefs.h"
+#define paste(a,b) a##b
+int main() {
+ int xy = 1; return paste(x,y);
+; return 0; }
+EOF
+if { (eval echo configure:1592: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
+ rm -rf conftest*
+ cat >> confdefs.h <<\EOF
+#define TOKEN_PASTE(x,y) x##y
+EOF
+ echo "$ac_t""ANSI" 1>&6
+else
+ echo "configure: failed program was:" >&5
+ cat conftest.$ac_ext >&5
+ rm -rf conftest*
+ cat >> confdefs.h <<\EOF
+#define TOKEN_PASTE(x,y) x/**/y
+EOF
+ echo "$ac_t""KnR1" 1>&6
+fi
+rm -f conftest*
+
echo $ac_n "checking for variable length prototypes and stdarg.h""... $ac_c" 1>&6
-echo "configure:1544: checking for variable length prototypes and stdarg.h" >&5
+echo "configure:1610: 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 1549 "configure"
+#line 1615 "configure"
#include "confdefs.h"
#include <stdarg.h>
@@ -1562,7 +1628,7 @@ int main() {
return foo(10, "", 3.14);
; return 0; }
EOF
-if { (eval echo configure:1566: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
+if { (eval echo configure:1632: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
rm -rf conftest*
rb_cv_stdarg=yes
else
@@ -1583,19 +1649,19 @@ EOF
fi
echo $ac_n "checking for gcc attribute noreturn""... $ac_c" 1>&6
-echo "configure:1587: checking for gcc attribute noreturn" >&5
+echo "configure:1653: 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 1592 "configure"
+#line 1658 "configure"
#include "confdefs.h"
void exit(int x) __attribute__ ((noreturn));
int main() {
; return 0; }
EOF
-if { (eval echo configure:1599: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
+if { (eval echo configure:1665: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
rm -rf conftest*
rb_cv_have_attr_noreturn=yes
else
@@ -1624,7 +1690,7 @@ beos*) ;;
*) LIBS="-lm $LIBS";;
esac
echo $ac_n "checking for crypt in -lcrypt""... $ac_c" 1>&6
-echo "configure:1628: checking for crypt in -lcrypt" >&5
+echo "configure:1694: 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
@@ -1632,7 +1698,7 @@ else
ac_save_LIBS="$LIBS"
LIBS="-lcrypt $LIBS"
cat > conftest.$ac_ext <<EOF
-#line 1636 "configure"
+#line 1702 "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
@@ -1643,7 +1709,7 @@ int main() {
crypt()
; return 0; }
EOF
-if { (eval echo configure:1647: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
+if { (eval echo configure:1713: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
rm -rf conftest*
eval "ac_cv_lib_$ac_lib_var=yes"
else
@@ -1671,7 +1737,7 @@ else
fi
echo $ac_n "checking for dlopen in -ldl""... $ac_c" 1>&6
-echo "configure:1675: checking for dlopen in -ldl" >&5
+echo "configure:1741: 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
@@ -1679,7 +1745,7 @@ else
ac_save_LIBS="$LIBS"
LIBS="-ldl $LIBS"
cat > conftest.$ac_ext <<EOF
-#line 1683 "configure"
+#line 1749 "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
@@ -1690,7 +1756,7 @@ int main() {
dlopen()
; return 0; }
EOF
-if { (eval echo configure:1694: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
+if { (eval echo configure:1760: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
rm -rf conftest*
eval "ac_cv_lib_$ac_lib_var=yes"
else
@@ -1718,7 +1784,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:1722: checking for shl_load in -ldld" >&5
+echo "configure:1788: 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
@@ -1726,7 +1792,7 @@ else
ac_save_LIBS="$LIBS"
LIBS="-ldld $LIBS"
cat > conftest.$ac_ext <<EOF
-#line 1730 "configure"
+#line 1796 "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
@@ -1737,7 +1803,7 @@ int main() {
shl_load()
; return 0; }
EOF
-if { (eval echo configure:1741: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
+if { (eval echo configure:1807: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
rm -rf conftest*
eval "ac_cv_lib_$ac_lib_var=yes"
else
@@ -1765,7 +1831,7 @@ else
fi
# Dynamic linking for HP-UX
echo $ac_n "checking for setlocale in -lxpg4""... $ac_c" 1>&6
-echo "configure:1769: checking for setlocale in -lxpg4" >&5
+echo "configure:1835: checking for setlocale in -lxpg4" >&5
ac_lib_var=`echo xpg4'_'setlocale | sed 'y%./+-%__p_%'`
if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then
echo $ac_n "(cached) $ac_c" 1>&6
@@ -1773,7 +1839,7 @@ else
ac_save_LIBS="$LIBS"
LIBS="-lxpg4 $LIBS"
cat > conftest.$ac_ext <<EOF
-#line 1777 "configure"
+#line 1843 "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
@@ -1784,7 +1850,7 @@ int main() {
setlocale()
; return 0; }
EOF
-if { (eval echo configure:1788: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
+if { (eval echo configure:1854: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
rm -rf conftest*
eval "ac_cv_lib_$ac_lib_var=yes"
else
@@ -1817,12 +1883,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:1821: checking for $ac_hdr that defines DIR" >&5
+echo "configure:1887: 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 1826 "configure"
+#line 1892 "configure"
#include "confdefs.h"
#include <sys/types.h>
#include <$ac_hdr>
@@ -1830,7 +1896,7 @@ int main() {
DIR *dirp = 0;
; return 0; }
EOF
-if { (eval echo configure:1834: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
+if { (eval echo configure:1900: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
rm -rf conftest*
eval "ac_cv_header_dirent_$ac_safe=yes"
else
@@ -1855,7 +1921,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:1859: checking for opendir in -ldir" >&5
+echo "configure:1925: 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
@@ -1863,7 +1929,7 @@ else
ac_save_LIBS="$LIBS"
LIBS="-ldir $LIBS"
cat > conftest.$ac_ext <<EOF
-#line 1867 "configure"
+#line 1933 "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
@@ -1874,7 +1940,7 @@ int main() {
opendir()
; return 0; }
EOF
-if { (eval echo configure:1878: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
+if { (eval echo configure:1944: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
rm -rf conftest*
eval "ac_cv_lib_$ac_lib_var=yes"
else
@@ -1896,7 +1962,7 @@ fi
else
echo $ac_n "checking for opendir in -lx""... $ac_c" 1>&6
-echo "configure:1900: checking for opendir in -lx" >&5
+echo "configure:1966: 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
@@ -1904,7 +1970,7 @@ else
ac_save_LIBS="$LIBS"
LIBS="-lx $LIBS"
cat > conftest.$ac_ext <<EOF
-#line 1908 "configure"
+#line 1974 "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
@@ -1915,7 +1981,7 @@ int main() {
opendir()
; return 0; }
EOF
-if { (eval echo configure:1919: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
+if { (eval echo configure:1985: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
rm -rf conftest*
eval "ac_cv_lib_$ac_lib_var=yes"
else
@@ -1938,12 +2004,12 @@ fi
fi
echo $ac_n "checking for ANSI C header files""... $ac_c" 1>&6
-echo "configure:1942: checking for ANSI C header files" >&5
+echo "configure:2008: 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 1947 "configure"
+#line 2013 "configure"
#include "confdefs.h"
#include <stdlib.h>
#include <stdarg.h>
@@ -1951,7 +2017,7 @@ else
#include <float.h>
EOF
ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
-{ (eval echo configure:1955: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
+{ (eval echo configure:2021: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
if test -z "$ac_err"; then
rm -rf conftest*
@@ -1968,7 +2034,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 1972 "configure"
+#line 2038 "configure"
#include "confdefs.h"
#include <string.h>
EOF
@@ -1986,7 +2052,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 1990 "configure"
+#line 2056 "configure"
#include "confdefs.h"
#include <stdlib.h>
EOF
@@ -2007,7 +2073,7 @@ if test "$cross_compiling" = yes; then
:
else
cat > conftest.$ac_ext <<EOF
-#line 2011 "configure"
+#line 2077 "configure"
#include "confdefs.h"
#include <ctype.h>
#define ISLOWER(c) ('a' <= (c) && (c) <= 'z')
@@ -2018,7 +2084,7 @@ if (XOR (islower (i), ISLOWER (i)) || toupper (i) != TOUPPER (i)) exit(2);
exit (0); }
EOF
-if { (eval echo configure:2022: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null
+if { (eval echo configure:2088: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null
then
:
else
@@ -2047,17 +2113,17 @@ for ac_hdr in stdlib.h unistd.h limits.h sys/file.h sys/ioctl.h pwd.h \
do
ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'`
echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6
-echo "configure:2051: checking for $ac_hdr" >&5
+echo "configure:2117: 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 2056 "configure"
+#line 2122 "configure"
#include "confdefs.h"
#include <$ac_hdr>
EOF
ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
-{ (eval echo configure:2061: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
+{ (eval echo configure:2127: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
if test -z "$ac_err"; then
rm -rf conftest*
@@ -2085,12 +2151,12 @@ done
echo $ac_n "checking for uid_t in sys/types.h""... $ac_c" 1>&6
-echo "configure:2089: checking for uid_t in sys/types.h" >&5
+echo "configure:2155: 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 2094 "configure"
+#line 2160 "configure"
#include "confdefs.h"
#include <sys/types.h>
EOF
@@ -2119,12 +2185,12 @@ EOF
fi
echo $ac_n "checking for size_t""... $ac_c" 1>&6
-echo "configure:2123: checking for size_t" >&5
+echo "configure:2189: 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 2128 "configure"
+#line 2194 "configure"
#include "confdefs.h"
#include <sys/types.h>
#if STDC_HEADERS
@@ -2152,12 +2218,12 @@ EOF
fi
echo $ac_n "checking for st_blksize in struct stat""... $ac_c" 1>&6
-echo "configure:2156: checking for st_blksize in struct stat" >&5
+echo "configure:2222: 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 2161 "configure"
+#line 2227 "configure"
#include "confdefs.h"
#include <sys/types.h>
#include <sys/stat.h>
@@ -2165,7 +2231,7 @@ int main() {
struct stat s; s.st_blksize;
; return 0; }
EOF
-if { (eval echo configure:2169: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
+if { (eval echo configure:2235: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
rm -rf conftest*
ac_cv_struct_st_blksize=yes
else
@@ -2187,12 +2253,12 @@ fi
save_LIBOJBS="$LIBOBJS"
echo $ac_n "checking for st_blocks in struct stat""... $ac_c" 1>&6
-echo "configure:2191: checking for st_blocks in struct stat" >&5
+echo "configure:2257: 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 2196 "configure"
+#line 2262 "configure"
#include "confdefs.h"
#include <sys/types.h>
#include <sys/stat.h>
@@ -2200,7 +2266,7 @@ int main() {
struct stat s; s.st_blocks;
; return 0; }
EOF
-if { (eval echo configure:2204: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
+if { (eval echo configure:2270: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
rm -rf conftest*
ac_cv_struct_st_blocks=yes
else
@@ -2224,12 +2290,12 @@ fi
LIBOBJS="$save_LIBOBJS"
echo $ac_n "checking for st_rdev in struct stat""... $ac_c" 1>&6
-echo "configure:2228: checking for st_rdev in struct stat" >&5
+echo "configure:2294: 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 2233 "configure"
+#line 2299 "configure"
#include "confdefs.h"
#include <sys/types.h>
#include <sys/stat.h>
@@ -2237,7 +2303,7 @@ int main() {
struct stat s; s.st_rdev;
; return 0; }
EOF
-if { (eval echo configure:2241: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
+if { (eval echo configure:2307: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
rm -rf conftest*
ac_cv_struct_st_rdev=yes
else
@@ -2259,7 +2325,7 @@ fi
echo $ac_n "checking type of array argument to getgroups""... $ac_c" 1>&6
-echo "configure:2263: checking type of array argument to getgroups" >&5
+echo "configure:2329: 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
@@ -2267,7 +2333,7 @@ else
ac_cv_type_getgroups=cross
else
cat > conftest.$ac_ext <<EOF
-#line 2271 "configure"
+#line 2337 "configure"
#include "confdefs.h"
/* Thanks to Mike Rendell for this test. */
@@ -2292,7 +2358,7 @@ main()
}
EOF
-if { (eval echo configure:2296: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null
+if { (eval echo configure:2362: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null
then
ac_cv_type_getgroups=gid_t
else
@@ -2306,7 +2372,7 @@ fi
if test $ac_cv_type_getgroups = cross; then
cat > conftest.$ac_ext <<EOF
-#line 2310 "configure"
+#line 2376 "configure"
#include "confdefs.h"
#include <unistd.h>
EOF
@@ -2330,12 +2396,12 @@ EOF
echo $ac_n "checking return type of signal handlers""... $ac_c" 1>&6
-echo "configure:2334: checking return type of signal handlers" >&5
+echo "configure:2400: 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 2339 "configure"
+#line 2405 "configure"
#include "confdefs.h"
#include <sys/types.h>
#include <signal.h>
@@ -2352,7 +2418,7 @@ int main() {
int i;
; return 0; }
EOF
-if { (eval echo configure:2356: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
+if { (eval echo configure:2422: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
rm -rf conftest*
ac_cv_type_signal=void
else
@@ -2373,19 +2439,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:2377: checking for working alloca.h" >&5
+echo "configure:2443: 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 2382 "configure"
+#line 2448 "configure"
#include "confdefs.h"
#include <alloca.h>
int main() {
char *p = alloca(2 * sizeof(int));
; return 0; }
EOF
-if { (eval echo configure:2389: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
+if { (eval echo configure:2455: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
rm -rf conftest*
ac_cv_header_alloca_h=yes
else
@@ -2406,12 +2472,12 @@ EOF
fi
echo $ac_n "checking for alloca""... $ac_c" 1>&6
-echo "configure:2410: checking for alloca" >&5
+echo "configure:2476: 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 2415 "configure"
+#line 2481 "configure"
#include "confdefs.h"
#ifdef __GNUC__
@@ -2439,7 +2505,7 @@ int main() {
char *p = (char *) alloca(1);
; return 0; }
EOF
-if { (eval echo configure:2443: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
+if { (eval echo configure:2509: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
rm -rf conftest*
ac_cv_func_alloca_works=yes
else
@@ -2471,12 +2537,12 @@ EOF
echo $ac_n "checking whether alloca needs Cray hooks""... $ac_c" 1>&6
-echo "configure:2475: checking whether alloca needs Cray hooks" >&5
+echo "configure:2541: 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 2480 "configure"
+#line 2546 "configure"
#include "confdefs.h"
#if defined(CRAY) && ! defined(CRAY2)
webecray
@@ -2501,12 +2567,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:2505: checking for $ac_func" >&5
+echo "configure:2571: 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 2510 "configure"
+#line 2576 "configure"
#include "confdefs.h"
/* System header to define __stub macros and hopefully few prototypes,
which can conflict with char $ac_func(); below. */
@@ -2529,7 +2595,7 @@ $ac_func();
; return 0; }
EOF
-if { (eval echo configure:2533: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
+if { (eval echo configure:2599: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
rm -rf conftest*
eval "ac_cv_func_$ac_func=yes"
else
@@ -2556,7 +2622,7 @@ done
fi
echo $ac_n "checking stack direction for C alloca""... $ac_c" 1>&6
-echo "configure:2560: checking stack direction for C alloca" >&5
+echo "configure:2626: 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
@@ -2564,7 +2630,7 @@ else
ac_cv_c_stack_direction=0
else
cat > conftest.$ac_ext <<EOF
-#line 2568 "configure"
+#line 2634 "configure"
#include "confdefs.h"
find_stack_direction ()
{
@@ -2583,7 +2649,7 @@ main ()
exit (find_stack_direction() < 0);
}
EOF
-if { (eval echo configure:2587: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null
+if { (eval echo configure:2653: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null
then
ac_cv_c_stack_direction=1
else
@@ -2605,12 +2671,12 @@ EOF
fi
echo $ac_n "checking for pid_t""... $ac_c" 1>&6
-echo "configure:2609: checking for pid_t" >&5
+echo "configure:2675: 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 2614 "configure"
+#line 2680 "configure"
#include "confdefs.h"
#include <sys/types.h>
#if STDC_HEADERS
@@ -2639,17 +2705,17 @@ fi
ac_safe=`echo "vfork.h" | sed 'y%./+-%__p_%'`
echo $ac_n "checking for vfork.h""... $ac_c" 1>&6
-echo "configure:2643: checking for vfork.h" >&5
+echo "configure:2709: 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 2648 "configure"
+#line 2714 "configure"
#include "confdefs.h"
#include <vfork.h>
EOF
ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
-{ (eval echo configure:2653: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
+{ (eval echo configure:2719: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
if test -z "$ac_err"; then
rm -rf conftest*
@@ -2674,18 +2740,18 @@ else
fi
echo $ac_n "checking for working vfork""... $ac_c" 1>&6
-echo "configure:2678: checking for working vfork" >&5
+echo "configure:2744: 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:2684: checking for vfork" >&5
+echo "configure:2750: 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 2689 "configure"
+#line 2755 "configure"
#include "confdefs.h"
/* System header to define __stub macros and hopefully few prototypes,
which can conflict with char vfork(); below. */
@@ -2708,7 +2774,7 @@ vfork();
; return 0; }
EOF
-if { (eval echo configure:2712: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
+if { (eval echo configure:2778: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
rm -rf conftest*
eval "ac_cv_func_vfork=yes"
else
@@ -2730,7 +2796,7 @@ fi
ac_cv_func_vfork_works=$ac_cv_func_vfork
else
cat > conftest.$ac_ext <<EOF
-#line 2734 "configure"
+#line 2800 "configure"
#include "confdefs.h"
/* Thanks to Paul Eggert for this test. */
#include <stdio.h>
@@ -2825,7 +2891,7 @@ main() {
}
}
EOF
-if { (eval echo configure:2829: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null
+if { (eval echo configure:2895: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null
then
ac_cv_func_vfork_works=yes
else
@@ -2848,7 +2914,7 @@ EOF
fi
echo $ac_n "checking for 8-bit clean memcmp""... $ac_c" 1>&6
-echo "configure:2852: checking for 8-bit clean memcmp" >&5
+echo "configure:2918: 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
@@ -2856,7 +2922,7 @@ else
ac_cv_func_memcmp_clean=no
else
cat > conftest.$ac_ext <<EOF
-#line 2860 "configure"
+#line 2926 "configure"
#include "confdefs.h"
main()
@@ -2866,7 +2932,7 @@ main()
}
EOF
-if { (eval echo configure:2870: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null
+if { (eval echo configure:2936: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null
then
ac_cv_func_memcmp_clean=yes
else
@@ -2887,12 +2953,12 @@ for ac_func in dup2 memmove mkdir strcasecmp strerror strftime\
strchr strstr strtoul strdup crypt flock vsnprintf
do
echo $ac_n "checking for $ac_func""... $ac_c" 1>&6
-echo "configure:2891: checking for $ac_func" >&5
+echo "configure:2957: 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 2896 "configure"
+#line 2962 "configure"
#include "confdefs.h"
/* System header to define __stub macros and hopefully few prototypes,
which can conflict with char $ac_func(); below. */
@@ -2915,7 +2981,7 @@ $ac_func();
; return 0; }
EOF
-if { (eval echo configure:2919: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
+if { (eval echo configure:2985: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
rm -rf conftest*
eval "ac_cv_func_$ac_func=yes"
else
@@ -2948,12 +3014,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:2952: checking for $ac_func" >&5
+echo "configure:3018: 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 2957 "configure"
+#line 3023 "configure"
#include "confdefs.h"
/* System header to define __stub macros and hopefully few prototypes,
which can conflict with char $ac_func(); below. */
@@ -2976,7 +3042,7 @@ $ac_func();
; return 0; }
EOF
-if { (eval echo configure:2980: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
+if { (eval echo configure:3046: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
rm -rf conftest*
eval "ac_cv_func_$ac_func=yes"
else
@@ -3002,12 +3068,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:3006: checking whether struct tm is in sys/time.h or time.h" >&5
+echo "configure:3072: 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 3011 "configure"
+#line 3077 "configure"
#include "confdefs.h"
#include <sys/types.h>
#include <time.h>
@@ -3015,7 +3081,7 @@ int main() {
struct tm *tp; tp->tm_sec;
; return 0; }
EOF
-if { (eval echo configure:3019: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
+if { (eval echo configure:3085: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
rm -rf conftest*
ac_cv_struct_tm=time.h
else
@@ -3036,12 +3102,12 @@ EOF
fi
echo $ac_n "checking for tm_zone in struct tm""... $ac_c" 1>&6
-echo "configure:3040: checking for tm_zone in struct tm" >&5
+echo "configure:3106: 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 3045 "configure"
+#line 3111 "configure"
#include "confdefs.h"
#include <sys/types.h>
#include <$ac_cv_struct_tm>
@@ -3049,7 +3115,7 @@ int main() {
struct tm tm; tm.tm_zone;
; return 0; }
EOF
-if { (eval echo configure:3053: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
+if { (eval echo configure:3119: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
rm -rf conftest*
ac_cv_struct_tm_zone=yes
else
@@ -3069,12 +3135,12 @@ EOF
else
echo $ac_n "checking for tzname""... $ac_c" 1>&6
-echo "configure:3073: checking for tzname" >&5
+echo "configure:3139: 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 3078 "configure"
+#line 3144 "configure"
#include "confdefs.h"
#include <time.h>
#ifndef tzname /* For SGI. */
@@ -3084,7 +3150,7 @@ int main() {
atoi(*tzname);
; return 0; }
EOF
-if { (eval echo configure:3088: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
+if { (eval echo configure:3154: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
rm -rf conftest*
ac_cv_var_tzname=yes
else
@@ -3106,14 +3172,14 @@ EOF
fi
cat > conftest.$ac_ext <<EOF
-#line 3110 "configure"
+#line 3176 "configure"
#include "confdefs.h"
int main() {
extern int daylight; int i = daylight;
; return 0; }
EOF
-if { (eval echo configure:3117: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
+if { (eval echo configure:3183: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
rm -rf conftest*
cat >> confdefs.h <<\EOF
#define HAVE_DAYLIGHT 1
@@ -3133,7 +3199,7 @@ EOF
else
echo $ac_n "checking for BSD signal semantics""... $ac_c" 1>&6
-echo "configure:3137: checking for BSD signal semantics" >&5
+echo "configure:3203: 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
@@ -3141,7 +3207,7 @@ else
{ echo "configure: error: can not run test program while cross compiling" 1>&2; exit 1; }
else
cat > conftest.$ac_ext <<EOF
-#line 3145 "configure"
+#line 3211 "configure"
#include "confdefs.h"
#include <stdio.h>
@@ -3163,7 +3229,7 @@ main()
}
EOF
-if { (eval echo configure:3167: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null
+if { (eval echo configure:3233: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null
then
rb_cv_bsd_signal=yes
else
@@ -3197,19 +3263,19 @@ EOF
else
echo $ac_n "checking whether getpgrp() has arg""... $ac_c" 1>&6
-echo "configure:3201: checking whether getpgrp() has arg" >&5
+echo "configure:3267: 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 3206 "configure"
+#line 3272 "configure"
#include "confdefs.h"
#include <unistd.h>
int main() {
getpgrp(0);
; return 0; }
EOF
-if { (eval echo configure:3213: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
+if { (eval echo configure:3279: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
rm -rf conftest*
rb_cv_bsdgetpgrp=yes
else
@@ -3230,19 +3296,19 @@ EOF
fi
echo $ac_n "checking whether setpgrp() has args""... $ac_c" 1>&6
-echo "configure:3234: checking whether setpgrp() has args" >&5
+echo "configure:3300: 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 3239 "configure"
+#line 3305 "configure"
#include "confdefs.h"
#include <unistd.h>
int main() {
setpgrp(1, 1);
; return 0; }
EOF
-if { (eval echo configure:3246: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
+if { (eval echo configure:3312: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
rm -rf conftest*
rb_cv_bsdsetpgrp=yes
else
@@ -3264,14 +3330,14 @@ EOF
fi
echo $ac_n "checking whether byte ordering is bigendian""... $ac_c" 1>&6
-echo "configure:3268: checking whether byte ordering is bigendian" >&5
+echo "configure:3334: 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 3275 "configure"
+#line 3341 "configure"
#include "confdefs.h"
#include <sys/types.h>
#include <sys/param.h>
@@ -3282,11 +3348,11 @@ int main() {
#endif
; return 0; }
EOF
-if { (eval echo configure:3286: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
+if { (eval echo configure:3352: \"$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 3290 "configure"
+#line 3356 "configure"
#include "confdefs.h"
#include <sys/types.h>
#include <sys/param.h>
@@ -3297,7 +3363,7 @@ int main() {
#endif
; return 0; }
EOF
-if { (eval echo configure:3301: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
+if { (eval echo configure:3367: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
rm -rf conftest*
ac_cv_c_bigendian=yes
else
@@ -3317,7 +3383,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 3321 "configure"
+#line 3387 "configure"
#include "confdefs.h"
main () {
/* Are we little or big endian? From Harbison&Steele. */
@@ -3330,7 +3396,7 @@ main () {
exit (u.c[sizeof (long) - 1] == 1);
}
EOF
-if { (eval echo configure:3334: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null
+if { (eval echo configure:3400: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null
then
ac_cv_c_bigendian=no
else
@@ -3354,14 +3420,14 @@ EOF
fi
echo $ac_n "checking whether char is unsigned""... $ac_c" 1>&6
-echo "configure:3358: checking whether char is unsigned" >&5
+echo "configure:3424: 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 3365 "configure"
+#line 3431 "configure"
#include "confdefs.h"
#ifdef __CHAR_UNSIGNED__
yes
@@ -3383,7 +3449,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 3387 "configure"
+#line 3453 "configure"
#include "confdefs.h"
/* volatile prevents gcc2 from optimizing the test away on sparcs. */
#if !defined(__STDC__) || __STDC__ != 1
@@ -3393,7 +3459,7 @@ main() {
volatile char c = 255; exit(c < 0);
}
EOF
-if { (eval echo configure:3397: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null
+if { (eval echo configure:3463: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null
then
ac_cv_c_char_unsigned=yes
else
@@ -3418,7 +3484,7 @@ fi
echo $ac_n "checking whether right shift preserve sign bit""... $ac_c" 1>&6
-echo "configure:3422: checking whether right shift preserve sign bit" >&5
+echo "configure:3488: 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
@@ -3426,7 +3492,7 @@ else
{ echo "configure: error: can not run test program while cross compiling" 1>&2; exit 1; }
else
cat > conftest.$ac_ext <<EOF
-#line 3430 "configure"
+#line 3496 "configure"
#include "confdefs.h"
int
@@ -3438,7 +3504,7 @@ main()
}
EOF
-if { (eval echo configure:3442: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null
+if { (eval echo configure:3508: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null
then
rb_cv_rshift_sign=yes
else
@@ -3466,19 +3532,19 @@ EOF
fi
echo $ac_n "checking count field in FILE structures""... $ac_c" 1>&6
-echo "configure:3470: checking count field in FILE structures" >&5
+echo "configure:3536: 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 3475 "configure"
+#line 3541 "configure"
#include "confdefs.h"
#include <stdio.h>
int main() {
FILE *f = stdin; f->_cnt = 0;
; return 0; }
EOF
-if { (eval echo configure:3482: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
+if { (eval echo configure:3548: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
rm -rf conftest*
rb_cv_fcnt="_cnt"
else
@@ -3488,14 +3554,14 @@ fi
rm -f conftest*
if test "$rb_cv_fcnt" = ""; then
cat > conftest.$ac_ext <<EOF
-#line 3492 "configure"
+#line 3558 "configure"
#include "confdefs.h"
#include <stdio.h>
int main() {
FILE *f = stdin; f->__cnt = 0;
; return 0; }
EOF
-if { (eval echo configure:3499: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
+if { (eval echo configure:3565: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
rm -rf conftest*
rb_cv_fcnt="__cnt"
else
@@ -3506,14 +3572,14 @@ rm -f conftest*
fi
if test "$rb_cv_fcnt" = ""; then
cat > conftest.$ac_ext <<EOF
-#line 3510 "configure"
+#line 3576 "configure"
#include "confdefs.h"
#include <stdio.h>
int main() {
FILE *f = stdin; f->_r = 0;
; return 0; }
EOF
-if { (eval echo configure:3517: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
+if { (eval echo configure:3583: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
rm -rf conftest*
rb_cv_fcnt="_r"
else
@@ -3524,14 +3590,14 @@ rm -f conftest*
fi
if test "$rb_cv_fcnt" = ""; then
cat > conftest.$ac_ext <<EOF
-#line 3528 "configure"
+#line 3594 "configure"
#include "confdefs.h"
#include <stdio.h>
int main() {
FILE *f = stdin; f->readCount = 0;
; return 0; }
EOF
-if { (eval echo configure:3535: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
+if { (eval echo configure:3601: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
rm -rf conftest*
rb_cv_fcnt="readCount"
else
@@ -3570,7 +3636,7 @@ fi
case "$host_os" in
linux*)
echo $ac_n "checking whether ELF binaries are produced""... $ac_c" 1>&6
-echo "configure:3574: checking whether ELF binaries are produced" >&5
+echo "configure:3640: checking whether ELF binaries are produced" >&5
if eval "test \"`echo '$''{'rb_cv_binary_elf'+set}'`\" = set"; then
echo $ac_n "(cached) $ac_c" 1>&6
else
@@ -3578,7 +3644,7 @@ else
:
else
cat > conftest.$ac_ext <<EOF
-#line 3582 "configure"
+#line 3648 "configure"
#include "confdefs.h"
/* Test for whether ELF binaries are produced */
@@ -3598,7 +3664,7 @@ main() {
}
EOF
-if { (eval echo configure:3602: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null
+if { (eval echo configure:3668: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null
then
rb_cv_binary_elf=yes
else
@@ -3628,7 +3694,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:3632: checking whether OS depend dynamic link works" >&5
+echo "configure:3698: checking whether OS depend dynamic link works" >&5
if test "$GCC" = yes; then
case "$host_os" in
nextstep*) ;;
@@ -3636,14 +3702,14 @@ echo "configure:3632: checking whether OS depend dynamic link works" >&5
rhapsody*) ;;
human*) ;;
cygwin*) CCDLFLAGS=-DDLLIMPORT;;
- *) CCDLFLAGS=-fpic;;
+ *) CCDLFLAGS=-fPIC;;
esac
else
case "$host_os" in
hpux*) CCDLFLAGS='+z';;
- solaris*|irix*) CCDLFLAGS='-K pic' ;;
- sunos*) CCDLFLAGS='-pic' ;;
- esix*|uxpds*) CCDLFLAGS='-Kpic' ;;
+ solaris*|irix*) CCDLFLAGS='-K PIC' ;;
+ sunos*) CCDLFLAGS='-PIC' ;;
+ esix*|uxpds*) CCDLFLAGS='-KPIC' ;;
*) CCDLFLAGS='' ;;
esac
fi
@@ -3671,7 +3737,6 @@ echo "configure:3632: checking whether OS depend dynamic link works" >&5
netbsd*) LDSHARED="ld -Bshareable"
rb_cv_dlopen=yes ;;
openbsd*) LDSHARED="ld -Bforcearchive -Bshareable"
- CCDLFLAGS=-fPIC
rb_cv_dlopen=yes ;;
nextstep*) LDSHARED='cc -r'
LDFLAGS="-u libsys_s"
@@ -3710,13 +3775,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:3714: checking whether matz's dln works" >&5
+echo "configure:3779: 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 3720 "configure"
+#line 3785 "configure"
#include "confdefs.h"
#define USE_DLN_A_OUT
@@ -3726,7 +3791,7 @@ int main() {
; return 0; }
EOF
-if { (eval echo configure:3730: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
+if { (eval echo configure:3795: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
rm -rf conftest*
rb_cv_dln_a_out=yes
else
@@ -3828,7 +3893,7 @@ fi
case "$host_os" in
human*)
echo $ac_n "checking for _harderr in -lsignal""... $ac_c" 1>&6
-echo "configure:3832: checking for _harderr in -lsignal" >&5
+echo "configure:3897: 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
@@ -3836,7 +3901,7 @@ else
ac_save_LIBS="$LIBS"
LIBS="-lsignal $LIBS"
cat > conftest.$ac_ext <<EOF
-#line 3840 "configure"
+#line 3905 "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
@@ -3847,7 +3912,7 @@ int main() {
_harderr()
; return 0; }
EOF
-if { (eval echo configure:3851: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
+if { (eval echo configure:3916: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
rm -rf conftest*
eval "ac_cv_lib_$ac_lib_var=yes"
else
@@ -3875,7 +3940,7 @@ else
fi
echo $ac_n "checking for hmemset in -lhmem""... $ac_c" 1>&6
-echo "configure:3879: checking for hmemset in -lhmem" >&5
+echo "configure:3944: 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
@@ -3883,7 +3948,7 @@ else
ac_save_LIBS="$LIBS"
LIBS="-lhmem $LIBS"
cat > conftest.$ac_ext <<EOF
-#line 3887 "configure"
+#line 3952 "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
@@ -3894,7 +3959,7 @@ int main() {
hmemset()
; return 0; }
EOF
-if { (eval echo configure:3898: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
+if { (eval echo configure:3963: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
rm -rf conftest*
eval "ac_cv_lib_$ac_lib_var=yes"
else
@@ -3924,12 +3989,12 @@ fi
for ac_func in select
do
echo $ac_n "checking for $ac_func""... $ac_c" 1>&6
-echo "configure:3928: checking for $ac_func" >&5
+echo "configure:3993: 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 3933 "configure"
+#line 3998 "configure"
#include "confdefs.h"
/* System header to define __stub macros and hopefully few prototypes,
which can conflict with char $ac_func(); below. */
@@ -3952,7 +4017,7 @@ $ac_func();
; return 0; }
EOF
-if { (eval echo configure:3956: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
+if { (eval echo configure:4021: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
rm -rf conftest*
eval "ac_cv_func_$ac_func=yes"
else
@@ -3977,7 +4042,7 @@ fi
done
echo $ac_n "checking whether PD libc _dtos18 fail to convert big number""... $ac_c" 1>&6
-echo "configure:3981: checking whether PD libc _dtos18 fail to convert big number" >&5
+echo "configure:4046: 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
@@ -3985,7 +4050,7 @@ else
{ echo "configure: error: can not run test program while cross compiling" 1>&2; exit 1; }
else
cat > conftest.$ac_ext <<EOF
-#line 3989 "configure"
+#line 4054 "configure"
#include "confdefs.h"
#include <stdio.h>
@@ -3997,7 +4062,7 @@ main ()
}
EOF
-if { (eval echo configure:4001: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null
+if { (eval echo configure:4066: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null
then
rb_cv_missing__dtos18=yes
else
@@ -4019,7 +4084,7 @@ EOF
fi
echo $ac_n "checking whether PD libc fconvert fail to round""... $ac_c" 1>&6
-echo "configure:4023: checking whether PD libc fconvert fail to round" >&5
+echo "configure:4088: 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
@@ -4027,7 +4092,7 @@ else
{ echo "configure: error: can not run test program while cross compiling" 1>&2; exit 1; }
else
cat > conftest.$ac_ext <<EOF
-#line 4031 "configure"
+#line 4096 "configure"
#include "confdefs.h"
#include <stdio.h>
@@ -4040,7 +4105,7 @@ main ()
}
EOF
-if { (eval echo configure:4044: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null
+if { (eval echo configure:4109: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null
then
rb_cv_missing_fconvert=yes
else
diff --git a/configure.in b/configure.in
index 55e7415..ca9ae1b 100644
--- a/configure.in
+++ b/configure.in
@@ -99,6 +99,7 @@ AC_PROG_MAKE_SET
AC_MINIX
AC_CHECK_SIZEOF(int)
+AC_CHECK_SIZEOF(short)
AC_CHECK_SIZEOF(long)
AC_CHECK_SIZEOF(void*)
AC_CHECK_SIZEOF(float)
@@ -114,6 +115,12 @@ if test "$rb_cv_have_prototypes" = yes; then
AC_DEFINE(HAVE_PROTOTYPES)
fi
+AC_MSG_CHECKING(token paste string)
+AC_TRY_COMPILE([#define paste(a,b) a##b],
+[ int xy = 1; return paste(x,y);],
+AC_DEFINE(TOKEN_PASTE(x,y),[x##y]) AC_MSG_RESULT(ANSI),
+AC_DEFINE(TOKEN_PASTE(x,y),[x/**/y]) AC_MSG_RESULT(KnR1))
+
AC_MSG_CHECKING(for variable length prototypes and stdarg.h)
AC_CACHE_VAL(rb_cv_stdarg,
[AC_TRY_COMPILE([
@@ -356,14 +363,14 @@ if test "$with_dln_a_out" != yes; then
rhapsody*) ;;
human*) ;;
cygwin*) CCDLFLAGS=-DDLLIMPORT;;
- *) CCDLFLAGS=-fpic;;
+ *) CCDLFLAGS=-fPIC;;
esac
else
case "$host_os" in
hpux*) CCDLFLAGS='+z';;
- solaris*|irix*) CCDLFLAGS='-K pic' ;;
- sunos*) CCDLFLAGS='-pic' ;;
- esix*|uxpds*) CCDLFLAGS='-Kpic' ;;
+ solaris*|irix*) CCDLFLAGS='-K PIC' ;;
+ sunos*) CCDLFLAGS='-PIC' ;;
+ esix*|uxpds*) CCDLFLAGS='-KPIC' ;;
*) CCDLFLAGS='' ;;
esac
fi
@@ -391,7 +398,6 @@ if test "$with_dln_a_out" != yes; then
netbsd*) LDSHARED="ld -Bshareable"
rb_cv_dlopen=yes ;;
openbsd*) LDSHARED="ld -Bforcearchive -Bshareable"
- CCDLFLAGS=-fPIC
rb_cv_dlopen=yes ;;
nextstep*) LDSHARED='cc -r'
LDFLAGS="-u libsys_s"
diff --git a/enum.c b/enum.c
index 75bc547..dc7e211 100644
--- a/enum.c
+++ b/enum.c
@@ -123,6 +123,28 @@ enum_find_all(obj)
}
static VALUE
+reject_i(i, tmp)
+ VALUE i, tmp;
+{
+ if (!RTEST(rb_yield(i))) {
+ rb_ary_push(tmp, i);
+ }
+ return Qnil;
+}
+
+static VALUE
+enum_reject(obj)
+ VALUE obj;
+{
+ VALUE tmp;
+
+ tmp = rb_ary_new();
+ rb_iterate(rb_each, obj, reject_i, tmp);
+
+ return tmp;
+}
+
+static VALUE
collect_i(i, tmp)
VALUE i, tmp;
{
@@ -377,6 +399,7 @@ Init_Enumerable()
rb_define_method(rb_mEnumerable,"detect", enum_find, -1);
rb_define_method(rb_mEnumerable,"find_all", enum_find_all, 0);
rb_define_method(rb_mEnumerable,"select", enum_find_all, 0);
+ rb_define_method(rb_mEnumerable,"reject", enum_reject, 0);
rb_define_method(rb_mEnumerable,"collect", enum_collect, 0);
rb_define_method(rb_mEnumerable,"min", enum_min, 0);
rb_define_method(rb_mEnumerable,"max", enum_max, 0);
diff --git a/hash.c b/hash.c
index 32d7379..318bb66 100644
--- a/hash.c
+++ b/hash.c
@@ -1415,6 +1415,7 @@ Init_Hash()
rb_define_method(rb_cHash,"shift", rb_hash_shift, 0);
rb_define_method(rb_cHash,"delete", rb_hash_delete, 1);
rb_define_method(rb_cHash,"delete_if", rb_hash_delete_if, 0);
+ rb_define_method(rb_cHash,"reject!", rb_hash_delete_if, 0);
rb_define_method(rb_cHash,"clear", rb_hash_clear, 0);
rb_define_method(rb_cHash,"invert", rb_hash_invert, 0);
rb_define_method(rb_cHash,"update", rb_hash_update, 1);
@@ -1439,6 +1440,7 @@ Init_Hash()
rb_define_singleton_method(envtbl,"each_value", env_each_value, 0);
rb_define_singleton_method(envtbl,"delete", env_delete_method, 1);
rb_define_singleton_method(envtbl,"delete_if", env_delete_if, 0);
+ rb_define_singleton_method(envtbl,"reject!", env_delete_if, 0);
rb_define_singleton_method(envtbl,"to_s", env_to_s, 0);
rb_define_singleton_method(envtbl,"rehash", env_none, 0);
rb_define_singleton_method(envtbl,"to_a", env_to_a, 0);
diff --git a/lib/telnet.rb b/lib/telnet.rb
index e3c590c..0336bda 100644
--- a/lib/telnet.rb
+++ b/lib/telnet.rb
@@ -356,9 +356,9 @@ class Telnet < SimpleDelegator
end
line = ''
- until(not select([@sock], nil, nil, waittime) and prompt === line)
+ until(not IO::select([@sock], nil, nil, waittime) and prompt === line)
raise TimeOut, "timed-out; wait for the next data" if
- not select([@sock], nil, nil, timeout)
+ not IO::select([@sock], nil, nil, timeout)
buf = ''
begin
buf = @sock.sysread(1024 * 1024)
@@ -405,7 +405,7 @@ class Telnet < SimpleDelegator
string = options
end
- select(nil, [@sock])
+ IO::select(nil, [@sock])
print(string)
if iterator?
waitfor({"Prompt" => match, "Timeout" => timeout}){|c| yield c }
diff --git a/numeric.c b/numeric.c
index 5a4d493..21aecf7 100644
--- a/numeric.c
+++ b/numeric.c
@@ -186,7 +186,9 @@ flo_to_s(flt)
char buf[24];
snprintf(buf, 24, "%.10g", RFLOAT(flt)->value);
- if (strchr(buf, '.') == 0 && strcmp(buf, "Inf") != 0) {
+ if (strchr(buf, '.') == 0 &&
+ strcmp(buf, "Inf") != 0 &&
+ strcmp(buf, "NaN") != 0) {
int len = strlen(buf);
char *ind = strchr(buf, 'e');
diff --git a/pack.c b/pack.c
index d14f95a..4c101d5 100644
--- a/pack.c
+++ b/pack.c
@@ -14,11 +14,129 @@
#include <sys/types.h>
#include <ctype.h>
+#define define_swapx(x, xtype) \
+static xtype \
+TAKEN_PASTE(swap,x)(z) \
+ xtype z; \
+{ \
+ xtype r; \
+ xtype *zp; \
+ unsigned char *s, *t; \
+ int i; \
+ \
+ zp = (xtype *)malloc(sizeof(xtype));\
+ *zp = z; \
+ s = (char *)zp; \
+ t = (char *)malloc(sizeof(xtype)); \
+ for (i=0 ; i<sizeof(xtype); i++) { \
+ t[sizeof(xtype)-i-1] = s[i]; \
+ } \
+ r = *(xtype *)t; \
+ free(t); \
+ free(zp); \
+ return r; \
+}
+
+#if SIZEOF_SHORT == 2
#define swaps(x) ((((x)&0xFF)<<8) + (((x)>>8)&0xFF))
+#else
+#if SIZEOF_SHORT == 4
+#define swaps(x) ((((x)&0xFF)<<24) \
+ +(((x)>>24)&0xFF) \
+ +(((x)&0x0000FF00)<<8) \
+ +(((x)&0x00FF0000)>>8) )
+#else
+define_swapx(s,short);
+#endif
+#endif
+
+#if SIZEOF_LONG == 4
#define swapl(x) ((((x)&0xFF)<<24) \
+(((x)>>24)&0xFF) \
+(((x)&0x0000FF00)<<8) \
+(((x)&0x00FF0000)>>8) )
+#else
+#if SIZEOF_LONG == 8
+#define swapl(x) ((((x)&0x00000000000000FF)<<56) \
+ +(((x)&0xFF00000000000000)>>56) \
+ +(((x)&0x000000000000FF00)<<40) \
+ +(((x)&0x00FF000000000000)>>40) \
+ +(((x)&0x0000000000FF0000)<<24) \
+ +(((x)&0x0000FF0000000000)>>24) \
+ +(((x)&0x00000000FF000000)<<8) \
+ +(((x)&0x000000FF00000000)>>8)
+#else
+
+define_swapx(l,long);
+#endif
+#endif
+
+#if SIZEOF_FLOAT == 4
+#if SIZEOF_LONG == 4 /* SIZEOF_FLOAT == 4 == SIZEOF_LONG */
+#define swapf(x) swapl(x)
+#define FLOAT_SWAPPER unsigned long
+#else
+#if SIZEOF_SHORT == 4 /* SIZEOF_FLOAT == 4 == SIZEOF_SHORT */
+#define swapf(x) swaps(x)
+#define FLOAT_SWAPPER unsigned short
+#else /* SIZEOF_FLOAT == 4 but undivide by known size of int */
+define_swapx(f,float);
+#endif /* #if SIZEOF_SHORT == 4 */
+#endif /* #if SIZEOF_LONG == 4 */
+#else /* SIZEOF_FLOAT != 4 */
+define_swapx(f,float);
+#endif /* #if SIZEOF_FLOAT == 4 */
+
+#if SIZEOF_DOUBLE == 8
+#if SIZEOF_LONG == 8 /* SIZEOF_DOUBLE == 8 == SIZEOF_LONG */
+#define swapd(x) swapl(x)
+#define DOUBLE_SWAPPER unsigned long
+#else
+#if SIZEOF_LONG == 4 /* SIZEOF_DOUBLE == 8 && 4 == SIZEOF_LONG */
+static double
+swapd(d)
+ const double d;
+{
+ double dtmp = d;
+ unsigned long utmp[2];
+ unsigned long utmp0;
+
+ utmp[0] = 0; utmp[1] = 0;
+ memcpy(utmp,&dtmp,sizeof(double));
+ utmp0 = utmp[0];
+ utmp[0] = swapl(utmp[1]);
+ utmp[1] = swapl(utmp0);
+ memcpy(&dtmp,utmp,sizeof(double));
+ return dtmp;
+}
+#else
+#if SIZEOF_SHORT == 4 /* SIZEOF_DOUBLE == 8 && 4 == SIZEOF_SHORT */
+static double
+swapd(d)
+ const double d;
+{
+ double dtmp = d;
+ unsigned short utmp[2];
+ unsigned short utmp0;
+
+ utmp[0] = 0; utmp[1] = 0;
+ memcpy(utmp,&dtmp,sizeof(double));
+ utmp0 = utmp[0];
+ utmp[0] = swaps(utmp[1]);
+ utmp[1] = swaps(utmp0);
+ memcpy(&dtmp,utmp,sizeof(double));
+ return dtmp;
+}
+#else /* SIZEOF_DOUBLE == 8 but undivied by known size of int */
+define_swapx(d, double);
+#endif /* #if SIZEOF_SHORT == 4 */
+#endif /* #if SIZEOF_LONG == 4 */
+#endif /* #if SIZEOF_LONG == 8 */
+#else /* SIZEOF_DOUBLE != 8 */
+define_swapx(d, double);
+#endif /* #if SIZEOF_DPOUBLE == 8 */
+
+#undef define_swapx
#ifdef DYNAMIC_ENDIAN
#ifdef ntohs
@@ -42,12 +160,20 @@ endian()
#define ntohs(x) (endian()?(x):swaps(x))
#define ntohl(x) (endian()?(x):swapl(x))
+#define ntohf(x) (endian()?(x):swapf(x))
+#define ntohd(x) (endian()?(x):swapd(x))
#define htons(x) (endian()?(x):swaps(x))
#define htonl(x) (endian()?(x):swapl(x))
+#define htonf(x) (endian()?(x):swapf(x))
+#define htond(x) (endian()?(x):swapd(x))
#define htovs(x) (endian()?swaps(x):(x))
#define htovl(x) (endian()?swapl(x):(x))
+#define htovf(x) (endian()?swapf(x):(x))
+#define htovd(x) (endian()?swapd(x):(x))
#define vtohs(x) (endian()?swaps(x):(x))
#define vtohl(x) (endian()?swapl(x):(x))
+#define vtohf(x) (endian()?swapf(x):(x))
+#define vtohd(x) (endian()?swapd(x):(x))
#else
#ifdef WORDS_BIGENDIAN
#ifndef ntohs
@@ -56,24 +182,96 @@ endian()
#define htons(x) (x)
#define htonl(x) (x)
#endif
+#define ntohf(x) (x)
+#define ntohd(x) (x)
+#define htonf(x) (x)
+#define htond(x) (x)
#define htovs(x) swaps(x)
#define htovl(x) swapl(x)
+#define htovf(x) swapf(x)
+#define htovd(x) swapd(x)
#define vtohs(x) swaps(x)
#define vtohl(x) swapl(x)
+#define vtohf(x) swapf(x)
+#define vtohd(x) swapd(x)
#else /* LITTLE ENDIAN */
#ifndef ntohs
+#undef ntohs
+#undef ntohl
+#undef htons
+#undef htonl
#define ntohs(x) swaps(x)
#define ntohl(x) swapl(x)
#define htons(x) swaps(x)
#define htonl(x) swapl(x)
#endif
+#define ntohf(x) swapf(x)
+#define ntohd(x) swapd(x)
+#define htonf(x) swapf(x)
+#define htond(x) swapd(x)
#define htovs(x) (x)
#define htovl(x) (x)
+#define htovf(x) (x)
+#define htovd(x) (x)
#define vtohs(x) (x)
#define vtohl(x) (x)
+#define vtohf(x) (x)
+#define vtohd(x) (x)
#endif
#endif
+#ifdef FLOAT_SWAPPER
+#define FLOAT_CONVWITH(y) FLOAT_SWAPPER y;
+#define HTONF(x,y) (memcpy(&y,&x,sizeof(float)), \
+ x = htonf((FLOAT_SWAPPER)y), \
+ memcpy(&x,&y,sizeof(float)), \
+ x)
+#define HTOVF(x,y) (memcpy(&y,&x,sizeof(float)), \
+ y = htovf((FLOAT_SWAPPER)y), \
+ memcpy(&x,&y,sizeof(float)), \
+ x)
+#define NTOHF(x,y) (memcpy(&y,&x,sizeof(float)), \
+ y = ntohf((FLOAT_SWAPPER)y), \
+ memcpy(&x,&y,sizeof(float)), \
+ x)
+#define VTOHF(x,y) (memcpy(&y,&x,sizeof(float)), \
+ y = vtohf((FLOAT_SWAPPER)y), \
+ memcpy(&x,&y,sizeof(float)), \
+ x)
+#else
+#define FLOAT_CONVWITH(y)
+#define HTONF(x,y) htonf(x)
+#define HTOVF(x,y) htovf(x)
+#define NTOHF(x,y) ntohf(x)
+#define VTOHF(x,y) vtohf(x)
+#endif
+
+#ifdef DOUBLE_SWAPPER
+#define DOUBLE_CONVWITH(y) DOUBLE_SWAPPER y;
+#define HTOND(x,y) (memcpy(&y,&x,sizeof(double)), \
+ x = htond((DOUBLE_SWAPPER)y), \
+ memcpy(&x,&y,sizeof(double)), \
+ x)
+#define HTOVD(x,y) (memcpy(&y,&x,sizeof(double)), \
+ y = htovd((DOUBLE_SWAPPER)y), \
+ memcpy(&x,&y,sizeof(double)), \
+ x)
+#define NTOHD(x,y) (memcpy(&y,&x,sizeof(double)), \
+ y = ntohd((DOUBLE_SWAPPER)y), \
+ memcpy(&x,&y,sizeof(double)), \
+ x)
+#define VTOHD(x,y) (memcpy(&y,&x,sizeof(double)), \
+ y = vtohd((DOUBLE_SWAPPER)y), \
+ memcpy(&x,&y,sizeof(double)), \
+ x)
+#else
+#define DOUBLE_CONVWITH(y)
+#define HTOND(x,y) htond(x)
+#define HTOVD(x,y) htovd(x)
+#define NTOHD(x,y) ntohd(x)
+#define VTOHD(x,y) vtohd(x)
+#endif
+
static char *toofew = "too few arguments";
static void encodes _((VALUE,char*,int,int));
@@ -399,6 +597,48 @@ pack_pack(ary, fmt)
}
break;
+ case 'e':
+ while (len-- > 0) {
+ float f;
+ FLOAT_CONVWITH(ftmp);
+
+ from = NEXTFROM;
+ switch (TYPE(from)) {
+ case T_FLOAT:
+ f = RFLOAT(from)->value;
+ break;
+ case T_STRING:
+ f = atof(RSTRING(from)->ptr);
+ default:
+ f = (float)NUM2INT(from);
+ break;
+ }
+ f = HTOVF(f,ftmp);
+ rb_str_cat(res, (char*)&f, sizeof(float));
+ }
+ break;
+
+ case 'E':
+ while (len-- > 0) {
+ double d;
+ DOUBLE_CONVWITH(dtmp);
+
+ from = NEXTFROM;
+ switch (TYPE(from)) {
+ case T_FLOAT:
+ d = RFLOAT(from)->value;
+ break;
+ case T_STRING:
+ d = atof(RSTRING(from)->ptr);
+ default:
+ d = (double)NUM2INT(from);
+ break;
+ }
+ d = HTOVD(d,dtmp);
+ rb_str_cat(res, (char*)&d, sizeof(double));
+ }
+ break;
+
case 'd':
case 'D':
while (len-- > 0) {
@@ -419,6 +659,48 @@ pack_pack(ary, fmt)
}
break;
+ case 'g':
+ while (len-- > 0) {
+ float f;
+ FLOAT_CONVWITH(ftmp);
+
+ from = NEXTFROM;
+ switch (TYPE(from)) {
+ case T_FLOAT:
+ f = RFLOAT(from)->value;
+ break;
+ case T_STRING:
+ f = atof(RSTRING(from)->ptr);
+ default:
+ f = (float)NUM2INT(from);
+ break;
+ }
+ f = HTONF(f,ftmp);
+ rb_str_cat(res, (char*)&f, sizeof(float));
+ }
+ break;
+
+ case 'G':
+ while (len-- > 0) {
+ double d;
+ DOUBLE_CONVWITH(dtmp);
+
+ from = NEXTFROM;
+ switch (TYPE(from)) {
+ case T_FLOAT:
+ d = RFLOAT(from)->value;
+ break;
+ case T_STRING:
+ d = atof(RSTRING(from)->ptr);
+ default:
+ d = (double)NUM2INT(from);
+ break;
+ }
+ d = HTOND(d,dtmp);
+ rb_str_cat(res, (char*)&d, sizeof(double));
+ }
+ break;
+
case 'x':
grow:
while (len >= 10) {
@@ -558,7 +840,7 @@ qpencode(str, from, len)
{
char buff[1024];
int i = 0, n = 0, prev = EOF;
- unsigned char *s = RSTRING(from)->ptr;
+ unsigned char *s = (unsigned char*)RSTRING(from)->ptr;
unsigned char *send = s + RSTRING(from)->len;
while (s < send) {
@@ -911,6 +1193,34 @@ pack_unpack(str, fmt)
}
break;
+ case 'e':
+ if (len >= (send - s) / sizeof(float))
+ len = (send - s) / sizeof(float);
+ while (len-- > 0) {
+ float tmp;
+ FLOAT_CONVWITH(ftmp);
+
+ memcpy(&tmp, s, sizeof(float));
+ s += sizeof(float);
+ tmp = VTOHF(tmp,ftmp);
+ rb_ary_push(ary, rb_float_new((double)tmp));
+ }
+ break;
+
+ case 'E':
+ if (len >= (send - s) / sizeof(double))
+ len = (send - s) / sizeof(double);
+ while (len-- > 0) {
+ double tmp;
+ DOUBLE_CONVWITH(dtmp);
+
+ memcpy(&tmp, s, sizeof(double));
+ s += sizeof(double);
+ tmp = VTOHD(tmp,dtmp);
+ rb_ary_push(ary, rb_float_new(tmp));
+ }
+ break;
+
case 'D':
case 'd':
if (len >= (send - s) / sizeof(double))
@@ -923,6 +1233,34 @@ pack_unpack(str, fmt)
}
break;
+ case 'g':
+ if (len >= (send - s) / sizeof(float))
+ len = (send - s) / sizeof(float);
+ while (len-- > 0) {
+ float tmp;
+ FLOAT_CONVWITH(ftmp;)
+
+ memcpy(&tmp, s, sizeof(float));
+ s += sizeof(float);
+ tmp = NTOHF(tmp,ftmp);
+ rb_ary_push(ary, rb_float_new((double)tmp));
+ }
+ break;
+
+ case 'G':
+ if (len >= (send - s) / sizeof(double))
+ len = (send - s) / sizeof(double);
+ while (len-- > 0) {
+ double tmp;
+ DOUBLE_CONVWITH(dtmp);
+
+ memcpy(&tmp, s, sizeof(double));
+ s += sizeof(double);
+ tmp = NTOHD(tmp,dtmp);
+ rb_ary_push(ary, rb_float_new(tmp));
+ }
+ break;
+
case 'u':
{
VALUE str = rb_str_new(0, (send - s)*3/4);
diff --git a/parse.c b/parse.c
index c9c48dc..300b163 100644
--- a/parse.c
+++ b/parse.c
@@ -4940,8 +4940,10 @@ parse_regx(term, paren)
}
/* fall through */
default:
- if (c == paren) nest++;
- if (c == term) nest--;
+ if (paren) {
+ if (c == paren) nest++;
+ if (c == term) nest--;
+ }
if (c == '\n') {
ruby_sourceline++;
}
@@ -5085,10 +5087,12 @@ parse_string(func, term, paren)
}
continue;
}
- if (c == paren) nest++;
- if (c == term) {
- nest--;
- if (nest == 0) break;
+ if (paren) {
+ if (c == paren) nest++;
+ if (c == term) {
+ nest--;
+ if (nest == 0) break;
+ }
}
tokadd(c);
}
@@ -5163,10 +5167,12 @@ parse_qstring(term, paren)
tokadd('\\');
}
}
- if (c == paren) nest++;
- if (c == term) {
- nest--;
- if (nest == 0) break;
+ if (paren) {
+ if (c == paren) nest++;
+ if (c == term) {
+ nest--;
+ if (nest == 0) break;
+ }
}
tokadd(c);
}
@@ -5527,7 +5533,7 @@ retry:
return parse_string(c,c,c);
case '\'':
- return parse_qstring(c,c);
+ return parse_qstring(c,0);
case '?':
if (lex_state == EXPR_END) {
@@ -5918,7 +5924,7 @@ retry:
rb_compile_error("unterminated quoted string meets end of file");
return 0;
}
- paren = term;
+ paren = 0;
if (term == '(') term = ')';
else if (term == '[') term = ']';
else if (term == '{') term = '}';
diff --git a/parse.y b/parse.y
index 16410a9..524b188 100644
--- a/parse.y
+++ b/parse.y
@@ -2029,8 +2029,10 @@ parse_regx(term, paren)
}
/* fall through */
default:
- if (c == paren) nest++;
- if (c == term) nest--;
+ if (paren) {
+ if (c == paren) nest++;
+ if (c == term) nest--;
+ }
if (c == '\n') {
ruby_sourceline++;
}
@@ -2174,10 +2176,12 @@ parse_string(func, term, paren)
}
continue;
}
- if (c == paren) nest++;
- if (c == term) {
- nest--;
- if (nest == 0) break;
+ if (paren) {
+ if (c == paren) nest++;
+ if (c == term) {
+ nest--;
+ if (nest == 0) break;
+ }
}
tokadd(c);
}
@@ -2252,10 +2256,12 @@ parse_qstring(term, paren)
tokadd('\\');
}
}
- if (c == paren) nest++;
- if (c == term) {
- nest--;
- if (nest == 0) break;
+ if (paren) {
+ if (c == paren) nest++;
+ if (c == term) {
+ nest--;
+ if (nest == 0) break;
+ }
}
tokadd(c);
}
@@ -2616,7 +2622,7 @@ retry:
return parse_string(c,c,c);
case '\'':
- return parse_qstring(c,c);
+ return parse_qstring(c,0);
case '?':
if (lex_state == EXPR_END) {
@@ -3007,7 +3013,7 @@ retry:
rb_compile_error("unterminated quoted string meets end of file");
return 0;
}
- paren = term;
+ paren = 0;
if (term == '(') term = ')';
else if (term == '[') term = ']';
else if (term == '{') term = '}';
diff --git a/regex.c b/regex.c
index 426b490..d2a0fd9 100644
--- a/regex.c
+++ b/regex.c
@@ -400,9 +400,9 @@ re_set_syntax(syntax)
if (current_mbctype == MBCTYPE_UTF8) {\
int n = ismbchar(c);\
int c1;\
- c &= 1<<(BYTEWIDTH-2-n);\
+ c &= (1<<(BYTEWIDTH-2-n)) - 1;\
while (n--) {\
- c = c << 6 | *p++;\
+ c = c << 6 | *p++ & ((1<<6)-1);\
}\
}\
else {\
@@ -502,19 +502,17 @@ print_mbc(c)
/* Get the next unsigned number in the uncompiled pattern. */
#define GET_UNSIGNED_NUMBER(num) \
- do { if (p != pend) \
- { \
+ do { if (p != pend) { \
PATFETCH(c); \
- while (ISDIGIT(c)) \
- { \
- if (num < 0) \
- num = 0; \
- num = num * 10 + c - '0'; \
- if (p == pend) \
- break; \
- PATFETCH(c); \
- } \
- } \
+ while (ISDIGIT(c)) { \
+ if (num < 0) \
+ num = 0; \
+ num = num * 10 + c - '0'; \
+ if (p == pend) \
+ break; \
+ PATFETCH(c); \
+ } \
+ } \
} while (0)
#define STREQ(s1, s2) ((strcmp (s1, s2) == 0))
@@ -1969,6 +1967,7 @@ re_compile_pattern(pattern, size, bufp)
p_save = p;
had_mbchar = 0;
+ c1 = 0;
GET_UNSIGNED_NUMBER(c1);
if (!ISDIGIT(c)) PATUNFETCH;
@@ -2844,10 +2843,11 @@ re_search(bufp, string, size, startpos, range, regs)
while (range > 0) {
c = *p++;
if (ismbchar(c)) {
+ int len = ismbchar(c);
if (fastmap[c])
break;
c = *p++;
- range--;
+ range -= len;
if (fastmap[c] == 2)
break;
}
@@ -3092,7 +3092,7 @@ typedef union
#define IS_A_LETTER(d) (SYNTAX(*(d)) == Sword || \
(current_mbctype ? \
- re_mbctab[*(d)] == 1 : \
+ re_mbctab[*(d)] : \
SYNTAX(*(d)) == Sword2))
#define PREV_IS_A_LETTER(d) ((current_mbctype == MBCTYPE_SJIS)? \
@@ -3537,7 +3537,7 @@ re_match(bufp, string_arg, size, pos, regs)
PREFETCH;
cc = c = (unsigned char)*d++;
if (ismbchar(c)) {
- if (d + ismbchar(c) < dend) {
+ if (d + ismbchar(c) <= dend) {
MBC2WC(c, d);
}
}
diff --git a/ruby.c b/ruby.c
index 52eb653..47772c3 100644
--- a/ruby.c
+++ b/ruby.c
@@ -78,7 +78,7 @@ usage(name)
* Removed -h because the user already knows that opton. Others? */
static char *usage_msg[] = {
-"-0[octal] specify record separator (\0, if no argument)",
+"-0[octal] specify record separator (\\0, if no argument)",
"-a autosplit mode with -n or -p (splits $_ into $F)",
"-c check syntax only",
"-d set debugging flags (set $DEBUG to true)",
diff --git a/version.h b/version.h
index de5c2e1..c01b38a 100644
--- a/version.h
+++ b/version.h
@@ -1,2 +1,2 @@
#define RUBY_VERSION "1.3.1"
-#define VERSION_DATE "99/02/01"
+#define VERSION_DATE "99/02/03"
diff --git a/win32/Makefile b/win32/Makefile
index 152bdc8..ce9dbe6 100644
--- a/win32/Makefile
+++ b/win32/Makefile
@@ -62,6 +62,7 @@ OBJS = array.obj \
object.obj \
pack.obj \
parse.obj \
+ prec.obj \
process.obj \
random.obj \
range.obj \
@@ -228,3 +229,4 @@ util.obj: util.c defines.h config.h util.h
variable.obj: variable.c ruby.h config.h defines.h env.h st.h
version.obj: version.c ruby.h config.h defines.h version.h
director.obj : director.c dir.h
+prec.obj: prec.c ruby.h config.h defines.h