diff options
author | nobu <nobu@b2dd03c8-39d4-4d8f-98ff-823fe69b080e> | 2010-12-03 10:48:12 +0000 |
---|---|---|
committer | nobu <nobu@b2dd03c8-39d4-4d8f-98ff-823fe69b080e> | 2010-12-03 10:48:12 +0000 |
commit | 7bb94fa3f59d37f4650b0c32111c7917a322ca38 (patch) | |
tree | 993ecbdb3e7eed8ae578feeba4c38ac7c265c6a8 /lib | |
parent | 693a6cde25fe96ea1e8bede5ebc44b39ad178807 (diff) |
* lib/mkmf.rb (check_sizeof): should return integer always.
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/branches/ruby_1_8@30068 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
Diffstat (limited to 'lib')
-rw-r--r-- | lib/mkmf.rb | 9 |
1 files changed, 1 insertions, 8 deletions
diff --git a/lib/mkmf.rb b/lib/mkmf.rb index b259f00d25..d0cd8c93bb 100644 --- a/lib/mkmf.rb +++ b/lib/mkmf.rb @@ -1006,14 +1006,7 @@ def check_sizeof(type, headers = nil, opts = "", &b) x ? super : "failed" end checking_for checking_message("size of #{type}", headers), fmt do - if UNIVERSAL_INTS.include?(type) - type - elsif size = UNIVERSAL_INTS.find {|t| - try_static_assert("#{expr} == sizeof(#{t})", prelude, opts, &b) - } - $defs.push(format("-DSIZEOF_%s=SIZEOF_%s", type.tr_cpp, size.tr_cpp)) - size - elsif size = try_constant(expr, prelude, opts, &b) + if size = try_constant(expr, prelude, opts, &b) $defs.push(format("-DSIZEOF_%s=%s", type.tr_cpp, size)) size end |