]> sourceware.org Git - newlib-cygwin.git/commitdiff
gai_strerror() - Update string error messages according to RFC 3493.
authorpfg <pfg@FreeBSD.org>
Sun, 23 Dec 2018 18:15:48 +0000 (18:15 +0000)
committerSebastian Huber <sebastian.huber@embedded-brains.de>
Wed, 25 Sep 2019 06:38:27 +0000 (08:38 +0200)
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

newlib/libc/sys/rtems/include/netdb.h

index 3a42485aa1a9de7b9aecc2be201cc4b92bf4fe68..cf0330a2f26a5925855bb53442f4d9ed6bb74572 100644 (file)
@@ -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 */
This page took 0.03257 seconds and 5 git commands to generate.