summaryrefslogtreecommitdiffstats
path: root/man3/getservent_r.3
diff options
context:
space:
mode:
Diffstat (limited to '')
-rw-r--r--man3/getservent_r.319
1 files changed, 9 insertions, 10 deletions
diff --git a/man3/getservent_r.3 b/man3/getservent_r.3
index 04397ee..76c42f3 100644
--- a/man3/getservent_r.3
+++ b/man3/getservent_r.3
@@ -4,7 +4,7 @@
.\"
.\" SPDX-License-Identifier: Linux-man-pages-copyleft
.\"
-.TH getservent_r 3 2023-07-20 "Linux man-pages 6.05.01"
+.TH getservent_r 3 2023-10-31 "Linux man-pages 6.7"
.SH NAME
getservent_r, getservbyname_r, getservbyport_r \- get
service entry (reentrant)
@@ -14,7 +14,7 @@ Standard C library
.SH SYNOPSIS
.nf
.B #include <netdb.h>
-.PP
+.P
.BI "int getservent_r(struct servent *restrict " result_buf ,
.BI " char " buf "[restrict ." buflen "], size_t " buflen ,
.BI " struct servent **restrict " result );
@@ -28,13 +28,13 @@ Standard C library
.BI " struct servent *restrict " result_buf ,
.BI " char " buf "[restrict ." buflen "], size_t " buflen ,
.BI " struct servent **restrict " result );
-.PP
+.P
.fi
.RS -4
Feature Test Macro Requirements for glibc (see
.BR feature_test_macros (7)):
.RE
-.PP
+.P
.BR getservent_r (),
.BR getservbyname_r (),
.BR getservbyport_r ():
@@ -61,13 +61,13 @@ structure is returned,
and in the function calling signature and return value.
This manual page describes just the differences from
the nonreentrant functions.
-.PP
+.P
Instead of returning a pointer to a statically allocated
.I servent
structure as the function result,
these functions copy the structure into the location pointed to by
.IR result_buf .
-.PP
+.P
The
.I buf
array is used to store the string fields pointed to by the returned
@@ -84,7 +84,7 @@ and the caller must try again with a larger buffer.
(A buffer of length 1024 bytes should be sufficient for most applications.)
.\" I can find no information on the required/recommended buffer size;
.\" the nonreentrant functions use a 1024 byte buffer -- mtk.
-.PP
+.P
If the function call successfully obtains a service record, then
.I *result
is set pointing to
@@ -95,7 +95,7 @@ is set to NULL.
.SH RETURN VALUE
On success, these functions return 0.
On error, they return one of the positive error numbers listed in errors.
-.PP
+.P
On error, record not found
.RB ( getservbyname_r (),
.BR getservbyport_r ()),
@@ -131,7 +131,6 @@ T{
.BR getservbyport_r ()
T} Thread safety MT-Safe locale
.TE
-.sp 1
.SH VERSIONS
Functions with similar names exist on some other systems,
though typically with different calling signatures.
@@ -151,7 +150,7 @@ fails with the error
.BR ERANGE ,
the program retries with larger buffer sizes.
The following shell session shows a couple of sample runs:
-.PP
+.P
.in +4n
.EX
.RB "$" " ./a.out 7 tcp 1"