Remove unnecessary #includes from the kqueue(2) man page.

Now that <sys/event.h> can be included on its own, adjust the manual
page accordingly. Remove both unnecessary #include statements from the
synopsis and the example code.

While there, also add a note to the BUGS section to mention that
previous versions of this header file still depend on <sys/types.h>.

Reviewed by:	ngie, vangyzen
Differential Revision:	https://reviews.freebsd.org/D9605
This commit is contained in:
Ed Schouten 2017-02-16 06:52:53 +00:00
parent bd1623def1
commit 8eb15797b1
Notes: svn2git 2020-12-20 02:59:44 +00:00
svn path=/head/; revision=313801

View File

@ -24,7 +24,7 @@
.\"
.\" $FreeBSD$
.\"
.Dd May 3, 2016
.Dd February 15, 2017
.Dt KQUEUE 2
.Os
.Sh NAME
@ -34,9 +34,7 @@
.Sh LIBRARY
.Lb libc
.Sh SYNOPSIS
.In sys/types.h
.In sys/event.h
.In sys/time.h
.Ft int
.Fn kqueue "void"
.Ft int
@ -633,15 +631,12 @@ If the time limit expires, then
returns 0.
.Sh EXAMPLES
.Bd -literal -compact
#include <sys/types.h>
#include <sys/event.h>
#include <sys/time.h>
#include <err.h>
#include <fcntl.h>
#include <stdio.h>
#include <stdlib.h>
#include <string.h>
#include <unistd.h>
int
main(int argc, char **argv)
@ -769,3 +764,9 @@ The
.Fa timeout
value is limited to 24 hours; longer timeouts will be silently
reinterpreted as 24 hours.
.Pp
Previous versions of
.In sys/event.h
fail to parse without including
.In sys/types.h
manually.