Some questions about POSIX headers

gwyn at BRL.MIL gwyn at BRL.MIL
Sun Nov 19 12:36:27 AEST 1989


In article <431 at longway.TIC.COM> karish at forel.stanford.edu (Chuck Karish) writes:
-In article <428 at longway.TIC.COM> gwyn at brl.arpa (Doug Gwyn) wrote:
->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.

But IEEE Std 1003.1 cannot constrain the identifiers reserved for
implementation use by ANSI X3.159.  The intention of this part of
the 1003.1 spec is quite clear -- it means that applications cannot
count on the symbols defined by 1003.1 as being visible in the
Standard C headers unless _POSIX_SOURCE is defined before including
the headers.  It does not impose additional constraints on the pure
X3.159 part of the implementation.  As a practical matter, it cannot
forbid use of the implementation-reserved identifiers, because they
are necessary in many environments in order to correctly implement
X3.159.

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

2.8.2 obviously DOES deal with the case where _POSIX_SOURCE is
undefined, because it is the contrast between that and the case
where _POSIX_SOURCE is defined that constitutes waht is "affected
by _POSIX_SOURCE".

Note that what is defined by the standard headers when _POSIX_SOURCE
is not defined is ENTIRELY specified by X3.159, not by 1003.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.

You are being deliberately obtuse.  I don't think anybody involved
with drawing up these specifications would back your interpretation.

[ Let's avoid personal characterisations and stick to technical points,
please.  -mod ]

	- D A Gwyn
	acting X3J11/1003.1 liaison

Volume-Number: Volume 17, Number 60



More information about the Comp.std.unix mailing list