summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorakr <akr@b2dd03c8-39d4-4d8f-98ff-823fe69b080e>2015-06-16 10:22:16 +0000
committerakr <akr@b2dd03c8-39d4-4d8f-98ff-823fe69b080e>2015-06-16 10:22:16 +0000
commit96593ece29ad71f0b3545df730f566199a8ec4a0 (patch)
treea850065fe1d5072ecfaa1253be68959fd6bf04cc
parente4d0f54b1b0e3391eabbb961530beaffcbc7879a (diff)
* ext/rbconfig/sizeof/extconf.rb: Check several types defined in C99
and x86_64 ABI. * template/sizes.c.tmpl: Relax a pattern for types. git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@50920 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
-rw-r--r--ChangeLog7
-rw-r--r--ext/rbconfig/sizeof/extconf.rb18
-rw-r--r--template/sizes.c.tmpl2
3 files changed, 25 insertions, 2 deletions
diff --git a/ChangeLog b/ChangeLog
index 4d09ffa..ba72378 100644
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,3 +1,10 @@
+Tue Jun 16 19:19:53 2015 Tanaka Akira <akr@fsij.org>
+
+ * ext/rbconfig/sizeof/extconf.rb: Check several types defined in C99
+ and x86_64 ABI.
+
+ * template/sizes.c.tmpl: Relax a pattern for types.
+
Tue Jun 16 17:37:01 2015 Koichi Sasada <ko1@atdot.net>
* test/objspace/test_objspace.rb: relax pattern because uncollectible
diff --git a/ext/rbconfig/sizeof/extconf.rb b/ext/rbconfig/sizeof/extconf.rb
index 66f7d77..3006436 100644
--- a/ext/rbconfig/sizeof/extconf.rb
+++ b/ext/rbconfig/sizeof/extconf.rb
@@ -1,5 +1,6 @@
$srcs = %w[sizes.c]
$distcleanfiles.concat($srcs)
+
check_sizeof('int8_t')
check_sizeof('int16_t')
check_sizeof('int32_t')
@@ -19,5 +20,20 @@ check_sizeof('wchar_t')
check_sizeof('wint_t', %w[wctype.h])
check_sizeof('wctrans_t', %w[wctype.h])
check_sizeof('wctype_t', %w[wctype.h])
-check_sizeof('__int128')
+check_sizeof('_Bool')
+check_sizeof('long double')
+check_sizeof('float _Complex')
+check_sizeof('double _Complex')
+check_sizeof('long double _Complex')
+check_sizeof('float _Imaginary')
+check_sizeof('double _Imaginary')
+check_sizeof('long double _Imaginary')
+check_sizeof('__int128') # x86_64 ABI (optional)
+check_sizeof('__float128') # x86_64 ABI (optional)
+check_sizeof('_Decimal32') # x86_64 ABI
+check_sizeof('_Decimal64') # x86_64 ABI
+check_sizeof('_Decimal128') # x86_64 ABI
+check_sizeof('__m64') # x86_64 ABI (optional)
+check_sizeof('__m128') # x86_64 ABI (optional)
+
create_makefile('rbconfig/sizeof')
diff --git a/template/sizes.c.tmpl b/template/sizes.c.tmpl
index 045e69e..146e209 100644
--- a/template/sizes.c.tmpl
+++ b/template/sizes.c.tmpl
@@ -7,7 +7,7 @@ class String
end
end
types = ARGF.grep(/^\s*RUBY_CHECK_SIZEOF\((\w[^\[\],#]*)[^#]*\)|
- ^\s*check_sizeof\('(\w+)'/x) {$+}
+ ^\s*check_sizeof\('(.+?)'/x) {$+}
conditions = {
"long long" => 'defined(HAVE_TRUE_LONG_LONG)',
}