summaryrefslogtreecommitdiffstats
path: root/lib/libc
diff options
context:
space:
mode:
authorru <ru@FreeBSD.org>2005-01-20 09:17:07 +0000
committerru <ru@FreeBSD.org>2005-01-20 09:17:07 +0000
commited72feddcb3cc58c18aff36f4227af3fb11facad (patch)
tree13c84f0554aefe96321f671bc8860f5e9f184a5a /lib/libc
parent10aca679734b6819f63019fd7c2ba4e54357c677 (diff)
downloadFreeBSD-src-ed72feddcb3cc58c18aff36f4227af3fb11facad.zip
FreeBSD-src-ed72feddcb3cc58c18aff36f4227af3fb11facad.tar.gz
Sort sections.
Diffstat (limited to 'lib/libc')
-rw-r--r--lib/libc/compat-43/gethostid.34
-rw-r--r--lib/libc/compat-43/setruid.36
-rw-r--r--lib/libc/compat-43/sigvec.266
-rw-r--r--lib/libc/gen/check_utility_compat.34
-rw-r--r--lib/libc/gen/dlinfo.314
-rw-r--r--lib/libc/gen/exec.364
-rw-r--r--lib/libc/gen/getbootfile.310
-rw-r--r--lib/libc/gen/getdomainname.310
-rw-r--r--lib/libc/gen/getgrent.344
-rw-r--r--lib/libc/gen/getnetgrent.34
-rw-r--r--lib/libc/gen/getpwent.356
-rw-r--r--lib/libc/gen/msgsnd.34
-rw-r--r--lib/libc/gen/popen.320
-rw-r--r--lib/libc/gen/rand48.34
-rw-r--r--lib/libc/gen/readpassphrase.354
-rw-r--r--lib/libc/gen/shm_open.318
-rw-r--r--lib/libc/gen/sysconf.38
-rw-r--r--lib/libc/gen/sysctl.342
-rw-r--r--lib/libc/gen/time.310
-rw-r--r--lib/libc/gen/utime.310
-rw-r--r--lib/libc/locale/isblank.310
-rw-r--r--lib/libc/locale/nl_langinfo.322
-rw-r--r--lib/libc/locale/setlocale.34
-rw-r--r--lib/libc/net/ethers.310
-rw-r--r--lib/libc/net/eui64.312
-rw-r--r--lib/libc/net/getaddrinfo.320
-rw-r--r--lib/libc/net/getifaddrs.320
-rw-r--r--lib/libc/net/getifmaddrs.318
-rw-r--r--lib/libc/net/getipnodebyname.36
-rw-r--r--lib/libc/net/getnameinfo.320
-rw-r--r--lib/libc/net/hesiod.312
-rw-r--r--lib/libc/net/inet6_opt_init.314
-rw-r--r--lib/libc/net/inet6_option_space.312
-rw-r--r--lib/libc/net/inet6_rth_space.316
-rw-r--r--lib/libc/net/inet6_rthdr_space.312
-rw-r--r--lib/libc/net/rcmdsh.38
-rw-r--r--lib/libc/net/resolver.310
-rw-r--r--lib/libc/posix1e/mac.310
-rw-r--r--lib/libc/posix1e/mac.conf.510
-rw-r--r--lib/libc/regex/regex.316
-rw-r--r--lib/libc/rpc/getrpcent.38
-rw-r--r--lib/libc/rpc/rpc.58
-rw-r--r--lib/libc/stdio/mktemp.354
-rw-r--r--lib/libc/stdio/stdio.38
-rw-r--r--lib/libc/stdio/tmpnam.348
-rw-r--r--lib/libc/stdlib/getenv.322
-rw-r--r--lib/libc/stdlib/getopt_long.324
-rw-r--r--lib/libc/stdlib/hcreate.320
-rw-r--r--lib/libc/stdlib/lsearch.314
-rw-r--r--lib/libc/stdlib/malloc.346
-rw-r--r--lib/libc/stdlib/qsort.312
-rw-r--r--lib/libc/stdlib/random.34
-rw-r--r--lib/libc/stdlib/strtod.34
-rw-r--r--lib/libc/stdlib/tsearch.38
-rw-r--r--lib/libc/stdtime/strptime.310
-rw-r--r--lib/libc/string/strtok.316
-rw-r--r--lib/libc/sys/brk.210
-rw-r--r--lib/libc/sys/getlogin.238
-rw-r--r--lib/libc/sys/getpgrp.256
-rw-r--r--lib/libc/sys/getrusage.26
-rw-r--r--lib/libc/sys/getsockname.28
-rw-r--r--lib/libc/sys/getsockopt.24
-rw-r--r--lib/libc/sys/lseek.28
-rw-r--r--lib/libc/sys/minherit.214
-rw-r--r--lib/libc/sys/mlock.214
-rw-r--r--lib/libc/sys/mount.24
-rw-r--r--lib/libc/sys/poll.214
-rw-r--r--lib/libc/sys/quotactl.210
-rw-r--r--lib/libc/sys/reboot.210
-rw-r--r--lib/libc/sys/rfork.28
-rw-r--r--lib/libc/sys/rtprio.214
-rw-r--r--lib/libc/sys/select.214
-rw-r--r--lib/libc/sys/send.224
-rw-r--r--lib/libc/sys/setpgid.218
-rw-r--r--lib/libc/sys/shm_open.218
-rw-r--r--lib/libc/sys/sigaction.238
-rw-r--r--lib/libc/sys/socketpair.28
-rw-r--r--lib/libc/sys/stat.214
-rw-r--r--lib/libc/sys/sync.210
-rw-r--r--lib/libc/sys/syscall.28
-rw-r--r--lib/libc/sys/truncate.210
-rw-r--r--lib/libc/sys/vfork.216
-rw-r--r--lib/libc/sys/wait.210
-rw-r--r--lib/libc/uuid/uuid.34
84 files changed, 715 insertions, 715 deletions
diff --git a/lib/libc/compat-43/gethostid.3 b/lib/libc/compat-43/gethostid.3
index 8d58004..4b5446d 100644
--- a/lib/libc/compat-43/gethostid.3
+++ b/lib/libc/compat-43/gethostid.3
@@ -71,8 +71,6 @@ The hostid should be set or retrieved by use of
.Xr gethostname 3 ,
.Xr sysctl 3 ,
.Xr sysctl 8
-.Sh BUGS
-32 bits for the identifier is too small.
.Sh HISTORY
The
.Fn gethostid
@@ -82,3 +80,5 @@ syscalls appeared in
.Bx 4.2
and were dropped in
.Bx 4.4 .
+.Sh BUGS
+32 bits for the identifier is too small.
diff --git a/lib/libc/compat-43/setruid.3 b/lib/libc/compat-43/setruid.3
index 472e7fb..31228dc 100644
--- a/lib/libc/compat-43/setruid.3
+++ b/lib/libc/compat-43/setruid.3
@@ -56,6 +56,9 @@ sets the real user ID (group ID) of the
current process.
.Sh RETURN VALUES
.Rv -std
+.Sh COMPATIBILITY
+The use of these calls is not portable.
+Their use is discouraged; they will be removed in the future.
.Sh ERRORS
The functions fail if:
.Bl -tag -width Er
@@ -63,9 +66,6 @@ The functions fail if:
The user is not the super user and the ID
specified is not the real or effective ID.
.El
-.Sh COMPATIBILITY
-The use of these calls is not portable.
-Their use is discouraged; they will be removed in the future.
.Sh SEE ALSO
.Xr getgid 2 ,
.Xr getuid 2 ,
diff --git a/lib/libc/compat-43/sigvec.2 b/lib/libc/compat-43/sigvec.2
index a3f95e2..4e5cedd 100644
--- a/lib/libc/compat-43/sigvec.2
+++ b/lib/libc/compat-43/sigvec.2
@@ -268,6 +268,39 @@ flag is not available in
hence it should not be used if backward compatibility is needed.
.Sh RETURN VALUES
.Rv -std sigvec
+.Sh EXAMPLES
+On the
+.Tn VAX\-11
+The handler routine can be declared:
+.Bd -literal -offset indent
+void handler(sig, code, scp)
+int sig, code;
+struct sigcontext *scp;
+.Ed
+.Pp
+Here
+.Fa sig
+is the signal number, into which the hardware faults and traps are
+mapped as defined below.
+The
+.Fa code
+argument
+is either a constant
+as given below or, for compatibility mode faults, the code provided by
+the hardware (Compatibility mode faults are distinguished from the
+other
+.Dv SIGILL
+traps by having
+.Dv PSL_CM
+set in the psl).
+The
+.Fa scp
+argument
+is a pointer to the
+.Fa sigcontext
+structure (defined in
+.In signal.h ) ,
+used to restore the context from before the signal.
.Sh ERRORS
The
.Fn sigvec
@@ -309,38 +342,5 @@ or
.Xr signal 3 ,
.Xr sigsetops 3 ,
.Xr tty 4
-.Sh EXAMPLES
-On the
-.Tn VAX\-11
-The handler routine can be declared:
-.Bd -literal -offset indent
-void handler(sig, code, scp)
-int sig, code;
-struct sigcontext *scp;
-.Ed
-.Pp
-Here
-.Fa sig
-is the signal number, into which the hardware faults and traps are
-mapped as defined below.
-The
-.Fa code
-argument
-is either a constant
-as given below or, for compatibility mode faults, the code provided by
-the hardware (Compatibility mode faults are distinguished from the
-other
-.Dv SIGILL
-traps by having
-.Dv PSL_CM
-set in the psl).
-The
-.Fa scp
-argument
-is a pointer to the
-.Fa sigcontext
-structure (defined in
-.In signal.h ) ,
-used to restore the context from before the signal.
.Sh BUGS
This manual page is still confusing.
diff --git a/lib/libc/gen/check_utility_compat.3 b/lib/libc/gen/check_utility_compat.3
index 53e5aa8..7a96bac 100644
--- a/lib/libc/gen/check_utility_compat.3
+++ b/lib/libc/gen/check_utility_compat.3
@@ -69,8 +69,6 @@ function returns zero if
should implement strict
.St -p1003.1-2001
behavior, and nonzero otherwise.
-.Sh ERRORS
-No errors are detected.
.Sh FILES
.Bl -tag -width ".Pa /etc/compat-FreeBSD-4-util"
.It Pa /etc/compat-FreeBSD-4-util
@@ -79,6 +77,8 @@ for the
.Fn check_utility_compat
function.
.El
+.Sh ERRORS
+No errors are detected.
.Sh HISTORY
The
.Fn check_utility_compat
diff --git a/lib/libc/gen/dlinfo.3 b/lib/libc/gen/dlinfo.3
index ef77e7c..9433fb6 100644
--- a/lib/libc/gen/dlinfo.3
+++ b/lib/libc/gen/dlinfo.3
@@ -193,6 +193,13 @@ argument is filled with the
pointer
.Pq Fa "char *p" .
.El
+.Sh RETURN VALUES
+The
+.Fn dlinfo
+function returns 0 on success, or \-1 if an error occurred.
+Whenever an error has been detected, a message detailing it can
+be retrieved via a call to
+.Xr dlerror 3 .
.Sh EXAMPLES
Example 1: Using
.Fn dlinfo
@@ -244,13 +251,6 @@ for (cnt = 1; cnt <= info->dls_cnt; cnt++, path++) {
(void) printf("%2d: %s\\n", cnt, path->dls_name);
}
.Ed
-.Sh RETURN VALUES
-The
-.Fn dlinfo
-function returns 0 on success, or \-1 if an error occurred.
-Whenever an error has been detected, a message detailing it can
-be retrieved via a call to
-.Xr dlerror 3 .
.Sh SEE ALSO
.Xr rtld 1 ,
.Xr dladdr 3 ,
diff --git a/lib/libc/gen/exec.3 b/lib/libc/gen/exec.3
index b3c2191..fa85291 100644
--- a/lib/libc/gen/exec.3
+++ b/lib/libc/gen/exec.3
@@ -220,38 +220,6 @@ will be set to indicate the error.
.It Pa /bin/sh
The shell.
.El
-.Sh ERRORS
-The
-.Fn execl ,
-.Fn execle ,
-.Fn execlp ,
-.Fn execvp
-and
-.Fn execvP
-functions
-may fail and set
-.Va errno
-for any of the errors specified for the library functions
-.Xr execve 2
-and
-.Xr malloc 3 .
-.Pp
-The
-.Fn exect
-and
-.Fn execv
-functions
-may fail and set
-.Va errno
-for any of the errors specified for the library function
-.Xr execve 2 .
-.Sh SEE ALSO
-.Xr sh 1 ,
-.Xr execve 2 ,
-.Xr fork 2 ,
-.Xr ktrace 2 ,
-.Xr ptrace 2 ,
-.Xr environ 7
.Sh COMPATIBILITY
Historically, the default path for the
.Fn execlp
@@ -308,6 +276,38 @@ and the unusual error
.Er EIO .
The behaviour was changed to match the behaviour of
.Xr sh 1 .
+.Sh ERRORS
+The
+.Fn execl ,
+.Fn execle ,
+.Fn execlp ,
+.Fn execvp
+and
+.Fn execvP
+functions
+may fail and set
+.Va errno
+for any of the errors specified for the library functions
+.Xr execve 2
+and
+.Xr malloc 3 .
+.Pp
+The
+.Fn exect
+and
+.Fn execv
+functions
+may fail and set
+.Va errno
+for any of the errors specified for the library function
+.Xr execve 2 .
+.Sh SEE ALSO
+.Xr sh 1 ,
+.Xr execve 2 ,
+.Xr fork 2 ,
+.Xr ktrace 2 ,
+.Xr ptrace 2 ,
+.Xr environ 7
.Sh STANDARDS
The
.Fn execl ,
diff --git a/lib/libc/gen/getbootfile.3 b/lib/libc/gen/getbootfile.3
index 03e4c12..e9cc8b6 100644
--- a/lib/libc/gen/getbootfile.3
+++ b/lib/libc/gen/getbootfile.3
@@ -61,13 +61,13 @@ placed in the global location
.Va errno .
.Sh SEE ALSO
.Xr sysctl 3
-.Sh BUGS
-If the boot blocks have not been modified to pass this information into
-the kernel at boot time, the static string
-.Dq Pa /boot/kernel/kernel
-is returned instead of the real boot file.
.Sh HISTORY
The
.Fn getbootfile
function appeared in
.Fx 2.0 .
+.Sh BUGS
+If the boot blocks have not been modified to pass this information into
+the kernel at boot time, the static string
+.Dq Pa /boot/kernel/kernel
+is returned instead of the real boot file.
diff --git a/lib/libc/gen/getdomainname.3 b/lib/libc/gen/getdomainname.3
index ed1f0ff..ec1e07a 100644
--- a/lib/libc/gen/getdomainname.3
+++ b/lib/libc/gen/getdomainname.3
@@ -91,14 +91,14 @@ The caller tried to set the hostname and was not the super-user.
.Xr gethostid 3 ,
.Xr gethostname 3 ,
.Xr sysctl 3
+.Sh HISTORY
+The
+.Fn getdomainname
+function appeared in
+.Bx 4.2 .
.Sh BUGS
Domain names are limited to
.Dv MAXHOSTNAMELEN
(from
.In sys/param.h )
characters, currently 256.
-.Sh HISTORY
-The
-.Fn getdomainname
-function appeared in
-.Bx 4.2 .
diff --git a/lib/libc/gen/getgrent.3 b/lib/libc/gen/getgrent.3
index b8628b2..4678811 100644
--- a/lib/libc/gen/getgrent.3
+++ b/lib/libc/gen/getgrent.3
@@ -208,11 +208,33 @@ have no return value.
.It Pa /etc/group
group database file
.El
+.Sh COMPATIBILITY
+The historic function
+.Fn setgrfile ,
+which allowed the specification of alternate password databases, has
+been deprecated and is no longer available.
.Sh SEE ALSO
.Xr getpwent 3 ,
.Xr group 5 ,
.Xr nsswitch.conf 5 ,
.Xr yp 8
+.Sh STANDARDS
+The
+.Fn getgrent ,
+.Fn getgrnam ,
+.Fn getgrnam_r ,
+.Fn getgrgid ,
+.Fn getgrgid_r
+and
+.Fn endgrent
+functions conform to
+.St -p1003.1-96 .
+The
+.Fn setgrent
+function differs from that standard in that its return type is
+.Vt int
+rather than
+.Vt void .
.Sh HISTORY
The functions
.Fn endgrent ,
@@ -236,28 +258,6 @@ and
.Fn getgrgid_r
appeared in
.Fx 5.1 .
-.Sh STANDARDS
-The
-.Fn getgrent ,
-.Fn getgrnam ,
-.Fn getgrnam_r ,
-.Fn getgrgid ,
-.Fn getgrgid_r
-and
-.Fn endgrent
-functions conform to
-.St -p1003.1-96 .
-The
-.Fn setgrent
-function differs from that standard in that its return type is
-.Vt int
-rather than
-.Vt void .
-.Sh COMPATIBILITY
-The historic function
-.Fn setgrfile ,
-which allowed the specification of alternate password databases, has
-been deprecated and is no longer available.
.Sh BUGS
The functions
.Fn getgrent ,
diff --git a/lib/libc/gen/getnetgrent.3 b/lib/libc/gen/getnetgrent.3
index 91d0dd3..aa93324 100644
--- a/lib/libc/gen/getnetgrent.3
+++ b/lib/libc/gen/getnetgrent.3
@@ -118,14 +118,14 @@ have no return value.
.It Pa /etc/netgroup
netgroup database file
.El
-.Sh SEE ALSO
-.Xr netgroup 5
.Sh COMPATIBILITY
The netgroup members have three string fields to maintain compatibility
with other vendor implementations, however it is not obvious what use the
.Sy domain
string has within
.Bx .
+.Sh SEE ALSO
+.Xr netgroup 5
.Sh BUGS
The function
.Fn getnetgrent
diff --git a/lib/libc/gen/getpwent.3 b/lib/libc/gen/getpwent.3
index 5ed800c..64c8986 100644
--- a/lib/libc/gen/getpwent.3
+++ b/lib/libc/gen/getpwent.3
@@ -214,6 +214,22 @@ and
.Fn setpwent
functions
have no return value.
+.Sh FILES
+.Bl -tag -width /etc/master.passwd -compact
+.It Pa /etc/pwd.db
+The insecure password database file
+.It Pa /etc/spwd.db
+The secure password database file
+.It Pa /etc/master.passwd
+The current password file
+.It Pa /etc/passwd
+A Version 7 format password file
+.El
+.Sh COMPATIBILITY
+The historic function
+.Xr setpwfile 3 ,
+which allowed the specification of alternate password databases,
+has been deprecated and is no longer available.
.Sh ERRORS
These routines may fail for any of the errors specified in
.Xr open 2 ,
@@ -231,17 +247,6 @@ and
arguments was insufficiently sized to store the result.
The caller should retry with a larger buffer.
.El
-.Sh FILES
-.Bl -tag -width /etc/master.passwd -compact
-.It Pa /etc/pwd.db
-The insecure password database file
-.It Pa /etc/spwd.db
-The secure password database file
-.It Pa /etc/master.passwd
-The current password file
-.It Pa /etc/passwd
-A Version 7 format password file
-.El
.Sh SEE ALSO
.Xr getlogin 2 ,
.Xr getgrent 3 ,
@@ -250,6 +255,18 @@ A Version 7 format password file
.Xr pwd_mkdb 8 ,
.Xr vipw 8 ,
.Xr yp 8
+.Sh STANDARDS
+The
+.Fn getpwent ,
+.Fn getpwnam ,
+.Fn getpwnam_r ,
+.Fn getpwuid ,
+.Fn getpwuid_r ,
+.Fn setpwent ,
+and
+.Fn endpwent
+functions conform to
+.St -p1003.1-96 .
.Sh HISTORY
The
.Fn getpwent ,
@@ -271,23 +288,6 @@ and
.Fn getpwuid_r
functions appeared in
.Fx 5.1 .
-.Sh STANDARDS
-The
-.Fn getpwent ,
-.Fn getpwnam ,
-.Fn getpwnam_r ,
-.Fn getpwuid ,
-.Fn getpwuid_r ,
-.Fn setpwent ,
-and
-.Fn endpwent
-functions conform to
-.St -p1003.1-96 .
-.Sh COMPATIBILITY
-The historic function
-.Xr setpwfile 3 ,
-which allowed the specification of alternate password databases,
-has been deprecated and is no longer available.
.Sh BUGS
The functions
.Fn getpwent ,
diff --git a/lib/libc/gen/msgsnd.3 b/lib/libc/gen/msgsnd.3
index 257802b..89e9d75 100644
--- a/lib/libc/gen/msgsnd.3
+++ b/lib/libc/gen/msgsnd.3
@@ -167,6 +167,8 @@ points to an invalid address.
.It Bq Er EINTR
The system call was interrupted by the delivery of a signal.
.El
+.Sh HISTORY
+Message queues appeared in the first release of AT&T Unix System V.
.Sh BUGS
.Nx
and
@@ -175,5 +177,3 @@ do not define the
.Er EIDRM
error value, which should be used
in the case of a removed message queue.
-.Sh HISTORY
-Message queues appeared in the first release of AT&T Unix System V.
diff --git a/lib/libc/gen/popen.3 b/lib/libc/gen/popen.3
index 50132a2..ae020da 100644
--- a/lib/libc/gen/popen.3
+++ b/lib/libc/gen/popen.3
@@ -164,6 +164,16 @@ function does not reliably set
.Xr fopen 3 ,
.Xr stdio 3 ,
.Xr system 3
+.Sh HISTORY
+A
+.Fn popen
+and a
+.Fn pclose
+function appeared in
+.At v7 .
+.Pp
+Bidirectional functionality was added in
+.Fx 2.2.6 .
.Sh BUGS
Since the standard input of a command opened for reading
shares its seek offset with the process that called
@@ -189,13 +199,3 @@ always calls
.Xr sh 1 ,
never calls
.Xr csh 1 .
-.Sh HISTORY
-A
-.Fn popen
-and a
-.Fn pclose
-function appeared in
-.At v7 .
-.Pp
-Bidirectional functionality was added in
-.Fx 2.2.6 .
diff --git a/lib/libc/gen/rand48.3 b/lib/libc/gen/rand48.3
index 1bd315e..a703ba0 100644
--- a/lib/libc/gen/rand48.3
+++ b/lib/libc/gen/rand48.3
@@ -177,8 +177,8 @@ generator calls.
.Pp
For a more powerful random number generator, see
.Xr random 3 .
-.Sh AUTHORS
-.An Martin Birgmeier
.Sh SEE ALSO
.Xr rand 3 ,
.Xr random 3
+.Sh AUTHORS
+.An Martin Birgmeier
diff --git a/lib/libc/gen/readpassphrase.3 b/lib/libc/gen/readpassphrase.3
index 48859a9..0d6a7ff 100644
--- a/lib/libc/gen/readpassphrase.3
+++ b/lib/libc/gen/readpassphrase.3
@@ -92,30 +92,9 @@ If an error is encountered, the terminal state is restored and
a
.Dv NULL
pointer is returned.
-.Sh ERRORS
-.Bl -tag -width Er
-.It Bq Er EINTR
-The
-.Fn readpassphrase
-function was interrupted by a signal.
-.It Bq Er EINVAL
-The
-.Fa bufsiz
-argument was zero.
-.It Bq Er EIO
-The process is a member of a background process attempting to read
-from its controlling terminal, the process is ignoring or blocking
-the
-.Dv SIGTTIN
-signal or the process group is orphaned.
-.It Bq Er EMFILE
-The process has already reached its limit for open file descriptors.
-.It Bq Er ENFILE
-The system file table is full.
-.It Bq Er ENOTTY
-There is no controlling terminal and the
-.Dv RPP_REQUIRE_TTY
-flag was specified.
+.Sh FILES
+.Bl -tag -width ".Pa /dev/tty" -compact
+.It Pa /dev/tty
.El
.Sh EXAMPLES
The following code fragment will read a passphrase from
@@ -172,9 +151,30 @@ from a background process) are treated specially.
When the process is resumed after it has been stopped,
.Fn readpassphrase
will reprint the prompt and the user may then enter a passphrase.
-.Sh FILES
-.Bl -tag -width ".Pa /dev/tty" -compact
-.It Pa /dev/tty
+.Sh ERRORS
+.Bl -tag -width Er
+.It Bq Er EINTR
+The
+.Fn readpassphrase
+function was interrupted by a signal.
+.It Bq Er EINVAL
+The
+.Fa bufsiz
+argument was zero.
+.It Bq Er EIO
+The process is a member of a background process attempting to read
+from its controlling terminal, the process is ignoring or blocking
+the
+.Dv SIGTTIN
+signal or the process group is orphaned.
+.It Bq Er EMFILE
+The process has already reached its limit for open file descriptors.
+.It Bq Er ENFILE
+The system file table is full.
+.It Bq Er ENOTTY
+There is no controlling terminal and the
+.Dv RPP_REQUIRE_TTY
+flag was specified.
.El
.Sh SEE ALSO
.Xr sigaction 2 ,
diff --git a/lib/libc/gen/shm_open.3 b/lib/libc/gen/shm_open.3
index 7b62e9a..b68e85b 100644
--- a/lib/libc/gen/shm_open.3
+++ b/lib/libc/gen/shm_open.3
@@ -98,6 +98,15 @@ The
function makes no effort to ensure that
.Fa path
refers to a shared memory object.
+.Sh RETURN VALUES
+If successful,
+.Fn shm_open
+returns a non-negative integer;
+.Fn shm_unlink
+returns zero.
+Both functions return -1 on failure, and set
+.Va errno
+to indicate the error.
.Sh COMPATIBILITY
The
.Fa path
@@ -130,15 +139,6 @@ on a shared memory object, or on the descriptor returned by
is undefined.
It is also undefined whether the shared memory object itself, or its
contents, persist across reboots.
-.Sh RETURN VALUES
-If successful,
-.Fn shm_open
-returns a non-negative integer;
-.Fn shm_unlink
-returns zero.
-Both functions return -1 on failure, and set
-.Va errno
-to indicate the error.
.Sh ERRORS
The
.Fn shm_open
diff --git a/lib/libc/gen/sysconf.3 b/lib/libc/gen/sysconf.3
index 86fb16f..cd6d3ad 100644
--- a/lib/libc/gen/sysconf.3
+++ b/lib/libc/gen/sysconf.3
@@ -195,10 +195,6 @@ argument is invalid.
.Xr pathconf 2 ,
.Xr confstr 3 ,
.Xr sysctl 3
-.Sh BUGS
-The value for _SC_STREAM_MAX is a minimum maximum, and required to be
-the same as ANSI C's FOPEN_MAX, so the returned value is a ridiculously
-small and misleading number.
.Sh STANDARDS
Except for the fact that values returned by
.Fn sysconf
@@ -210,3 +206,7 @@ The
.Fn sysconf
function first appeared in
.Bx 4.4 .
+.Sh BUGS
+The value for _SC_STREAM_MAX is a minimum maximum, and required to be
+the same as ANSI C's FOPEN_MAX, so the returned value is a ridiculously
+small and misleading number.
diff --git a/lib/libc/gen/sysctl.3 b/lib/libc/gen/sysctl.3
index 24d078a..f24f06b 100644
--- a/lib/libc/gen/sysctl.3
+++ b/lib/libc/gen/sysctl.3
@@ -783,6 +783,27 @@ pageout daemon will enter "memory conserving mode" to avoid deadlock.
.El
.Sh RETURN VALUES
.Rv -std
+.Sh FILES
+.Bl -tag -width <netinet/icmpXvar.h> -compact
+.It In sys/sysctl.h
+definitions for top level identifiers, second level kernel and hardware
+identifiers, and user level identifiers
+.It In sys/socket.h
+definitions for second level network identifiers
+.It In sys/gmon.h
+definitions for third level profiling identifiers
+.It In vm/vm_param.h
+definitions for second level virtual memory identifiers
+.It In netinet/in.h
+definitions for third level IPv4/IPv6 identifiers and
+fourth level IPv4/v6 identifiers
+.It In netinet/icmp_var.h
+definitions for fourth level ICMP identifiers
+.It In netinet/icmp6.h
+definitions for fourth level ICMPv6 identifiers
+.It In netinet/udp_var.h
+definitions for fourth level UDP identifiers
+.El
.Sh ERRORS
The following errors may be reported:
.Bl -tag -width Er
@@ -836,27 +857,6 @@ An attempt is made to set a read-only value.
.It Bq Er EPERM
A process without appropriate privilege attempts to set a value.
.El
-.Sh FILES
-.Bl -tag -width <netinet/icmpXvar.h> -compact
-.It In sys/sysctl.h
-definitions for top level identifiers, second level kernel and hardware
-identifiers, and user level identifiers
-.It In sys/socket.h
-definitions for second level network identifiers
-.It In sys/gmon.h
-definitions for third level profiling identifiers
-.It In vm/vm_param.h
-definitions for second level virtual memory identifiers
-.It In netinet/in.h
-definitions for third level IPv4/IPv6 identifiers and
-fourth level IPv4/v6 identifiers
-.It In netinet/icmp_var.h
-definitions for fourth level ICMP identifiers
-.It In netinet/icmp6.h
-definitions for fourth level ICMPv6 identifiers
-.It In netinet/udp_var.h
-definitions for fourth level UDP identifiers
-.El
.Sh SEE ALSO
.Xr sysconf 3 ,
.Xr sysctl 8
diff --git a/lib/libc/gen/time.3 b/lib/libc/gen/time.3
index 9494ec7..241494a 100644
--- a/lib/libc/gen/time.3
+++ b/lib/libc/gen/time.3
@@ -77,6 +77,11 @@ The
.Nm
function conforms to
.St -p1003.1-2001 .
+.Sh HISTORY
+A
+.Fn time
+function appeared in
+.At v6 .
.Sh BUGS
Neither
.St -isoC-99
@@ -97,8 +102,3 @@ standards (including older versions of
did not set
.No \&* Ns Va tloc
in the error case.
-.Sh HISTORY
-A
-.Fn time
-function appeared in
-.At v6 .
diff --git a/lib/libc/gen/utime.3 b/lib/libc/gen/utime.3
index 19134f5..aed098e 100644
--- a/lib/libc/gen/utime.3
+++ b/lib/libc/gen/utime.3
@@ -84,13 +84,13 @@ for any of the errors specified for the library function
.Sh SEE ALSO
.Xr stat 2 ,
.Xr utimes 2
-.Sh HISTORY
-A
-.Fn utime
-function appeared in
-.At v7 .
.Sh STANDARDS
The
.Fn utime
function conforms to
.St -p1003.1-88 .
+.Sh HISTORY
+A
+.Fn utime
+function appeared in
+.At v7 .
diff --git a/lib/libc/locale/isblank.3 b/lib/libc/locale/isblank.3
index 3b269bf..c03cfd3 100644
--- a/lib/libc/locale/isblank.3
+++ b/lib/libc/locale/isblank.3
@@ -66,6 +66,11 @@ representable as an
.Li unsigned char
or the value of
.Dv EOF .
+.Sh RETURN VALUES
+The
+.Fn isblank
+function returns zero if the character tests false and
+returns non-zero if the character tests true.
.Sh COMPATIBILITY
The
.Bx 4.4
@@ -76,11 +81,6 @@ and may not be supported in future releases.
The
.Fn iswblank
function should be used instead.
-.Sh RETURN VALUES
-The
-.Fn isblank
-function returns zero if the character tests false and
-returns non-zero if the character tests true.
.Sh SEE ALSO
.Xr ctype 3 ,
.Xr iswblank 3 ,
diff --git a/lib/libc/locale/nl_langinfo.3 b/lib/libc/locale/nl_langinfo.3
index 57071c4..8de1682 100644
--- a/lib/libc/locale/nl_langinfo.3
+++ b/lib/libc/locale/nl_langinfo.3
@@ -54,17 +54,6 @@ or to the
category
.Dv LC_ALL ,
may overwrite buffer pointed by the return value.
-.Sh EXAMPLES
-For example:
-.Pp
-.Dl nl_langinfo(ABDAY_1)
-.Pp
-would return a pointer to the string
-.Qq Li Dom
-if the identified language was
-Portuguese, and
-.Qq Li Sun
-if the identified language was English.
.Sh RETURN VALUES
In a locale where langinfo data is not defined,
.Fn nl_langinfo
@@ -76,6 +65,17 @@ In all locales,
returns a pointer to an empty string if
.Fa item
contains an invalid setting.
+.Sh EXAMPLES
+For example:
+.Pp
+.Dl nl_langinfo(ABDAY_1)
+.Pp
+would return a pointer to the string
+.Qq Li Dom
+if the identified language was
+Portuguese, and
+.Qq Li Sun
+if the identified language was English.
.Sh SEE ALSO
.Xr setlocale 3
.Sh STANDARDS
diff --git a/lib/libc/locale/setlocale.3 b/lib/libc/locale/setlocale.3
index d8b8855..0d958d0 100644
--- a/lib/libc/locale/setlocale.3
+++ b/lib/libc/locale/setlocale.3
@@ -143,8 +143,6 @@ if the given combination of
and
.Fa locale
makes no sense.
-.Sh ERRORS
-No errors are defined.
.Sh FILES
.Bl -tag -width /usr/share/locale/locale/category -compact
.It Pa $PATH_LOCALE/ Ns Em locale/category
@@ -154,6 +152,8 @@ locale file for the locale
and the category
.Em category .
.El
+.Sh ERRORS
+No errors are defined.
.Sh SEE ALSO
.Xr colldef 1 ,
.Xr mklocale 1 ,
diff --git a/lib/libc/net/ethers.3 b/lib/libc/net/ethers.3
index 4f774e5..a132447 100644
--- a/lib/libc/net/ethers.3
+++ b/lib/libc/net/ethers.3
@@ -187,6 +187,11 @@ file.
.Sh SEE ALSO
.Xr ethers 5 ,
.Xr yp 8
+.Sh HISTORY
+This particular implementation of the
+.Nm
+library functions were written for and first appeared in
+.Fx 2.1 .
.Sh BUGS
The
.Fn ether_aton
@@ -194,8 +199,3 @@ and
.Fn ether_ntoa
functions returns values that are stored in static memory areas
which may be overwritten the next time they are called.
-.Sh HISTORY
-This particular implementation of the
-.Nm
-library functions were written for and first appeared in
-.Fx 2.1 .
diff --git a/lib/libc/net/eui64.3 b/lib/libc/net/eui64.3
index 7a500dd..3000c74 100644
--- a/lib/libc/net/eui64.3
+++ b/lib/libc/net/eui64.3
@@ -215,6 +215,12 @@ file.
.Xr firewire 4 ,
.Xr eui64 5 ,
.Xr yp 8
+.Sh HISTORY
+These functions first appears in
+.Fx 5.3 .
+They are derived from the
+.Xr ethers 3
+family of functions.
.Sh BUGS
The
.Fn eui64_aton
@@ -222,9 +228,3 @@ and
.Fn eui64_ntoa
functions returns values that are stored in static memory areas
which may be overwritten the next time they are called.
-.Sh HISTORY
-These functions first appears in
-.Fx 5.3 .
-They are derived from the
-.Xr ethers 3
-family of functions.
diff --git a/lib/libc/net/getaddrinfo.3 b/lib/libc/net/getaddrinfo.3
index e44a947..e72fb25 100644
--- a/lib/libc/net/getaddrinfo.3
+++ b/lib/libc/net/getaddrinfo.3
@@ -397,6 +397,13 @@ The current implementation assumes a one-to-one relationship between
interfaces and links, which is not necessarily true according to the
specification.
.\"
+.Sh FILES
+.Bl -tag -width /etc/nsswitch.conf -compact
+.It Pa /etc/hosts
+.It Pa /etc/nsswitch.conf
+.It Pa /etc/resolv.conf
+.El
+.\"
.Sh EXAMPLES
The following code tries to connect to
.Dq Li www.kame.net
@@ -504,13 +511,6 @@ if (nsock == 0) {
freeaddrinfo(res0);
.Ed
.\"
-.Sh FILES
-.Bl -tag -width /etc/nsswitch.conf -compact
-.It Pa /etc/hosts
-.It Pa /etc/nsswitch.conf
-.It Pa /etc/resolv.conf
-.El
-.\"
.Sh DIAGNOSTICS
Error return status from
.Fn getaddrinfo
@@ -606,9 +606,6 @@ indicate an unknown error.
.%D June 2000
.Re
.\"
-.Sh HISTORY
-The implementation first appeared in WIDE Hydrangea IPv6 protocol stack kit.
-.\"
.Sh STANDARDS
The
.Fn getaddrinfo
@@ -618,6 +615,9 @@ and documented in
.Dq Basic Socket Interface Extensions for IPv6
(RFC2553).
.\"
+.Sh HISTORY
+The implementation first appeared in WIDE Hydrangea IPv6 protocol stack kit.
+.\"
.Sh BUGS
Although the current implementation is otherwise thread-safe, using
.Fn getaddrinfo
diff --git a/lib/libc/net/getifaddrs.3 b/lib/libc/net/getifaddrs.3
index 8387723..29ea50c 100644
--- a/lib/libc/net/getifaddrs.3
+++ b/lib/libc/net/getifaddrs.3
@@ -142,16 +142,6 @@ for any of the errors specified for the library routines
.Xr malloc 3
or
.Xr sysctl 3 .
-.Sh BUGS
-If both
-.In net/if.h
-and
-.In ifaddrs.h
-are being included,
-.In net/if.h
-.Em must
-be included before
-.In ifaddrs.h .
.Sh SEE ALSO
.Xr ioctl 2 ,
.Xr socket 2 ,
@@ -163,3 +153,13 @@ The
.Nm
implementation first appeared in BSDi
.Bsx .
+.Sh BUGS
+If both
+.In net/if.h
+and
+.In ifaddrs.h
+are being included,
+.In net/if.h
+.Em must
+be included before
+.In ifaddrs.h .
diff --git a/lib/libc/net/getifmaddrs.3 b/lib/libc/net/getifmaddrs.3
index 613a187..2d2a936 100644
--- a/lib/libc/net/getifmaddrs.3
+++ b/lib/libc/net/getifmaddrs.3
@@ -95,6 +95,15 @@ for any of the errors specified for the library routines
.Xr malloc 3
or
.Xr sysctl 3 .
+.Sh SEE ALSO
+.Xr sysctl 3 ,
+.Xr networking 4 ,
+.Xr ifconfig 8
+.Sh HISTORY
+The
+.Fn getifmaddrs
+function first appeared in
+.Fx 5.2 .
.Sh BUGS
If both
.In net/if.h
@@ -105,12 +114,3 @@ are being included,
.Em must
be included before
.In ifaddrs.h .
-.Sh SEE ALSO
-.Xr sysctl 3 ,
-.Xr networking 4 ,
-.Xr ifconfig 8
-.Sh HISTORY
-The
-.Fn getifmaddrs
-function first appeared in
-.Fx 5.2 .
diff --git a/lib/libc/net/getipnodebyname.3 b/lib/libc/net/getipnodebyname.3
index 241b6fa..d9de5bf 100644
--- a/lib/libc/net/getipnodebyname.3
+++ b/lib/libc/net/getipnodebyname.3
@@ -447,9 +447,6 @@ The meanings of each error code are described in
.%D March 1999
.Re
.\"
-.Sh HISTORY
-The implementation first appeared in KAME advanced networking kit.
-.\"
.Sh STANDARDS
The
.Fn getipnodebyname
@@ -460,6 +457,9 @@ are documented in
.Dq Basic Socket Interface Extensions for IPv6
(RFC2553).
.\"
+.Sh HISTORY
+The implementation first appeared in KAME advanced networking kit.
+.\"
.Sh BUGS
Although the current implementation is otherwise thread-safe, using
it in conjunction with
diff --git a/lib/libc/net/getnameinfo.3 b/lib/libc/net/getnameinfo.3
index 7965318..5691815 100644
--- a/lib/libc/net/getnameinfo.3
+++ b/lib/libc/net/getnameinfo.3
@@ -187,6 +187,13 @@ Refer to
.Xr getaddrinfo 3
for the notation.
.\"
+.Sh FILES
+.Bl -tag -width /etc/nsswitch.conf -compact
+.It Pa /etc/hosts
+.It Pa /etc/nsswitch.conf
+.It Pa /etc/resolv.conf
+.El
+.\"
.Sh EXAMPLES
The following code tries to get numeric hostname, and service name,
for given socket address.
@@ -216,13 +223,6 @@ if (getnameinfo(sa, sa->sa_len, hbuf, sizeof(hbuf), NULL, 0,
printf("host=%s\\n", hbuf);
.Ed
.\"
-.Sh FILES
-.Bl -tag -width /etc/nsswitch.conf -compact
-.It Pa /etc/hosts
-.It Pa /etc/nsswitch.conf
-.It Pa /etc/resolv.conf
-.El
-.\"
.Sh DIAGNOSTICS
The function indicates successful completion by a zero return value;
a non-zero return value indicates failure.
@@ -284,9 +284,6 @@ The error code can be found in errno.
.%D June 2000
.Re
.\"
-.Sh HISTORY
-The implementation first appeared in WIDE Hydrangea IPv6 protocol stack kit.
-.\"
.Sh STANDARDS
The
.Fn getaddrinfo
@@ -296,6 +293,9 @@ and documented in
.Dq Basic Socket Interface Extensions for IPv6
(RFC2553).
.\"
+.Sh HISTORY
+The implementation first appeared in WIDE Hydrangea IPv6 protocol stack kit.
+.\"
.Sh BUGS
Though the current implementation should be thread-safe, using
.Fn getnameinfo
diff --git a/lib/libc/net/hesiod.3 b/lib/libc/net/hesiod.3
index d91db9e..bae4e44 100644
--- a/lib/libc/net/hesiod.3
+++ b/lib/libc/net/hesiod.3
@@ -113,12 +113,6 @@ If the environment variable
.Ev HESIOD_CONFIG
is set, it specifies the location of the Hesiod configuration file.
.El
-.Sh SEE ALSO
-.Xr hesiod.conf 5 ,
-.Xr named 8
-.Rs
-.%T "Hesiod - Project Athena Technical Plan -- Name Service"
-.Re
.Sh ERRORS
Hesiod calls may fail because of:
.Bl -tag -width Er
@@ -159,6 +153,12 @@ argument had a domain extension which could not be resolved with type
.Dq rhs\-extension
in the local Hesiod domain.
.El
+.Sh SEE ALSO
+.Xr hesiod.conf 5 ,
+.Xr named 8
+.Rs
+.%T "Hesiod - Project Athena Technical Plan -- Name Service"
+.Re
.Sh AUTHORS
.An Steve Dyer ,
IBM/Project Athena
diff --git a/lib/libc/net/inet6_opt_init.3 b/lib/libc/net/inet6_opt_init.3
index 88dd483..e397099 100644
--- a/lib/libc/net/inet6_opt_init.3
+++ b/lib/libc/net/inet6_opt_init.3
@@ -279,17 +279,17 @@ multiple fields.
Robust receivers might want to verify alignment before calling
this function.
.\"
-.Sh DIAGNOSTICS
-All the functions return
-\-1
-on an error.
-.\"
.Sh EXAMPLES
draft-ietf-ipngwg-rfc2292bis-08.txt
gives comprehensive examples in Section 23.
.Pp
KAME also provides examples in the advapitest directory of its kit.
.\"
+.Sh DIAGNOSTICS
+All the functions return
+\-1
+on an error.
+.\"
.Sh SEE ALSO
.Rs
.%A W. Stevens
@@ -307,13 +307,13 @@ KAME also provides examples in the advapitest directory of its kit.
.%N RFC2460
.%D December 1998
.Re
-.Sh HISTORY
-The implementation first appeared in KAME advanced networking kit.
.Sh STANDARDS
The functions
are documented in
.Dq Advanced Sockets API for IPv6
.Pq draft-ietf-ipngwg-rfc2292bis-08.txt .
.\"
+.Sh HISTORY
+The implementation first appeared in KAME advanced networking kit.
.Sh BUGS
The text was shamelessly copied from internet-drafts for RFC2292bis.
diff --git a/lib/libc/net/inet6_option_space.3 b/lib/libc/net/inet6_option_space.3
index 15374b8..cf49fdf 100644
--- a/lib/libc/net/inet6_option_space.3
+++ b/lib/libc/net/inet6_option_space.3
@@ -422,6 +422,9 @@ and
is not
.Dv NULL .
.\"
+.Sh EXAMPLES
+RFC2292 gives comprehensive examples in chapter 6.
+.\"
.Sh DIAGNOSTICS
The
.Fn inet6_option_init
@@ -453,9 +456,6 @@ to non
.Dv NULL
value.
.\"
-.Sh EXAMPLES
-RFC2292 gives comprehensive examples in chapter 6.
-.\"
.Sh SEE ALSO
.Rs
.%A W. Stevens
@@ -472,14 +472,14 @@ RFC2292 gives comprehensive examples in chapter 6.
.%D December 1998
.Re
.\"
-.Sh HISTORY
-The implementation first appeared in KAME advanced networking kit.
-.\"
.Sh STANDARDS
The functions
are documented in
.Dq Advanced Sockets API for IPv6
(RFC2292).
.\"
+.Sh HISTORY
+The implementation first appeared in KAME advanced networking kit.
+.\"
.Sh BUGS
The text was shamelessly copied from RFC2292.
diff --git a/lib/libc/net/inet6_rth_space.3 b/lib/libc/net/inet6_rth_space.3
index 34e3f26..e10d8e5 100644
--- a/lib/libc/net/inet6_rth_space.3
+++ b/lib/libc/net/inet6_rth_space.3
@@ -217,6 +217,12 @@ to obtain the number of segments in the Routing header.
Upon an error the return value of the function is
.Dv NULL .
.\"
+.Sh EXAMPLES
+draft-ietf-ipngwg-rfc2292bis-08.txt
+gives comprehensive examples in Section 22.
+.Pp
+KAME also provides examples in the advapitest directory of its kit.
+.\"
.Sh DIAGNOSTICS
The
.Fn inet6_rth_space
@@ -238,12 +244,6 @@ and
functions
return 0 on success, or \-1 upon an error.
.\"
-.Sh EXAMPLES
-draft-ietf-ipngwg-rfc2292bis-08.txt
-gives comprehensive examples in Section 22.
-.Pp
-KAME also provides examples in the advapitest directory of its kit.
-.\"
.Sh SEE ALSO
.Rs
.%A W. Stevens
@@ -261,13 +261,13 @@ KAME also provides examples in the advapitest directory of its kit.
.%N RFC2460
.%D December 1998
.Re
-.Sh HISTORY
-The implementation first appeared in KAME advanced networking kit.
.Sh STANDARDS
The functions
are documented in
.Dq Advanced Sockets API for IPv6
.Pq draft-ietf-ipngwg-rfc2292bis-08.txt .
.\"
+.Sh HISTORY
+The implementation first appeared in KAME advanced networking kit.
.Sh BUGS
The text was shamelessly copied from internet-drafts for RFC2292bis.
diff --git a/lib/libc/net/inet6_rthdr_space.3 b/lib/libc/net/inet6_rthdr_space.3
index 9c3e5be..4de2359 100644
--- a/lib/libc/net/inet6_rthdr_space.3
+++ b/lib/libc/net/inet6_rthdr_space.3
@@ -268,6 +268,9 @@ Upon an error the return value of the function is -1.
Note: Addresses are indexed starting at 1, and flags starting at 0,
to maintain consistency with the terminology and figures in RFC2460.
.\"
+.Sh EXAMPLES
+RFC2292 gives comprehensive examples in chapter 8.
+.\"
.Sh DIAGNOSTICS
The
.Fn inet6_rthdr_space
@@ -298,9 +301,6 @@ and
functions
return -1 on error.
.\"
-.Sh EXAMPLES
-RFC2292 gives comprehensive examples in chapter 8.
-.\"
.Sh SEE ALSO
.Rs
.%A W. Stevens
@@ -317,15 +317,15 @@ RFC2292 gives comprehensive examples in chapter 8.
.%D December 1998
.Re
.\"
-.Sh HISTORY
-The implementation first appeared in KAME advanced networking kit.
-.\"
.Sh STANDARDS
The functions
are documented in
.Dq Advanced Sockets API for IPv6
(RFC2292).
.\"
+.Sh HISTORY
+The implementation first appeared in KAME advanced networking kit.
+.\"
.Sh BUGS
The text was shamelessly copied from RFC2292.
.Pp
diff --git a/lib/libc/net/rcmdsh.3 b/lib/libc/net/rcmdsh.3
index 91b81b9..03e7dab 100644
--- a/lib/libc/net/rcmdsh.3
+++ b/lib/libc/net/rcmdsh.3
@@ -107,10 +107,6 @@ and a diagnostic message is printed on the standard error.
.Xr socketpair 2 ,
.Xr rcmd 3 ,
.Xr rshd 8
-.Sh BUGS
-If
-.Xr rsh 1
-encounters an error, a file descriptor is still returned instead of \-1.
.Sh HISTORY
The
.Fn rcmdsh
@@ -118,3 +114,7 @@ function first appeared in
.Ox 2.0 ,
and made its way into
.Fx 4.6 .
+.Sh BUGS
+If
+.Xr rsh 1
+encounters an error, a file descriptor is still returned instead of \-1.
diff --git a/lib/libc/net/resolver.3 b/lib/libc/net/resolver.3
index 49257bf..a736db9 100644
--- a/lib/libc/net/resolver.3
+++ b/lib/libc/net/resolver.3
@@ -399,17 +399,17 @@ function puts a 32-bit quantity
.Fa src
to a buffer pointed to by
.Fa dst .
-.Sh RETURN VALUES
-The
-.Fn res_init
-function will return 0 on success, or \-1 in a threaded program if
-per-thread storage could not be allocated.
.Sh IMPLEMENTATION NOTES
This implementation of the resolver is thread-safe, but it will not
function properly if the programmer attempts to declare his or her own
.Va _res
structure in an attempt to replace the per-thread version referred to
by that macro.
+.Sh RETURN VALUES
+The
+.Fn res_init
+function will return 0 on success, or \-1 in a threaded program if
+per-thread storage could not be allocated.
.Sh FILES
.Bl -tag -width /etc/resolv.conf
.It Pa /etc/resolv.conf
diff --git a/lib/libc/posix1e/mac.3 b/lib/libc/posix1e/mac.3
index 7a25542..4dce03e 100644
--- a/lib/libc/posix1e/mac.3
+++ b/lib/libc/posix1e/mac.3
@@ -134,6 +134,11 @@ The behavior of some of these calls is influenced by the configuration
settings found in
.Xr mac.conf 5 ,
the MAC library run-time configuration file.
+.Sh IMPLEMENTATION NOTES
+.Fx Ns 's
+support for POSIX.1e interfaces and features
+is
+.Ud .
.Sh FILES
.Bl -tag -width ".Pa /etc/mac.conf" -compact
.It Pa /etc/mac.conf
@@ -142,11 +147,6 @@ MAC library configuration file, documented in
Provides default behavior for applications aware of MAC labels on
system objects, but without policy-specific knowledge.
.El
-.Sh IMPLEMENTATION NOTES
-.Fx Ns 's
-support for POSIX.1e interfaces and features
-is
-.Ud .
.Sh SEE ALSO
.Xr mac_free 3 ,
.Xr mac_get 3 ,
diff --git a/lib/libc/posix1e/mac.conf.5 b/lib/libc/posix1e/mac.conf.5
index 6ccd38d..a8dfba2 100644
--- a/lib/libc/posix1e/mac.conf.5
+++ b/lib/libc/posix1e/mac.conf.5
@@ -63,6 +63,11 @@ Label element names may optionally begin with a
symbol to indicate that a failure to retrieve the label element for
an object should be silently ignored, and improves usability if the
set of MAC policies may change over time.
+.Sh FILES
+.Bl -tag -width ".Pa /etc/mac.conf" -compact
+.It Pa /etc/mac.conf
+MAC library configuration file.
+.El
.Sh EXAMPLES
The following example configures user applications to operate with
four MAC policies:
@@ -93,11 +98,6 @@ MLS, and SEBSD labels for all object classes; for processes, they will
additionally attempt to retrieve a Partition identifier.
In all cases except the Partition identifier, failure to retrieve a
label due to the respective policy not being present will be ignored.
-.Sh FILES
-.Bl -tag -width ".Pa /etc/mac.conf" -compact
-.It Pa /etc/mac.conf
-MAC library configuration file.
-.El
.Sh SEE ALSO
.Xr mac 3 ,
.Xr mac_get 3 ,
diff --git a/lib/libc/regex/regex.3 b/lib/libc/regex/regex.3
index f10b841..7800575 100644
--- a/lib/libc/regex/regex.3
+++ b/lib/libc/regex/regex.3
@@ -588,14 +588,6 @@ and
beginning and ending subexpressions in obsolete
.Pq Dq basic
REs are anchors, not ordinary characters.
-.Sh SEE ALSO
-.Xr grep 1 ,
-.Xr re_format 7
-.Pp
-.St -p1003.2 ,
-sections 2.8 (Regular Expression Notation)
-and
-B.5 (C Binding for Regular Expression Matching).
.Sh DIAGNOSTICS
Non-zero error codes from
.Fn regcomp
@@ -655,6 +647,14 @@ invalid argument, e.g.\& negative-length string
.It Dv REG_ILLSEQ
illegal byte sequence (bad multibyte character)
.El
+.Sh SEE ALSO
+.Xr grep 1 ,
+.Xr re_format 7
+.Pp
+.St -p1003.2 ,
+sections 2.8 (Regular Expression Notation)
+and
+B.5 (C Binding for Regular Expression Matching).
.Sh HISTORY
Originally written by
.An Henry Spencer .
diff --git a/lib/libc/rpc/getrpcent.3 b/lib/libc/rpc/getrpcent.3
index 4d209b5..1a999eb 100644
--- a/lib/libc/rpc/getrpcent.3
+++ b/lib/libc/rpc/getrpcent.3
@@ -92,16 +92,16 @@ program number is found, or until end-of-file is encountered.
.Bl -tag -width /etc/rpc -compact
.It Pa /etc/rpc
.El
-.Sh SEE ALSO
-.Xr rpc 5 ,
-.Xr rpcinfo 8 ,
-.Xr ypserv 8
.Sh DIAGNOSTICS
A
.Dv NULL
pointer is returned on
.Dv EOF
or error.
+.Sh SEE ALSO
+.Xr rpc 5 ,
+.Xr rpcinfo 8 ,
+.Xr ypserv 8
.Sh BUGS
All information
is contained in a static area
diff --git a/lib/libc/rpc/rpc.5 b/lib/libc/rpc/rpc.5
index a45cc2d..398d9aa 100644
--- a/lib/libc/rpc/rpc.5
+++ b/lib/libc/rpc/rpc.5
@@ -33,6 +33,10 @@ A hash
.Pq Dq Li #
indicates the beginning of a comment; characters up to the end of
the line are not interpreted by routines which search the file.
+.Sh FILES
+.Bl -tag -width /etc/nsswitch.conf -compact
+.It Pa /etc/nsswitch.conf
+.El
.Sh EXAMPLES
Below is an example of an RPC database:
.Bd -literal
@@ -51,9 +55,5 @@ status 100024
bootparam 100026
keyserv 100029 keyserver
.Ed
-.Sh FILES
-.Bl -tag -width /etc/nsswitch.conf -compact
-.It Pa /etc/nsswitch.conf
-.El
.Sh SEE ALSO
.Xr getrpcent 3
diff --git a/lib/libc/stdio/mktemp.3 b/lib/libc/stdio/mktemp.3
index 432d0de..43cef21 100644
--- a/lib/libc/stdio/mktemp.3
+++ b/lib/libc/stdio/mktemp.3
@@ -190,6 +190,33 @@ so that it will store string constants in a writable segment of memory.
See
.Xr gcc 1
for more information.
+.Sh SEE ALSO
+.Xr chmod 2 ,
+.Xr getpid 2 ,
+.Xr mkdir 2 ,
+.Xr open 2 ,
+.Xr stat 2
+.Sh HISTORY
+A
+.Fn mktemp
+function appeared in
+.At v7 .
+The
+.Fn mkstemp
+function appeared in
+.Bx 4.4 .
+The
+.Fn mkdtemp
+function first appeared in
+.Ox 2.2 ,
+and later in
+.Fx 3.2 .
+The
+.Fn mkstemps
+function first appeared in
+.Ox 2.4 ,
+and later in
+.Fx 3.4 .
.Sh BUGS
This family of functions produces filenames which can be guessed,
though the risk is minimized when large numbers of
@@ -226,30 +253,3 @@ which is not reentrant.
You must provide your own locking around this and other consumers of the
.Xr arc4random 3
API.
-.Sh SEE ALSO
-.Xr chmod 2 ,
-.Xr getpid 2 ,
-.Xr mkdir 2 ,
-.Xr open 2 ,
-.Xr stat 2
-.Sh HISTORY
-A
-.Fn mktemp
-function appeared in
-.At v7 .
-The
-.Fn mkstemp
-function appeared in
-.Bx 4.4 .
-The
-.Fn mkdtemp
-function first appeared in
-.Ox 2.2 ,
-and later in
-.Fx 3.2 .
-The
-.Fn mkstemps
-function first appeared in
-.Ox 2.4 ,
-and later in
-.Fx 3.4 .
diff --git a/lib/libc/stdio/stdio.3 b/lib/libc/stdio/stdio.3
index ab5d1fd..e839bea 100644
--- a/lib/libc/stdio/stdio.3
+++ b/lib/libc/stdio/stdio.3
@@ -237,10 +237,6 @@ definitions are explicitly removed.
.Xr open 2 ,
.Xr read 2 ,
.Xr write 2
-.Sh BUGS
-The standard buffered functions do not interact well with certain other
-library and system functions, especially
-.Xr vfork 2 .
.Sh STANDARDS
The
.Nm
@@ -331,3 +327,7 @@ library conforms to
.It "vwprintf formatted wide character output conversion"
.It "wprintf formatted wide character output conversion"
.El
+.Sh BUGS
+The standard buffered functions do not interact well with certain other
+library and system functions, especially
+.Xr vfork 2 .
diff --git a/lib/libc/stdio/tmpnam.3 b/lib/libc/stdio/tmpnam.3
index 7937a0a..825c3c9 100644
--- a/lib/libc/stdio/tmpnam.3
+++ b/lib/libc/stdio/tmpnam.3
@@ -156,6 +156,30 @@ return a pointer to a file name on success, and a
.Dv NULL
pointer
on error.
+.Sh COMPATIBILITY
+These interfaces are provided from System V and
+.Tn ANSI
+compatibility only.
+.Pp
+Most historic implementations of these functions provide
+only a limited number of possible temporary file names
+(usually 26)
+before file names will start being recycled.
+System V implementations of these functions
+(and of
+.Xr mktemp 3 )
+use the
+.Xr access 2
+system call to determine whether or not the temporary file
+may be created.
+This has obvious ramifications for setuid or setgid programs,
+complicating the portable use of these interfaces in such programs.
+.Pp
+The
+.Fn tmpfile
+interface should not be used in software expected to be used on other systems
+if there is any possibility that the user does not wish the temporary file to
+be publicly readable and writable.
.Sh ERRORS
The
.Fn tmpfile
@@ -202,30 +226,6 @@ It is strongly suggested that
be used in place of these functions.
(See
the FSA.)
-.Sh COMPATIBILITY
-These interfaces are provided from System V and
-.Tn ANSI
-compatibility only.
-.Pp
-Most historic implementations of these functions provide
-only a limited number of possible temporary file names
-(usually 26)
-before file names will start being recycled.
-System V implementations of these functions
-(and of
-.Xr mktemp 3 )
-use the
-.Xr access 2
-system call to determine whether or not the temporary file
-may be created.
-This has obvious ramifications for setuid or setgid programs,
-complicating the portable use of these interfaces in such programs.
-.Pp
-The
-.Fn tmpfile
-interface should not be used in software expected to be used on other systems
-if there is any possibility that the user does not wish the temporary file to
-be publicly readable and writable.
.Sh SEE ALSO
.Xr mkstemp 3 ,
.Xr mktemp 3
diff --git a/lib/libc/stdlib/getenv.3 b/lib/libc/stdlib/getenv.3
index c5ed228..a75e49f 100644
--- a/lib/libc/stdlib/getenv.3
+++ b/lib/libc/stdlib/getenv.3
@@ -142,6 +142,17 @@ The
.Fn getenv
function conforms to
.St -isoC .
+.Sh HISTORY
+The functions
+.Fn setenv
+and
+.Fn unsetenv
+appeared in
+.At v7 .
+The
+.Fn putenv
+function appeared in
+.Bx 4.3 Reno .
.Sh BUGS
Successive calls to
.Fn setenv
@@ -161,14 +172,3 @@ are copied and that old values remain accessible indefinitely) make this
bug unavoidable.
Future versions may eliminate one or both of these
semantic guarantees in order to fix the bug.
-.Sh HISTORY
-The functions
-.Fn setenv
-and
-.Fn unsetenv
-appeared in
-.At v7 .
-The
-.Fn putenv
-function appeared in
-.Bx 4.3 Reno .
diff --git a/lib/libc/stdlib/getopt_long.3 b/lib/libc/stdlib/getopt_long.3
index e36ff84..352af08 100644
--- a/lib/libc/stdlib/getopt_long.3
+++ b/lib/libc/stdlib/getopt_long.3
@@ -213,6 +213,18 @@ if there was a missing option argument,
.Ql \&?
if the user specified an unknown or ambiguous option, and
\-1 when the argument list has been exhausted.
+.Sh ENVIRONMENT
+.Bl -tag -width ".Ev POSIXLY_CORRECT"
+.It Ev POSIXLY_CORRECT
+If set, option processing stops when the first non-option is found and
+a leading
+.Ql -
+or
+.Ql +
+in the
+.Fa optstring
+is ignored.
+.El
.Sh EXAMPLES
.Bd -literal -compact
int bflag, ch, fd;
@@ -450,18 +462,6 @@ relative
to current positions) are the same, though.
(We do fewer variable swaps.)
.El
-.Sh ENVIRONMENT
-.Bl -tag -width ".Ev POSIXLY_CORRECT"
-.It Ev POSIXLY_CORRECT
-If set, option processing stops when the first non-option is found and
-a leading
-.Ql -
-or
-.Ql +
-in the
-.Fa optstring
-is ignored.
-.El
.Sh SEE ALSO
.Xr getopt 3
.Sh HISTORY
diff --git a/lib/libc/stdlib/hcreate.3 b/lib/libc/stdlib/hcreate.3
index 88943c1..38743af 100644
--- a/lib/libc/stdlib/hcreate.3
+++ b/lib/libc/stdlib/hcreate.3
@@ -133,16 +133,6 @@ could not be found or the
is
.Dv ENTER
and the table is full.
-.Sh ERRORS
-The
-.Fn hcreate
-and
-.Fn hsearch
-functions may fail if:
-.Bl -tag -width Er
-.It Bq Er ENOMEM
-Insufficient storage space is available.
-.El
.Sh EXAMPLES
The following example reads in strings followed by two numbers
and stores them in a hash table, discarding duplicates.
@@ -200,6 +190,16 @@ main(void)
return 0;
}
.Ed
+.Sh ERRORS
+The
+.Fn hcreate
+and
+.Fn hsearch
+functions may fail if:
+.Bl -tag -width Er
+.It Bq Er ENOMEM
+Insufficient storage space is available.
+.El
.Sh SEE ALSO
.Xr bsearch 3 ,
.Xr lsearch 3 ,
diff --git a/lib/libc/stdlib/lsearch.3 b/lib/libc/stdlib/lsearch.3
index e3a324c..5e76724 100644
--- a/lib/libc/stdlib/lsearch.3
+++ b/lib/libc/stdlib/lsearch.3
@@ -85,6 +85,13 @@ if an error occurs.
.Xr bsearch 3 ,
.Xr hsearch 3 ,
.Xr tsearch 3
+.Sh STANDARDS
+The
+.Fn lsearch
+and
+.Fn lfind
+functions conform to
+.St -p1003.1-2001 .
.Sh HISTORY
The
.Fn lsearch
@@ -96,10 +103,3 @@ In
.Fx 5.0 ,
they reappeared conforming to
.St -p1003.1-2001 .
-.Sh STANDARDS
-The
-.Fn lsearch
-and
-.Fn lfind
-functions conform to
-.St -p1003.1-2001 .
diff --git a/lib/libc/stdlib/malloc.3 b/lib/libc/stdlib/malloc.3
index d2916da..8974f7c 100644
--- a/lib/libc/stdlib/malloc.3
+++ b/lib/libc/stdlib/malloc.3
@@ -262,29 +262,6 @@ and
options are intended for testing and debugging.
An application which changes its behavior when these options are used
is flawed.
-.Sh EXAMPLES
-To set a systemwide reduction of cache size, and to dump core whenever
-a problem occurs:
-.Pp
-.Bd -literal -offset indent
-ln -s 'A<' /etc/malloc.conf
-.Ed
-.Pp
-To specify in the source that a program does no return value checking
-on calls to these functions:
-.Bd -literal -offset indent
-_malloc_options = "X";
-.Ed
-.Sh ENVIRONMENT
-The following environment variables affect the execution of the allocation
-functions:
-.Bl -tag -width ".Ev MALLOC_OPTIONS"
-.It Ev MALLOC_OPTIONS
-If the environment variable
-.Ev MALLOC_OPTIONS
-is set, the characters it contains will be interpreted as flags to the
-allocation functions.
-.El
.Sh RETURN VALUES
The
.Fn malloc
@@ -464,6 +441,29 @@ Even with the
.Dq A
option set, this warning is still only a warning.
.El
+.Sh ENVIRONMENT
+The following environment variables affect the execution of the allocation
+functions:
+.Bl -tag -width ".Ev MALLOC_OPTIONS"
+.It Ev MALLOC_OPTIONS
+If the environment variable
+.Ev MALLOC_OPTIONS
+is set, the characters it contains will be interpreted as flags to the
+allocation functions.
+.El
+.Sh EXAMPLES
+To set a systemwide reduction of cache size, and to dump core whenever
+a problem occurs:
+.Pp
+.Bd -literal -offset indent
+ln -s 'A<' /etc/malloc.conf
+.Ed
+.Pp
+To specify in the source that a program does no return value checking
+on calls to these functions:
+.Bd -literal -offset indent
+_malloc_options = "X";
+.Ed
.Sh SEE ALSO
.Xr brk 2 ,
.Xr mmap 2 ,
diff --git a/lib/libc/stdlib/qsort.3 b/lib/libc/stdlib/qsort.3
index 07777db..a55b2e3 100644
--- a/lib/libc/stdlib/qsort.3
+++ b/lib/libc/stdlib/qsort.3
@@ -209,6 +209,12 @@ functions
return no value.
.Pp
.Rv -std heapsort mergesort
+.Sh COMPATIBILITY
+Previous versions of
+.Fn qsort
+did not permit the comparison routine itself to call
+.Fn qsort 3 .
+This is no longer true.
.Sh ERRORS
The
.Fn heapsort
@@ -234,12 +240,6 @@ or
functions
were unable to allocate memory.
.El
-.Sh COMPATIBILITY
-Previous versions of
-.Fn qsort
-did not permit the comparison routine itself to call
-.Fn qsort 3 .
-This is no longer true.
.Sh SEE ALSO
.Xr sort 1 ,
.Xr radixsort 3
diff --git a/lib/libc/stdlib/random.3 b/lib/libc/stdlib/random.3
index a1dbf8a..70709ca 100644
--- a/lib/libc/stdlib/random.3
+++ b/lib/libc/stdlib/random.3
@@ -168,8 +168,6 @@ generator is greater than
.if t 2\u\s769\s10\d,
.if n 2**69
which should be sufficient for most purposes.
-.Sh AUTHORS
-.An Earl T. Cohen
.Sh DIAGNOSTICS
If
.Fn initstate
@@ -186,6 +184,8 @@ messages are printed on the standard error output.
These
functions appeared in
.Bx 4.2 .
+.Sh AUTHORS
+.An Earl T. Cohen
.Sh BUGS
About 2/3 the speed of
.Xr rand 3 .
diff --git a/lib/libc/stdlib/strtod.3 b/lib/libc/stdlib/strtod.3
index 0fd7003..37092bf 100644
--- a/lib/libc/stdlib/strtod.3
+++ b/lib/libc/stdlib/strtod.3
@@ -154,8 +154,6 @@ function
conforms to
.St -isoC-99 ,
with the exception of the bug noted below.
-.Sh BUGS
-These routines do not recognize the C99 ``NaN(...)'' syntax.
.Sh AUTHORS
The author of this software is
.An David M. Gay .
@@ -183,3 +181,5 @@ IN AN ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION,
ARISING OUT OF OR IN CONNECTION WITH THE USE OR PERFORMANCE OF
THIS SOFTWARE.
.Ed
+.Sh BUGS
+These routines do not recognize the C99 ``NaN(...)'' syntax.
diff --git a/lib/libc/stdlib/tsearch.3 b/lib/libc/stdlib/tsearch.3
index ea0a9da..c0af27f 100644
--- a/lib/libc/stdlib/tsearch.3
+++ b/lib/libc/stdlib/tsearch.3
@@ -107,10 +107,6 @@ a value from the enum
.Sy "typedef enum { preorder, postorder, endorder, leaf } VISIT;"
specifying the traversal type, and a node level (where level
zero is the root of the tree).
-.Sh SEE ALSO
-.Xr bsearch 3 ,
-.Xr hsearch 3 ,
-.Xr lsearch 3
.Sh RETURN VALUES
The
.Fn tsearch
@@ -130,3 +126,7 @@ is NULL or the datum cannot be found.
The
.Fn twalk
function returns no value.
+.Sh SEE ALSO
+.Xr bsearch 3 ,
+.Xr hsearch 3 ,
+.Xr lsearch 3
diff --git a/lib/libc/stdtime/strptime.3 b/lib/libc/stdtime/strptime.3
index 5f93b34..d763fbc 100644
--- a/lib/libc/stdtime/strptime.3
+++ b/lib/libc/stdtime/strptime.3
@@ -108,6 +108,11 @@ if one of the conversions failed.
.Xr date 1 ,
.Xr scanf 3 ,
.Xr strftime 3
+.Sh HISTORY
+The
+.Fn strptime
+function appeared in
+.Fx 3.0 .
.Sh AUTHORS
The
.Fn strptime
@@ -115,11 +120,6 @@ function has been contributed by Powerdog Industries.
.Pp
This man page was written by
.An J\(:org Wunsch .
-.Sh HISTORY
-The
-.Fn strptime
-function appeared in
-.Fx 3.0 .
.Sh BUGS
Both the
.Fa %e
diff --git a/lib/libc/string/strtok.3 b/lib/libc/string/strtok.3
index ba47f72..e5c8e33 100644
--- a/lib/libc/string/strtok.3
+++ b/lib/libc/string/strtok.3
@@ -155,6 +155,14 @@ The
function
conforms to
.St -isoC .
+.Sh AUTHORS
+.An Wes Peters ,
+Softweyr LLC:
+.Aq wes@softweyr.com
+.Pp
+Based on the
+.Fx 3.0
+implementation.
.Sh BUGS
The System V
.Fn strtok ,
@@ -168,11 +176,3 @@ value.
Since this implementation always alters the next starting point,
such a sequence of calls would always return
.Dv NULL .
-.Sh AUTHORS
-.An Wes Peters ,
-Softweyr LLC:
-.Aq wes@softweyr.com
-.Pp
-Based on the
-.Fx 3.0
-implementation.
diff --git a/lib/libc/sys/brk.2 b/lib/libc/sys/brk.2
index e1053f3..ba97987 100644
--- a/lib/libc/sys/brk.2
+++ b/lib/libc/sys/brk.2
@@ -152,6 +152,11 @@ to support the expansion of the data segment.
.Xr end 3 ,
.Xr free 3 ,
.Xr malloc 3
+.Sh HISTORY
+The
+.Fn brk
+function appeared in
+.At v7 .
.Sh BUGS
Mixing
.Fn brk
@@ -168,8 +173,3 @@ It is not possible to distinguish this
from a failure caused by exceeding the maximum size of
the data segment without consulting
.Xr getrlimit 2 .
-.Sh HISTORY
-The
-.Fn brk
-function appeared in
-.At v7 .
diff --git a/lib/libc/sys/getlogin.2 b/lib/libc/sys/getlogin.2
index 9a254f3..cea8caf 100644
--- a/lib/libc/sys/getlogin.2
+++ b/lib/libc/sys/getlogin.2
@@ -174,17 +174,16 @@ The size of the buffer is smaller than the result to be returned.
.Sh SEE ALSO
.Xr setsid 2 ,
.Xr daemon 3
-.Sh BUGS
-In earlier versions of the system,
-.Fn getlogin
-failed unless the process was associated with a login terminal.
-The current implementation (using
-.Fn setlogin )
-allows getlogin to succeed even when the process has no controlling terminal.
-In earlier versions of the system, the value returned by
+.Sh STANDARDS
+The
.Fn getlogin
-could not be trusted without checking the user ID.
-Portable programs should probably still make this check.
+system call
+and
+the
+.Fn getlogin_r
+function
+conform to
+.St -p1003.1-96 .
.Sh HISTORY
The
.Fn getlogin
@@ -196,13 +195,14 @@ was changed from earlier versions of
.Fx
to be conformant with
.St -p1003.1-96 .
-.Sh STANDARDS
-The
+.Sh BUGS
+In earlier versions of the system,
.Fn getlogin
-system call
-and
-the
-.Fn getlogin_r
-function
-conform to
-.St -p1003.1-96 .
+failed unless the process was associated with a login terminal.
+The current implementation (using
+.Fn setlogin )
+allows getlogin to succeed even when the process has no controlling terminal.
+In earlier versions of the system, the value returned by
+.Fn getlogin
+could not be trusted without checking the user ID.
+Portable programs should probably still make this check.
diff --git a/lib/libc/sys/getpgrp.2 b/lib/libc/sys/getpgrp.2
index e96ba84..1daffd2 100644
--- a/lib/libc/sys/getpgrp.2
+++ b/lib/libc/sys/getpgrp.2
@@ -86,34 +86,6 @@ system call returns the process group of the specified process;
otherwise, it returns a value of \-1 and sets
.Va errno
to indicate the error.
-.Sh ERRORS
-The
-.Fn getpgid
-system call
-will succeed unless:
-.Bl -tag -width Er
-.It Bq Er ESRCH
-there is no process whose process ID equals
-.Fa pid
-.El
-.Sh SEE ALSO
-.Xr getsid 2 ,
-.Xr setpgid 2 ,
-.Xr termios 4
-.Sh HISTORY
-The
-.Fn getpgrp
-system call appeared in
-.Bx 4.0 .
-The
-.Fn getpgid
-system call is derived from its usage in
-.At V.4 .
-.Sh STANDARDS
-The
-.Fn getpgrp
-system call is expected to conform to
-.St -p1003.1-90 .
.Sh COMPATIBILITY
This version of
.Fn getpgrp
@@ -144,3 +116,31 @@ has been omitted from POSIX.1.
The old functionality is available from the
.Fn getpgid
system call.
+.Sh ERRORS
+The
+.Fn getpgid
+system call
+will succeed unless:
+.Bl -tag -width Er
+.It Bq Er ESRCH
+there is no process whose process ID equals
+.Fa pid
+.El
+.Sh SEE ALSO
+.Xr getsid 2 ,
+.Xr setpgid 2 ,
+.Xr termios 4
+.Sh STANDARDS
+The
+.Fn getpgrp
+system call is expected to conform to
+.St -p1003.1-90 .
+.Sh HISTORY
+The
+.Fn getpgrp
+system call appeared in
+.Bx 4.0 .
+The
+.Fn getpgid
+system call is derived from its usage in
+.At V.4 .
diff --git a/lib/libc/sys/getrusage.2 b/lib/libc/sys/getrusage.2
index b27e3a6..512e6aa 100644
--- a/lib/libc/sys/getrusage.2
+++ b/lib/libc/sys/getrusage.2
@@ -174,11 +174,11 @@ argument is not in a valid part of the process address space.
.Xr gettimeofday 2 ,
.Xr wait 2 ,
.Xr clocks 7
-.Sh BUGS
-There is no way to obtain information about a child process
-that has not yet terminated.
.Sh HISTORY
The
.Fn getrusage
system call appeared in
.Bx 4.2 .
+.Sh BUGS
+There is no way to obtain information about a child process
+that has not yet terminated.
diff --git a/lib/libc/sys/getsockname.2 b/lib/libc/sys/getsockname.2
index 0c285ad..b3de16f 100644
--- a/lib/libc/sys/getsockname.2
+++ b/lib/libc/sys/getsockname.2
@@ -87,12 +87,12 @@ process address space.
.Xr bind 2 ,
.Xr getpeername 2 ,
.Xr socket 2
-.Sh BUGS
-Names bound to sockets in the UNIX domain are inaccessible;
-.Fn getsockname
-returns a zero length name.
.Sh HISTORY
The
.Fn getsockname
system call appeared in
.Bx 4.2 .
+.Sh BUGS
+Names bound to sockets in the UNIX domain are inaccessible;
+.Fn getsockname
+returns a zero length name.
diff --git a/lib/libc/sys/getsockopt.2 b/lib/libc/sys/getsockopt.2
index ccc71e3..7177e1b 100644
--- a/lib/libc/sys/getsockopt.2
+++ b/lib/libc/sys/getsockopt.2
@@ -408,10 +408,10 @@ on a non-listening socket was attempted.
.Xr protocols 5 ,
.Xr sysctl 8 ,
.Xr accept_filter 9
-.Sh BUGS
-Several of the socket options should be handled at lower levels of the system.
.Sh HISTORY
The
.Fn getsockopt
system call appeared in
.Bx 4.2 .
+.Sh BUGS
+Several of the socket options should be handled at lower levels of the system.
diff --git a/lib/libc/sys/lseek.2 b/lib/libc/sys/lseek.2
index 13bcf21..e770142 100644
--- a/lib/libc/sys/lseek.2
+++ b/lib/libc/sys/lseek.2
@@ -145,10 +145,6 @@ is associated with a pipe, socket, or FIFO.
.Sh SEE ALSO
.Xr dup 2 ,
.Xr open 2
-.Sh BUGS
-This document's use of
-.Fa whence
-is incorrect English, but is maintained for historical reasons.
.Sh STANDARDS
The
.Fn lseek
@@ -159,3 +155,7 @@ The
.Fn lseek
function appeared in
.At v7 .
+.Sh BUGS
+This document's use of
+.Fa whence
+is incorrect English, but is maintained for historical reasons.
diff --git a/lib/libc/sys/minherit.2 b/lib/libc/sys/minherit.2
index b19e36d..1ec8b2d 100644
--- a/lib/libc/sys/minherit.2
+++ b/lib/libc/sys/minherit.2
@@ -119,13 +119,6 @@ and
.Fa len
arguments.
.El
-.Sh BUGS
-Once you set inheritance to
-.Dv MAP_PRIVATE
-or
-.Dv MAP_SHARED ,
-there is no way to recover the original copy-on-write semantics
-short of unmapping and remapping the area.
.Sh SEE ALSO
.Xr fork 2 ,
.Xr madvise 2 ,
@@ -139,3 +132,10 @@ The
.Fn minherit
system call first appeared in
.Ox .
+.Sh BUGS
+Once you set inheritance to
+.Dv MAP_PRIVATE
+or
+.Dv MAP_SHARED ,
+there is no way to recover the original copy-on-write semantics
+short of unmapping and remapping the area.
diff --git a/lib/libc/sys/mlock.2 b/lib/libc/sys/mlock.2
index 313deb5..cf2ed4c 100644
--- a/lib/libc/sys/mlock.2
+++ b/lib/libc/sys/mlock.2
@@ -148,6 +148,13 @@ Some portion of the indicated address range is not allocated.
.Xr munmap 2 ,
.Xr setrlimit 2 ,
.Xr getpagesize 3
+.Sh HISTORY
+The
+.Fn mlock
+and
+.Fn munlock
+system calls first appeared in
+.Bx 4.4 .
.Sh BUGS
Allocating too much wired memory can lead to a memory-allocation deadlock
which requires a reboot to recover from.
@@ -160,10 +167,3 @@ counts as 2 pages against the per-process limit and as only a single page
in the system limit.
.Pp
The per-process resource limit is not currently supported.
-.Sh HISTORY
-The
-.Fn mlock
-and
-.Fn munlock
-system calls first appeared in
-.Bx 4.4 .
diff --git a/lib/libc/sys/mount.2 b/lib/libc/sys/mount.2
index af0ff70..30bd1ee 100644
--- a/lib/libc/sys/mount.2
+++ b/lib/libc/sys/mount.2
@@ -363,8 +363,6 @@ mounted.
.Xr mksnap_ffs 8 ,
.Xr mount 8 ,
.Xr umount 8
-.Sh BUGS
-Some of the error codes need translation to more obvious messages.
.Sh HISTORY
The
.Fn mount
@@ -372,3 +370,5 @@ and
.Fn unmount
functions appeared in
.At v6 .
+.Sh BUGS
+Some of the error codes need translation to more obvious messages.
diff --git a/lib/libc/sys/poll.2 b/lib/libc/sys/poll.2
index 28c426e..932186d 100644
--- a/lib/libc/sys/poll.2
+++ b/lib/libc/sys/poll.2
@@ -196,6 +196,13 @@ The specified time limit is negative.
.Xr select 2 ,
.Xr send 2 ,
.Xr write 2
+.Sh HISTORY
+The
+.Fn poll
+function appeared in
+.At V .
+This manual page and the core of the implementation was taken from
+.Nx .
.Sh BUGS
The distinction between some of the fields in the
.Fa events
@@ -204,10 +211,3 @@ and
bitmasks is really not useful without STREAMS.
The fields are
defined for compatibility with existing software.
-.Sh HISTORY
-The
-.Fn poll
-function appeared in
-.At V .
-This manual page and the core of the implementation was taken from
-.Nx .
diff --git a/lib/libc/sys/quotactl.2 b/lib/libc/sys/quotactl.2
index 12f724d..d0cee9b 100644
--- a/lib/libc/sys/quotactl.2
+++ b/lib/libc/sys/quotactl.2
@@ -223,14 +223,14 @@ The call was privileged and the caller was not the super-user.
.Xr quotacheck 8 ,
.Xr quotaon 8 ,
.Xr repquota 8
+.Sh HISTORY
+The
+.Fn quotactl
+system call appeared in
+.Bx 4.3 Reno .
.Sh BUGS
There should be some way to integrate this call with the resource
limit interface provided by
.Xr setrlimit 2
and
.Xr getrlimit 2 .
-.Sh HISTORY
-The
-.Fn quotactl
-system call appeared in
-.Bx 4.3 Reno .
diff --git a/lib/libc/sys/reboot.2 b/lib/libc/sys/reboot.2
index 54c04da..6d9f096 100644
--- a/lib/libc/sys/reboot.2
+++ b/lib/libc/sys/reboot.2
@@ -158,13 +158,13 @@ The caller is not the super-user.
.Xr init 8 ,
.Xr reboot 8 ,
.Xr savecore 8
-.Sh BUGS
-The HP300 implementation supports neither
-.Dv RB_DFLTROOT
-nor
-.Dv RB_KDB .
.Sh HISTORY
The
.Fn reboot
system call appeared in
.Bx 4.0 .
+.Sh BUGS
+The HP300 implementation supports neither
+.Dv RB_DFLTROOT
+nor
+.Dv RB_KDB .
diff --git a/lib/libc/sys/rfork.2 b/lib/libc/sys/rfork.2
index d6c69dc..9dcbf52 100644
--- a/lib/libc/sys/rfork.2
+++ b/lib/libc/sys/rfork.2
@@ -164,6 +164,10 @@ There is insufficient swap space for the new process.
.Xr minherit 2 ,
.Xr vfork 2 ,
.Xr rfork_thread 3
+.Sh HISTORY
+The
+.Fn rfork
+function first appeared in Plan9.
.Sh BUGS
.Fx
does not yet implement a native
@@ -180,7 +184,3 @@ The
.Xr rfork_thread 3
function can often be used instead of
.Fn clone .
-.Sh HISTORY
-The
-.Fn rfork
-function first appeared in Plan9.
diff --git a/lib/libc/sys/rtprio.2 b/lib/libc/sys/rtprio.2
index ce519fc..afed81e 100644
--- a/lib/libc/sys/rtprio.2
+++ b/lib/libc/sys/rtprio.2
@@ -109,6 +109,13 @@ may only change the idle priority of the current process.
.It Bq Er ESRCH
The specified process was not found.
.El
+.Sh SEE ALSO
+.Xr nice 1 ,
+.Xr ps 1 ,
+.Xr rtprio 1 ,
+.Xr setpriority 2 ,
+.Xr nice 3 ,
+.Xr renice 8
.Sh AUTHORS
.An -nosplit
The original author was
@@ -117,10 +124,3 @@ This implementation in
.Fx
was substantially rewritten by
.An David Greenman .
-.Sh SEE ALSO
-.Xr nice 1 ,
-.Xr ps 1 ,
-.Xr rtprio 1 ,
-.Xr setpriority 2 ,
-.Xr nice 3 ,
-.Xr renice 8
diff --git a/lib/libc/sys/select.2 b/lib/libc/sys/select.2
index d90d521..8d92563 100644
--- a/lib/libc/sys/select.2
+++ b/lib/libc/sys/select.2
@@ -203,13 +203,6 @@ For historical
reasons,
.Fn select
will always examine the first 256 descriptors.
-.Sh BUGS
-.St -susv2
-allows systems to modify the original timeout in place.
-Thus, it is unwise to assume that the timeout value will be unmodified
-by the
-.Fn select
-system call.
.Sh STANDARDS
The
.Fn select
@@ -226,3 +219,10 @@ The
.Fn select
system call appeared in
.Bx 4.2 .
+.Sh BUGS
+.St -susv2
+allows systems to modify the original timeout in place.
+Thus, it is unwise to assume that the timeout value will be unmodified
+by the
+.Fn select
+system call.
diff --git a/lib/libc/sys/send.2 b/lib/libc/sys/send.2
index f5fae6f..81030fa 100644
--- a/lib/libc/sys/send.2
+++ b/lib/libc/sys/send.2
@@ -203,6 +203,18 @@ has been set on the socket).
This typically means that the socket
is not connected.
.El
+.Sh SEE ALSO
+.Xr fcntl 2 ,
+.Xr getsockopt 2 ,
+.Xr recv 2 ,
+.Xr select 2 ,
+.Xr socket 2 ,
+.Xr write 2
+.Sh HISTORY
+The
+.Fn send
+function appeared in
+.Bx 4.2 .
.Sh BUGS
Because
.Fn sendmsg
@@ -218,15 +230,3 @@ it before it has actually been sent, the result being that the receiver
gets a closed file descriptor.
It is left to the application to
implement an acknowledgment mechanism to prevent this from happening.
-.Sh SEE ALSO
-.Xr fcntl 2 ,
-.Xr getsockopt 2 ,
-.Xr recv 2 ,
-.Xr select 2 ,
-.Xr socket 2 ,
-.Xr write 2
-.Sh HISTORY
-The
-.Fn send
-function appeared in
-.Bx 4.2 .
diff --git a/lib/libc/sys/setpgid.2 b/lib/libc/sys/setpgid.2
index c771e03..79ece67 100644
--- a/lib/libc/sys/setpgid.2
+++ b/lib/libc/sys/setpgid.2
@@ -67,6 +67,15 @@ The requested process group ID must already exist in the session of
the caller, or it must be equal to the target process ID.
.Sh RETURN VALUES
.Rv -std setpgid
+.Sh COMPATIBILITY
+The
+.Fn setpgrp
+system call
+is identical to
+.Fn setpgid ,
+and is retained for calling convention compatibility with historical
+versions of
+.Bx .
.Sh ERRORS
The
.Fn setpgid
@@ -98,12 +107,3 @@ The
.Fn setpgid
system call is expected to conform to
.St -p1003.1-90 .
-.Sh COMPATIBILITY
-The
-.Fn setpgrp
-system call
-is identical to
-.Fn setpgid ,
-and is retained for calling convention compatibility with historical
-versions of
-.Bx .
diff --git a/lib/libc/sys/shm_open.2 b/lib/libc/sys/shm_open.2
index 7b62e9a..b68e85b 100644
--- a/lib/libc/sys/shm_open.2
+++ b/lib/libc/sys/shm_open.2
@@ -98,6 +98,15 @@ The
function makes no effort to ensure that
.Fa path
refers to a shared memory object.
+.Sh RETURN VALUES
+If successful,
+.Fn shm_open
+returns a non-negative integer;
+.Fn shm_unlink
+returns zero.
+Both functions return -1 on failure, and set
+.Va errno
+to indicate the error.
.Sh COMPATIBILITY
The
.Fa path
@@ -130,15 +139,6 @@ on a shared memory object, or on the descriptor returned by
is undefined.
It is also undefined whether the shared memory object itself, or its
contents, persist across reboots.
-.Sh RETURN VALUES
-If successful,
-.Fn shm_open
-returns a non-negative integer;
-.Fn shm_unlink
-returns zero.
-Both functions return -1 on failure, and set
-.Va errno
-to indicate the error.
.Sh ERRORS
The
.Fn shm_open
diff --git a/lib/libc/sys/sigaction.2 b/lib/libc/sys/sigaction.2
index 9f15f8b..2e87649 100644
--- a/lib/libc/sys/sigaction.2
+++ b/lib/libc/sys/sigaction.2
@@ -603,6 +603,25 @@ An attempt is made to ignore or supply a handler for
or
.Dv SIGSTOP .
.El
+.Sh SEE ALSO
+.Xr kill 1 ,
+.Xr kill 2 ,
+.Xr ptrace 2 ,
+.Xr sigaltstack 2 ,
+.Xr sigblock 2 ,
+.Xr sigpause 2 ,
+.Xr sigpending 2 ,
+.Xr sigprocmask 2 ,
+.Xr sigsetmask 2 ,
+.Xr sigsuspend 2 ,
+.Xr sigvec 2 ,
+.Xr wait 2 ,
+.Xr fpsetmask 3 ,
+.Xr setjmp 3 ,
+.Xr siginterrupt 3 ,
+.Xr sigsetops 3 ,
+.Xr ucontext 3 ,
+.Xr tty 4
.Sh STANDARDS
The
.Fn sigaction
@@ -647,22 +666,3 @@ The flags are approved by
.St -susv2 ,
along with the option to avoid zombie creation by ignoring
.Dv SIGCHLD .
-.Sh SEE ALSO
-.Xr kill 1 ,
-.Xr kill 2 ,
-.Xr ptrace 2 ,
-.Xr sigaltstack 2 ,
-.Xr sigblock 2 ,
-.Xr sigpause 2 ,
-.Xr sigpending 2 ,
-.Xr sigprocmask 2 ,
-.Xr sigsetmask 2 ,
-.Xr sigsuspend 2 ,
-.Xr sigvec 2 ,
-.Xr wait 2 ,
-.Xr fpsetmask 3 ,
-.Xr setjmp 3 ,
-.Xr siginterrupt 3 ,
-.Xr sigsetops 3 ,
-.Xr ucontext 3 ,
-.Xr tty 4
diff --git a/lib/libc/sys/socketpair.2 b/lib/libc/sys/socketpair.2
index 2dbc202..7f982c5 100644
--- a/lib/libc/sys/socketpair.2
+++ b/lib/libc/sys/socketpair.2
@@ -84,12 +84,12 @@ process address space.
.Xr pipe 2 ,
.Xr read 2 ,
.Xr write 2
-.Sh BUGS
-This call is currently implemented only for the
-.Ux
-domain.
.Sh HISTORY
The
.Fn socketpair
system call appeared in
.Bx 4.2 .
+.Sh BUGS
+This call is currently implemented only for the
+.Ux
+domain.
diff --git a/lib/libc/sys/stat.2 b/lib/libc/sys/stat.2
index 866d55a..bb55665 100644
--- a/lib/libc/sys/stat.2
+++ b/lib/libc/sys/stat.2
@@ -317,13 +317,6 @@ represented correctly in the structure pointed to by
.Xr utimes 2 ,
.Xr symlink 7 ,
.Xr sticky 8
-.Sh BUGS
-Applying
-.Fn fstat
-to a socket (and thus to a pipe)
-returns a zeroed buffer,
-except for the blocksize field,
-and a unique device and inode number.
.Sh STANDARDS
The
.Fn stat
@@ -342,3 +335,10 @@ The
.Fn lstat
system call appeared in
.Bx 4.2 .
+.Sh BUGS
+Applying
+.Fn fstat
+to a socket (and thus to a pipe)
+returns a zeroed buffer,
+except for the blocksize field,
+and a unique device and inode number.
diff --git a/lib/libc/sys/sync.2 b/lib/libc/sys/sync.2
index 89c2583..6e9b78b 100644
--- a/lib/libc/sys/sync.2
+++ b/lib/libc/sys/sync.2
@@ -69,13 +69,13 @@ attributes.
.Xr fsync 2 ,
.Xr syncer 4 ,
.Xr sync 8
-.Sh BUGS
-The
-.Fn sync
-system call
-may return before the buffers are completely flushed.
.Sh HISTORY
The
.Fn sync
function appeared in
.At v6 .
+.Sh BUGS
+The
+.Fn sync
+system call
+may return before the buffers are completely flushed.
diff --git a/lib/libc/sys/syscall.2 b/lib/libc/sys/syscall.2
index 675cf8e..4e7241e 100644
--- a/lib/libc/sys/syscall.2
+++ b/lib/libc/sys/syscall.2
@@ -70,12 +70,12 @@ In general, a 0 return value indicates success.
A -1 return value indicates an error,
and an error code is stored in
.Va errno .
-.Sh BUGS
-There is no way to simulate system calls that have multiple return values
-such as
-.Xr pipe 2 .
.Sh HISTORY
The
.Fn syscall
function appeared in
.Bx 4.0 .
+.Sh BUGS
+There is no way to simulate system calls that have multiple return values
+such as
+.Xr pipe 2 .
diff --git a/lib/libc/sys/truncate.2 b/lib/libc/sys/truncate.2
index 5966f5f..08cc947 100644
--- a/lib/libc/sys/truncate.2
+++ b/lib/libc/sys/truncate.2
@@ -126,6 +126,11 @@ is not open for writing.
.El
.Sh SEE ALSO
.Xr open 2
+.Sh HISTORY
+The
+.Fn truncate
+system call appeared in
+.Bx 4.2 .
.Sh BUGS
These calls should be generalized to allow ranges
of bytes in a file to be discarded.
@@ -133,8 +138,3 @@ of bytes in a file to be discarded.
Use of
.Fn truncate
to extend a file is not portable.
-.Sh HISTORY
-The
-.Fn truncate
-system call appeared in
-.Bx 4.2 .
diff --git a/lib/libc/sys/vfork.2 b/lib/libc/sys/vfork.2
index a1f74cb..3727256 100644
--- a/lib/libc/sys/vfork.2
+++ b/lib/libc/sys/vfork.2
@@ -100,6 +100,9 @@ parent processes standard I/O data structures.
it is wrong to call
.Xr exit 3
since buffered data would then be flushed twice.)
+.Sh RETURN VALUES
+Same as for
+.Xr fork 2 .
.Sh SEE ALSO
.Xr execve 2 ,
.Xr _exit 2 ,
@@ -108,9 +111,11 @@ since buffered data would then be flushed twice.)
.Xr sigvec 2 ,
.Xr wait 2 ,
.Xr exit 3
-.Sh RETURN VALUES
-Same as for
-.Xr fork 2 .
+.Sh HISTORY
+The
+.Fn vfork
+system call appeared in
+.Bx 2.9 .
.Sh BUGS
This system call will be eliminated when proper system sharing
mechanisms are implemented.
@@ -134,8 +139,3 @@ output or
calls
are allowed
and input attempts result in an end-of-file indication.
-.Sh HISTORY
-The
-.Fn vfork
-system call appeared in
-.Bx 2.9 .
diff --git a/lib/libc/sys/wait.2 b/lib/libc/sys/wait.2
index ab734fc..2081e2d 100644
--- a/lib/libc/sys/wait.2
+++ b/lib/libc/sys/wait.2
@@ -297,6 +297,11 @@ or the signal did not have the
.Dv SA_RESTART
flag set.
.El
+.Sh SEE ALSO
+.Xr _exit 2 ,
+.Xr ptrace 2 ,
+.Xr sigaction 2 ,
+.Xr exit 3
.Sh STANDARDS
The
.Fn wait
@@ -313,11 +318,6 @@ macro
and the ability to restart a pending
.Fn wait
call are extensions to the POSIX interface.
-.Sh SEE ALSO
-.Xr _exit 2 ,
-.Xr ptrace 2 ,
-.Xr sigaction 2 ,
-.Xr exit 3
.Sh HISTORY
The
.Fn wait
diff --git a/lib/libc/uuid/uuid.3 b/lib/libc/uuid/uuid.3
index 188fa9b..0972c4b 100644
--- a/lib/libc/uuid/uuid.3
+++ b/lib/libc/uuid/uuid.3
@@ -94,7 +94,7 @@ The meaning of the code escaped the writers mind.
.Sh SEE ALSO
.Xr uuidgen 1 ,
.Xr uuidgen 2
-.Sh BUGS
-This manpage can be improved.
.Sh STANDARDS
The UUID functions conform to the DCE 1.1 RPC specification.
+.Sh BUGS
+This manpage can be improved.
OpenPOWER on IntegriCloud