ruby-changes:10548
From: nobu <ko1@a...>
Date: Sat, 7 Feb 2009 11:44:20 +0900 (JST)
Subject: [ruby-changes:10548] Ruby:r22103 (trunk): * lib/mkmf.rb (have_header): needs dependent headers if trying to
nobu 2009-02-07 11:44:07 +0900 (Sat, 07 Feb 2009) New Revision: 22103 http://svn.ruby-lang.org/cgi-bin/viewvc.cgi?view=rev&revision=22103 Log: * lib/mkmf.rb (have_header): needs dependent headers if trying to compile. * ext/socket/extconf.rb: net/if.h depends on other headers. Modified files: trunk/ChangeLog trunk/ext/socket/extconf.rb trunk/lib/mkmf.rb Index: ChangeLog =================================================================== --- ChangeLog (revision 22102) +++ ChangeLog (revision 22103) @@ -1,3 +1,10 @@ +Sat Feb 7 11:44:06 2009 Nobuyoshi Nakada <nobu@r...> + + * lib/mkmf.rb (have_header): needs dependent headers if trying to + compile. + + * ext/socket/extconf.rb: net/if.h depends on other headers. + Sat Feb 7 04:02:37 2009 Tanaka Akira <akr@f...> * dir.c (dir_read): don't disable rdoc. Index: lib/mkmf.rb =================================================================== --- lib/mkmf.rb (revision 22102) +++ lib/mkmf.rb (revision 22103) @@ -808,9 +808,9 @@ # For example, if have_header('foo.h') returned true, then the HAVE_FOO_H # preprocessor macro would be passed to the compiler. # -def have_header(header, &b) +def have_header(header, preheaders = nil, &b) checking_for header do - if try_header(cpp_include(header), &b) + if try_header(cpp_include(preheaders)+cpp_include(header), &b) $defs.push(format("-DHAVE_%s", header.tr("a-z./\055", "A-Z___"))) true else Index: ext/socket/extconf.rb =================================================================== --- ext/socket/extconf.rb (revision 22102) +++ ext/socket/extconf.rb (revision 22103) @@ -291,7 +291,7 @@ have_func("getifaddrs") have_header("sys/ioctl.h") have_header("sys/sockio.h") -have_header("net/if.h") +have_header("net/if.h", headers) unless have_type("socklen_t", headers) $defs << "-Dsocklen_t=int" -- ML: ruby-changes@q... Info: http://www.atdot.net/~ko1/quickml/