summaryrefslogtreecommitdiff
path: root/file.c
diff options
context:
space:
mode:
authornobu <nobu@b2dd03c8-39d4-4d8f-98ff-823fe69b080e>2003-08-15 03:01:52 +0000
committernobu <nobu@b2dd03c8-39d4-4d8f-98ff-823fe69b080e>2003-08-15 03:01:52 +0000
commit625c1361e368f6f13f303de0310e6625d7b5296b (patch)
treee119ce31630c3186aa666ed4973f7fd22f4fc9a0 /file.c
parentbefd57c7ea203d37531798dda95eaf488ef74dee (diff)
* configure.in (HUGE_ST_INO): check whether struct stat.st_ino
is larger than long. [ruby-dev:21194] http://www.geocities.co.jp/SiliconValley-PaloAlto/1409/ruby/beos.html * error.c (syserr_eqq): errno might exceed Fixnum limit. * error.c (Init_Exception): moved base initialization from init_syserr(). * inits.c (rb_call_inits): postpone initializing errnos until Bignum is available. * ext/curses/curses.c (_XOPEN_SOURCE_EXTENDED): needed to let keyname() and so on be declared. * ext/curses/curses.c (curses_resizeterm, window_resize): arguments conflicted with macros in term.h. * ext/curses/curses.c (Curses module methods): ensure initialized. [ruby-dev:21191] git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@4392 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
Diffstat (limited to 'file.c')
-rw-r--r--file.c6
1 files changed, 5 insertions, 1 deletions
diff --git a/file.c b/file.c
index 12d71f0bf3..b159256f65 100644
--- a/file.c
+++ b/file.c
@@ -161,7 +161,11 @@ static VALUE
rb_stat_ino(self)
VALUE self;
{
+#ifdef HUGE_ST_INO
+ return ULL2NUM(get_stat(self)->st_ino);
+#else
return ULONG2NUM(get_stat(self)->st_ino);
+#endif
}
static VALUE
@@ -171,7 +175,7 @@ rb_stat_mode(self)
#ifdef __BORLANDC__
return UINT2NUM((unsigned short)(get_stat(self)->st_mode));
#else
- return UINT2NUM(get_stat(self)->st_mode);
+ return UINT2NUM(get_stat(self)->st_mode);
#endif
}