On Wed, Feb 24, 2010 at 05:38:14PM -0700, Theo de Raadt wrote:
> > On Wednesday 24 February 2010 15:57:43 Ingo Schwarze wrote:
> > > In OpenBSD, we usually include headers in other headers if that
> > > is required by a relevant standard, in particular by POSIX.
> > 
> > I don't know where you get this idea from. Theo has made it pretty clear
> > in the past that what you said above is not true. Read the man pages.
> 
> No kidding... if you go and include everything everywhere, and then
> those headers include themselves too, and some of them recurse even
> deeper, pretty soon you are pushing half a megabyte of stuff into ccp
> which still has to find the lines which start with #, and do all that
> extra IO.

It might be surprising, but for any semi-modern version of GCC
applying the patch and compiling

#include <sys/types.h>
#include <sys/mman.h>

doesn't result in significant IO change compared to the unpatched
version. The compiler is smart enough to recognise the normal include
guard style and won't touch the file again. So please, don't justify
breaking POSIX compliant code by "reducing IO". That said, sys/types.h
is most likely not what is needed to make sys/mman.h self-contained, but
that's a completely separate issue.

Joerg

Reply via email to