View Issue Details

IDProjectCategoryView StatusLast Update
00003601003.1(2008)/Issue 7Base Definitions and Headerspublic2013-04-16 13:06
Reportereblake Assigned Toajosey  
PrioritynormalSeverityEditorialTypeError
Status ClosedResolutionAccepted As Marked 
NameEric Blake
OrganizationRed Hat
User Referenceebb.ctermid
Sectionunistd.h
Page Number443
Line Number15048
Interp StatusApproved
Final Accepted TextSee 0000360:0000657
Summary0000360: ctermid should be optional in <unistd.h>
DescriptionThe standard is explicit that ctermid( ) is required to live in <stdio.h> and
is an extension to the C standard, as seen in both XBD <stdio.h> line 11819
and in XSH termid SYOPSIS at line 24006. The standard also mentions that
<unistd.h> must declare ctermid(); however, this does not match existing
practice. On at least FreeBSD, ctermid( ) is not declared in <unistd.h>, but
lives only in <stdio.h>. However, the cat is already out of the bag for
namespace pollution, as at least glibc and Solaris declare ctermid( ) in both
headers, so we must continue to permit this.

[I noticed this issue because the ctermid( ) declaration was the only CX
shaded line in <unistd.h>, but since that entire header is not mandated by C,
it should not need any CX shading; deleting the problematic line happens to
also solve the shading issue.]
Desired ActionDelete line 15048 (ctermid declaration in XBD <unistd.h>).

At line 15124 (<unistd.h>), add a sentence:

Implementations may also include the ctermid( ) prototype as defined in
<stdio.h>.
Tagstc1-2008

Activities

Don Cragun

2011-01-27 16:55

manager   bugnote:0000657

Last edited: 2011-01-27 16:59

Interpretation response
------------------------
The standard states that <unistd.h> shall include a function prototype for ctermid(), and conforming implementations must conform to this. However, concerns have been raised about this which are being referred to the sponsor.

Rationale:
-------------
Some implementations have had a declaration for ctermid() and this should still be allowed in Issue 7. Having ctermid() and pthread_atfork() prototypes in <unistd.h>, however, are namespace pollution issues that should be corrected in the next revision.

Notes to the Editor (not part of this interpretation):
-------------------------------------------------------
Delete line 15048 (ctermid declaration in XBD <unistd.h>).

At line 15124 (<unistd.h>), add a sentence:

Implementations may also include the ctermid( ) prototype as defined in
<stdio.h>.

Tag the entire paragraph starting on line 15124 including the above new sentence with the OB margin marking.

ajosey

2011-03-15 14:46

manager   bugnote:0000705

Interpretation proposed 15 Mar 2011 for final 30 day review

ajosey

2011-04-26 15:11

manager   bugnote:0000768

The interpretation is now approved.

Issue History

Date Modified Username Field Change
2010-12-17 21:02 eblake New Issue
2010-12-17 21:02 eblake Status New => Under Review
2010-12-17 21:02 eblake Assigned To => ajosey
2010-12-17 21:02 eblake Name => Eric Blake
2010-12-17 21:02 eblake Organization => Red Hat
2010-12-17 21:02 eblake User Reference => ebb.ctermid
2010-12-17 21:02 eblake Section => unistd.h
2010-12-17 21:02 eblake Page Number => 443
2010-12-17 21:02 eblake Line Number => 15048
2010-12-17 21:02 eblake Interp Status => ---
2011-01-27 16:55 Don Cragun Interp Status --- => Pending
2011-01-27 16:55 Don Cragun Note Added: 0000657
2011-01-27 16:55 Don Cragun Status Under Review => Interpretation Required
2011-01-27 16:55 Don Cragun Resolution Open => Accepted As Marked
2011-01-27 16:57 Don Cragun Final Accepted Text => See 0000360:0000657
2011-01-27 16:57 Don Cragun Tag Attached: tc1-2008
2011-01-27 16:59 Don Cragun Note Edited: 0000657
2011-03-15 14:46 ajosey Interp Status Pending => Proposed
2011-03-15 14:46 ajosey Note Added: 0000705
2011-04-26 15:11 ajosey Interp Status Proposed => Approved
2011-04-26 15:11 ajosey Note Added: 0000768
2013-04-16 13:06 ajosey Status Interpretation Required => Closed