summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--lib/libc/compat-43/setruid.316
-rw-r--r--lib/libc/gen/getdomainname.35
-rw-r--r--lib/libc/gen/gethostname.35
-rw-r--r--lib/libc/gen/sem_wait.39
-rw-r--r--lib/libc/gen/sysctl.38
-rw-r--r--lib/libc/i386/sys/i386_get_ioperm.210
-rw-r--r--lib/libc/net/getifaddrs.35
-rw-r--r--lib/libc/posix1e/acl_delete.35
-rw-r--r--lib/libc/posix1e/acl_set.35
-rw-r--r--lib/libc/posix1e/acl_valid.35
-rw-r--r--lib/libc/stdio/fseek.310
-rw-r--r--lib/libc/stdlib/getenv.39
-rw-r--r--lib/libc/stdlib/qsort.39
-rw-r--r--lib/libc/sys/brk.211
-rw-r--r--lib/libc/sys/chdir.26
-rw-r--r--lib/libc/sys/chflags.25
-rw-r--r--lib/libc/sys/chmod.25
-rw-r--r--lib/libc/sys/chown.25
-rw-r--r--lib/libc/sys/clock_gettime.25
-rw-r--r--lib/libc/sys/extattr_get_file.25
-rw-r--r--lib/libc/sys/fhopen.210
-rw-r--r--lib/libc/sys/getitimer.25
-rw-r--r--lib/libc/sys/getlogin.28
-rw-r--r--lib/libc/sys/getpriority.26
-rw-r--r--lib/libc/sys/getrlimit.26
-rw-r--r--lib/libc/sys/getsockopt.22
-rw-r--r--lib/libc/sys/gettimeofday.25
-rw-r--r--lib/libc/sys/mlock.211
-rw-r--r--lib/libc/sys/mount.214
-rw-r--r--lib/libc/sys/rtprio.26
-rw-r--r--lib/libc/sys/sched_get_priority_max.27
-rw-r--r--lib/libc/sys/sched_setparam.25
-rw-r--r--lib/libc/sys/sched_setscheduler.25
-rw-r--r--lib/libc/sys/setpgid.26
-rw-r--r--lib/libc/sys/setresuid.26
-rw-r--r--lib/libc/sys/setuid.214
-rw-r--r--lib/libc/sys/shmat.26
-rw-r--r--lib/libc/sys/stat.25
-rw-r--r--lib/libc/sys/statfs.25
-rw-r--r--lib/libc/sys/truncate.25
-rw-r--r--lib/libc/sys/utimes.25
-rw-r--r--lib/libc_r/man/sem_wait.39
-rw-r--r--lib/libpthread/man/sem_wait.39
43 files changed, 71 insertions, 232 deletions
diff --git a/lib/libc/compat-43/setruid.3 b/lib/libc/compat-43/setruid.3
index b90656b..465d81e 100644
--- a/lib/libc/compat-43/setruid.3
+++ b/lib/libc/compat-43/setruid.3
@@ -55,13 +55,15 @@ function
sets the real user ID (group ID) of the
current process.
.Sh RETURN VALUES
-Upon success, these functions return 0;
-otherwise \-1 is returned.
-.Pp
-If the user is not the super user, or the uid
-specified is not the real or effective ID, these
-functions return \-1.
-.Pp
+.Rv -std
+.Sh ERRORS
+The functions fail if:
+.Bl -tag -width Er
+.It Bq Er EPERM
+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
diff --git a/lib/libc/gen/getdomainname.3 b/lib/libc/gen/getdomainname.3
index 4d6f723..69d1b673 100644
--- a/lib/libc/gen/getdomainname.3
+++ b/lib/libc/gen/getdomainname.3
@@ -67,10 +67,7 @@ which has length
This call is restricted to the super-user and
is normally used only when the system is bootstrapped.
.Sh RETURN VALUES
-If the call succeeds a value of 0 is returned. If the call
-fails, a value of -1 is returned and an error code is
-placed in the global location
-.Va errno .
+.Rv -std
.Sh ERRORS
The following errors may be returned by these calls:
.Bl -tag -width Er
diff --git a/lib/libc/gen/gethostname.3 b/lib/libc/gen/gethostname.3
index 605ccc7..76819b1 100644
--- a/lib/libc/gen/gethostname.3
+++ b/lib/libc/gen/gethostname.3
@@ -67,10 +67,7 @@ which has length
This call is restricted to the super-user and
is normally used only when the system is bootstrapped.
.Sh RETURN VALUES
-If the call succeeds a value of 0 is returned. If the call
-fails, a value of -1 is returned and an error code is
-placed in the global location
-.Va errno .
+.Rv -std
.Sh ERRORS
The following errors may be returned by these calls:
.Bl -tag -width Er
diff --git a/lib/libc/gen/sem_wait.3 b/lib/libc/gen/sem_wait.3
index 61a21be..d015b90 100644
--- a/lib/libc/gen/sem_wait.3
+++ b/lib/libc/gen/sem_wait.3
@@ -57,14 +57,7 @@ function decrements (locks) the semaphore pointed to by
only if the value is non-zero. Otherwise, the semaphore is not decremented and
an error is returned.
.Sh RETURN VALUES
-If successful,
-.Fn sem_wait
-and
-.Fn sem_trywait
-return 0. Otherwise, -1 is returned and
-.Va errno
-is set to indicate the type of
-error.
+.Rv -std
.Sh ERRORS
.Fn sem_wait
and
diff --git a/lib/libc/gen/sysctl.3 b/lib/libc/gen/sysctl.3
index 062f60d..9551466 100644
--- a/lib/libc/gen/sysctl.3
+++ b/lib/libc/gen/sysctl.3
@@ -753,13 +753,7 @@ If the amount of free and cache memory falls below this value, the
pageout daemon will enter "memory conserving mode" to avoid deadlock.
.El
.Sh RETURN VALUES
-.Fn sysctl
-and
-.Fn sysctlbyname
-return 0 when successful.
-Otherwise \-1 is returned and
-.Va errno
-is set appropriately.
+.Rv -std
.Sh ERRORS
The following errors may be reported:
.Bl -tag -width Er
diff --git a/lib/libc/i386/sys/i386_get_ioperm.2 b/lib/libc/i386/sys/i386_get_ioperm.2
index 11437dc..fcd1353 100644
--- a/lib/libc/i386/sys/i386_get_ioperm.2
+++ b/lib/libc/i386/sys/i386_get_ioperm.2
@@ -57,15 +57,7 @@ arguments to the state specified by the
.Fa enable
argument.
.Sh RETURN VALUES
-Upon successful completion,
-.Fn i386_get_ioperm
-and
-.Fn i386_set_ioperm
-return the value of 0.
-Otherwise, a value of -1 is returned and the global
-variable
-.Va errno
-is set to indicate the error.
+.Rv -std
.Sh ERRORS
.Fn i386_get_ioperm
and
diff --git a/lib/libc/net/getifaddrs.3 b/lib/libc/net/getifaddrs.3
index 8f6c582..5572cea 100644
--- a/lib/libc/net/getifaddrs.3
+++ b/lib/libc/net/getifaddrs.3
@@ -129,10 +129,7 @@ is dynamically allocated and should be freed using
.Fn freeifaddrs
when no longer needed.
.Sh RETURN VALUES
-Upon successful completion, a value of 0 is returned.
-Otherwise, a value of -1 is returned and
-.Va errno
-is set to indicate the error.
+.Rv -std getifaddrs
.Sh ERRORS
The
.Fn getifaddrs
diff --git a/lib/libc/posix1e/acl_delete.3 b/lib/libc/posix1e/acl_delete.3
index 2b21bf9..8e9cea5 100644
--- a/lib/libc/posix1e/acl_delete.3
+++ b/lib/libc/posix1e/acl_delete.3
@@ -61,10 +61,7 @@ name, or by file descriptor.
support for POSIX.1e interfaces and features is still under
development at this time.
.Sh RETURN VALUES
-In the event of success, 0 is returned. In the event of failure, -1 is
-returned, and
-.Va errno
-is set to indicate the error.
+.Rv -std
.Sh ERRORS
If any of the following conditions occur, these functions shall return -1
and set
diff --git a/lib/libc/posix1e/acl_set.3 b/lib/libc/posix1e/acl_set.3
index 17a8db0..08f2dbd 100644
--- a/lib/libc/posix1e/acl_set.3
+++ b/lib/libc/posix1e/acl_set.3
@@ -67,10 +67,7 @@ allows the setting of ACLs of any type.
support for POSIX.1e interfaces and features is still under
development at this time.
.Sh RETURN VALUES
-Upon successful completion, the function shall return a value of zero.
-Otherwise, a value of -1 shall be returned and
-.Va errno
-shall be set to indicate the error.
+.Rv -std
.Sh ERRORS
If any of the following conditions occur, these functions shall return
-1 and set
diff --git a/lib/libc/posix1e/acl_valid.3 b/lib/libc/posix1e/acl_valid.3
index a395df6..9dbdcac 100644
--- a/lib/libc/posix1e/acl_valid.3
+++ b/lib/libc/posix1e/acl_valid.3
@@ -84,10 +84,7 @@ non-portable validation functions will not.
support for POSIX.1e interfaces and features is still under
development at this time.
.Sh RETURN VALUES
-Upon successful completion, the function shall return a value of zero.
-Otherwise, a value of -1 shall be returned and
-.Va errno
-shall be set to indicate the error.
+.Rv -std
.Sh ERRORS
If any of the following conditions occur, these functions shall return
-1 and set
diff --git a/lib/libc/stdio/fseek.3 b/lib/libc/stdio/fseek.3
index 73a79f2..57e810a 100644
--- a/lib/libc/stdio/fseek.3
+++ b/lib/libc/stdio/fseek.3
@@ -167,14 +167,10 @@ The
.Fn rewind
function
returns no value.
+.Pp
+.Rv -std fgetpos fseek fseeko fsetpos
+.Pp
Upon successful completion,
-.Fn fgetpos ,
-.Fn fseek ,
-.Fn fseeko ,
-and
-.Fn fsetpos
-return 0,
-and
.Fn ftell
and
.Fn ftello
diff --git a/lib/libc/stdlib/getenv.3 b/lib/libc/stdlib/getenv.3
index a0feb2b..7f73af7 100644
--- a/lib/libc/stdlib/getenv.3
+++ b/lib/libc/stdlib/getenv.3
@@ -114,14 +114,7 @@ deletes all instances of the variable name pointed to by
.Fa name
from the list.
.Sh RETURN VALUES
-The functions
-.Fn setenv
-and
-.Fn putenv
-return zero if successful; otherwise the global variable
-.Va errno
-is set to indicate the error and a
-\-1 is returned.
+.Rv -std setenv putenv
.Sh ERRORS
.Bl -tag -width Er
.It Bq Er ENOMEM
diff --git a/lib/libc/stdlib/qsort.3 b/lib/libc/stdlib/qsort.3
index da4df56..cc62a8c 100644
--- a/lib/libc/stdlib/qsort.3
+++ b/lib/libc/stdlib/qsort.3
@@ -154,14 +154,7 @@ The
function
returns no value.
.Pp
-Upon successful completion,
-.Fn heapsort
-and
-.Fn mergesort
-return 0.
-Otherwise, they return \-1 and the global variable
-.Va errno
-is set to indicate the error.
+.Rv -std heapsort mergesort
.Sh ERRORS
The
.Fn heapsort
diff --git a/lib/libc/sys/brk.2 b/lib/libc/sys/brk.2
index 50c8196..72e3c47 100644
--- a/lib/libc/sys/brk.2
+++ b/lib/libc/sys/brk.2
@@ -105,17 +105,14 @@ e.g.\&
for the definition of
.Va etext ) .
.Sh RETURN VALUES
-.Fn Brk
-returns 0 if successful;
-otherwise -1 with
-.Va errno
-set to indicate why the allocation failed.
+.Rv -std brk
+.Pp
The
.Fn sbrk
function returns a pointer to the base of the new storage if successful;
-otherwise -1 with
+otherwise the value \-1 is returned and the global variable
.Va errno
-set to indicate why the allocation failed.
+is set to indicate the error.
.Sh ERRORS
.Fn Brk
or
diff --git a/lib/libc/sys/chdir.2 b/lib/libc/sys/chdir.2
index bd969f9..8648789 100644
--- a/lib/libc/sys/chdir.2
+++ b/lib/libc/sys/chdir.2
@@ -73,11 +73,7 @@ a slash,
In order for a directory to become the current directory,
a process must have execute (search) access to the directory.
.Sh RETURN VALUES
-Upon successful completion, a value of 0 is returned.
-Otherwise, a value of -1 is returned and
-.Va errno
-is set to indicate
-the error.
+.Rv -std
.Sh ERRORS
.Fn Chdir
will fail and the current working directory will be unchanged if
diff --git a/lib/libc/sys/chflags.2 b/lib/libc/sys/chflags.2
index 632e359..05205c6 100644
--- a/lib/libc/sys/chflags.2
+++ b/lib/libc/sys/chflags.2
@@ -106,10 +106,7 @@ the system is in single-user mode.
.Xr init 8
for details.)
.Sh RETURN VALUES
-Upon successful completion, a value of 0 is returned.
-Otherwise, -1 is returned and the global variable
-.Va errno
-is set to indicate the error.
+.Rv -std
.Sh ERRORS
.Fn Chflags
will fail if:
diff --git a/lib/libc/sys/chmod.2 b/lib/libc/sys/chmod.2
index d003503..5a165ca 100644
--- a/lib/libc/sys/chmod.2
+++ b/lib/libc/sys/chmod.2
@@ -157,10 +157,7 @@ by protecting set-user-id (set-group-id) files
from remaining set-user-id (set-group-id) if they are modified,
at the expense of a degree of compatibility.
.Sh RETURN VALUES
-Upon successful completion, a value of 0 is returned.
-Otherwise, a value of -1 is returned and
-.Va errno
-is set to indicate the error.
+.Rv -std
.Sh ERRORS
.Fn Chmod
will fail and the file mode will be unchanged if:
diff --git a/lib/libc/sys/chown.2 b/lib/libc/sys/chown.2
index 363893a..65fd888 100644
--- a/lib/libc/sys/chown.2
+++ b/lib/libc/sys/chown.2
@@ -91,10 +91,7 @@ but does not follow symbolic links.
One of the owner or group id's
may be left unchanged by specifying it as -1.
.Sh RETURN VALUES
-Zero is returned if the operation was successful;
--1 is returned if an error occurs, with a more specific
-error code being placed in the global variable
-.Va errno .
+.Rv -std
.Sh ERRORS
.Fn Chown
and
diff --git a/lib/libc/sys/clock_gettime.2 b/lib/libc/sys/clock_gettime.2
index 5737560..633f3f9 100644
--- a/lib/libc/sys/clock_gettime.2
+++ b/lib/libc/sys/clock_gettime.2
@@ -94,10 +94,7 @@ The resolution (granularity) of a clock is returned by the
call. This value is placed in a (non-NULL)
.Fa *tp .
.Sh RETURN VALUES
-A 0 return value indicates that the call succeeded.
-A -1 return value indicates an error occurred, and in this
-case an error code is stored into the global variable
-.Va errno .
+.Rv -std
.Sh ERRORS
The following error codes may be set in
.Va errno :
diff --git a/lib/libc/sys/extattr_get_file.2 b/lib/libc/sys/extattr_get_file.2
index f22271a..bb44004 100644
--- a/lib/libc/sys/extattr_get_file.2
+++ b/lib/libc/sys/extattr_get_file.2
@@ -131,13 +131,12 @@ calls return the number of bytes
that were read or written from the
.Fa iovp ,
respectively.
-The
-.Fn extattr_delete_file
-call returns 0 on success.
If any of the calls are unsuccessful, the value \-1 is returned
and the global variable
.Va errno
is set to indicate the error.
+.Pp
+.Rv -std extattr_delete_file
.Sh ERRORS
The following errors may be returned by the system calls themselves.
Additionally, the filesystem implementing the call may return any
diff --git a/lib/libc/sys/fhopen.2 b/lib/libc/sys/fhopen.2
index 6deb16a..270be1c 100644
--- a/lib/libc/sys/fhopen.2
+++ b/lib/libc/sys/fhopen.2
@@ -87,14 +87,12 @@ rather than an open file.
.Sh RETURN VALUES
Upon successful completion,
.Fn fhopen
-returns the file descriptor for the opened file, while
-.Fn fhstat
-and
-.Fn fhstatfs
-return 0.
-Otherwise, -1 is returned and
+returns the file descriptor for the opened file;
+otherwise the value \-1 is returned and the global variable
.Va errno
is set to indicate the error.
+.Pp
+.Rv -std fhstat fhstatfs
.Sh ERRORS
In addition to the errors returned by
.Xr open 2 ,
diff --git a/lib/libc/sys/getitimer.2 b/lib/libc/sys/getitimer.2
index 156caa1..e99e9a8 100644
--- a/lib/libc/sys/getitimer.2
+++ b/lib/libc/sys/getitimer.2
@@ -147,10 +147,7 @@ tests if a time value is non-zero, and
.Fa timercmp
compares two time values.
.Sh RETURN VALUES
-If the calls succeed, a value of 0 is returned. If an error occurs,
-the value -1 is returned, and a more precise error code is placed
-in the global variable
-.Va errno .
+.Rv -std
.Sh ERRORS
.Fn Getitimer
and
diff --git a/lib/libc/sys/getlogin.2 b/lib/libc/sys/getlogin.2
index 89c9211..07e54f6 100644
--- a/lib/libc/sys/getlogin.2
+++ b/lib/libc/sys/getlogin.2
@@ -139,13 +139,7 @@ if the name has not been set.
.Fn getlogin_r
returns zero if successful, or the error number upon failure.
.Pp
-If a call to
-.Fn setlogin
-succeeds, a value of 0 is returned. If
-.Fn setlogin
-fails, a value of -1 is returned and an error code is
-placed in the global location
-.Va errno .
+.Rv -std setlogin
.Sh ERRORS
The following errors may be returned by these calls:
.Bl -tag -width Er
diff --git a/lib/libc/sys/getpriority.2 b/lib/libc/sys/getpriority.2
index efaa5ed..d156702 100644
--- a/lib/libc/sys/getpriority.2
+++ b/lib/libc/sys/getpriority.2
@@ -99,10 +99,8 @@ to clear the external variable
prior to the
call, then check it afterward to determine
if a -1 is an error or a legitimate value.
-The
-.Fn setpriority
-call returns 0 if there is no error, or
--1 if there is.
+.Pp
+.Rv -std setpriority
.Sh ERRORS
.Fn Getpriority
and
diff --git a/lib/libc/sys/getrlimit.2 b/lib/libc/sys/getrlimit.2
index 9b76214..d573fbc 100644
--- a/lib/libc/sys/getrlimit.2
+++ b/lib/libc/sys/getrlimit.2
@@ -155,11 +155,7 @@ the soft cpu time limit is exceeded, a signal
is sent to the
offending process.
.Sh RETURN VALUES
-A 0 return value indicates that the call succeeded, changing
-or returning the resource limit. A return value of -1 indicates
-that an error occurred, and an error code is stored in the global
-location
-.Va errno .
+.Rv -std
.Sh ERRORS
.Fn Getrlimit
and
diff --git a/lib/libc/sys/getsockopt.2 b/lib/libc/sys/getsockopt.2
index b5bc37b..c61691e 100644
--- a/lib/libc/sys/getsockopt.2
+++ b/lib/libc/sys/getsockopt.2
@@ -391,7 +391,7 @@ Before returning,
unlocks
.Fa s .
.Sh RETURN VALUES
-A 0 is returned if the call succeeds, -1 if it fails.
+.Rv -std
.Sh ERRORS
The call succeeds unless:
.Bl -tag -width Er
diff --git a/lib/libc/sys/gettimeofday.2 b/lib/libc/sys/gettimeofday.2
index 06b7996..a0cb096 100644
--- a/lib/libc/sys/gettimeofday.2
+++ b/lib/libc/sys/gettimeofday.2
@@ -108,10 +108,7 @@ The system time can still be adjusted backwards using the
.Xr adjtime 2
system call even when the system is secure.
.Sh RETURN VALUES
-A 0 return value indicates that the call succeeded.
-A -1 return value indicates an error occurred, and in this
-case an error code is stored into the global variable
-.Va errno .
+.Rv -std
.Sh ERRORS
The following error codes may be set in
.Va errno :
diff --git a/lib/libc/sys/mlock.2 b/lib/libc/sys/mlock.2
index ba2bbb1..fd92aa2 100644
--- a/lib/libc/sys/mlock.2
+++ b/lib/libc/sys/mlock.2
@@ -106,13 +106,10 @@ resource limit.
.Pp
These calls are only available to the super-user.
.Sh RETURN VALUES
-A return value of 0 indicates that the call
-succeeded and all pages in the range have either been locked or unlocked.
-A return value of -1 indicates an error occurred and the locked
-status of all pages in the range remains unchanged.
-In this case, the global location
-.Va errno
-is set to indicate the error.
+.Rv -std
+.Pp
+If the call succeeds, all pages in the range become locked (unlocked);
+otherwise the locked status of all pages in the range remains unchanged.
.Sh ERRORS
.Fn Mlock
will fail if:
diff --git a/lib/libc/sys/mount.2 b/lib/libc/sys/mount.2
index ef3d22d..d8f8dec 100644
--- a/lib/libc/sys/mount.2
+++ b/lib/libc/sys/mount.2
@@ -169,19 +169,7 @@ and
.Xr chmod 2
pages for more information.
.Sh RETURN VALUES
-The
-.Fn mount
-returns the value 0 if the mount was successful, otherwise -1 is returned
-and the variable
-.Va errno
-is set to indicate the error.
-.Pp
-The
-.Fn unmount
-function returns the value 0 if the umount succeeded; otherwise -1 is returned
-and the variable
-.Va errno
-is set to indicate the error.
+.Rv -std
.Sh ERRORS
The
.Fn mount
diff --git a/lib/libc/sys/rtprio.2 b/lib/libc/sys/rtprio.2
index bfd72c4..f5175ad 100644
--- a/lib/libc/sys/rtprio.2
+++ b/lib/libc/sys/rtprio.2
@@ -82,11 +82,7 @@ Higher real/idle priority processes
preempt lower real/idle priority processes.
Processes of equal real/idle priority are run round-robin.
.Sh RETURN VALUES
-.Fn rtprio
-will return 0 for success and -1 for all errors.
-The global variable
-.Va errno
-will be set to indicate the error.
+.Rv -std rtprio
.Sh ERRORS
.Fn rtprio
will fail if
diff --git a/lib/libc/sys/sched_get_priority_max.2 b/lib/libc/sys/sched_get_priority_max.2
index 54095d0..82b8685 100644
--- a/lib/libc/sys/sched_get_priority_max.2
+++ b/lib/libc/sys/sched_get_priority_max.2
@@ -85,12 +85,7 @@ respectively. If unsuccessful, they shall return a value of -1 and set
.Fa errno
to indicate the error.
.Pp
-If successful, the
-.Fn sched_rr_get_interval
-function will return 0. Otherwise, it will
-return a value of -1 and set
-.Fa errno
-to indicate the error.
+.Rv -std sched_rr_get_interval
.Sh ERRORS
On failure
.Va errno
diff --git a/lib/libc/sys/sched_setparam.2 b/lib/libc/sys/sched_setparam.2
index 57b077f..ac9be76 100644
--- a/lib/libc/sys/sched_setparam.2
+++ b/lib/libc/sys/sched_setparam.2
@@ -134,10 +134,7 @@ function will fail if
.Fa pid
is negative.
.Sh RETURN VALUES
-The function will return zero if it completes successfully, or it
-will return a value of -1 and set
-.Va errno
-to indicate the error.
+.Rv -std
.Sh ERRORS
On failure
.Va errno
diff --git a/lib/libc/sys/sched_setscheduler.2 b/lib/libc/sys/sched_setscheduler.2
index b616e6d..556b986 100644
--- a/lib/libc/sys/sched_setscheduler.2
+++ b/lib/libc/sys/sched_setscheduler.2
@@ -129,10 +129,7 @@ function will fail if
.Fa pid
is negative.
.Sh RETURN VALUES
-The function will return zero if it completes successfully, or it
-will return a value of -1 and set
-.Va errno
-to indicate the error.
+.Rv -std
.Sh ERRORS
On failure
.Va errno
diff --git a/lib/libc/sys/setpgid.2 b/lib/libc/sys/setpgid.2
index d9178b5..30667d6 100644
--- a/lib/libc/sys/setpgid.2
+++ b/lib/libc/sys/setpgid.2
@@ -61,11 +61,7 @@ If the invoker is not the super-user, then the affected process
must have the same effective user-id as the invoker or be a descendant
of the invoking process.
.Sh RETURN VALUES
-.Fn Setpgid
-returns 0 when the operation was successful.
-If the request failed, -1 is returned and the global variable
-.Va errno
-indicates the reason.
+.Rv -std setpgid
.Sh ERRORS
.Fn Setpgid
will fail and the process group will not be altered if:
diff --git a/lib/libc/sys/setresuid.2 b/lib/libc/sys/setresuid.2
index 37b44ab..d1a3b28 100644
--- a/lib/libc/sys/setresuid.2
+++ b/lib/libc/sys/setresuid.2
@@ -65,11 +65,7 @@ and
calls retrieve the real, effective, and saved group and user IDs of
the current process, respectively.
.Sh RETURN VALUES
-These functions return the value 0 if successful;
-otherwise the value -1 is returned
-and the global variable
-.Va errno
-is set to indicate the error.
+.Rv -std
.Sh ERRORS
.Bl -tag -width Er
.It Bq Er EPERM
diff --git a/lib/libc/sys/setuid.2 b/lib/libc/sys/setuid.2
index 4ef4d35..3403b108 100644
--- a/lib/libc/sys/setuid.2
+++ b/lib/libc/sys/setuid.2
@@ -120,12 +120,14 @@ by reverting to the set-user-ID value.
Similarly, the effective group ID may be set to the value
of the real group ID or the saved set-user-ID.
.Sh RETURN VALUES
-Upon success, these functions return 0;
-otherwise \-1 is returned.
-.Pp
-If the user is not the super user, or the uid
-specified is not the real, effective ID, or saved ID,
-these functions return \-1.
+.Rv -std
+.Sh ERRORS
+The functions will fail if:
+.Bl -tag -width Er
+.It Bq Er EPERM
+The user is not the super user and the ID
+specified is not the real, effective ID, or saved ID.
+.El
.Sh SEE ALSO
.Xr getgid 2 ,
.Xr getuid 2 ,
diff --git a/lib/libc/sys/shmat.2 b/lib/libc/sys/shmat.2
index 6f7dc13..63a08bc 100644
--- a/lib/libc/sys/shmat.2
+++ b/lib/libc/sys/shmat.2
@@ -85,11 +85,7 @@ is returned and
.Va errno
is set to indicate the error.
.Pp
-Upon success,
-.Fn shmdt
-returns 0; otherwise, -1 is returned and
-.Va errno
-is set to indicate the error.
+.Rv -std shmdt
.Sh ERRORS
.Fn Shmat
will fail if:
diff --git a/lib/libc/sys/stat.2 b/lib/libc/sys/stat.2
index 9984a1e..50499f7 100644
--- a/lib/libc/sys/stat.2
+++ b/lib/libc/sys/stat.2
@@ -200,10 +200,7 @@ For a list of access modes, see
and
.Xr chmod 2 .
.Sh RETURN VALUES
-Upon successful completion a value of 0 is returned.
-Otherwise, a value of -1 is returned and
-.Va errno
-is set to indicate the error.
+.Rv -std
.Sh COMPATIBILITY
Previous versions of the system used different types for the
.Li st_dev ,
diff --git a/lib/libc/sys/statfs.2 b/lib/libc/sys/statfs.2
index 7119d25..17e8ebe 100644
--- a/lib/libc/sys/statfs.2
+++ b/lib/libc/sys/statfs.2
@@ -125,10 +125,7 @@ Fields that are undefined for a particular file system are set to -1.
returns the same information about an open file referenced by descriptor
.Fa fd .
.Sh RETURN VALUES
-Upon successful completion, a value of 0 is returned.
-Otherwise, -1 is returned and the global variable
-.Va errno
-is set to indicate the error.
+.Rv -std
.Sh ERRORS
.Fn Statfs
fails if one or more of the following are true:
diff --git a/lib/libc/sys/truncate.2 b/lib/libc/sys/truncate.2
index fb3311f..aa6a4b6 100644
--- a/lib/libc/sys/truncate.2
+++ b/lib/libc/sys/truncate.2
@@ -65,10 +65,7 @@ With
.Fn ftruncate ,
the file must be open for writing.
.Sh RETURN VALUES
-A value of 0 is returned if the call succeeds. If the call
-fails a -1 is returned, and the global variable
-.Va errno
-specifies the error.
+.Rv -std
.Sh ERRORS
.Fn Truncate
succeeds unless:
diff --git a/lib/libc/sys/utimes.2 b/lib/libc/sys/utimes.2
index 84a0a0d..1b2ef22 100644
--- a/lib/libc/sys/utimes.2
+++ b/lib/libc/sys/utimes.2
@@ -91,10 +91,7 @@ while
.Fn utimes
changes the times of the file the link references.
.Sh RETURN VALUES
-Upon successful completion, a value of 0 is returned.
-Otherwise, a value of -1 is returned and
-.Va errno
-is set to indicate the error.
+.Rv -std
.Sh ERRORS
.Fn utimes
and
diff --git a/lib/libc_r/man/sem_wait.3 b/lib/libc_r/man/sem_wait.3
index 61a21be..d015b90 100644
--- a/lib/libc_r/man/sem_wait.3
+++ b/lib/libc_r/man/sem_wait.3
@@ -57,14 +57,7 @@ function decrements (locks) the semaphore pointed to by
only if the value is non-zero. Otherwise, the semaphore is not decremented and
an error is returned.
.Sh RETURN VALUES
-If successful,
-.Fn sem_wait
-and
-.Fn sem_trywait
-return 0. Otherwise, -1 is returned and
-.Va errno
-is set to indicate the type of
-error.
+.Rv -std
.Sh ERRORS
.Fn sem_wait
and
diff --git a/lib/libpthread/man/sem_wait.3 b/lib/libpthread/man/sem_wait.3
index 61a21be..d015b90 100644
--- a/lib/libpthread/man/sem_wait.3
+++ b/lib/libpthread/man/sem_wait.3
@@ -57,14 +57,7 @@ function decrements (locks) the semaphore pointed to by
only if the value is non-zero. Otherwise, the semaphore is not decremented and
an error is returned.
.Sh RETURN VALUES
-If successful,
-.Fn sem_wait
-and
-.Fn sem_trywait
-return 0. Otherwise, -1 is returned and
-.Va errno
-is set to indicate the type of
-error.
+.Rv -std
.Sh ERRORS
.Fn sem_wait
and
OpenPOWER on IntegriCloud