View Issue Details

IDProjectCategoryView StatusLast Update
00005311003.1(2008)/Issue 7Base Definitions and Headerspublic2019-06-10 08:55
Reporterantoinel Assigned Toajosey  
PrioritynormalSeverityEditorialTypeOmission
Status ClosedResolutionAccepted 
NameAntoine Leca
Organization
User Reference
Sectionsys/stat.h
Page Number390
Line Number13129
Interp Status---
Final Accepted Text
Summary0000531: Inclusion of <sys/stat.h> may make visible symbols defined in <time.h>
DescriptionStruct timespec is allowed (since IEEE Std 1003.1-2001/Cor 2-2004, item XBD/TC2/D6/25) to be defined in <sys/stat.h>, however the text then was not accompagnied by the usual boilerplate "Inclusion of the <sys/stat.h> header may make visible symbols defined in <time.h>" (where <time.h> is the native place where struct timespec is to be fully defined.)

With IEEE Std 1003.1-2008, the definition of struct timespec is no longer optional.

This is at odds with the way struct timespec is handled in the (various) other headers which are referencing it.
Also several mainstream operating systems took for granted they could import their <time.h> (or <sys/time.h>) namespaces when including <sys/stat.h>; it is certainly not an excuse though.


Another solution could be to "move" the reference to struct timespec toward <sys/types.h>, effectively making it a "POSIX base type." It would lower the name pollution, but the fact it is a struct, not a typedef, could be problematic. Also it won't reduce the already existing pollution (sys/select.h, aio.h are examples.)
Desired ActionAdd to the end of the DESCRIPTION subclause:

Inclusion of the <sys/stat.h> header may make visible all symbols from the header <time.h>.
Tagstc2-2008

Activities

There are no notes attached to this issue.

Issue History

Date Modified Username Field Change
2011-12-22 17:54 antoinel New Issue
2011-12-22 17:54 antoinel Status New => Under Review
2011-12-22 17:54 antoinel Assigned To => ajosey
2011-12-22 17:54 antoinel Name => Antoine Leca
2011-12-22 17:54 antoinel Section => sys/stat.h
2011-12-22 17:54 antoinel Page Number => ?
2011-12-22 17:54 antoinel Line Number => ?
2012-01-12 16:34 Don Cragun Page Number ? => 390
2012-01-12 16:34 Don Cragun Line Number ? => 13129
2012-01-12 16:34 Don Cragun Interp Status => ---
2012-01-12 16:34 Don Cragun Status Under Review => Resolved
2012-01-12 16:34 Don Cragun Resolution Open => Accepted
2012-01-12 16:34 Don Cragun Tag Attached: tc2-2008
2019-06-10 08:55 agadmin Status Resolved => Closed