summaryrefslogtreecommitdiff
path: root/ext/rbconfig/sizeof
diff options
context:
space:
mode:
authornobu <nobu@b2dd03c8-39d4-4d8f-98ff-823fe69b080e>2016-04-25 05:39:12 +0000
committernobu <nobu@b2dd03c8-39d4-4d8f-98ff-823fe69b080e>2016-04-25 05:39:12 +0000
commita7dd0947916d84e2179b164a64da644e755a4e90 (patch)
treee83df381ed2457b103acd40d2d44f0f1f792d840 /ext/rbconfig/sizeof
parent75a5dcf170049bcae15b18350ff7c7950f598f01 (diff)
rbconfig/sizeof: calculate at compilation time
* ext/rbconfig/sizeof/extconf.rb: just check the existence of each types, to reduce configuration time, especially cross-compiling. * template/sizes.c.tmpl: calculate sizes of checked types at compilation time. git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@54759 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
Diffstat (limited to 'ext/rbconfig/sizeof')
-rw-r--r--ext/rbconfig/sizeof/extconf.rb60
1 files changed, 30 insertions, 30 deletions
diff --git a/ext/rbconfig/sizeof/extconf.rb b/ext/rbconfig/sizeof/extconf.rb
index b7cc876..8cb16ca 100644
--- a/ext/rbconfig/sizeof/extconf.rb
+++ b/ext/rbconfig/sizeof/extconf.rb
@@ -2,35 +2,35 @@
$srcs = %w[sizes.c]
$distcleanfiles.concat($srcs)
-check_sizeof('int_least8_t')
-check_sizeof('int_least16_t')
-check_sizeof('int_least32_t')
-check_sizeof('int_least64_t')
-check_sizeof('int_fast8_t')
-check_sizeof('int_fast16_t')
-check_sizeof('int_fast32_t')
-check_sizeof('int_fast64_t')
-check_sizeof('intmax_t')
-check_sizeof('sig_atomic_t', %w[signal.h])
-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('_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)
-check_sizeof('__float80') # gcc x86
+have_type('int_least8_t')
+have_type('int_least16_t')
+have_type('int_least32_t')
+have_type('int_least64_t')
+have_type('int_fast8_t')
+have_type('int_fast16_t')
+have_type('int_fast32_t')
+have_type('int_fast64_t')
+have_type('intmax_t')
+have_type('sig_atomic_t', %w[signal.h])
+have_type('wchar_t')
+have_type('wint_t', %w[wctype.h])
+have_type('wctrans_t', %w[wctype.h])
+have_type('wctype_t', %w[wctype.h])
+have_type('_Bool')
+have_type('long double')
+have_type('float _Complex')
+have_type('double _Complex')
+have_type('long double _Complex')
+have_type('float _Imaginary')
+have_type('double _Imaginary')
+have_type('long double _Imaginary')
+have_type('__int128') # x86_64 ABI (optional)
+have_type('__float128') # x86_64 ABI (optional)
+have_type('_Decimal32') # x86_64 ABI
+have_type('_Decimal64') # x86_64 ABI
+have_type('_Decimal128') # x86_64 ABI
+have_type('__m64') # x86_64 ABI (optional)
+have_type('__m128') # x86_64 ABI (optional)
+have_type('__float80') # gcc x86
create_makefile('rbconfig/sizeof')