Permalink
Browse files

2000-03-07

git-svn-id: http://svn.ruby-lang.org/repos/ruby/trunk@634 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
  • Loading branch information...
matz committed Mar 7, 2000
1 parent 37a8fef commit f0f206d828e37bf452f53fe63f729d16b42df2c9
Showing with 190 additions and 316 deletions.
  1. +22 −0 ChangeLog
  2. +2 −2 bignum.c
  3. +1 −4 class.c
  4. +32 −44 configure
  5. +7 −9 configure.in
  6. +3 −6 dir.c
  7. +1 −5 dln.c
  8. +6 −18 error.c
  9. +1 −7 eval.c
  10. +0 −3 ext/dbm/dbm.c
  11. +0 −3 ext/gdbm/gdbm.c
  12. +0 −3 ext/sdbm/init.c
  13. +0 −7 ext/socket/socket.c
  14. +4 −27 file.c
  15. +2 −3 gc.c
  16. +0 −4 hash.c
  17. +3 −57 io.c
  18. +17 −17 lib/e2mmap.rb
  19. +0 −2 lib/matrix.rb
  20. +7 −1 marshal.c
  21. +5 −5 numeric.c
  22. +42 −5 object.c
  23. +1 −1 parse.y
  24. +1 −31 process.c
  25. +1 −1 range.c
  26. +1 −0 re.c
  27. +1 −6 ruby.c
  28. +17 −2 ruby.h
  29. +5 −14 signal.c
  30. +0 −4 sprintf.c
  31. +0 −4 st.c
  32. +1 −1 string.c
  33. +0 −4 struct.c
  34. +1 −8 time.c
  35. +2 −4 util.c
  36. +4 −4 version.h
View
@@ -1,5 +1,27 @@
+Tue Mar 7 01:44:27 2000 Yukihiro Matsumoto <matz@netlab.co.jp>
+
+ * io.c (set_stdin): simplified procedure, allows $stdin = DATA;
+ experimental.
+
+ * io.c (set_outfile): ditto.
+
+ * re.c (Init_Regexp): new method Regexp#last_match added; it's a
+ replacement for $~.
+
+ * configure.in (DEFAULT_KCODE): KCODE_NONE should be the default.
+
+ * dir.c (dir_s_rmdir): should return 0 on success.
+
+ * signal.c: remove CWGUSI support.
+
Mon Mar 6 12:28:37 2000 Yukihiro Matsumoto <matz@netlab.co.jp>
+ * marshal.c (w_symbol): support symbol object.
+
+ * util.c: make symbol as separated class.
+
+ * error.c (Init_Exception): new exception RangeError.
+
* ext/socket/socket.c (ip_addrsetup): should check length of hostname.
* ext/socket/socket.c (ip_addrsetup): check newline at the end of
View
@@ -404,7 +404,7 @@ big2ulong(x, type)
USHORT *ds;
if (len > sizeof(long)/sizeof(USHORT))
- rb_raise(rb_eArgError, "bignum too big to convert into `%s'", type);
+ rb_raise(rb_eRangeError, "bignum too big to convert into `%s'", type);
ds = BDIGITS(x);
num = 0;
while (len--) {
@@ -430,7 +430,7 @@ rb_big2long(x)
unsigned long num = big2ulong(x, "int");
if ((long)num < 0) {
- rb_raise(rb_eArgError, "bignum too big to convert into `int'");
+ rb_raise(rb_eRangeError, "bignum too big to convert into `int'");
}
if (!RBIGNUM(x)->sign) return -(long)num;
return num;
View
@@ -15,10 +15,6 @@
#include "st.h"
#include <ctype.h>
-#ifdef USE_CWGUSI
-#include <stdio.h>
-#endif
-
extern st_table *rb_class_tbl;
VALUE
@@ -511,6 +507,7 @@ rb_singleton_class(obj)
VALUE obj;
{
VALUE klass;
+
if (rb_special_const_p(obj)) {
rb_raise(rb_eTypeError, "can't define singleton");
}
View
@@ -2820,7 +2820,7 @@ else
#include "confdefs.h"
#include <alloca.h>
int main() {
-char *p = alloca(2 * sizeof(int));
+void *p = alloca(2 * sizeof(int));
; return 0; }
EOF
if { (eval echo configure:2827: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
@@ -4205,35 +4205,24 @@ EOF
fi
+DEFAULT_KCODE="KCODE_NONE"
# Check whether --with-default-kcode or --without-default-kcode was given.
if test "${with_default_kcode+set}" = set; then
withval="$with_default_kcode"
case $withval in
- utf8) cat >> confdefs.h <<\EOF
-#define DEFAULT_KCODE KCODE_UTF8
-EOF
-
- DEFAULT_KCODE="KCODE_UTF8";;
- euc) cat >> confdefs.h <<\EOF
-#define DEFAULT_KCODE KCODE_EUC
-EOF
-
- DEFAULT_KCODE="KCODE_EUC";;
- sjis) cat >> confdefs.h <<\EOF
-#define DEFAULT_KCODE KCODE_SJIS
-EOF
-
- DEFAULT_KCODE="KCODE_SJIS";;
- none) cat >> confdefs.h <<\EOF
-#define DEFAULT_KCODE KCODE_NONE
-EOF
-
- DEFAULT_KCODE="KCODE_NONE";;
+ utf8) DEFAULT_KCODE="KCODE_UTF8";;
+ euc) DEFAULT_KCODE="KCODE_EUC";;
+ sjis) DEFAULT_KCODE="KCODE_SJIS";;
+ none) DEFAULT_KCODE="KCODE_NONE";;
*) echo "configure: warning: $withval is not valid kcode; ignored" 1>&2;;
esac
fi
+cat >> confdefs.h <<EOF
+#define DEFAULT_KCODE $DEFAULT_KCODE
+EOF
+
# Check whether --with-dln-a-out or --without-dln-a-out was given.
if test "${with_dln_a_out+set}" = set; then
@@ -4250,15 +4239,15 @@ fi
echo $ac_n "checking whether ELF binaries are produced""... $ac_c" 1>&6
-echo "configure:4254: checking whether ELF binaries are produced" >&5
+echo "configure:4243: 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
if test "$cross_compiling" = yes; then
rb_cv_binary_elf=yes
else
cat > conftest.$ac_ext <<EOF
-#line 4262 "configure"
+#line 4251 "configure"
#include "confdefs.h"
/* Test for whether ELF binaries are produced */
@@ -4278,7 +4267,7 @@ main() {
}
EOF
-if { (eval echo configure:4282: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null
+if { (eval echo configure:4271: \"$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
@@ -4326,7 +4315,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:4330: checking whether OS depend dynamic link works" >&5
+echo "configure:4319: checking whether OS depend dynamic link works" >&5
if test "$GCC" = yes; then
case "$target_os" in
nextstep*) ;;
@@ -4445,12 +4434,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:4449: checking whether matz's dln works" >&5
+echo "configure:4438: 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 4454 "configure"
+#line 4443 "configure"
#include "confdefs.h"
#define USE_DLN_A_OUT
@@ -4460,7 +4449,7 @@ int main() {
; return 0; }
EOF
-if { (eval echo configure:4464: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
+if { (eval echo configure:4453: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
rm -rf conftest*
rb_cv_dln_a_out=yes
else
@@ -4567,15 +4556,15 @@ fi
case "$target_os" in
human*)
echo $ac_n "checking for _harderr in -lsignal""... $ac_c" 1>&6
-echo "configure:4571: checking for _harderr in -lsignal" >&5
+echo "configure:4560: 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
else
ac_save_LIBS="$LIBS"
LIBS="-lsignal $LIBS"
cat > conftest.$ac_ext <<EOF
-#line 4579 "configure"
+#line 4568 "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
@@ -4586,7 +4575,7 @@ int main() {
_harderr()
; return 0; }
EOF
-if { (eval echo configure:4590: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
+if { (eval echo configure:4579: \"$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
@@ -4614,15 +4603,15 @@ else
fi
echo $ac_n "checking for hmemset in -lhmem""... $ac_c" 1>&6
-echo "configure:4618: checking for hmemset in -lhmem" >&5
+echo "configure:4607: 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
else
ac_save_LIBS="$LIBS"
LIBS="-lhmem $LIBS"
cat > conftest.$ac_ext <<EOF
-#line 4626 "configure"
+#line 4615 "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
@@ -4633,7 +4622,7 @@ int main() {
hmemset()
; return 0; }
EOF
-if { (eval echo configure:4637: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
+if { (eval echo configure:4626: \"$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
@@ -4663,12 +4652,12 @@ fi
for ac_func in select gettimeofday
do
echo $ac_n "checking for $ac_func""... $ac_c" 1>&6
-echo "configure:4667: checking for $ac_func" >&5
+echo "configure:4656: 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 4672 "configure"
+#line 4661 "configure"
#include "confdefs.h"
/* System header to define __stub macros and hopefully few prototypes,
which can conflict with char $ac_func(); below. */
@@ -4691,7 +4680,7 @@ $ac_func();
; return 0; }
EOF
-if { (eval echo configure:4695: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
+if { (eval echo configure:4684: \"$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
@@ -4716,15 +4705,15 @@ fi
done
echo $ac_n "checking whether PD libc _dtos18 fail to convert big number""... $ac_c" 1>&6
-echo "configure:4720: checking whether PD libc _dtos18 fail to convert big number" >&5
+echo "configure:4709: 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
if test "$cross_compiling" = yes; then
rb_cv_missing__dtos18=no
else
cat > conftest.$ac_ext <<EOF
-#line 4728 "configure"
+#line 4717 "configure"
#include "confdefs.h"
#include <stdio.h>
@@ -4736,7 +4725,7 @@ main ()
}
EOF
-if { (eval echo configure:4740: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null
+if { (eval echo configure:4729: \"$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
@@ -4758,15 +4747,15 @@ EOF
fi
echo $ac_n "checking whether PD libc fconvert fail to round""... $ac_c" 1>&6
-echo "configure:4762: checking whether PD libc fconvert fail to round" >&5
+echo "configure:4751: 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
if test "$cross_compiling" = yes; then
rb_cv_missing_fconvert=no
else
cat > conftest.$ac_ext <<EOF
-#line 4770 "configure"
+#line 4759 "configure"
#include "confdefs.h"
#include <stdio.h>
@@ -4779,7 +4768,7 @@ main ()
}
EOF
-if { (eval echo configure:4783: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null
+if { (eval echo configure:4772: \"$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
@@ -5213,7 +5202,6 @@ s%@EXEEXT@%$EXEEXT%g
s%@OBJEXT@%$OBJEXT%g
s%@LIBOBJS@%$LIBOBJS%g
s%@ALLOCA@%$ALLOCA%g
-s%@DEFAULT_KCODE@%$DEFAULT_KCODE%g
s%@XLDFLAGS@%$XLDFLAGS%g
s%@DLDFLAGS@%$DLDFLAGS%g
s%@STATIC@%$STATIC%g
View
@@ -323,20 +323,18 @@ else
fi
dnl default value for $KANJI
-AC_SUBST(DEFAULT_KCODE)
+DEFAULT_KCODE="KCODE_NONE"
+
AC_ARG_WITH(default-kcode,
[--with-default-kcode=CODE specify default value for \$KCODE (utf8|euc|sjis|none)],
[case $withval in
- utf8) AC_DEFINE(DEFAULT_KCODE, KCODE_UTF8)
- DEFAULT_KCODE="KCODE_UTF8";;
- euc) AC_DEFINE(DEFAULT_KCODE, KCODE_EUC)
- DEFAULT_KCODE="KCODE_EUC";;
- sjis) AC_DEFINE(DEFAULT_KCODE, KCODE_SJIS)
- DEFAULT_KCODE="KCODE_SJIS";;
- none) AC_DEFINE(DEFAULT_KCODE, KCODE_NONE)
- DEFAULT_KCODE="KCODE_NONE";;
+ utf8) DEFAULT_KCODE="KCODE_UTF8";;
+ euc) DEFAULT_KCODE="KCODE_EUC";;
+ sjis) DEFAULT_KCODE="KCODE_SJIS";;
+ none) DEFAULT_KCODE="KCODE_NONE";;
*) AC_MSG_WARN($withval is not valid kcode; ignored);;
esac])
+AC_DEFINE_UNQUOTED(DEFAULT_KCODE, $DEFAULT_KCODE)
dnl wheather use dln_a_out ot not
AC_ARG_WITH(dln-a-out,
View
9 dir.c
@@ -48,9 +48,6 @@
#endif
#include <errno.h>
-#ifdef USE_CWGUSI
-# include <sys/errno.h>
-#endif
#ifndef HAVE_STDLIB_H
char *getenv();
@@ -430,7 +427,7 @@ static VALUE
dir_s_chroot(dir, path)
VALUE dir, path;
{
-#if !defined(DJGPP) && !defined(NT) && !defined(__human68k__) && !defined(USE_CWGUSI) && !defined(__BEOS__) && !defined(__EMX__) && !defined(riscos)
+#if !defined(DJGPP) && !defined(NT) && !defined(__human68k__) && !defined(__BEOS__) && !defined(__EMX__) && !defined(riscos)
rb_secure(2);
Check_SafeStr(path);
@@ -462,7 +459,7 @@ dir_s_mkdir(argc, argv, obj)
Check_SafeStr(path);
rb_secure(2);
-#if !defined(NT) && !defined(USE_CWGUSI)
+#if !defined(NT)
if (mkdir(RSTRING(path)->ptr, mode) == -1)
rb_sys_fail(RSTRING(path)->ptr);
#else
@@ -482,7 +479,7 @@ dir_s_rmdir(obj, dir)
if (rmdir(RSTRING(dir)->ptr) < 0)
rb_sys_fail(RSTRING(dir)->ptr);
- return Qtrue;
+ return INT2FIX(0);
}
/* Return nonzero if S has any special globbing chars in it. */
View
6 dln.c
@@ -37,11 +37,7 @@ void *xrealloc();
#endif
#include <stdio.h>
-#ifndef NT
-# ifndef USE_CWGUSI
-# include <sys/file.h>
-# endif
-#else
+#ifdef NT
#include "missing/file.h"
#endif
#include <sys/types.h>
Oops, something went wrong.

0 comments on commit f0f206d

Please sign in to comment.