Austin Group Defect Tracker

Aardvark Mark III

Viewing Issue Simple Details Jump to Notes ] Issue History ] Print ]
ID Category Severity Type Date Submitted Last Update
0001171 [1003.1(2016)/Issue7+TC2] Base Definitions and Headers Objection Error 2017-11-22 09:52 2017-11-22 09:52
Reporter martinr View Status public  
Assigned To
Priority normal Resolution Open  
Status New  
Name Martin Rehak
Organization Oracle Corporation
User Reference
Section <sys/time.h>
Page Number 399
Line Number 13572
Interp Status ---
Final Accepted Text
Summary 0001171: <sys/select.h> doesn’t allow to include <sys/time.h> namespace anymore
Description The standard in XPG7 version says for <sys/select.h>:

"Inclusion of the <sys/select.h> header may make visible all symbols from the headers <signal.h> and <time.h>."

In previous version (XPG6) there was also <sys/time.h> allowed to be included in <sys/select.h>, but we were not able to find out why the change happened. We are just guessing that intention was to do reverse inclusion:

The select() was defined in <sys/time.h> in earlier versions of the standard (pre-XPG6). However, with the introduction of pselect() in <sys/select.h> in XPG6, the move was made to define ALL the related definitions for pselect() and select() in <sys/select.h>. As noted on the pselect() page in SUSv4 Rationale section, "Backwards-compatibility to existing XSI implementations is handled by allowing <sys/time.h> to include <sys/select.h>. This is KEY statement.

Looking at the <sys/select.h> header, it appears the intent was that <sys/select.h> would now define the timeval structure and it's members. In XPG7, the specification for both <sys/time.h> and <sys/select.h> states that the respective header:

"...shall define the timeval structure, which shall include at least the following members:

time_t tv_sec Seconds.
suseconds_t tv_usec Microseconds."

This appears to be a bug. Given that <sys/time.h> further states that "Inclusion of the <sys/time.h> header may make visible all the symbols from the <sys/select.h> header", along with the previously quoted Rationale, it appears the intent was indeed to move the timeval structure definition to <sys/select.h>. Hence, the description in <sys/time.h> should probably read:

"The <sys/time.h> header shall define the timeval structure as described in <sys/select.h>.
Desired Action 1) Clarify why the mentioned change happened.

2) If our guessing is right change the <sys/time.h> description (Page 399 / Line: 13572) to:

The <sys/time.h> header shall define the timeval structure as described in <sys/select.h>.
Tags No tags attached.
Attached Files

- Relationships

There are no notes attached to this issue.

- Issue History
Date Modified Username Field Change
2017-11-22 09:52 martinr New Issue
2017-11-22 09:52 martinr Name => Martin Rehak
2017-11-22 09:52 martinr Organization => Oracle Corporation
2017-11-22 09:52 martinr Section => <sys/time.h>
2017-11-22 09:52 martinr Page Number => 399
2017-11-22 09:52 martinr Line Number => 13572

Mantis 1.1.6[^]
Copyright © 2000 - 2008 Mantis Group
Powered by Mantis Bugtracker