[前][次][番号順一覧][スレッド一覧]

ruby-changes:27130

From: akr <ko1@a...>
Date: Sun, 10 Feb 2013 12:11:12 +0900 (JST)
Subject: [ruby-changes:27130] akr:r39182 (trunk): * ext/socket/extconf.rb: test headers at first.

akr	2013-02-10 12:11:00 +0900 (Sun, 10 Feb 2013)

  New Revision: 39182

  http://svn.ruby-lang.org/cgi-bin/viewvc.cgi?view=rev&revision=39182

  Log:
    * ext/socket/extconf.rb: test headers at first.

  Modified files:
    trunk/ChangeLog
    trunk/ext/socket/extconf.rb

Index: ChangeLog
===================================================================
--- ChangeLog	(revision 39181)
+++ ChangeLog	(revision 39182)
@@ -1,3 +1,7 @@ https://github.com/ruby/ruby/blob/trunk/ChangeLog#L1
+Sun Feb 10 12:10:25 2013  Tanaka Akira  <akr@f...>
+
+	* ext/socket/extconf.rb: test headers at first.
+
 Sun Feb  10 12:00:00 2013  Zachary Scott  <zachary@z...>
 
 	* doc/rake/*: Removed stale Rake static files
Index: ext/socket/extconf.rb
===================================================================
--- ext/socket/extconf.rb	(revision 39181)
+++ ext/socket/extconf.rb	(revision 39182)
@@ -34,6 +34,26 @@ if have_header("arpa/inet.h") https://github.com/ruby/ruby/blob/trunk/ext/socket/extconf.rb#L34
   headers << "arpa/inet.h"
 end
 
+have_header("netinet/tcp.h") if /cygwin/ !~ RUBY_PLATFORM # for cygwin 1.1.5
+have_header("netinet/udp.h")
+
+have_header("arpa/nameser.h")
+have_header("resolv.h")
+
+have_header("ifaddrs.h")
+
+have_header("sys/ioctl.h")
+have_header("sys/sockio.h")
+have_header("net/if.h", headers)
+
+have_header("sys/param.h", headers)
+have_header("sys/ucred.h", headers)
+
+have_header("sys/un.h")
+have_header("sys/uio.h")
+
+have_header("ucred.h", headers)
+
 ipv6 = false
 default_ipv6 = /cygwin|beos|haiku/ !~ RUBY_PLATFORM
 if enable_config("ipv6", default_ipv6)
@@ -110,9 +130,6 @@ if have_struct_member("struct sockaddr", https://github.com/ruby/ruby/blob/trunk/ext/socket/extconf.rb#L130
   $defs[-1] = "-DHAVE_SA_LEN "
 end
 
-have_header("netinet/tcp.h") if /cygwin/ !~ RUBY_PLATFORM # for cygwin 1.1.5
-have_header("netinet/udp.h")
-
 if !have_macro("IPPROTO_IPV6", headers) && have_const("IPPROTO_IPV6", headers)
   IO.read(File.join(File.dirname(__FILE__), "mkconstants.rb")).sub(/\A.*^__END__$/m, '').split(/\r?\n/).grep(/\AIPPROTO_\w*/){$&}.each {|name|
     have_const(name, headers) unless $defs.include?("-DHAVE_CONST_#{name.upcase}")
@@ -434,24 +451,12 @@ have_func('inet_ntop(0, (const void *)0, https://github.com/ruby/ruby/blob/trunk/ext/socket/extconf.rb#L451
   have_func("inet_ntoa(*(struct in_addr *)NULL)")
 have_func('inet_pton(0, "", (void *)0)') or have_func('inet_aton("", (struct in_addr *)0)')
 have_func('getservbyport(0, "")')
-have_header("arpa/nameser.h")
-have_header("resolv.h")
-
-have_header("ifaddrs.h")
 have_func("getifaddrs")
-have_header("sys/ioctl.h")
-have_header("sys/sockio.h")
-have_header("net/if.h", headers)
-
-have_header("sys/param.h", headers)
-have_header("sys/ucred.h", headers)
 
 unless have_type("socklen_t", headers)
   $defs << "-Dsocklen_t=int"
 end
 
-have_header("sys/un.h")
-have_header("sys/uio.h")
 have_type("struct in_pktinfo", headers) {|src|
   src.sub(%r'^/\*top\*/', '\&'"\n#if defined(IPPROTO_IP) && defined(IP_PKTINFO)") <<
   "#else\n" << "#error\n" << ">>>>>> no in_pktinfo <<<<<<\n" << "#endif\n"
@@ -466,7 +471,6 @@ have_type("struct cmsgcred", headers) https://github.com/ruby/ruby/blob/trunk/ext/socket/extconf.rb#L471
 
 have_func("getpeereid")
 
-have_header("ucred.h", headers)
 have_func("getpeerucred")
 
 have_func("if_indextoname")

--
ML: ruby-changes@q...
Info: http://www.atdot.net/~ko1/quickml/

[前][次][番号順一覧][スレッド一覧]