From c233867d377eac31e74934cb4a420cb039fa4174 Mon Sep 17 00:00:00 2001 From: Collin Funk Date: Thu, 27 Jun 2024 14:38:49 -0700 Subject: [PATCH] netdb: Simplify NI_MAXHOST and NI_MAXSERV definitions. * lib/netdb.in.h (NI_MAXHOST, NI_MAXSERV): Fix typos in comments. Undefine and then redefine to the correct value. --- ChangeLog | 4 ++++ lib/netdb.in.h | 20 ++++++-------------- 2 files changed, 10 insertions(+), 14 deletions(-) diff --git a/ChangeLog b/ChangeLog index ef61d1c652..f058aab66a 100644 --- a/ChangeLog +++ b/ChangeLog @@ -1,5 +1,9 @@ 2024-06-27 Collin Funk + netdb: Simplify NI_MAXHOST and NI_MAXSERV definitions. + * lib/netdb.in.h (NI_MAXHOST, NI_MAXSERV): Fix typos in comments. + Undefine and then redefine to the correct value. + doc: Fix error in previous commits. * doc/posix-headers/netdb.texi (netdb.h): Move @end itemize to the end of the list. diff --git a/lib/netdb.in.h b/lib/netdb.in.h index 6267b544b0..35cf6c32fe 100644 --- a/lib/netdb.in.h +++ b/lib/netdb.in.h @@ -54,21 +54,13 @@ /* Declarations for a platform that lacks , 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 +/* Maximum length of a fully-qualified domain name. */ +#undef NI_MAXHOST +#define NI_MAXHOST 1025 -/* 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 +/* Maximum length of a service. */ +#undef NI_MAXSERV +#define NI_MAXSERV 32 #if @GNULIB_GETADDRINFO@ -- 2.39.5