summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authormatz <matz@b2dd03c8-39d4-4d8f-98ff-823fe69b080e>1999-02-15 07:31:51 +0000
committermatz <matz@b2dd03c8-39d4-4d8f-98ff-823fe69b080e>1999-02-15 07:31:51 +0000
commit51fa86ece2d2b0f72c86c70fe1314e412c7a9e68 (patch)
tree86cdfce906bcc995c55e83a907f9d9f7be071da0
parent42c802126215101feed36135ba8f9601895ec03a (diff)
990215
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/branches/ruby_1_3@402 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
-rw-r--r--ChangeLog16
-rw-r--r--array.c2
-rw-r--r--configure257
-rw-r--r--configure.in26
-rw-r--r--eval.c38
-rw-r--r--ext/Win32API/Win32API.c6
-rw-r--r--io.c2
-rw-r--r--process.c8
-rw-r--r--sprintf.c1
-rw-r--r--version.h2
-rw-r--r--win32/ruby.def2
11 files changed, 201 insertions, 159 deletions
diff --git a/ChangeLog b/ChangeLog
index 3ad3d99e69..555553c55f 100644
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,3 +1,19 @@
+Mon Feb 15 15:48:30 1999 WATANABE Hirofumi <watanabe@ase.ptg.sony.co.jp>
+
+ * configure.in: specify `-Wl,-E' only for GNU ld.
+
+Mon Feb 15 11:43:22 1999 GOTO Kentaro <gotoken@math.sci.hokudai.ac.jp>
+
+ * array.c (rb_inspecting_p): should return Qfalse.
+
+Sun Feb 14 22:36:40 1999 EGUCHI Osamu <eguchi@shizuokanet.ne.jp>
+
+ * sprintf.c (rb_f_sprintf): `%G' was ommited.
+
+Sat Feb 13 01:24:16 1999 Yukihiro Matsumoto <matz@netlab.co.jp>
+
+ * eval.c (rb_thread_create_0): should protect th->thread.
+
Fri Feb 12 16:16:47 1999 Yasuhiro Fukuma <yasuf@big.or.jp>
* string.c (rb_str_inspect): wrong mbc position.
diff --git a/array.c b/array.c
index a9de53f228..8b0d379999 100644
--- a/array.c
+++ b/array.c
@@ -821,7 +821,7 @@ rb_inspecting_p(obj)
inspect_tbl = rb_thread_local_aref(rb_thread_current(), inspect_key);
if (NIL_P(inspect_tbl)) return Qfalse;
#else
- if (!inspect_tbl) return Qnil;
+ if (!inspect_tbl) return Qfalse;
#endif
return rb_ary_includes(inspect_tbl, obj);
}
diff --git a/configure b/configure
index 91025fb80c..103020a187 100644
--- a/configure
+++ b/configure
@@ -3263,85 +3263,148 @@ EOF
fi
fi
-if test "$ac_cv_func_setpgrp2" = yes; then
- cat >> confdefs.h <<\EOF
-#define BSD_GETPGRP getpgrp2
-EOF
-
- cat >> confdefs.h <<\EOF
-#define BSD_SETPGRP setpgrp2
-EOF
-
-else
- echo $ac_n "checking whether getpgrp() has arg""... $ac_c" 1>&6
-echo "configure:3278: checking whether getpgrp() has arg" >&5
-if eval "test \"`echo '$''{'rb_cv_bsdgetpgrp'+set}'`\" = set"; then
+echo $ac_n "checking whether getpgrp takes no argument""... $ac_c" 1>&6
+echo "configure:3268: checking whether getpgrp takes no argument" >&5
+if eval "test \"`echo '$''{'ac_cv_func_getpgrp_void'+set}'`\" = set"; then
echo $ac_n "(cached) $ac_c" 1>&6
else
+ if test "$cross_compiling" = yes; then
+ { echo "configure: error: cannot check getpgrp if cross compiling" 1>&2; exit 1; }
+else
cat > conftest.$ac_ext <<EOF
-#line 3283 "configure"
+#line 3276 "configure"
#include "confdefs.h"
-#include <unistd.h>
-int main() {
-getpgrp(0);
-; return 0; }
+
+/*
+ * If this system has a BSD-style getpgrp(),
+ * which takes a pid argument, exit unsuccessfully.
+ *
+ * Snarfed from Chet Ramey's bash pgrp.c test program
+ */
+#include <stdio.h>
+#include <sys/types.h>
+
+int pid;
+int pg1, pg2, pg3, pg4;
+int ng, np, s, child;
+
+main()
+{
+ pid = getpid();
+ pg1 = getpgrp(0);
+ pg2 = getpgrp();
+ pg3 = getpgrp(pid);
+ pg4 = getpgrp(1);
+
+ /*
+ * If all of these values are the same, it's pretty sure that
+ * we're on a system that ignores getpgrp's first argument.
+ */
+ if (pg2 == pg4 && pg1 == pg3 && pg2 == pg3)
+ exit(0);
+
+ child = fork();
+ if (child < 0)
+ exit(1);
+ else if (child == 0) {
+ np = getpid();
+ /*
+ * If this is Sys V, this will not work; pgrp will be
+ * set to np because setpgrp just changes a pgrp to be
+ * the same as the pid.
+ */
+ setpgrp(np, pg1);
+ ng = getpgrp(0); /* Same result for Sys V and BSD */
+ if (ng == pg1) {
+ exit(1);
+ } else {
+ exit(0);
+ }
+ } else {
+ wait(&s);
+ exit(s>>8);
+ }
+}
+
EOF
-if { (eval echo configure:3290: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
- rm -rf conftest*
- rb_cv_bsdgetpgrp=yes
+if { (eval echo configure:3331: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null
+then
+ ac_cv_func_getpgrp_void=yes
else
echo "configure: failed program was:" >&5
cat conftest.$ac_ext >&5
- rm -rf conftest*
- rb_cv_bsdgetpgrp=no
+ rm -fr conftest*
+ ac_cv_func_getpgrp_void=no
fi
-rm -f conftest*
+rm -fr conftest*
fi
-echo "$ac_t""$rb_cv_bsdgetpgrp" 1>&6
- if test "$rb_cv_bsdgetpgrp" = yes; then
- cat >> confdefs.h <<\EOF
-#define BSD_GETPGRP getpgrp
+
+fi
+
+echo "$ac_t""$ac_cv_func_getpgrp_void" 1>&6
+if test $ac_cv_func_getpgrp_void = yes; then
+ cat >> confdefs.h <<\EOF
+#define GETPGRP_VOID 1
EOF
- fi
+fi
- echo $ac_n "checking whether setpgrp() has args""... $ac_c" 1>&6
-echo "configure:3311: checking whether setpgrp() has args" >&5
-if eval "test \"`echo '$''{'rb_cv_bsdsetpgrp'+set}'`\" = set"; then
+echo $ac_n "checking whether setpgrp takes no argument""... $ac_c" 1>&6
+echo "configure:3355: checking whether setpgrp takes no argument" >&5
+if eval "test \"`echo '$''{'ac_cv_func_setpgrp_void'+set}'`\" = set"; then
echo $ac_n "(cached) $ac_c" 1>&6
else
+ if test "$cross_compiling" = yes; then
+ { echo "configure: error: cannot check setpgrp if cross compiling" 1>&2; exit 1; }
+else
cat > conftest.$ac_ext <<EOF
-#line 3316 "configure"
+#line 3363 "configure"
#include "confdefs.h"
+
+#ifdef HAVE_UNISTD_H
#include <unistd.h>
-int main() {
-setpgrp(1, 1);
-; return 0; }
+#endif
+
+/*
+ * If this system has a BSD-style setpgrp, which takes arguments, exit
+ * successfully.
+ */
+main()
+{
+ if (setpgrp(1,1) == -1)
+ exit(0);
+ else
+ exit(1);
+}
+
EOF
-if { (eval echo configure:3323: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
- rm -rf conftest*
- rb_cv_bsdsetpgrp=yes
+if { (eval echo configure:3383: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null
+then
+ ac_cv_func_setpgrp_void=no
else
echo "configure: failed program was:" >&5
cat conftest.$ac_ext >&5
- rm -rf conftest*
- rb_cv_bsdsetpgrp=no
+ rm -fr conftest*
+ ac_cv_func_setpgrp_void=yes
fi
-rm -f conftest*
+rm -fr conftest*
fi
-echo "$ac_t""$rb_cv_bsdsetpgrp" 1>&6
- if test "$rb_cv_bsdsetpgrp" = yes; then
- cat >> confdefs.h <<\EOF
-#define BSD_SETPGRP setpgrp
+
+fi
+
+echo "$ac_t""$ac_cv_func_setpgrp_void" 1>&6
+if test $ac_cv_func_setpgrp_void = yes; then
+ cat >> confdefs.h <<\EOF
+#define SETPGRP_VOID 1
EOF
- fi
fi
+
echo $ac_n "checking for working strtod""... $ac_c" 1>&6
-echo "configure:3345: checking for working strtod" >&5
+echo "configure:3408: checking for working strtod" >&5
if eval "test \"`echo '$''{'rb_cv_func_strtod'+set}'`\" = set"; then
echo $ac_n "(cached) $ac_c" 1>&6
else
@@ -3349,7 +3412,7 @@ else
rb_cv_func_strtod=no
else
cat > conftest.$ac_ext <<EOF
-#line 3353 "configure"
+#line 3416 "configure"
#include "confdefs.h"
double strtod ();
@@ -3379,7 +3442,7 @@ main()
}
EOF
-if { (eval echo configure:3383: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null
+if { (eval echo configure:3446: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null
then
rb_cv_func_strtod=yes
else
@@ -3397,14 +3460,14 @@ echo "$ac_t""$rb_cv_func_strtod" 1>&6
test $rb_cv_func_strtod = no && LIBOBJS="$LIBOBJS strtod.o"
echo $ac_n "checking whether byte ordering is bigendian""... $ac_c" 1>&6
-echo "configure:3401: checking whether byte ordering is bigendian" >&5
+echo "configure:3464: 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 3408 "configure"
+#line 3471 "configure"
#include "confdefs.h"
#include <sys/types.h>
#include <sys/param.h>
@@ -3415,11 +3478,11 @@ int main() {
#endif
; return 0; }
EOF
-if { (eval echo configure:3419: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
+if { (eval echo configure:3482: \"$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 3423 "configure"
+#line 3486 "configure"
#include "confdefs.h"
#include <sys/types.h>
#include <sys/param.h>
@@ -3430,7 +3493,7 @@ int main() {
#endif
; return 0; }
EOF
-if { (eval echo configure:3434: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
+if { (eval echo configure:3497: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
rm -rf conftest*
ac_cv_c_bigendian=yes
else
@@ -3450,7 +3513,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 3454 "configure"
+#line 3517 "configure"
#include "confdefs.h"
main () {
/* Are we little or big endian? From Harbison&Steele. */
@@ -3463,7 +3526,7 @@ main () {
exit (u.c[sizeof (long) - 1] == 1);
}
EOF
-if { (eval echo configure:3467: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null
+if { (eval echo configure:3530: \"$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
@@ -3487,14 +3550,14 @@ EOF
fi
echo $ac_n "checking whether char is unsigned""... $ac_c" 1>&6
-echo "configure:3491: checking whether char is unsigned" >&5
+echo "configure:3554: 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 3498 "configure"
+#line 3561 "configure"
#include "confdefs.h"
#ifdef __CHAR_UNSIGNED__
yes
@@ -3516,7 +3579,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 3520 "configure"
+#line 3583 "configure"
#include "confdefs.h"
/* volatile prevents gcc2 from optimizing the test away on sparcs. */
#if !defined(__STDC__) || __STDC__ != 1
@@ -3526,7 +3589,7 @@ main() {
volatile char c = 255; exit(c < 0);
}
EOF
-if { (eval echo configure:3530: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null
+if { (eval echo configure:3593: \"$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
@@ -3551,7 +3614,7 @@ fi
echo $ac_n "checking whether right shift preserve sign bit""... $ac_c" 1>&6
-echo "configure:3555: checking whether right shift preserve sign bit" >&5
+echo "configure:3618: 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
@@ -3559,7 +3622,7 @@ else
rb_cv_rshift_sign=yes
else
cat > conftest.$ac_ext <<EOF
-#line 3563 "configure"
+#line 3626 "configure"
#include "confdefs.h"
int
@@ -3571,7 +3634,7 @@ main()
}
EOF
-if { (eval echo configure:3575: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null
+if { (eval echo configure:3638: \"$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
@@ -3599,19 +3662,19 @@ EOF
fi
echo $ac_n "checking count field in FILE structures""... $ac_c" 1>&6
-echo "configure:3603: checking count field in FILE structures" >&5
+echo "configure:3666: 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 3608 "configure"
+#line 3671 "configure"
#include "confdefs.h"
#include <stdio.h>
int main() {
FILE *f = stdin; f->_cnt = 0;
; return 0; }
EOF
-if { (eval echo configure:3615: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
+if { (eval echo configure:3678: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
rm -rf conftest*
rb_cv_fcnt="_cnt"
else
@@ -3621,14 +3684,14 @@ fi
rm -f conftest*
if test "$rb_cv_fcnt" = ""; then
cat > conftest.$ac_ext <<EOF
-#line 3625 "configure"
+#line 3688 "configure"
#include "confdefs.h"
#include <stdio.h>
int main() {
FILE *f = stdin; f->__cnt = 0;
; return 0; }
EOF
-if { (eval echo configure:3632: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
+if { (eval echo configure:3695: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
rm -rf conftest*
rb_cv_fcnt="__cnt"
else
@@ -3639,14 +3702,14 @@ rm -f conftest*
fi
if test "$rb_cv_fcnt" = ""; then
cat > conftest.$ac_ext <<EOF
-#line 3643 "configure"
+#line 3706 "configure"
#include "confdefs.h"
#include <stdio.h>
int main() {
FILE *f = stdin; f->_r = 0;
; return 0; }
EOF
-if { (eval echo configure:3650: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
+if { (eval echo configure:3713: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
rm -rf conftest*
rb_cv_fcnt="_r"
else
@@ -3657,14 +3720,14 @@ rm -f conftest*
fi
if test "$rb_cv_fcnt" = ""; then
cat > conftest.$ac_ext <<EOF
-#line 3661 "configure"
+#line 3724 "configure"
#include "confdefs.h"
#include <stdio.h>
int main() {
FILE *f = stdin; f->readCount = 0;
; return 0; }
EOF
-if { (eval echo configure:3668: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
+if { (eval echo configure:3731: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
rm -rf conftest*
rb_cv_fcnt="readCount"
else
@@ -3703,7 +3766,7 @@ fi
case "$host_os" in
linux*)
echo $ac_n "checking whether ELF binaries are produced""... $ac_c" 1>&6
-echo "configure:3707: checking whether ELF binaries are produced" >&5
+echo "configure:3770: 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
@@ -3711,7 +3774,7 @@ else
rb_cv_binary_elf=yes
else
cat > conftest.$ac_ext <<EOF
-#line 3715 "configure"
+#line 3778 "configure"
#include "confdefs.h"
/* Test for whether ELF binaries are produced */
@@ -3731,7 +3794,7 @@ main() {
}
EOF
-if { (eval echo configure:3735: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null
+if { (eval echo configure:3798: \"$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
@@ -3761,7 +3824,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:3765: checking whether OS depend dynamic link works" >&5
+echo "configure:3828: checking whether OS depend dynamic link works" >&5
if test "$GCC" = yes; then
case "$host_os" in
nextstep*) ;;
@@ -3787,7 +3850,7 @@ echo "configure:3765: checking whether OS depend dynamic link works" >&5
LDFLAGS="-Wl,-E"
rb_cv_dlopen=yes;;
solaris*) LDSHARED='ld -G'
- LDFLAGS="-Wl,-E"
+ test "$GCC" = yes && `$CC --print-prog-name=ld` -v 2>&1 | grep "GNU ld" > /dev/null && LDFLAGS="-Wl,-E"
rb_cv_dlopen=yes;;
sunos*) LDSHARED='ld -assert nodefinitions'
rb_cv_dlopen=yes;;
@@ -3855,12 +3918,12 @@ if test "$ac_cv_header_a_out_h" = yes; then
if test "$with_dln_a_out" = yes || test "$rb_cv_dlopen" = unknown; then
cat confdefs.h > config.h
echo $ac_n "checking whether matz's dln works""... $ac_c" 1>&6
-echo "configure:3859: checking whether matz's dln works" >&5
+echo "configure:3922: checking whether matz's dln works" >&5
if eval "test \"`echo '$''{'rb_cv_dln_a_out'+set}'`\" = set"; then
echo $ac_n "(cached) $ac_c" 1>&6
else
cat > conftest.$ac_ext <<EOF
-#line 3864 "configure"
+#line 3927 "configure"
#include "confdefs.h"
#define USE_DLN_A_OUT
@@ -3870,7 +3933,7 @@ int main() {
; return 0; }
EOF
-if { (eval echo configure:3874: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
+if { (eval echo configure:3937: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
rm -rf conftest*
rb_cv_dln_a_out=yes
else
@@ -3972,7 +4035,7 @@ fi
case "$host_os" in
human*)
echo $ac_n "checking for _harderr in -lsignal""... $ac_c" 1>&6
-echo "configure:3976: checking for _harderr in -lsignal" >&5
+echo "configure:4039: 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
@@ -3980,7 +4043,7 @@ else
ac_save_LIBS="$LIBS"
LIBS="-lsignal $LIBS"
cat > conftest.$ac_ext <<EOF
-#line 3984 "configure"
+#line 4047 "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
@@ -3991,7 +4054,7 @@ int main() {
_harderr()
; return 0; }
EOF
-if { (eval echo configure:3995: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
+if { (eval echo configure:4058: \"$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
@@ -4019,7 +4082,7 @@ else
fi
echo $ac_n "checking for hmemset in -lhmem""... $ac_c" 1>&6
-echo "configure:4023: checking for hmemset in -lhmem" >&5
+echo "configure:4086: 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
@@ -4027,7 +4090,7 @@ else
ac_save_LIBS="$LIBS"
LIBS="-lhmem $LIBS"
cat > conftest.$ac_ext <<EOF
-#line 4031 "configure"
+#line 4094 "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
@@ -4038,7 +4101,7 @@ int main() {
hmemset()
; return 0; }
EOF
-if { (eval echo configure:4042: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
+if { (eval echo configure:4105: \"$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
@@ -4068,12 +4131,12 @@ fi
for ac_func in select
do
echo $ac_n "checking for $ac_func""... $ac_c" 1>&6
-echo "configure:4072: checking for $ac_func" >&5
+echo "configure:4135: 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 4077 "configure"
+#line 4140 "configure"
#include "confdefs.h"
/* System header to define __stub macros and hopefully few prototypes,
which can conflict with char $ac_func(); below. */
@@ -4096,7 +4159,7 @@ $ac_func();
; return 0; }
EOF
-if { (eval echo configure:4100: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
+if { (eval echo configure:4163: \"$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
@@ -4121,7 +4184,7 @@ fi
done
echo $ac_n "checking whether PD libc _dtos18 fail to convert big number""... $ac_c" 1>&6
-echo "configure:4125: checking whether PD libc _dtos18 fail to convert big number" >&5
+echo "configure:4188: 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
@@ -4129,7 +4192,7 @@ else
rb_cv_missing__dtos18=no
else
cat > conftest.$ac_ext <<EOF
-#line 4133 "configure"
+#line 4196 "configure"
#include "confdefs.h"
#include <stdio.h>
@@ -4141,7 +4204,7 @@ main ()
}
EOF
-if { (eval echo configure:4145: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null
+if { (eval echo configure:4208: \"$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
@@ -4163,7 +4226,7 @@ EOF
fi
echo $ac_n "checking whether PD libc fconvert fail to round""... $ac_c" 1>&6
-echo "configure:4167: checking whether PD libc fconvert fail to round" >&5
+echo "configure:4230: 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
@@ -4171,7 +4234,7 @@ else
rb_cv_missing_fconvert=no
else
cat > conftest.$ac_ext <<EOF
-#line 4175 "configure"
+#line 4238 "configure"
#include "confdefs.h"
#include <stdio.h>
@@ -4184,7 +4247,7 @@ main ()
}
EOF
-if { (eval echo configure:4188: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null
+if { (eval echo configure:4251: \"$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
@@ -4306,7 +4369,7 @@ ri_prefix=
test "$program_prefix" != NONE &&
ri_prefix=$program_prefix
-ri_suffix="${MAJOR}.${MINOR}"
+ri_suffix=
test "$program_suffix" != NONE &&
ri_suffix=$program_suffix
diff --git a/configure.in b/configure.in
index 069cffba8e..26945dd0d9 100644
--- a/configure.in
+++ b/configure.in
@@ -230,26 +230,8 @@ main()
fi
fi
-if test "$ac_cv_func_setpgrp2" = yes; then
- AC_DEFINE(BSD_GETPGRP, getpgrp2)
- AC_DEFINE(BSD_SETPGRP, setpgrp2)
-else
- AC_CACHE_CHECK(whether getpgrp() has arg, rb_cv_bsdgetpgrp,
- [AC_TRY_COMPILE([#include <unistd.h>], [getpgrp(0);],
- rb_cv_bsdgetpgrp=yes,
- rb_cv_bsdgetpgrp=no)])
- if test "$rb_cv_bsdgetpgrp" = yes; then
- AC_DEFINE(BSD_GETPGRP, getpgrp)
- fi
-
- AC_CACHE_CHECK(whether setpgrp() has args, rb_cv_bsdsetpgrp,
- [AC_TRY_COMPILE([#include <unistd.h>], [setpgrp(1, 1);],
- rb_cv_bsdsetpgrp=yes,
- rb_cv_bsdsetpgrp=no)])
- if test "$rb_cv_bsdsetpgrp" = yes; then
- AC_DEFINE(BSD_SETPGRP, setpgrp)
- fi
-fi
+AC_FUNC_GETPGRP
+AC_FUNC_SETPGRP
AC_CACHE_CHECK(for working strtod, rb_cv_func_strtod,
[AC_TRY_RUN([
@@ -402,7 +384,7 @@ if test "$with_dln_a_out" != yes; then
LDFLAGS="-Wl,-E"
rb_cv_dlopen=yes;;
solaris*) LDSHARED='ld -G'
- LDFLAGS="-Wl,-E"
+ test "$GCC" = yes && `$CC --print-prog-name=ld` -v 2>&1 | grep "GNU ld" > /dev/null && LDFLAGS="-Wl,-E"
rb_cv_dlopen=yes;;
sunos*) LDSHARED='ld -assert nodefinitions'
rb_cv_dlopen=yes;;
@@ -681,7 +663,7 @@ ri_prefix=
test "$program_prefix" != NONE &&
ri_prefix=$program_prefix
-ri_suffix="${MAJOR}.${MINOR}"
+ri_suffix=
test "$program_suffix" != NONE &&
ri_suffix=$program_suffix
diff --git a/eval.c b/eval.c
index 9246d6267a..7e1e6c74e1 100644
--- a/eval.c
+++ b/eval.c
@@ -6104,44 +6104,20 @@ rb_thread_fd_close(fd)
}
static void
-rb_thread_badf()
-{
- thread_t th;
- int max;
- struct timeval delay_tv;
- fd_set readfds;
-
- delay_tv.tv_sec = 0;
- delay_tv.tv_usec = 0;
- FOREACH_THREAD(th) {
- if (th->wait_for & WAIT_FD) {
- FD_ZERO(&readfds);
- FD_SET(th->fd, &readfds);
- if (select(th->fd+1, &readfds, 0, 0, &delay_tv) < 0 &&
- errno == EBADF) {
- rb_thread_ready(th);
- th->status = THREAD_TO_KILL;
- }
- }
- }
- END_FOREACH(th);
-}
-
-static void
rb_thread_deadlock()
{
- static int invoked = 0;
-
- if (invoked) return;
- invoked = 1;
+#if 1
curr_thread = main_thread;
-#if 0
th_raise_argc = 1;
th_raise_argv[0] = rb_exc_new2(rb_eFatal, "Thread: deadlock");
th_raise_file = ruby_sourcefile;
th_raise_line = ruby_sourceline;
rb_thread_restore_context(main_thread, RESTORE_RAISE);
#else
+ static int invoked = 0;
+
+ if (invoked) return;
+ invoked = 1;
rb_prohibit_interrupt = 1;
ruby_errinfo = rb_exc_new2(rb_eFatal, "Thread: deadlock");
set_backtrace(ruby_errinfo, make_backtrace());
@@ -6250,7 +6226,6 @@ rb_thread_schedule()
if (rb_trap_pending) rb_trap_exec();
switch (errno) {
case EBADF:
- rb_thread_badf();
case ENOMEM:
n = 0;
break;
@@ -6775,6 +6750,7 @@ rb_thread_create_0(fn, arg, klass)
VALUE klass;
{
thread_t th = rb_thread_alloc(klass);
+ volatile VALUE thread = th->thread;
enum thread_status status;
int state;
@@ -6794,7 +6770,7 @@ rb_thread_create_0(fn, arg, klass)
FL_SET(ruby_scope, SCOPE_SHARED);
rb_thread_save_context(curr_thread);
if (setjmp(curr_thread->context)) {
- return th->thread;
+ return thread;
}
PUSH_TAG(PROT_THREAD);
diff --git a/ext/Win32API/Win32API.c b/ext/Win32API/Win32API.c
index 86d72769b7..b57cf8101f 100644
--- a/ext/Win32API/Win32API.c
+++ b/ext/Win32API/Win32API.c
@@ -223,3 +223,9 @@ Init_Win32API()
rb_define_method(cWin32API, "call", Win32API_Call, -1);
rb_define_alias(cWin32API, "Call", "call");
}
+
+void
+Init_win32api()
+{
+ Init_Win32API();
+}
diff --git a/io.c b/io.c
index 3223c893d8..24122f9e13 100644
--- a/io.c
+++ b/io.c
@@ -1136,7 +1136,7 @@ static int
rb_open(fname, flag, mode)
char *fname;
int flag;
- mode_t mode;
+ unsigned int mode;
{
int fd;
diff --git a/process.c b/process.c
index 3318e556c2..8257812b91 100644
--- a/process.c
+++ b/process.c
@@ -782,13 +782,13 @@ proc_getpgrp(argc, argv)
VALUE *argv;
{
int pgrp;
-#ifdef BSD_GETPGRP
+#ifndef GETPGRP_VOID
VALUE vpid;
int pid;
rb_scan_args(argc, argv, "01", &vpid);
pid = NIL_P(vpid)?0:NUM2INT(vpid);
- pgrp = BSD_GETPGRP(pid);
+ pgrp = getpgrp(pid);
#else
rb_scan_args(argc, argv, "0");
pgrp = getpgrp();
@@ -803,7 +803,7 @@ proc_setpgrp(argc, argv)
VALUE *argv;
{
#ifdef HAVE_SETPGRP
-#ifdef BSD_SETPGRP
+#ifndef SETPGRP_VOID
VALUE pid, pgrp;
int ipid, ipgrp;
@@ -811,7 +811,7 @@ proc_setpgrp(argc, argv)
ipid = NIL_P(pid)?0:NUM2INT(pid);
ipgrp = NIL_P(pgrp)?0:NUM2INT(pgrp);
- if (BSD_SETPGRP(ipid, ipgrp) < 0) rb_sys_fail(0);
+ if (setpgrp(ipid, ipgrp) < 0) rb_sys_fail(0);
#else
rb_scan_args(argc, argv, "0");
if (setpgrp() < 0) rb_sys_fail(0);
diff --git a/sprintf.c b/sprintf.c
index eddb9024e5..71e5488bce 100644
--- a/sprintf.c
+++ b/sprintf.c
@@ -556,6 +556,7 @@ rb_f_sprintf(argc, argv)
case 'f':
case 'g':
+ case 'G':
case 'e':
case 'E':
{
diff --git a/version.h b/version.h
index a74ab03ef6..fadead04a2 100644
--- a/version.h
+++ b/version.h
@@ -1,2 +1,2 @@
#define RUBY_VERSION "1.3.1"
-#define VERSION_DATE "99/02/12"
+#define VERSION_DATE "99/02/15"
diff --git a/win32/ruby.def b/win32/ruby.def
index 3c6f9c3e56..6c391dcff4 100644
--- a/win32/ruby.def
+++ b/win32/ruby.def
@@ -272,11 +272,9 @@ EXPORTS
rb_io_fptr_finalize
rb_io_close
rb_io_binmode
- rb_io_mode_flags
rb_fopen
rb_fdopen
rb_io_unbuffered
- rb_io_reopen
rb_str_setter
; numeric.c
rb_num_zerodiv