Skip site navigation (1)Skip section navigation (2)
Date:      Fri, 9 Jun 2000 17:29:00 +1000 (EST)
From:      Bruce Evans <bde@zeta.org.au>
To:        John-Mark Gurney <gurney_j@resnet.uoregon.edu>
Cc:        cvs-committers@FreeBSD.org, cvs-all@FreeBSD.org
Subject:   Re: cvs commit: src/lib/libc/sys kqueue.2
Message-ID:  <Pine.BSF.4.21.0006091720010.1927-100000@besplex.bde.org>
In-Reply-To: <20000608151419.24215@hydrogen.funkthat.com>

next in thread | previous in thread | raw e-mail | index | archive | help
On Thu, 8 Jun 2000, John-Mark Gurney wrote:

> > >   add missing sys/time.h for struct timespec def...
> > 
> > This is bogus.  <sys/event.h> forward-declares struct timespec so that
> > <sys/time.h> is not a prerequisite for <sys/event.h>.  <sys/time.h> only
> > needs to be included when the complete type for struct timespec is needed.
> > Even if kevent() is called, the complete type isn't needed unless the
> > timeout arg is non-NULL and is constructed in the same file.  Anyway,
> > POSIX.1-1996 says that struct timespec is declared in <time.h>.
> 
> so, is the correct fix to take it out of to change it to time.h?

Maybe.  Unfortunately for my argument, there are examples of including
sometimes-unnecessary headers in timeout.2 and printf.3.  <stdarg.h>
is needed for using only the varargs functions, and the includes and
prototypes are arranged so that the include of <stdarg.h> is only before
the prototypes that appear to need it.

The include of <sys/time.h> in kqueue.2 is disordered.

Bruce



To Unsubscribe: send mail to majordomo@FreeBSD.org
with "unsubscribe cvs-all" in the body of the message




Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?Pine.BSF.4.21.0006091720010.1927-100000>