ruby-changes:28172
From: nobu <ko1@a...>
Date: Thu, 11 Apr 2013 10:11:39 +0900 (JST)
Subject: [ruby-changes:28172] nobu:r40224 (trunk): mkmf.rb: suppress warnings
nobu 2013-04-11 10:11:27 +0900 (Thu, 11 Apr 2013) New Revision: 40224 http://svn.ruby-lang.org/cgi-bin/viewvc.cgi?view=rev&revision=40224 Log: mkmf.rb: suppress warnings * lib/mkmf.rb (try_func, try_var, scalar_ptr_type, scalar_type): suppress implicit-function-declaration warnings. Modified files: trunk/lib/mkmf.rb Index: lib/mkmf.rb =================================================================== --- lib/mkmf.rb (revision 40223) +++ lib/mkmf.rb (revision 40224) @@ -743,15 +743,15 @@ int main() {printf("%"PRI_CONFTEST_PREFI https://github.com/ruby/ruby/blob/trunk/lib/mkmf.rb#L743 #{headers} /*top*/ extern int t(void); +#{MAIN_DOES_NOTHING 't'} int t(void) { #{decltype["volatile p"]}; p = (#{decltype[]})#{func}; return 0; } -#{MAIN_DOES_NOTHING "t"} SRC call && try_link(<<"SRC", opt, &b) #{headers} /*top*/ extern int t(void); +#{MAIN_DOES_NOTHING 't'} int t(void) { #{call}; return 0; } -#{MAIN_DOES_NOTHING "t"} SRC end @@ -762,8 +762,8 @@ SRC https://github.com/ruby/ruby/blob/trunk/lib/mkmf.rb#L762 #{headers} /*top*/ extern int t(void); +#{MAIN_DOES_NOTHING 't'} int t(void) { const volatile void *volatile p; p = &(&#{var})[0]; return 0; } -#{MAIN_DOES_NOTHING "t"} SRC end @@ -1147,7 +1147,7 @@ SRC https://github.com/ruby/ruby/blob/trunk/lib/mkmf.rb#L1147 #{cpp_include(headers)} /*top*/ int s = (char *)&((#{type}*)0)->#{member} - (char *)0; -#{MAIN_DOES_NOTHING "s"} +#{MAIN_DOES_NOTHING} SRC $defs.push(format("-DHAVE_%s_%s", type.tr_cpp, member.tr_cpp)) $defs.push(format("-DHAVE_ST_%s", member.tr_cpp)) # backward compatibility @@ -1401,8 +1401,8 @@ SRC https://github.com/ruby/ruby/blob/trunk/lib/mkmf.rb#L1401 /*top*/ volatile #{type} conftestval; extern int t(void); +#{MAIN_DOES_NOTHING 't'} int t(void) {return (int)(1-*(conftestval#{member ? ".#{member}" : ""}));} -#{MAIN_DOES_NOTHING "t"} SRC end @@ -1414,8 +1414,8 @@ SRC https://github.com/ruby/ruby/blob/trunk/lib/mkmf.rb#L1414 /*top*/ volatile #{type} conftestval; extern int t(void); +#{MAIN_DOES_NOTHING 't'} int t(void) {return (int)(1-(conftestval#{member ? ".#{member}" : ""}));} -#{MAIN_DOES_NOTHING "t"} SRC end -- ML: ruby-changes@q... Info: http://www.atdot.net/~ko1/quickml/