View Issue Details

IDProjectCategoryView StatusLast Update
00011271003.1(2013)/Issue7+TC1Base Definitions and Headerspublic2018-08-23 15:38
Reporterjsm28 Assigned To 
PrioritynormalSeverityEditorialTypeClarification Requested
Status ClosedResolutionRejected 
NameJoseph Myers
Organization
User Reference
Sectionsys/socket.h
Page Number389
Line Number13239
Interp Status---
Final Accepted Text
Summary0001127: sys/socket.h inclusion of sys/uio.h
DescriptionThe sys/socket.h specification says "The <sys/socket.h> header shall define the iovec structure as described in <sys/uio.h>." and "Inclusion of <sys/socket.h> may also make visible all symbols from <sys/uio.h>.".

These statements (and the use of the iovec structure) are not XSI-shaded. However, the whole of sys/uio.h is XSI-shaded. Thus, when <sys/socket.h> is included in the non-XSI case (_POSIX_C_SOURCE=200809L), may declarations become visible of readv, writev and the symbols listed (also XSI-shaded) as reserved when <sys/uio.h> is included in XSH 2.2.2 The Name Space, or only of the iovec structure and its contents?
Desired ActionClarify what may be visible when a non-XSI-shaded header is permitted to make visible symbols from an XSI-shaded header, or eliminate such permissions from the standard.
TagsNo tags attached.

Activities

shware_systems

2017-03-16 02:46

reporter   bugnote:0003615

Something XSI shaded need not be present in a header on a non-XSI system, but the names are reserved whether present or not, as explained in XSH 2.2.1.1 as "permitted symbols". Still, as msghdr in <sockets.h> uses the iovec type I believe this effectively moves it to the Base from XSI, so I agree there should be clarification it may need to be declared in <socket.h>, not just defined via #include, if the <uio.h> header is not available. How the msghdr related interfaces make use of those fields isn't really dependent on the <uio.h> interfaces, that I see, it's just the type sufficiently serves the purpose of tracking out of order packets in a message.

Don Cragun

2018-08-23 15:38

manager   bugnote:0004087

This was discussed during the August 23, 2018 conference call. This bug is rejected:

The standard clearly states that the entire contents of <sys/uio.h> can be made visible, and this applies even when compiled with _POSIX_C_SOURCE=200809L. This was the intent and we do not see any reason to change this requirement at this time. Implementations are required to define struct iovec when <sys/socket.h> is included. This can be done directly in <sys/socket.h> or by inclusion of <sys/uio.h>.

Issue History

Date Modified Username Field Change
2017-03-15 21:36 jsm28 New Issue
2017-03-15 21:36 jsm28 Name => Joseph Myers
2017-03-15 21:36 jsm28 Section => sys/socket.h
2017-03-15 21:36 jsm28 Page Number => 389
2017-03-15 21:36 jsm28 Line Number => 13239
2017-03-16 02:46 shware_systems Note Added: 0003615
2018-08-23 15:38 Don Cragun Interp Status => ---
2018-08-23 15:38 Don Cragun Note Added: 0004087
2018-08-23 15:38 Don Cragun Status New => Closed
2018-08-23 15:38 Don Cragun Resolution Open => Rejected