* lib/netdb.in.h (AI_NUMERICHOST): New macro.
* tests/test-netdb-h.c: Verify that AI_NUMERICHOST and AI_NUMERICSERV
are defined.
* doc/posix-headers/netdb.texi: Mention the platform support for
AI_NUMERICHOST and AI_NUMERICSERV.
+2025-02-12 Bruno Haible <bruno@clisp.org>
+
+ netdb-h: Ensure AI_NUMERICHOST and AI_NUMERICSERV are defined.
+ * lib/netdb.in.h (AI_NUMERICHOST): New macro.
+ * tests/test-netdb-h.c: Verify that AI_NUMERICHOST and AI_NUMERICSERV
+ are defined.
+ * doc/posix-headers/netdb.texi: Mention the platform support for
+ AI_NUMERICHOST and AI_NUMERICSERV.
+
2025-02-11 Collin Funk <collin.funk1@gmail.com>
acl-permissions, file-has-acl: Depend on stdint-h for SIZE_MAX.
This header file does not define @code{AI_ADDRCONFIG} on some platforms:
NetBSD 5.0.
+@item
+This header file does not define @code{AI_NUMERICHOST} on some platforms:
+HP-UX 11.11.
+
+@item
+This header file does not define @code{AI_NUMERICSERV} on some platforms:
+macOS 10.5, HP-UX 11.11, mingw.
+
@item
@c Defined in RFC 2553.
This header file incorrectly defines @code{NI_MAXHOST} on some platforms:
# ifndef AI_CANONNAME
# define AI_CANONNAME 0x0002 /* Request for canonical name. */
# endif
-# ifndef AI_NUMERICSERV
-# define AI_NUMERICSERV 0x0400 /* Don't use name resolution. */
+# ifndef AI_NUMERICHOST
+# define AI_NUMERICHOST 0x0004 /* Return numeric host address as name. */
# endif
-
-# if 0
-# define AI_NUMERICHOST 0x0004 /* Don't use name resolution. */
+# ifndef AI_NUMERICSERV
+# define AI_NUMERICSERV 0x0400 /* Return service number as service name. */
# endif
/* These symbolic constants are required to be present by POSIX, but
/* Check that the 'socklen_t' type is defined. */
socklen_t t2;
+int ai1 = AI_NUMERICHOST;
+int ai2 = AI_NUMERICSERV;
+
int
main (void)
{