summaryrefslogtreecommitdiffstats
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
commit8275198354c9bd6908eb7cc2135e30745842da2f (patch)
tree3435b7b20064626498f2f690e3303138a3f7cc61 /file.c
parent3ee0408853c2376a5dde876ae2e5712a73bbd63e (diff)
downloadruby-8275198354c9bd6908eb7cc2135e30745842da2f.tar.gz
ruby-8275198354c9bd6908eb7cc2135e30745842da2f.tar.xz
ruby-8275198354c9bd6908eb7cc2135e30745842da2f.zip
* 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: http://svn.ruby-lang.org/repos/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 5ad7665bb..3a9472add 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);