ruby-changes:11725
From: nobu <ko1@a...>
Date: Fri, 8 May 2009 19:17:23 +0900 (JST)
Subject: [ruby-changes:11725] Ruby:r23369 (trunk): * lib/mkmf.rb (check_sizeof): fixed wrong recuring result for
nobu 2009-05-08 19:17:04 +0900 (Fri, 08 May 2009) New Revision: 23369 http://svn.ruby-lang.org/cgi-bin/viewvc.cgi?view=rev&revision=23369 Log: * lib/mkmf.rb (check_sizeof): fixed wrong recuring result for intrinsic types. Modified files: trunk/ChangeLog trunk/lib/mkmf.rb Index: ChangeLog =================================================================== --- ChangeLog (revision 23368) +++ ChangeLog (revision 23369) @@ -1,3 +1,8 @@ +Fri May 8 19:17:02 2009 Nobuyoshi Nakada <nobu@r...> + + * lib/mkmf.rb (check_sizeof): fixed wrong recuring result for + intrinsic types. + Fri May 8 10:14:08 2009 Nobuyoshi Nakada <nobu@r...> * Makefile.in, configure.in, win32/Makefile.sub (RUBY_BASE_NAME): Index: lib/mkmf.rb =================================================================== --- lib/mkmf.rb (revision 23368) +++ lib/mkmf.rb (revision 23369) @@ -989,10 +989,14 @@ x ? super : "failed" end checking_for checking_message("size of #{type}", headers), fmt do - if ((size = UNIVERSAL_INTS.find {|t| - try_static_assert("#{expr} == sizeof(#{t})", prelude, &b) - }) or - size = try_constant(expr, prelude, &b)) + 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) $defs.push(format("-DSIZEOF_%s=%s", type.tr_cpp, size)) size end -- ML: ruby-changes@q... Info: http://www.atdot.net/~ko1/quickml/