From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 107704 invoked by alias); 25 Sep 2019 07:03:09 -0000 Mailing-List: contact newlib-cvs-help@sourceware.org; run by ezmlm Precedence: bulk List-Id: List-Subscribe: List-Archive: List-Post: List-Help: , Sender: newlib-cvs-owner@sourceware.org Received: (qmail 107648 invoked by uid 10080); 25 Sep 2019 07:03:09 -0000 Date: Wed, 25 Sep 2019 07:03:00 -0000 Message-ID: <20190925070309.107647.qmail@sourceware.org> Content-Type: text/plain; charset="us-ascii" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit From: Sebastian Huber To: newlib-cvs@sourceware.org Subject: [newlib-cygwin] gai_strerror() - Update string error messages according to RFC 3493. X-Act-Checkin: newlib-cygwin X-Git-Author: pfg X-Git-Refname: refs/heads/master X-Git-Oldrev: a9724c3904c5680890f23ce248e4b7092eeabf35 X-Git-Newrev: 84ba60e6ebc9a2ea3898278b2a6a9669cd5b58b5 X-SW-Source: 2019-q3/txt/msg00035.txt.bz2 https://sourceware.org/git/gitweb.cgi?p=newlib-cygwin.git;h=84ba60e6ebc9a2ea3898278b2a6a9669cd5b58b5 commit 84ba60e6ebc9a2ea3898278b2a6a9669cd5b58b5 Author: pfg Date: Sun Dec 23 18:15:48 2018 +0000 gai_strerror() - Update string error messages according to RFC 3493. Error messages in gai_strerror(3) vary largely among OSs. For new software we largely replaced the obsoleted EAI_NONAME and with EAI_NODATA but we never updated the corresponding message to better match the intended use. We also have references to ai_flags and ai_family which are not very descriptive for non-developer end users. Bring new new error messages based on informational RFC 3493, which has obsoleted RFC 2553, and make them consistent among the header adn manpage. MFC after: 1 month Differentical Revision: D18630 Diff: --- newlib/libc/sys/rtems/include/netdb.h | 18 +++++++++--------- 1 file changed, 9 insertions(+), 9 deletions(-) diff --git a/newlib/libc/sys/rtems/include/netdb.h b/newlib/libc/sys/rtems/include/netdb.h index 3a42485..cf0330a 100644 --- a/newlib/libc/sys/rtems/include/netdb.h +++ b/newlib/libc/sys/rtems/include/netdb.h @@ -159,24 +159,24 @@ struct addrinfo { #define NO_ADDRESS NO_DATA /* no address, look for MX record */ /* - * Error return codes from getaddrinfo() + * Error return codes from gai_strerror(3), see RFC 3493. */ #if 0 -/* obsoleted */ +/* Obsoleted on RFC 2553bis-02 */ #define EAI_ADDRFAMILY 1 /* address family for hostname not supported */ #endif -#define EAI_AGAIN 2 /* temporary failure in name resolution */ -#define EAI_BADFLAGS 3 /* invalid value for ai_flags */ +#define EAI_AGAIN 2 /* name could not be resolved at this time */ +#define EAI_BADFLAGS 3 /* flags parameter had an invalid value */ #define EAI_FAIL 4 /* non-recoverable failure in name resolution */ -#define EAI_FAMILY 5 /* ai_family not supported */ +#define EAI_FAMILY 5 /* address family was recognized */ #define EAI_MEMORY 6 /* memory allocation failure */ #if 0 -/* obsoleted */ +/* Obsoleted on RFC 2553bis-02 */ #define EAI_NODATA 7 /* no address associated with hostname */ #endif -#define EAI_NONAME 8 /* hostname nor servname provided, or not known */ -#define EAI_SERVICE 9 /* servname not supported for ai_socktype */ -#define EAI_SOCKTYPE 10 /* ai_socktype not supported */ +#define EAI_NONAME 8 /* name does not resolve */ +#define EAI_SERVICE 9 /* service not recognized for socket type */ +#define EAI_SOCKTYPE 10 /* intended socket type was not recognized */ #define EAI_SYSTEM 11 /* system error returned in errno */ #define EAI_BADHINTS 12 /* invalid value for hints */ #define EAI_PROTOCOL 13 /* resolved protocol is unknown */