Add documentation for gethostbyname_r, gethostbyname2_r and gethostbyaddr_r
Create proper MLINKs for the new functions.
PR: 249154
Reported by: asomers@
Differential D30385
gethostbyname(3): Add missing reentrant functions fernape on May 21 2021, 3:37 PM. Authored by Tags None Referenced Files
Subscribers
Details
Add documentation for gethostbyname_r, gethostbyname2_r and gethostbyaddr_r Create proper MLINKs for the new functions. PR: 249154 Before the change: $ man gethostbyname_r No manual entry for gethostbyname_r After the change, the new documentation is accessible.
Tested several things with this small program: #include <err.h> #include <netdb.h> #include <stdio.h> int main() { char *name = "localhost"; char buflen = 100; char buffer[buflen]; struct hostent he; struct hostent *result = NULL; int h_errnop, ret; if ((ret = gethostbyname_r(name, &he, buffer, buflen, &result, &h_errnop))) { errx(1, "no name associated with %s. result = %p. ret = %d", name, result, ret); } printf("name associated with %s is %s\n", name, result->h_name); return 0; } Note that we don't have named(8) anymore in base, but I would remove that in Also note the documentation for some getnet*_r functions is missing. I would
Diff Detail
Event TimelineComment Actions seems fine. If you don't get other feedback in a reasonable amount of time, go ahead, imho.
|