* lib/mkmf.rb (have_header): needs dependent headers if trying to

compile.

* ext/socket/extconf.rb: net/if.h depends on other headers.


git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@22103 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
This commit is contained in:
nobu 2009-02-07 02:44:07 +00:00
Родитель 0c0f987376
Коммит 7c93e56560
3 изменённых файлов: 10 добавлений и 3 удалений

Просмотреть файл

@ -1,3 +1,10 @@
Sat Feb 7 11:44:06 2009 Nobuyoshi Nakada <nobu@ruby-lang.org>
* 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@fsij.org> Sat Feb 7 04:02:37 2009 Tanaka Akira <akr@fsij.org>
* dir.c (dir_read): don't disable rdoc. * dir.c (dir_read): don't disable rdoc.

Просмотреть файл

@ -291,7 +291,7 @@ have_header("ifaddrs.h")
have_func("getifaddrs") have_func("getifaddrs")
have_header("sys/ioctl.h") have_header("sys/ioctl.h")
have_header("sys/sockio.h") have_header("sys/sockio.h")
have_header("net/if.h") have_header("net/if.h", headers)
unless have_type("socklen_t", headers) unless have_type("socklen_t", headers)
$defs << "-Dsocklen_t=int" $defs << "-Dsocklen_t=int"

Просмотреть файл

@ -808,9 +808,9 @@ end
# For example, if have_header('foo.h') returned true, then the HAVE_FOO_H # For example, if have_header('foo.h') returned true, then the HAVE_FOO_H
# preprocessor macro would be passed to the compiler. # preprocessor macro would be passed to the compiler.
# #
def have_header(header, &b) def have_header(header, preheaders = nil, &b)
checking_for header do 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___"))) $defs.push(format("-DHAVE_%s", header.tr("a-z./\055", "A-Z___")))
true true
else else