mirror of
https://github.com/ruby/ruby.git
synced 2022-11-09 12:17:21 -05:00
* eval.c (THREAD_ALLOC): th->thread should be initialized to NULL.
[ruby-talk:106657] The solution was found by Guy Decoux. * file.c (rb_stat_dev_major): new methods File::Stat#dev_major and #dev_minor. [ruby-core:03195] git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@6656 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
This commit is contained in:
parent
9c54f61a50
commit
15ba9f85cf
4 changed files with 94 additions and 8 deletions
10
ChangeLog
10
ChangeLog
|
@ -3,6 +3,16 @@ Sat Jul 17 05:26:27 2004 Dave Thomas <dave@pragprog.com>
|
||||||
* lib/rdoc/diagram.rb: Incorporate Micheal Neumann's
|
* lib/rdoc/diagram.rb: Incorporate Micheal Neumann's
|
||||||
client-side imagemao patch
|
client-side imagemao patch
|
||||||
|
|
||||||
|
Sat Jul 17 01:57:03 2004 Yukihiro Matsumoto <matz@ruby-lang.org>
|
||||||
|
|
||||||
|
* eval.c (THREAD_ALLOC): th->thread should be initialized to NULL.
|
||||||
|
[ruby-talk:106657] The solution was found by Guy Decoux.
|
||||||
|
|
||||||
|
Fri Jul 16 22:30:28 2004 Michael Neumann <mneumann@ntecs.de>
|
||||||
|
|
||||||
|
* file.c (rb_stat_dev_major): new methods File::Stat#dev_major and
|
||||||
|
#dev_minor. [ruby-core:03195]
|
||||||
|
|
||||||
Fri Jul 16 11:17:38 2004 Nobuyoshi Nakada <nobu@ruby-lang.org>
|
Fri Jul 16 11:17:38 2004 Nobuyoshi Nakada <nobu@ruby-lang.org>
|
||||||
|
|
||||||
* error.c (exit_initialize): use EXIT_SUCCESS instead of 0.
|
* error.c (exit_initialize): use EXIT_SUCCESS instead of 0.
|
||||||
|
|
43
config.guess
vendored
43
config.guess
vendored
|
@ -3,7 +3,7 @@
|
||||||
# Copyright (C) 1992, 1993, 1994, 1995, 1996, 1997, 1998, 1999,
|
# Copyright (C) 1992, 1993, 1994, 1995, 1996, 1997, 1998, 1999,
|
||||||
# 2000, 2001, 2002, 2003 Free Software Foundation, Inc.
|
# 2000, 2001, 2002, 2003 Free Software Foundation, Inc.
|
||||||
|
|
||||||
timestamp='2004-01-20'
|
timestamp='2004-06-11'
|
||||||
|
|
||||||
# This file is free software; you can redistribute it and/or modify it
|
# This file is free software; you can redistribute it and/or modify it
|
||||||
# under the terms of the GNU General Public License as published by
|
# under the terms of the GNU General Public License as published by
|
||||||
|
@ -197,15 +197,24 @@ case "${UNAME_MACHINE}:${UNAME_SYSTEM}:${UNAME_RELEASE}:${UNAME_VERSION}" in
|
||||||
# CPU_TYPE-MANUFACTURER-OPERATING_SYSTEM is used.
|
# CPU_TYPE-MANUFACTURER-OPERATING_SYSTEM is used.
|
||||||
echo "${machine}-${os}${release}"
|
echo "${machine}-${os}${release}"
|
||||||
exit 0 ;;
|
exit 0 ;;
|
||||||
|
amd64:OpenBSD:*:*)
|
||||||
|
echo x86_64-unknown-openbsd${UNAME_RELEASE}
|
||||||
|
exit 0 ;;
|
||||||
amiga:OpenBSD:*:*)
|
amiga:OpenBSD:*:*)
|
||||||
echo m68k-unknown-openbsd${UNAME_RELEASE}
|
echo m68k-unknown-openbsd${UNAME_RELEASE}
|
||||||
exit 0 ;;
|
exit 0 ;;
|
||||||
arc:OpenBSD:*:*)
|
arc:OpenBSD:*:*)
|
||||||
echo mipsel-unknown-openbsd${UNAME_RELEASE}
|
echo mipsel-unknown-openbsd${UNAME_RELEASE}
|
||||||
exit 0 ;;
|
exit 0 ;;
|
||||||
|
cats:OpenBSD:*:*)
|
||||||
|
echo arm-unknown-openbsd${UNAME_RELEASE}
|
||||||
|
exit 0 ;;
|
||||||
hp300:OpenBSD:*:*)
|
hp300:OpenBSD:*:*)
|
||||||
echo m68k-unknown-openbsd${UNAME_RELEASE}
|
echo m68k-unknown-openbsd${UNAME_RELEASE}
|
||||||
exit 0 ;;
|
exit 0 ;;
|
||||||
|
luna88k:OpenBSD:*:*)
|
||||||
|
echo m88k-unknown-openbsd${UNAME_RELEASE}
|
||||||
|
exit 0 ;;
|
||||||
mac68k:OpenBSD:*:*)
|
mac68k:OpenBSD:*:*)
|
||||||
echo m68k-unknown-openbsd${UNAME_RELEASE}
|
echo m68k-unknown-openbsd${UNAME_RELEASE}
|
||||||
exit 0 ;;
|
exit 0 ;;
|
||||||
|
@ -221,9 +230,6 @@ case "${UNAME_MACHINE}:${UNAME_SYSTEM}:${UNAME_RELEASE}:${UNAME_VERSION}" in
|
||||||
mvmeppc:OpenBSD:*:*)
|
mvmeppc:OpenBSD:*:*)
|
||||||
echo powerpc-unknown-openbsd${UNAME_RELEASE}
|
echo powerpc-unknown-openbsd${UNAME_RELEASE}
|
||||||
exit 0 ;;
|
exit 0 ;;
|
||||||
pegasos:OpenBSD:*:*)
|
|
||||||
echo powerpc-unknown-openbsd${UNAME_RELEASE}
|
|
||||||
exit 0 ;;
|
|
||||||
pmax:OpenBSD:*:*)
|
pmax:OpenBSD:*:*)
|
||||||
echo mipsel-unknown-openbsd${UNAME_RELEASE}
|
echo mipsel-unknown-openbsd${UNAME_RELEASE}
|
||||||
exit 0 ;;
|
exit 0 ;;
|
||||||
|
@ -239,10 +245,24 @@ case "${UNAME_MACHINE}:${UNAME_SYSTEM}:${UNAME_RELEASE}:${UNAME_VERSION}" in
|
||||||
*:OpenBSD:*:*)
|
*:OpenBSD:*:*)
|
||||||
echo ${UNAME_MACHINE}-unknown-openbsd${UNAME_RELEASE}
|
echo ${UNAME_MACHINE}-unknown-openbsd${UNAME_RELEASE}
|
||||||
exit 0 ;;
|
exit 0 ;;
|
||||||
|
*:ekkoBSD:*:*)
|
||||||
|
echo ${UNAME_MACHINE}-unknown-ekkobsd${UNAME_RELEASE}
|
||||||
|
exit 0 ;;
|
||||||
|
macppc:MirBSD:*:*)
|
||||||
|
echo powerppc-unknown-mirbsd${UNAME_RELEASE}
|
||||||
|
exit 0 ;;
|
||||||
|
*:MirBSD:*:*)
|
||||||
|
echo ${UNAME_MACHINE}-unknown-mirbsd${UNAME_RELEASE}
|
||||||
|
exit 0 ;;
|
||||||
alpha:OSF1:*:*)
|
alpha:OSF1:*:*)
|
||||||
if test $UNAME_RELEASE = "V4.0"; then
|
case $UNAME_RELEASE in
|
||||||
|
*4.0)
|
||||||
UNAME_RELEASE=`/usr/sbin/sizer -v | awk '{print $3}'`
|
UNAME_RELEASE=`/usr/sbin/sizer -v | awk '{print $3}'`
|
||||||
fi
|
;;
|
||||||
|
*5.*)
|
||||||
|
UNAME_RELEASE=`/usr/sbin/sizer -v | awk '{print $4}'`
|
||||||
|
;;
|
||||||
|
esac
|
||||||
# According to Compaq, /usr/sbin/psrinfo has been available on
|
# According to Compaq, /usr/sbin/psrinfo has been available on
|
||||||
# OSF/1 and Tru64 systems produced since 1995. I hope that
|
# OSF/1 and Tru64 systems produced since 1995. I hope that
|
||||||
# covers most systems running today. This code pipes the CPU
|
# covers most systems running today. This code pipes the CPU
|
||||||
|
@ -280,11 +300,12 @@ case "${UNAME_MACHINE}:${UNAME_SYSTEM}:${UNAME_RELEASE}:${UNAME_VERSION}" in
|
||||||
"EV7.9 (21364A)")
|
"EV7.9 (21364A)")
|
||||||
UNAME_MACHINE="alphaev79" ;;
|
UNAME_MACHINE="alphaev79" ;;
|
||||||
esac
|
esac
|
||||||
|
# A Pn.n version is a patched version.
|
||||||
# A Vn.n version is a released version.
|
# A Vn.n version is a released version.
|
||||||
# A Tn.n version is a released field test version.
|
# A Tn.n version is a released field test version.
|
||||||
# A Xn.n version is an unreleased experimental baselevel.
|
# A Xn.n version is an unreleased experimental baselevel.
|
||||||
# 1.2 uses "1.2" for uname -r.
|
# 1.2 uses "1.2" for uname -r.
|
||||||
echo ${UNAME_MACHINE}-dec-osf`echo ${UNAME_RELEASE} | sed -e 's/^[VTX]//' | tr 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
|
echo ${UNAME_MACHINE}-dec-osf`echo ${UNAME_RELEASE} | sed -e 's/^[PVTX]//' | tr 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
|
||||||
exit 0 ;;
|
exit 0 ;;
|
||||||
Alpha*:OpenVMS:*:*)
|
Alpha*:OpenVMS:*:*)
|
||||||
echo alpha-hp-vms
|
echo alpha-hp-vms
|
||||||
|
@ -405,6 +426,9 @@ case "${UNAME_MACHINE}:${UNAME_SYSTEM}:${UNAME_RELEASE}:${UNAME_VERSION}" in
|
||||||
*:*MiNT:*:* | *:*mint:*:* | *:*TOS:*:*)
|
*:*MiNT:*:* | *:*mint:*:* | *:*TOS:*:*)
|
||||||
echo m68k-unknown-mint${UNAME_RELEASE}
|
echo m68k-unknown-mint${UNAME_RELEASE}
|
||||||
exit 0 ;;
|
exit 0 ;;
|
||||||
|
m68k:machten:*:*)
|
||||||
|
echo m68k-apple-machten${UNAME_RELEASE}
|
||||||
|
exit 0 ;;
|
||||||
powerpc:machten:*:*)
|
powerpc:machten:*:*)
|
||||||
echo powerpc-apple-machten${UNAME_RELEASE}
|
echo powerpc-apple-machten${UNAME_RELEASE}
|
||||||
exit 0 ;;
|
exit 0 ;;
|
||||||
|
@ -829,6 +853,9 @@ EOF
|
||||||
ia64:Linux:*:*)
|
ia64:Linux:*:*)
|
||||||
echo ${UNAME_MACHINE}-unknown-linux-gnu
|
echo ${UNAME_MACHINE}-unknown-linux-gnu
|
||||||
exit 0 ;;
|
exit 0 ;;
|
||||||
|
m32r*:Linux:*:*)
|
||||||
|
echo ${UNAME_MACHINE}-unknown-linux-gnu
|
||||||
|
exit 0 ;;
|
||||||
m68*:Linux:*:*)
|
m68*:Linux:*:*)
|
||||||
echo ${UNAME_MACHINE}-unknown-linux-gnu
|
echo ${UNAME_MACHINE}-unknown-linux-gnu
|
||||||
exit 0 ;;
|
exit 0 ;;
|
||||||
|
@ -1069,7 +1096,7 @@ EOF
|
||||||
M680?0:D-NIX:5.3:*)
|
M680?0:D-NIX:5.3:*)
|
||||||
echo m68k-diab-dnix
|
echo m68k-diab-dnix
|
||||||
exit 0 ;;
|
exit 0 ;;
|
||||||
M68*:*:R3V[567]*:*)
|
M68*:*:R3V[5678]*:*)
|
||||||
test -r /sysV68 && echo 'm68k-motorola-sysv' && exit 0 ;;
|
test -r /sysV68 && echo 'm68k-motorola-sysv' && exit 0 ;;
|
||||||
3[345]??:*:4.0:3.0 | 3[34]??A:*:4.0:3.0 | 3[34]??,*:*:4.0:3.0 | 3[34]??/*:*:4.0:3.0 | 4400:*:4.0:3.0 | 4850:*:4.0:3.0 | SKA40:*:4.0:3.0 | SDS2:*:4.0:3.0 | SHG2:*:4.0:3.0)
|
3[345]??:*:4.0:3.0 | 3[34]??A:*:4.0:3.0 | 3[34]??,*:*:4.0:3.0 | 3[34]??/*:*:4.0:3.0 | 4400:*:4.0:3.0 | 4850:*:4.0:3.0 | SKA40:*:4.0:3.0 | SDS2:*:4.0:3.0 | SHG2:*:4.0:3.0)
|
||||||
OS_REL=''
|
OS_REL=''
|
||||||
|
|
1
eval.c
1
eval.c
|
@ -11227,6 +11227,7 @@ rb_thread_group(thread)
|
||||||
th->priority = 0;\
|
th->priority = 0;\
|
||||||
th->thgroup = thgroup_default;\
|
th->thgroup = thgroup_default;\
|
||||||
th->locals = 0;\
|
th->locals = 0;\
|
||||||
|
th->thread = 0;\
|
||||||
} while (0)
|
} while (0)
|
||||||
|
|
||||||
static rb_thread_t
|
static rb_thread_t
|
||||||
|
|
48
file.c
48
file.c
|
@ -217,6 +217,52 @@ rb_stat_dev(self)
|
||||||
return INT2NUM(get_stat(self)->st_dev);
|
return INT2NUM(get_stat(self)->st_dev);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
/*
|
||||||
|
* call-seq:
|
||||||
|
* stat.dev_major => fixnum
|
||||||
|
*
|
||||||
|
* Returns the major part of <code>File_Stat#dev</code> or
|
||||||
|
* <code>nil</code>.
|
||||||
|
*
|
||||||
|
* File.stat("/dev/fd1").dev_major #=> 2
|
||||||
|
* File.stat("/dev/tty").dev_major #=> 5
|
||||||
|
*/
|
||||||
|
|
||||||
|
static VALUE
|
||||||
|
rb_stat_dev_major(self)
|
||||||
|
VALUE self;
|
||||||
|
{
|
||||||
|
#if defined(major)
|
||||||
|
long dev = get_stat(self)->st_dev;
|
||||||
|
return ULONG2NUM(major(dev));
|
||||||
|
#else
|
||||||
|
return Qnil;
|
||||||
|
#endif
|
||||||
|
}
|
||||||
|
|
||||||
|
/*
|
||||||
|
* call-seq:
|
||||||
|
* stat.dev_minor => fixnum
|
||||||
|
*
|
||||||
|
* Returns the minor part of <code>File_Stat#dev</code> or
|
||||||
|
* <code>nil</code>.
|
||||||
|
*
|
||||||
|
* File.stat("/dev/fd1").dev_minor #=> 1
|
||||||
|
* File.stat("/dev/tty").dev_minor #=> 0
|
||||||
|
*/
|
||||||
|
|
||||||
|
static VALUE
|
||||||
|
rb_stat_dev_minor(self)
|
||||||
|
VALUE self;
|
||||||
|
{
|
||||||
|
#if defined(minor)
|
||||||
|
long dev = get_stat(self)->st_dev;
|
||||||
|
return ULONG2NUM(minor(dev));
|
||||||
|
#else
|
||||||
|
return Qnil;
|
||||||
|
#endif
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
/*
|
/*
|
||||||
* call-seq:
|
* call-seq:
|
||||||
|
@ -4319,6 +4365,8 @@ Init_File()
|
||||||
rb_define_method(rb_cStat, "<=>", rb_stat_cmp, 1);
|
rb_define_method(rb_cStat, "<=>", rb_stat_cmp, 1);
|
||||||
|
|
||||||
rb_define_method(rb_cStat, "dev", rb_stat_dev, 0);
|
rb_define_method(rb_cStat, "dev", rb_stat_dev, 0);
|
||||||
|
rb_define_method(rb_cStat, "dev_major", rb_stat_dev_major, 0);
|
||||||
|
rb_define_method(rb_cStat, "dev_minor", rb_stat_dev_minor, 0);
|
||||||
rb_define_method(rb_cStat, "ino", rb_stat_ino, 0);
|
rb_define_method(rb_cStat, "ino", rb_stat_ino, 0);
|
||||||
rb_define_method(rb_cStat, "mode", rb_stat_mode, 0);
|
rb_define_method(rb_cStat, "mode", rb_stat_mode, 0);
|
||||||
rb_define_method(rb_cStat, "nlink", rb_stat_nlink, 0);
|
rb_define_method(rb_cStat, "nlink", rb_stat_nlink, 0);
|
||||||
|
|
Loading…
Reference in a new issue