Some questions about POSIX headers

Chuck Karish karish at forel.stanford.edu
Sun Nov 19 22:36:12 AEST 1989


In article <5740045 at hpfcdc.HP.COM> rml at hpfcdc.HP.COM (Bob Lenk) wrote:
[Chuck Karish wrote:]
>> According to Section 2.8.2.1 of the 1003.1 document, "If there are no
>> feature test macros present in a program, only the set of symbols
>> defined by the C standard shall be present".  This means that the
>> symbols may be present, but they must be concealed by a feature test
>> macro...

>I would lean toward interpreting "the set of symbols defined by the
>C Standard" as including the possibility of any symbols reserved for
>the implementation by the C Standard.  I see no benefit, and many
>problems, with any other interpretation.  Consider that such symbols
>might legally be reserved words.

I agree with Bob, and with Doug Gwyn, that 1003.1 should allow symbols
reserved for the implementation by the C standard to be visible in the
standard headers.  I disagree that it is reasonable to interpret
`defined' to mean `reserved'.  The symbols required by the C standard
to be defined in the standard headers are neatly listed in Appendix 3
of that document.

Now that explicit provision has been made for use of symbols from the
reserved namespace when _POSIX_SOURCE is defined, but not otherwise
(1003.1a, Drafts 3 and 4, Section 2.8.2) it is more clear than ever
that the standard restricts visibility of such symbols.

The standard is broken.  For the case where only the C standard should
apply to the contents of headers, the 1003.1 standard is more
restrictive than the C standard.  We should make sure that it gets
fixed, rather than spend our time with corrective misinterpretations.



More information about the Comp.unix.questions mailing list