> Date: Sun, 05 Jul 2009 14:48:14 -0600
> From: Theo de Raadt <dera...@cvs.openbsd.org>
> 
> > > If i understand correctly, headers using types from <sys/types.h>
> > > ought to include <sys/types.h>
> > >  - unconditionally, if they are POSIX headers and the use of the
> > >    type is mandated by POSIX
> > >  - protected by __BSD_VISIBLE or the appropriate feature macro
> > >    like __XPG_VISIBLE, if they are POSIX headers and if the use
> > >    is not mandated by POSIX, but by a lesser standard
> > >  - protected by __BSD_VISIBLE only, if they are POSIX headers and
> > >    if the use is not mandated by a standard
> > >  - unconditionally, if they are not POSIX headers
> > 
> > You have the latter case wrong.  We tend to not include header files
> > in other header files, unless mandated by some standard.
> > 
> > So I think the man pages should be amended to #include <sys/types.h>.
> 
> Mark is correct.  It is simply a documentation error.
> 
> If we went the other way around, people would be able to include less
> files; indeed, almost be careless about what they include.  But this
> would not increase portability in any way.  And 'make build' would
> probably, if it was taken the nth degree, take twice as long.

Or worse, you end up with circular dependencies.

Reply via email to