* doc/posix-headers/netdb.texi (netdb.h): Document definitions that
differ from RFC 2553.
* lib/netdb.in.h (NI_MAXHOST, NI_MAXSERV): Define NI_MAXHOST and
NI_MAXSERV.
+2024-06-27 Collin Funk <collin.funk1@gmail.com>
+
+ netdb: Define NI_MAXHOST and NI_MAXSERV.
+ * doc/posix-headers/netdb.texi (netdb.h): Document definitions that
+ differ from RFC 2553.
+ * lib/netdb.in.h (NI_MAXHOST, NI_MAXSERV): Define NI_MAXHOST and
+ NI_MAXSERV.
+
2024-06-26 Paul Eggert <eggert@cs.ucla.edu>
strnlen: document Android bug
NetBSD 5.0.
@end itemize
+@item
+@c Defined in RFC 2553.
+This header file incorrectly defines @code{NI_MAXHOST} on some platforms:
+musl libc 1.2.4, OpenBSD 7.5.
+@end
+
Portability problems not fixed by Gnulib:
@itemize
@end itemize
/* Declarations for a platform that lacks <netdb.h>, or where it is
incomplete. */
+/* Maximumn length of a fully-qualified domain name. */
+#ifndef NI_MAXHOST
+# define NI_MAXHOST 1025
+#elif NI_MAXHOST != 1025
+# undef NI_MAXHOST
+# define NI_MAXHOST 1025
+#endif
+
+/* Maximumn length of a service. */
+#ifndef NI_MAXSERV
+# define NI_MAXSERV 32
+#elif NI_MAXSERV != 32
+# undef NI_MAXSERV 32
+# define NI_MAXSERV 32
+#endif
+
#if @GNULIB_GETADDRINFO@
# if !@HAVE_STRUCT_ADDRINFO@