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

ruby-changes:28140

From: nobu <ko1@a...>
Date: Tue, 9 Apr 2013 02:43:01 +0900 (JST)
Subject: [ruby-changes:28140] nobu:r40192 (trunk): socket/extconf.rb: check struct in_addr6

nobu	2013-04-09 02:42:48 +0900 (Tue, 09 Apr 2013)

  New Revision: 40192

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

  Log:
    socket/extconf.rb: check struct in_addr6
    
    * ext/socket/extconf.rb: check struct in_addr6, which is defined in
      VC6 instead of in6_addr.

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

Index: ChangeLog
===================================================================
--- ChangeLog	(revision 40191)
+++ ChangeLog	(revision 40192)
@@ -1,4 +1,7 @@ https://github.com/ruby/ruby/blob/trunk/ChangeLog#L1
-Tue Apr  9 02:40:53 2013  Nobuyoshi Nakada  <nobu@r...>
+Tue Apr  9 02:42:44 2013  Nobuyoshi Nakada  <nobu@r...>
+
+	* ext/socket/extconf.rb: check struct in_addr6, which is defined in
+	  VC6 instead of in6_addr.
 
 	* ext/socket/option.c (optname_to_sym): fix macro name.
 
Index: ext/socket/extconf.rb
===================================================================
--- ext/socket/extconf.rb	(revision 40191)
+++ ext/socket/extconf.rb	(revision 40192)
@@ -477,6 +477,10 @@ EOS https://github.com/ruby/ruby/blob/trunk/ext/socket/extconf.rb#L477
 
   if getaddr_info_ok == :wide or
       !have_func("getnameinfo", headers) or !have_func("getaddrinfo", headers)
+    if !have_type("struct in6_addr", headers) and have_type("struct in_addr6", headers)
+      $defs.pop(2)
+      $defs << "-Din_addr6=in6_addr"
+    end
     if have_struct_member("struct in6_addr", "s6_addr8", headers)
       $defs[-1] = "s6_addr=s6_addr8"
     end

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

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