ruby-changes:38839
From: akr <ko1@a...>
Date: Tue, 16 Jun 2015 19:22:51 +0900 (JST)
Subject: [ruby-changes:38839] akr:r50920 (trunk): * ext/rbconfig/sizeof/extconf.rb: Check several types defined in C99
akr 2015-06-16 19:22:16 +0900 (Tue, 16 Jun 2015) New Revision: 50920 http://svn.ruby-lang.org/cgi-bin/viewvc.cgi?view=revision&revision=50920 Log: * ext/rbconfig/sizeof/extconf.rb: Check several types defined in C99 and x86_64 ABI. * template/sizes.c.tmpl: Relax a pattern for types. Modified files: trunk/ChangeLog trunk/ext/rbconfig/sizeof/extconf.rb trunk/template/sizes.c.tmpl Index: ChangeLog =================================================================== --- ChangeLog (revision 50919) +++ ChangeLog (revision 50920) @@ -1,3 +1,10 @@ https://github.com/ruby/ruby/blob/trunk/ChangeLog#L1 +Tue Jun 16 19:19:53 2015 Tanaka Akira <akr@f...> + + * 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@a...> * test/objspace/test_objspace.rb: relax pattern because uncollectible Index: ext/rbconfig/sizeof/extconf.rb =================================================================== --- ext/rbconfig/sizeof/extconf.rb (revision 50919) +++ ext/rbconfig/sizeof/extconf.rb (revision 50920) @@ -1,5 +1,6 @@ https://github.com/ruby/ruby/blob/trunk/ext/rbconfig/sizeof/extconf.rb#L1 $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') https://github.com/ruby/ruby/blob/trunk/ext/rbconfig/sizeof/extconf.rb#L20 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') Index: template/sizes.c.tmpl =================================================================== --- template/sizes.c.tmpl (revision 50919) +++ template/sizes.c.tmpl (revision 50920) @@ -7,7 +7,7 @@ class String https://github.com/ruby/ruby/blob/trunk/template/sizes.c.tmpl#L7 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)', } -- ML: ruby-changes@q... Info: http://www.atdot.net/~ko1/quickml/