> 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.

Oh, so we should trust the compiler?  I am certain that rule is not
written anywhere.

sys/mman.h is not required to pull in sys/types.h.  Applications which
use it, must do that themselves.  

Guarding should be used where it needs to be used, and nowhere else.
Header files should not be pulled in unless the APIs are understood.

POSIX has completely undermined itself and turned itself into junk
under the guidance of a very small group of people with one platform
in mind.

Reply via email to