Defect report from : Joanna Farley , Sun Microsystems
(Please direct followup comments direct to yyyyyyyyyyyyyy@xxxxxxxxxxxxx)
@ page 398-403 line 13998-14-262 section unistd.h objection {sunw-jf03-ld2}
Problem:
Defect code : 3. Clarification required
The requirements on when constants in unistd.h can be defined or undefined
is unclear. This manifests itself in two ways:
Issue 1:
In SUSv2 for POSIX and XSI conformance there was no requirement that
_POSIX_CHOWN_RESTRICTED and _POSIX_NO_TRUNC constants needed definitions
in unistd.h as their value could be determined via calls to
fpathconf()/pathconf() or the getconf utility to verify that the
implementation support these.
This is still the definition for SUSv3 in the conformance section of
XBD6 Chapter 2, page 16, lines 659-667.
However, the unistd.h page does not clearly match Chapter 2, page
16, lines 659-667. In particular with the first sentence on 695:
"The following symbolic constants shall either be undefined or
defined with a value other than -1."
The unistd.h definition for _POSIX_CHOWN_RESTRICTED and _POSIX_NO_TRUNC
constants both say:
"This symbol shall always be set to a value other than -1."
(see XBD page 399 lines 14052 and pages 399-400 lines 14084-14085).
Clarification is required as the unistd.h definition does not make it
clear the _POSIX_CHOWN_RESTRICTED and _POSIX_NO_TRUNC constants can be
undefined in unistd.h and the requirement is:
"If this symbol is defined in <unistd.h>, it shall be defined to be a
value other than -1. If it is not defined, the value of this symbol
reported by fpathconf(), pathconf(), or sysconf(), shall be a value
other than -1."
Issue 2:
In many places in XBD6 for the optional constant definitions in the
unistd.h description on pages 399-403 the following wording is used:
"If this symbol has a value other than -1 or 0, it shall have the
value 200112L."
Clarification is required as the unistd.h definition does not make
it clear the optional constants can be undefined in unistd.h and the
requirement is:
"If this symbol is defined in <unistd.h>, it shall be defined to be -1,
0, or 200112L. The value of this symbol reported by sysconf() shall
either be -1 or 200112L."
Action:
For Issue 1:
An interpretation is required along with the proposed changes:
Change the sentence on XBD6 page 399 lines 14052 from:
"This symbol shall always be set to a value other than -1."
to
"This symbol shall either be undefined or defined with a value other
than -1."
Change the sentence on XBD6 page 399-400 lines 14084-14085 from:
"This symbol shall always be set to a value other than -1."
to
"This symbol shall either be undefined or defined with a value other
than -1."
For Issue 2:
An interpretation is required along with the proposed changes:
Where the following text is used in the definition of constants on
pages 399-403:
"If this symbol has a value other than -1 or 0, it shall have the
value 200112L."
This need to be changed to:
"If this symbol is defined in <unistd.h>, it shall be defined to be
-1, 0, or 200112L. The value of this symbol reported by sysconf()
shall either be -1 or 200112L."
|