summaryrefslogtreecommitdiff
path: root/file.c
diff options
context:
space:
mode:
authornobu <nobu@b2dd03c8-39d4-4d8f-98ff-823fe69b080e>2009-03-19 09:49:51 +0000
committernobu <nobu@b2dd03c8-39d4-4d8f-98ff-823fe69b080e>2009-03-19 09:49:51 +0000
commitb7800329d3070a4fb9f9dbdbe8b411c5f628f942 (patch)
tree3435b7b20064626498f2f690e3303138a3f7cc61 /file.c
parent0ff55a1bd21f61f22fd2d176abbe5663372a6871 (diff)
* configure.in (RUBY_CHECK_SIZEOF): allows qualified name.
* configure.in (RUBY_REPLACE_TYPE): checks more strictly. * configure.in (struct stat.st_size, struct stat.st_blocks), (struct stat.st_ino): check for size. * lib/mkmf.rb (check_sizeof): allows qualified name. * file.c (rb_stat_ino, rb_stat_blocks): check by size. git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@23005 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
Diffstat (limited to 'file.c')
-rw-r--r--file.c4
1 files changed, 2 insertions, 2 deletions
diff --git a/file.c b/file.c
index 5ad7665bbf..3a9472add8 100644
--- a/file.c
+++ b/file.c
@@ -310,7 +310,7 @@ rb_stat_dev_minor(VALUE self)
static VALUE
rb_stat_ino(VALUE self)
{
-#ifdef HUGE_ST_INO
+#if SIZEOF_STRUCT_STAT_ST_INO > SIZEOF_LONG
return ULL2NUM(get_stat(self)->st_ino);
#else
return ULONG2NUM(get_stat(self)->st_ino);
@@ -503,7 +503,7 @@ static VALUE
rb_stat_blocks(VALUE self)
{
#ifdef HAVE_STRUCT_STAT_ST_BLOCKS
-# ifdef HUGE_STRUCT_STAT_ST_BLOCKS
+# if SIZEOF_STRUCT_STAT_ST_BLOCKS > SIZEOF_LONG
return ULL2NUM(get_stat(self)->st_blocks);
# else
return ULONG2NUM(get_stat(self)->st_blocks);