|Anonymous | Login||2020-08-12 09:22 UTC|
|Main | My View | View Issues | Change Log | Docs|
|Viewing Issue Simple Details|
|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||2019-11-08 10:32|
|Priority||normal||Resolution||Accepted As Marked|
|Final Accepted Text||See Note: 0004242|
|Summary||0001171: <sys/select.h> doesn’t allow to include <sys/time.h> namespace anymore|
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>.
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>.
Change page 399 lines 13572-13575 (<sys/time.h>) from:
The <sys/time.h> header shall define the timeval structure, which shall include at least the following members:
The <sys/time.h> header shall define the fd_set type and
Delete page 399 line 13582:
The <sys/time.h> header shall define the fd_set type as described in <sys/select.h>.
Change the RATIONALE section on page 400 line 13609 from:
The <sys/time.h> header refers to <sys/select.h> for the definition of the timeval structure, instead of the other way round, because <sys/time.h> is an optional (XSI) header whereas <sys/select.h> is mandatory.
|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|
|2019-02-07 16:23||nick||Note Added: 0004242|
|2019-02-07 16:24||nick||Interp Status||=> ---|
|2019-02-07 16:24||nick||Final Accepted Text||=> See Note: 0004242|
|2019-02-07 16:24||nick||Status||New => Resolved|
|2019-02-07 16:24||nick||Resolution||Open => Accepted As Marked|
|2019-02-07 16:24||nick||Tag Attached: tc3-2008|
|2019-11-08 10:32||geoffclare||Status||Resolved => Applied|
|Mantis 1.1.6[^] Copyright © 2000 - 2008 Mantis Group|