ruby-changes:49897
From: nobu <ko1@a...>
Date: Wed, 24 Jan 2018 00:31:25 +0900 (JST)
Subject: [ruby-changes:49897] nobu:r62015 (trunk): getaddrinfo.c: ai_errlist
nobu 2018-01-24 00:31:21 +0900 (Wed, 24 Jan 2018) New Revision: 62015 https://svn.ruby-lang.org/cgi-bin/viewvc.cgi?view=revision&revision=62015 Log: getaddrinfo.c: ai_errlist * ext/socket/getaddrinfo.c (ai_errlist): used only if gai_strerror is missing. Modified files: trunk/ext/socket/getaddrinfo.c Index: ext/socket/getaddrinfo.c =================================================================== --- ext/socket/getaddrinfo.c (revision 62014) +++ ext/socket/getaddrinfo.c (revision 62015) @@ -149,6 +149,7 @@ static int get_addr __P((const char *, i https://github.com/ruby/ruby/blob/trunk/ext/socket/getaddrinfo.c#L149 struct addrinfo *, int)); static int str_isnumber __P((const char *)); +#ifndef HAVE_GAI_STRERROR static const char *const ai_errlist[] = { "success.", "address family for hostname not supported.", /* EAI_ADDRFAMILY */ @@ -166,6 +167,7 @@ static const char *const ai_errlist[] = https://github.com/ruby/ruby/blob/trunk/ext/socket/getaddrinfo.c#L167 "resolved protocol is unknown.", /* EAI_PROTOCOL */ "unknown error.", /* EAI_MAX */ }; +#endif #define GET_CANONNAME(ai, str) \ if (pai->ai_flags & AI_CANONNAME) {\ -- ML: ruby-changes@q... Info: http://www.atdot.net/~ko1/quickml/