ruby-changes:33072
From: nobu <ko1@a...>
Date: Sun, 23 Feb 2014 12:19:01 +0900 (JST)
Subject: [ruby-changes:33072] nobu:r45151 (trunk): option.c: use rb_w32_inet_pton
nobu 2014-02-23 12:18:56 +0900 (Sun, 23 Feb 2014) New Revision: 45151 http://svn.ruby-lang.org/cgi-bin/viewvc.cgi?view=rev&revision=45151 Log: option.c: use rb_w32_inet_pton * ext/socket/option.c (inet_pton): use rb_w32_inet_pton, instead of inet_ntop directly, which is unavailable on older version Windows. Modified files: trunk/ChangeLog trunk/ext/socket/raddrinfo.c Index: ChangeLog =================================================================== --- ChangeLog (revision 45150) +++ ChangeLog (revision 45151) @@ -1,4 +1,7 @@ https://github.com/ruby/ruby/blob/trunk/ChangeLog#L1 -Sun Feb 23 11:54:02 2014 Nobuyoshi Nakada <nobu@r...> +Sun Feb 23 12:18:54 2014 Nobuyoshi Nakada <nobu@r...> + + * ext/socket/option.c (inet_pton): use rb_w32_inet_pton, instead of + inet_ntop directly, which is unavailable on older version Windows. * include/ruby/win32.h, win32/win32.c (rb_w32_inet_pton): add a wrapper function for inet_pton minimum supported client is Index: ext/socket/raddrinfo.c =================================================================== --- ext/socket/raddrinfo.c (revision 45150) +++ ext/socket/raddrinfo.c (revision 45151) @@ -177,6 +177,10 @@ numeric_getaddrinfo(const char *node, co https://github.com/ruby/ruby/blob/trunk/ext/socket/raddrinfo.c#L177 struct addrinfo **res) { #ifdef HAVE_INET_PTON +# if defined __MINGW64__ +# define inet_pton(f,s,d) rb_w32_inet_pton(f,s,d) +# endif + if (node && (!service || strspn(service, "0123456789") == strlen(service))) { static const struct { int socktype; -- ML: ruby-changes@q... Info: http://www.atdot.net/~ko1/quickml/