Hi, I've applied the attached patch to mention the servent module in the documentation for the functions getservbyname and getservbyport. These functions exist on Windows in winsock2.h [1][2].
Also, since servent depends on sys_socket-h which will include winsock2.h on Windows I am 99% sure the declarations will be included correctly. I'll write a test for that soon though just to be sure. Windows doesn't have endservent, getservent, and setservent though so I won't mention it there. Collin [1] https://learn.microsoft.com/en-us/windows/win32/api/winsock2/nf-winsock2-getservbyname [2] https://learn.microsoft.com/en-us/windows/win32/api/winsock2/nf-winsock2-getservbyport
>From 2d1c0b2f38c81d1c8eca2f06b39264f5029b97fe Mon Sep 17 00:00:00 2001 From: Collin Funk <collin.fu...@gmail.com> Date: Sat, 28 Dec 2024 16:19:01 -0800 Subject: [PATCH] doc: Mention the servent module. * doc/posix-functions/getservbyname.texi: Document that the servent module will provide the declarations in netdb.h. * doc/posix-functions/getservbyport.texi: Likewise. --- ChangeLog | 7 +++++++ doc/posix-functions/getservbyname.texi | 5 +---- doc/posix-functions/getservbyport.texi | 5 +---- 3 files changed, 9 insertions(+), 8 deletions(-) diff --git a/ChangeLog b/ChangeLog index 533383ed94..4c3d2a88da 100644 --- a/ChangeLog +++ b/ChangeLog @@ -1,3 +1,10 @@ +2024-12-28 Collin Funk <collin.fu...@gmail.com> + + doc: Mention the servent module. + * doc/posix-functions/getservbyname.texi: Document that the servent + module will provide the declarations in netdb.h. + * doc/posix-functions/getservbyport.texi: Likewise. + 2024-12-28 Simon Josefsson <si...@josefsson.org> git-version-gen: avoid use of grep, suggested by Jim Meyering. diff --git a/doc/posix-functions/getservbyname.texi b/doc/posix-functions/getservbyname.texi index 3e5ea8efc0..d98a9e0a7a 100644 --- a/doc/posix-functions/getservbyname.texi +++ b/doc/posix-functions/getservbyname.texi @@ -4,7 +4,7 @@ @node getservbyname POSIX specification:@* @url{https://pubs.opengroup.org/onlinepubs/9799919799/functions/getservbyname.html} -Gnulib module: --- +Gnulib module: servent Portability problems fixed by Gnulib: @itemize @@ -13,7 +13,4 @@ @node getservbyname Portability problems not fixed by Gnulib: @itemize @item -This function is declared in @code{<winsock2.h>} instead of @code{<netdb.h>} -on some platforms: -mingw, MSVC 14. @end itemize diff --git a/doc/posix-functions/getservbyport.texi b/doc/posix-functions/getservbyport.texi index 0034ce69c7..8c275fe64a 100644 --- a/doc/posix-functions/getservbyport.texi +++ b/doc/posix-functions/getservbyport.texi @@ -4,7 +4,7 @@ @node getservbyport POSIX specification:@* @url{https://pubs.opengroup.org/onlinepubs/9799919799/functions/getservbyport.html} -Gnulib module: --- +Gnulib module: servent Portability problems fixed by Gnulib: @itemize @@ -13,7 +13,4 @@ @node getservbyport Portability problems not fixed by Gnulib: @itemize @item -This function is declared in @code{<winsock2.h>} instead of @code{<netdb.h>} -on some platforms: -mingw, MSVC 14. @end itemize -- 2.47.1