mirror of
https://github.com/ruby/ruby.git
synced 2022-11-09 12:17:21 -05:00
* 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:
parent
0c0f987376
commit
7c93e56560
3 changed files with 10 additions and 3 deletions
|
@ -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>
|
||||
|
||||
* dir.c (dir_read): don't disable rdoc.
|
||||
|
|
|
@ -291,7 +291,7 @@ have_header("ifaddrs.h")
|
|||
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"
|
||||
|
|
|
@ -808,9 +808,9 @@ end
|
|||
# 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
|
||||
|
|
Loading…
Reference in a new issue