diff options
author | shyouhei <shyouhei@b2dd03c8-39d4-4d8f-98ff-823fe69b080e> | 2018-02-17 09:51:23 +0000 |
---|---|---|
committer | shyouhei <shyouhei@b2dd03c8-39d4-4d8f-98ff-823fe69b080e> | 2018-02-17 09:51:23 +0000 |
commit | 1aaeeb326e754c5c5db83fbf35f780f729a9dfed (patch) | |
tree | 965d2c17a5c7d113e86d148c62404744f82dec3b /test/fiddle/test_import.rb | |
parent | 131dc83145fb72da00af94490e630b0339513fb2 (diff) |
long long is a C99ism
so SIZEOF_LONG_LONG is not always available.
We have to check its defined?-ness before using.
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@62450 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
Diffstat (limited to 'test/fiddle/test_import.rb')
-rw-r--r-- | test/fiddle/test_import.rb | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/test/fiddle/test_import.rb b/test/fiddle/test_import.rb index ff16d17d50..e08853da14 100644 --- a/test/fiddle/test_import.rb +++ b/test/fiddle/test_import.rb @@ -64,7 +64,7 @@ module Fiddle assert_equal(SIZEOF_VOIDP, LIBC.sizeof("FILE*")) assert_equal(LIBC::MyStruct.size(), LIBC.sizeof(LIBC::MyStruct)) assert_equal(LIBC::MyStruct.size(), LIBC.sizeof(LIBC::MyStruct.malloc())) - assert_equal(SIZEOF_LONG_LONG, LIBC.sizeof("long long")) + assert_equal(SIZEOF_LONG_LONG, LIBC.sizeof("long long")) if defined?(SIZEOF_LONG_LONG) end Fiddle.constants.grep(/\ATYPE_(?!VOID\z)(.*)/) do |