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

ruby-changes:24516

From: nobu <ko1@a...>
Date: Sun, 29 Jul 2012 23:57:39 +0900 (JST)
Subject: [ruby-changes:24516] nobu:r36567 (trunk): option.c: use rb_w32_inet_ntop

nobu	2012-07-29 23:57:30 +0900 (Sun, 29 Jul 2012)

  New Revision: 36567

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

  Log:
    option.c: use rb_w32_inet_ntop
    
    * ext/socket/option.c (inet_ntop): use rb_w32_inet_ntop, instead of
      inet_ntop directly, which is unavailable on older version Windows.

  Modified files:
    trunk/ChangeLog
    trunk/ext/socket/option.c

Index: ChangeLog
===================================================================
--- ChangeLog	(revision 36566)
+++ ChangeLog	(revision 36567)
@@ -1,5 +1,8 @@
-Sun Jul 29 23:56:49 2012  Nobuyoshi Nakada  <nobu@r...>
+Sun Jul 29 23:57:27 2012  Nobuyoshi Nakada  <nobu@r...>
 
+	* ext/socket/option.c (inet_ntop): use rb_w32_inet_ntop, instead of
+	  inet_ntop directly, which is unavailable on older version Windows.
+
 	* win32/win32.c (rb_w32_inet_ntop): type should be const.
 
 Sun Jul 29 14:20:34 2012  Kazuki Tsujimoto  <kazuki@c...>
Index: ext/socket/option.c
===================================================================
--- ext/socket/option.c	(revision 36566)
+++ ext/socket/option.c	(revision 36567)
@@ -452,8 +452,8 @@
 #endif
     return numaddr;
 }
-#elif !defined HAVE_ARPA_INET_H
-extern char *inet_ntop(int af, const void *addr, char *numaddr, size_t numaddr_len);
+#elif defined _WIN32
+# define inet_ntop(f,a,n,l)      rb_w32_inet_ntop(f,a,n,l)
 #endif
 
 /* Although the buffer size needed depends on the prefixes, "%u" may generate "4294967295".  */

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

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