Some questions about POSIX headers

Chuck Karish karish at forel.stanford.edu
Sat Nov 18 13:53:23 AEST 1989


In article <428 at longway.TIC.COM> gwyn at brl.arpa (Doug Gwyn) wrote:
>In article <6649 at portia.Stanford.EDU> karish at forel.stanford.edu (Chuck Karish) writes:
>>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:
>
>No, it doesn't -- because "the set of symbols defined by the C standard"
>can, and must, be construed as permitting all symbols that the C standard
>specifically reserves for the implementation, including _LOW etc.

To me, "the set of symbols defined by the C standard" means the set of
symbols defined, not the set of all possible symbols in some part of
the name space.  I interpreted this to mean the set of symbols listed
in Appendix 3 of X3J11/88-158 (Draft ANSI C Standard).  "Defined"
and "reserved" denote different concepts.

This is cleared up somewhat in Drafts 3 and 4 of the P1003.1a
supplement:

    2.8.2:  "It is unspecified by this standard whether any symbols in
    the namespace reserved to the implementation are affected by
    _POSIX_SOURCE."

    2.8.2.2:  "If _POSIX_SOURCE is defined ... [s]ymbols from the
    namespace reserved for the implementation, as defined by the C
    Standard [1], are also permitted."

Note that neither of these clauses deals with the case where
_POSIX_SOURCE is not defined, which is the case I considered in the
paragraph quoted from my earlier article [2.8.2.1].

If the 1003.1 committee means that anything in the implementors'
name space may be in a header without protection, the standard
must say so.  As now written, it explicitly says the opposite.

	Chuck Karish		karish at mindcraft.com
	(415) 323-9000		karish at forel.stanford.edu

Volume-Number: Volume 17, Number 59



More information about the Comp.std.unix mailing list