diff options
author | 2015-02-05 02:33:09 +0000 | |
---|---|---|
committer | 2015-02-05 02:33:09 +0000 | |
commit | 0e5e29b0acdc0ee4e690553a6bc8d573b5e26335 (patch) | |
tree | d03e470c7096ed54c1a9f6122a297cc536a42908 | |
parent | fix handling of empty .An macros (diff) | |
download | wireguard-openbsd-0e5e29b0acdc0ee4e690553a6bc8d573b5e26335.tar.xz wireguard-openbsd-0e5e29b0acdc0ee4e690553a6bc8d573b5e26335.zip |
macro fixes from Kaspars at Bankovskis dot net;
also fixing one typo in fts(3) while here
-rw-r--r-- | lib/libc/gen/fts.3 | 10 | ||||
-rw-r--r-- | lib/libc/gen/initgroups.3 | 6 | ||||
-rw-r--r-- | lib/libc/gen/posix_spawn.3 | 8 | ||||
-rw-r--r-- | lib/libc/hash/sha2.3 | 12 | ||||
-rw-r--r-- | lib/libc/sys/poll.2 | 29 | ||||
-rw-r--r-- | lib/libc/sys/read.2 | 16 | ||||
-rw-r--r-- | lib/libc/sys/setregid.2 | 6 | ||||
-rw-r--r-- | lib/libc/sys/setreuid.2 | 6 | ||||
-rw-r--r-- | lib/libc/sys/write.2 | 24 |
9 files changed, 61 insertions, 56 deletions
diff --git a/lib/libc/gen/fts.3 b/lib/libc/gen/fts.3 index ba77f4c165a..9eed64c783c 100644 --- a/lib/libc/gen/fts.3 +++ b/lib/libc/gen/fts.3 @@ -1,4 +1,4 @@ -.\" $OpenBSD: fts.3,v 1.31 2014/01/21 03:15:45 schwarze Exp $ +.\" $OpenBSD: fts.3,v 1.32 2015/02/05 02:33:09 schwarze Exp $ .\" .\" Copyright (c) 1989, 1991, 1993, 1994 .\" The Regents of the University of California. All rights reserved. @@ -29,7 +29,7 @@ .\" .\" @(#)fts.3 8.5 (Berkeley) 4/16/94 .\" -.Dd $Mdocdate: January 21 2014 $ +.Dd $Mdocdate: February 5 2015 $ .Dt FTS 3 .Os .Sh NAME @@ -234,17 +234,17 @@ The .Li FTSENT structure representing the parent of the starting point (or root) of the traversal is numbered -.Ev FTS_PARENTLEVEL +.Dv FTS_ROOTPARENTLEVEL (\-1), and the .Li FTSENT structure for the root itself is numbered -.Ev FTS_ROOTLEVEL +.Dv FTS_ROOTLEVEL (0). Note that while .Fa fts_level cannot hold a number of levels greater than -.Ev FTS_MAXLEVEL , +.Dv FTS_MAXLEVEL , the .Nm functions themselves are not limited to a fixed number diff --git a/lib/libc/gen/initgroups.3 b/lib/libc/gen/initgroups.3 index 33627038a3a..1e81a232ee2 100644 --- a/lib/libc/gen/initgroups.3 +++ b/lib/libc/gen/initgroups.3 @@ -1,4 +1,4 @@ -.\" $OpenBSD: initgroups.3,v 1.15 2015/01/17 17:17:10 deraadt Exp $ +.\" $OpenBSD: initgroups.3,v 1.16 2015/02/05 02:33:09 schwarze Exp $ .\" .\" Copyright (c) 1983, 1991, 1993 .\" The Regents of the University of California. All rights reserved. @@ -27,7 +27,7 @@ .\" OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF .\" SUCH DAMAGE. .\" -.Dd $Mdocdate: January 17 2015 $ +.Dd $Mdocdate: February 5 2015 $ .Dt INITGROUPS 3 .Os .Sh NAME @@ -52,7 +52,7 @@ is automatically included in the group list. Typically this value is given as the group number from the password file. .Pp If the groups database lists more than -.Ev NGROUPS_MAX +.Dv NGROUPS_MAX groups for .Fa name (including one for diff --git a/lib/libc/gen/posix_spawn.3 b/lib/libc/gen/posix_spawn.3 index 5f082d63dab..a22c7080391 100644 --- a/lib/libc/gen/posix_spawn.3 +++ b/lib/libc/gen/posix_spawn.3 @@ -1,4 +1,4 @@ -.\" $OpenBSD: posix_spawn.3,v 1.7 2014/11/30 02:41:43 schwarze Exp $ +.\" $OpenBSD: posix_spawn.3,v 1.8 2015/02/05 02:33:09 schwarze Exp $ .\" .\" Copyright (c) 2012 Marc Espie <espie@openbsd.org> .\" @@ -14,7 +14,7 @@ .\" ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION, ARISING OUT OF .\" OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE. .\" -.Dd $Mdocdate: November 30 2014 $ +.Dd $Mdocdate: February 5 2015 $ .Dt POSIX_SPAWN 3 .Os .Sh NAME @@ -66,7 +66,7 @@ If is a null pointer, file descriptors open in the parent process follow the usual rules: they remain open in the child process unless they've been marked -.Ev FD_CLOEXEC +.Dv FD_CLOEXEC with .Xr fcntl 2 . .Pp @@ -105,7 +105,7 @@ In case of an error, both functions may return or .Fn exec return values and set -.Ev errno +.Va errno accordingly. .Pp Note, however, that after the new process is started, the child diff --git a/lib/libc/hash/sha2.3 b/lib/libc/hash/sha2.3 index 4a9142be563..46e6ce6bc62 100644 --- a/lib/libc/hash/sha2.3 +++ b/lib/libc/hash/sha2.3 @@ -1,4 +1,4 @@ -.\" $OpenBSD: sha2.3,v 1.21 2014/11/26 02:05:58 schwarze Exp $ +.\" $OpenBSD: sha2.3,v 1.22 2015/02/05 02:33:09 schwarze Exp $ .\" .\" Copyright (c) 2003, 2004 Todd C. Miller <Todd.Miller@courtesan.com> .\" @@ -20,7 +20,7 @@ .\" .\" See http://www.nist.gov/sha/ for the detailed standard .\" -.Dd $Mdocdate: November 26 2014 $ +.Dd $Mdocdate: February 5 2015 $ .Dt SHA2 3 .Os .Sh NAME @@ -222,11 +222,11 @@ functions the .Fa buf parameter should either be a string large enough to hold the resulting digest (e.g.\& -.Ev SHA224_DIGEST_STRING_LENGTH , -.Ev SHA256_DIGEST_STRING_LENGTH , -.Ev SHA384_DIGEST_STRING_LENGTH , +.Dv SHA224_DIGEST_STRING_LENGTH , +.Dv SHA256_DIGEST_STRING_LENGTH , +.Dv SHA384_DIGEST_STRING_LENGTH , or -.Ev SHA512_DIGEST_STRING_LENGTH , +.Dv SHA512_DIGEST_STRING_LENGTH , depending on the function being used) or a .Dv NULL diff --git a/lib/libc/sys/poll.2 b/lib/libc/sys/poll.2 index b778819fad9..8474abb66cb 100644 --- a/lib/libc/sys/poll.2 +++ b/lib/libc/sys/poll.2 @@ -1,4 +1,4 @@ -.\" $OpenBSD: poll.2,v 1.28 2014/12/16 00:06:49 schwarze Exp $ +.\" $OpenBSD: poll.2,v 1.29 2015/02/05 02:33:09 schwarze Exp $ .\" .\" Copyright (c) 1994 Jason R. Thorpe .\" All rights reserved. @@ -28,7 +28,7 @@ .\" OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY .\" OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF .\" -.Dd $Mdocdate: December 16 2014 $ +.Dd $Mdocdate: February 5 2015 $ .Dt POLL 2 .Os .Sh NAME @@ -61,7 +61,7 @@ The arguments are as follows: .Bl -tag -width timeout .It Fa fds Points to an array of -.Fa pollfd +.Vt pollfd structures, which are defined as: .Bd -literal -offset indent struct pollfd { @@ -78,7 +78,7 @@ If .Fa fd is -1, the -.Fa pollfd +.Vt pollfd structure is considered unused, and .Fa revents will be cleared. @@ -91,14 +91,15 @@ members are bitmasks of conditions to monitor and conditions found, respectively. .It Fa nfds An unsigned integer specifying the number of -.Fa pollfd +.Vt pollfd structures in the array. .It Fa timeout Maximum interval to wait for the poll to complete, in milliseconds. If this value is 0, .Fn poll will return immediately. -If this value is INFTIM (-1), +If this value is +.Dv INFTIM Pq -1 , .Fn poll will block indefinitely until a condition is found. .El @@ -210,18 +211,18 @@ to indicate the error. If the timeout interval was reached before any events occurred, they return 0. Otherwise, they return the number of -.Fa pollfd +.Vt pollfd structures for which .Fa revents is non-zero. .Sh IDIOMS Care must be taken when converting code from -.Fn select +.Xr select 2 to .Fn poll as they have slightly different semantics. The first semantic difference is that, unlike -.Fn select , +.Xr select 2 , .Fn poll has a way of indicating that one or more file descriptors is invalid by setting a flag in the @@ -229,9 +230,11 @@ by setting a flag in the field of corresponding entry of .Fa fds , whereas -.Fn select +.Xr select 2 returns an error (-1) if any of the descriptors with bits set in -the fd_set are invalid. +the +.Vt fd_set +are invalid. The second difference is that on EOF there is no guarantee that .Dv POLLIN will be set in @@ -239,11 +242,11 @@ will be set in the caller must also check for .Dv POLLHUP . This differs from -.Fn select +.Xr select 2 where EOF is considered as a read event. .Pp Consider the following usage of -.Fn select +.Xr select 2 that implements a read from the standard input with a 60 second time out: .Bd -literal -offset indent diff --git a/lib/libc/sys/read.2 b/lib/libc/sys/read.2 index 1cbad9e4dc9..48e227354ee 100644 --- a/lib/libc/sys/read.2 +++ b/lib/libc/sys/read.2 @@ -1,4 +1,4 @@ -.\" $OpenBSD: read.2,v 1.34 2014/05/29 06:28:51 guenther Exp $ +.\" $OpenBSD: read.2,v 1.35 2015/02/05 02:33:09 schwarze Exp $ .\" $NetBSD: read.2,v 1.6 1995/02/27 12:35:47 cgd Exp $ .\" .\" Copyright (c) 1980, 1991, 1993 @@ -30,7 +30,7 @@ .\" .\" @(#)read.2 8.4 (Berkeley) 2/26/94 .\" -.Dd $Mdocdate: May 29 2014 $ +.Dd $Mdocdate: February 5 2015 $ .Dt READ 2 .Os .Sh NAME @@ -40,17 +40,17 @@ .Nm preadv .Nd read input .Sh SYNOPSIS -.Fd #include <unistd.h> +.In unistd.h .Ft ssize_t .Fn read "int d" "void *buf" "size_t nbytes" .Ft ssize_t .Fn pread "int d" "void *buf" "size_t nbytes" "off_t offset" .Pp -.Fd #include <sys/uio.h> +.In sys/uio.h .Ft ssize_t .Fn readv "int d" "const struct iovec *iov" "int iovcnt" -.Fd #include <sys/types.h> -.Fd #include <sys/uio.h> +.In sys/types.h +.In sys/uio.h .Ft ssize_t .Fn preadv "int d" "const struct iovec *iov" "int iovcnt" "off_t offset" .Sh DESCRIPTION @@ -220,7 +220,7 @@ The sum of the values in the .Fa iov array overflowed an -.Em ssize_t . +.Vt ssize_t . .It Bq Er EFAULT Part of .Fa iov @@ -266,7 +266,7 @@ while ((nr = read(fd, buf, sizeof(buf))) > 0) .Ed .Pp is not maximally portable, as some platforms allow for -.Va nbytes +.Fa nbytes to range between .Dv SSIZE_MAX and diff --git a/lib/libc/sys/setregid.2 b/lib/libc/sys/setregid.2 index 38b550532b5..602da875710 100644 --- a/lib/libc/sys/setregid.2 +++ b/lib/libc/sys/setregid.2 @@ -1,4 +1,4 @@ -.\" $OpenBSD: setregid.2,v 1.10 2014/12/10 19:19:00 schwarze Exp $ +.\" $OpenBSD: setregid.2,v 1.11 2015/02/05 02:33:09 schwarze Exp $ .\" .\" Copyright (c) 1980, 1991, 1993, 1994 .\" The Regents of the University of California. All rights reserved. @@ -29,14 +29,14 @@ .\" .\" @(#)setregid.2 8.2 (Berkeley) 4/16/94 .\" -.Dd $Mdocdate: December 10 2014 $ +.Dd $Mdocdate: February 5 2015 $ .Dt SETREGID 2 .Os .Sh NAME .Nm setregid .Nd set real and effective group IDs .Sh SYNOPSIS -.Fd #include <unistd.h> +.In unistd.h .Ft int .Fn setregid "gid_t rgid" "gid_t egid" .Sh DESCRIPTION diff --git a/lib/libc/sys/setreuid.2 b/lib/libc/sys/setreuid.2 index 533f20958ed..29c11c2e017 100644 --- a/lib/libc/sys/setreuid.2 +++ b/lib/libc/sys/setreuid.2 @@ -1,4 +1,4 @@ -.\" $OpenBSD: setreuid.2,v 1.11 2014/12/10 19:19:00 schwarze Exp $ +.\" $OpenBSD: setreuid.2,v 1.12 2015/02/05 02:33:09 schwarze Exp $ .\" .\" Copyright (c) 1980, 1991, 1993, 1994 .\" The Regents of the University of California. All rights reserved. @@ -29,14 +29,14 @@ .\" .\" @(#)setreuid.2 8.2 (Berkeley) 4/16/94 .\" -.Dd $Mdocdate: December 10 2014 $ +.Dd $Mdocdate: February 5 2015 $ .Dt SETREUID 2 .Os .Sh NAME .Nm setreuid .Nd set real and effective user IDs .Sh SYNOPSIS -.Fd #include <unistd.h> +.In unistd.h .Ft int .Fn setreuid "uid_t ruid" "uid_t euid" .Sh DESCRIPTION diff --git a/lib/libc/sys/write.2 b/lib/libc/sys/write.2 index 930e445c1a1..60463ee05b0 100644 --- a/lib/libc/sys/write.2 +++ b/lib/libc/sys/write.2 @@ -1,4 +1,4 @@ -.\" $OpenBSD: write.2,v 1.38 2013/04/08 07:39:17 jmc Exp $ +.\" $OpenBSD: write.2,v 1.39 2015/02/05 02:33:09 schwarze Exp $ .\" $NetBSD: write.2,v 1.6 1995/02/27 12:39:43 cgd Exp $ .\" .\" Copyright (c) 1980, 1991, 1993 @@ -30,7 +30,7 @@ .\" .\" @(#)write.2 8.5 (Berkeley) 4/2/94 .\" -.Dd $Mdocdate: April 8 2013 $ +.Dd $Mdocdate: February 5 2015 $ .Dt WRITE 2 .Os .Sh NAME @@ -40,17 +40,17 @@ .Nm pwritev .Nd write output .Sh SYNOPSIS -.Fd #include <unistd.h> +.In unistd.h .Ft ssize_t .Fn write "int d" "const void *buf" "size_t nbytes" .Ft ssize_t .Fn pwrite "int d" "const void *buf" "size_t nbytes" "off_t offset" .Pp -.Fd #include <sys/uio.h> +.In sys/uio.h .Ft ssize_t .Fn writev "int d" "const struct iovec *iov" "int iovcnt" -.Fd #include <sys/types.h> -.Fd #include <sys/uio.h> +.In sys/types.h +.In sys/uio.h .Ft ssize_t .Fn pwritev "int d" "const struct iovec *iov" "int iovcnt" "off_t offset" .Sh DESCRIPTION @@ -79,7 +79,7 @@ For and .Fn pwritev , the -.Fa iovec +.Vt iovec structure is defined as: .Bd -literal -offset indent struct iovec { @@ -89,7 +89,7 @@ struct iovec { .Ed .Pp Each -.Fa iovec +.Vt iovec entry specifies the base address and length of an area in memory from which data should be written. .Fn writev @@ -106,7 +106,9 @@ starts at a position given by the pointer associated with Upon return from .Fn write , the pointer is incremented by the number of bytes which were written. -If a file was opened with the O_APPEND flag (see +If a file was opened with the +.Dv O_APPEND +flag (see .Xr open 2 ) , calls to .Fn write @@ -264,7 +266,7 @@ The sum of the values in the .Fa iov array overflowed an -.Em ssize_t . +.Vt ssize_t . .It Bq Er EFAULT Part of .Fa iov @@ -313,7 +315,7 @@ while ((nr = write(fd, buf, sizeof(buf))) > 0) .Ed .Pp is not maximally portable, as some platforms allow for -.Va nbytes +.Fa nbytes to range between .Dv SSIZE_MAX and |