View Issue Details

IDProjectCategoryView StatusLast Update
00004051003.1(2008)/Issue 7Rationalepublic2013-04-16 13:06
ReporterDon Cragun Assigned Toajosey  
PrioritynormalSeverityEditorialTypeError
Status ClosedResolutionAccepted As Marked 
NameDon Cragun
OrganizationSelf
User Reference_XOPEN_SOURCE rationale
SectionB.2.2.1
Page Number3499
Line Number117672
Interp Status---
Final Accepted TextSee 0000405:0000771
Summary0000405: inconsistent rationale
DescriptionDefining _XOPEN_SOURCE to be 700 states that the application wants an environment conforming the SUSv7; not just some SUS.
Desired ActionChange "Version X" on P3499, L117672 to "Version 7" in the TC and make sure that this field is updated along with the value assigned to _XOPEN_SOURCE as part of future revision projects.
Tagstc1-2008

Activities

msbrown

2011-04-28 15:07

manager   bugnote:0000771

Last edited: 2011-04-28 15:26

Here is a proposed action that takes into account the request above as well as the note about the _POSIX_C_SOURCE text immediately above it.

REPLACE page 3499 lines 117653 through 117675 with:

The _POSIX_C_SOURCE Feature Test Macro
The POSIX.1-1990 standard specified a macro called _POSIX_SOURCE. This has been
superseded by _POSIX_C_SOURCE. This symbol will allow implementations to support various versions of this standard simultaneously. For instance, when _POSIX_C_SOURCE is defined as 200809L, the system should make visible the same name space as permitted and required by the POSIX.1-2008 standard. A special case is the one where the implementation wishes to make available support for the 1990 version of the POSIX standard, in which instance when either _POSIX_SOURCE is defined or _POSIX_C_SOURCE is defined as 1, the system should make visible the same name space as permitted and required by the POSIX.1-1990 standard.

It is expected that C bindings to future POSIX standards will define new values for _POSIX_C_SOURCE, with each new value reserving the name space for that new standard.


The _XOPEN_SOURCE Feature Test Macro
The feature test macro _XOPEN_SOURCE is provided as the announcement mechanism for the application that it requires functionality from the Single UNIX Specification. _XOPEN_SOURCE must be defined to the value 700 before the inclusion of any header to enable the functionality in the Single UNIX Specification Version 4. Its definition subsumes the use of _POSIX_C_SOURCE.

An extract of code from a conforming application, that appears before any #include statements, is given below:

#define _XOPEN_SOURCE 700 /* Single UNIX Specification, Version 4 */
#include ...

Note that the definition of _XOPEN_SOURCE with the value 700 makes the definition of _POSIX_C_SOURCE redundant and it can safely be omitted.

Issue History

Date Modified Username Field Change
2011-04-14 13:58 Don Cragun New Issue
2011-04-14 13:58 Don Cragun Status New => Under Review
2011-04-14 13:58 Don Cragun Assigned To => ajosey
2011-04-14 13:58 Don Cragun Name => Don Cragun
2011-04-14 13:58 Don Cragun Organization => Self
2011-04-14 13:58 Don Cragun User Reference => _XOPEN_SOURCE rationale
2011-04-14 13:58 Don Cragun Section => B.2.2.1
2011-04-14 13:58 Don Cragun Page Number => 3499
2011-04-14 13:58 Don Cragun Line Number => 117672
2011-04-14 13:58 Don Cragun Interp Status => ---
2011-04-28 15:07 msbrown Note Added: 0000771
2011-04-28 15:26 nick Note Edited: 0000771
2011-04-28 15:27 nick Final Accepted Text => See 0000405:0000771
2011-04-28 15:27 nick Status Under Review => Resolved
2011-04-28 15:27 nick Resolution Open => Accepted As Marked
2011-04-28 15:28 nick Tag Attached: tc1-2008
2013-04-16 13:06 ajosey Status Resolved => Closed