ANSI vs POSIX on <sys/types.h>

Karl Heuer karl at IMA.IMA.ISC.COM
Fri Jun 8 01:21:45 AEST 1990


From:  karl at IMA.IMA.ISC.COM (Karl Heuer)

In article <717 at longway.TIC.COM> From:  Doug Gwyn <gwyn at smoke.brl.mil>
>In article <714 at longway.TIC.COM> From:  Andy Tanenbaum <ast at cs.vu.nl>
>>However, why do you urge not to put #include <sys/types.h> into <signal.h>
>>under protection of #ifdef _POSIX_SOURCE?
>
>Because I don't think that use of _POSIX_SOURCE should pollute the
>name space beyond the minimum required for POSIX.

In an earlier thread in this newsgroup, it was decided that this is in fact a
requirement of POSIX.  (Clarified in the Supplement, I believe.)  If the user
himself has not included <sys/types.h>, then the name `pid_t' is not reserved
to the implementation, and so it falls in the user's namespace.

Karl W. Z. Heuer (karl at ima.ima.isc.com or harvard!ima!karl), The Walking Lint

Volume-Number: Volume 20, Number 27



More information about the Comp.std.unix mailing list