Peter Eisentraut <peter_e@gmx.net> writes:
> The standards specify (effectively) that sys/types.h must be included
> before grp.h. This can be considered stupid, but it's not really
> FreeBSD's fault.
Possibly I'm spoiled: HPUX gets this right.
I ran the same experiment Bruce mentioned, and found that of 192 headers
in HPUX 10.20's /usr/include directory, all but 24 compiled with no
additional inclusions. The failing headers were
alarm.h dcnodes.h dmapi.h dumprestor.h dvio.h elog.h eucioctl.h
execargs.h exportent.h fbackup.h hard_reg.h initptr.h lc_core.h
m4_frame.h m4_reg.h pfm.h ppfm.h prot.h sad.h soft_reg.h std_space.h
term.h xds.h xomi.h
which are mostly not standardized headers.
The failure rate was higher in the subdirectories of /usr/include, but
that's not surprising. A lot of the headers underneath /usr/include/sys
don't look like they're even intended to be compiled in userland code.
regards, tom lane