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

ruby-changes:9935

From: usa <ko1@a...>
Date: Tue, 13 Jan 2009 03:00:07 +0900 (JST)
Subject: [ruby-changes:9935] Ruby:r21476 (trunk): * ext/socket/extconf.rb: use headers instead of "netdb.h" in checking

usa	2009-01-13 02:59:45 +0900 (Tue, 13 Jan 2009)

  New Revision: 21476

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

  Log:
    * ext/socket/extconf.rb: use headers instead of "netdb.h" in checking
      getnameinfo() and getaddrinfo() because Windows doesn't have it.
      see [ruby-dev:37757].
    * ext/socket/sockport.h (SA_LEN): use sockaddr_in6 when defined AF_INET6
      if INET6 is not defined.  winsock2's getaddrinfo() returns
      sockaddr_in6 if ipv6 is available.

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

Index: ChangeLog
===================================================================
--- ChangeLog	(revision 21475)
+++ ChangeLog	(revision 21476)
@@ -1,3 +1,13 @@
+Tue Jan 13 02:54:54 2009  NAKAMURA Usaku  <usa@r...>
+
+	* ext/socket/extconf.rb: use headers instead of "netdb.h" in checking
+	  getnameinfo() and getaddrinfo() because Windows doesn't have it.
+	  see [ruby-dev:37757].
+
+	* ext/socket/sockport.h (SA_LEN): use sockaddr_in6 when defined AF_INET6
+	  if INET6 is not defined.  winsock2's getaddrinfo() returns
+	  sockaddr_in6 if ipv6 is available.
+
 Tue Jan 13 02:21:43 2009  Nobuyoshi Nakada  <nobu@r...>
 
 	* win32/win32.c (internal_cmd_match): extracted from
@@ -11,7 +21,7 @@
 
 Tue Jan 13 02:07:38 2009  Hidetoshi NAGAI  <nagai@a...>
 
-	* ext/tk/lib/tk.rb: use Encoding.find("locale") instaed of
+	* ext/tk/lib/tk.rb: use Encoding.find("locale") instead of
 	  Encoding.locale_charmap
 
 Tue Jan 13 00:57:56 2009  Tanaka Akira  <akr@f...>
Index: ext/socket/extconf.rb
===================================================================
--- ext/socket/extconf.rb	(revision 21475)
+++ ext/socket/extconf.rb	(revision 21476)
@@ -244,7 +244,7 @@
 
 $objs = ["socket.#{$OBJEXT}"]
 
-unless getaddr_info_ok and have_func("getnameinfo", "netdb.h") and have_func("getaddrinfo", "netdb.h")
+unless getaddr_info_ok and have_func("getnameinfo", headers) and have_func("getaddrinfo", headers)
   if have_struct_member("struct in6_addr", "s6_addr8", headers)
     $defs[-1] = "-DHAVE_ADDR8"
   end
Index: ext/socket/sockport.h
===================================================================
--- ext/socket/sockport.h	(revision 21475)
+++ ext/socket/sockport.h	(revision 21476)
@@ -14,7 +14,7 @@
 # ifdef HAVE_SA_LEN
 #  define SA_LEN(sa) (sa)->sa_len
 # else
-#  ifdef INET6
+#  ifdef AF_INET6
 #   define SA_LEN(sa) \
 	(((sa)->sa_family == AF_INET6) ? sizeof(struct sockaddr_in6) \
 				       : sizeof(struct sockaddr))

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

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