* file.c (rb_stat_mode): generalized st_mode mask.
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@18365 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
This commit is contained in:
parent
f2aa0e5b0c
commit
9a7def6ea9
@ -1,3 +1,7 @@
|
|||||||
|
Tue Aug 5 14:19:22 2008 Nobuyoshi Nakada <nobu@ruby-lang.org>
|
||||||
|
|
||||||
|
* file.c (rb_stat_mode): generalized st_mode mask.
|
||||||
|
|
||||||
Tue Aug 5 12:43:47 2008 Nobuyoshi Nakada <nobu@ruby-lang.org>
|
Tue Aug 5 12:43:47 2008 Nobuyoshi Nakada <nobu@ruby-lang.org>
|
||||||
|
|
||||||
* io.c (retry_sendfile, retry_read): ENOSYS and EWOULDBLOCK are not
|
* io.c (retry_sendfile, retry_read): ENOSYS and EWOULDBLOCK are not
|
||||||
|
8
file.c
8
file.c
@ -233,6 +233,8 @@ rb_stat_cmp(VALUE self, VALUE other)
|
|||||||
return Qnil;
|
return Qnil;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
#define ST2UINT(val) ((val) & ~(~1UL << (sizeof(val) * CHAR_BIT - 1)))
|
||||||
|
|
||||||
/*
|
/*
|
||||||
* call-seq:
|
* call-seq:
|
||||||
* stat.dev => fixnum
|
* stat.dev => fixnum
|
||||||
@ -330,11 +332,7 @@ rb_stat_ino(VALUE self)
|
|||||||
static VALUE
|
static VALUE
|
||||||
rb_stat_mode(VALUE self)
|
rb_stat_mode(VALUE self)
|
||||||
{
|
{
|
||||||
#ifdef __BORLANDC__
|
return UINT2NUM(ST2UINT(get_stat(self)->st_mode));
|
||||||
return UINT2NUM((unsigned short)(get_stat(self)->st_mode));
|
|
||||||
#else
|
|
||||||
return UINT2NUM(get_stat(self)->st_mode);
|
|
||||||
#endif
|
|
||||||
}
|
}
|
||||||
|
|
||||||
/*
|
/*
|
||||||
|
Loading…
x
Reference in New Issue
Block a user