Austin Group Defect Tracker

Aardvark Mark IV

Viewing Issue Simple Details Jump to Notes ] Issue History ] Print ]
ID Category Severity Type Date Submitted Last Update
0001032 [1003.1(2013)/Issue7+TC1] System Interfaces Objection Enhancement Request 2016-03-08 01:28 2016-03-24 16:32
Reporter philip-guenther View Status public  
Assigned To
Priority normal Resolution Duplicate  
Status Closed  
Name Philip Guenther
Organization OpenBSD
User Reference
Section FD_ISSET
Page Number 1545
Line Number 50609
Interp Status ---
Final Accepted Text
Summary 0001032: FD_ISSET() should take a const fd_set *
Description Implementations are explicitly permitted to only provide a macro version of FD_ISSET(), as that was historically the case. Since FD_ISSET() doesn't assign through its second argument, such macros have generally accepted a const fd_set * pointer.

To match that, implementations that provide it as function should be required to accept such usage as well. Note that since implementations are permitted to provide FD_ISSET() as a macro *without* a function version, a compliant application cannot take its address, so this incompatible change to the function type cannot affect a compliant application.

(OpenBSD has recently switched to providing FD_* as macros indirecting to inline functions and the version that didn't accept const fd_set* was found to break at least the hylafax and nxcomp 3rd-party applications.)
Desired Action The declaration in the pselect,select section and in the <sys/select.h> section should be changed from:
    int FD_ISSET(int fd, fd_set *fdset);
    int FD_ISSET(int fd, const fd_set *fdset);
Tags No tags attached.
Attached Files

- Relationships
duplicate of 0000220Appliedajosey 1003.1(2008)/Issue 7 FD_ISSET can use const keyword 

-  Notes
EdSchouten (updater)
2016-03-10 06:08
edited on: 2016-03-10 06:10

This is the same as [^] which I filed but got closed. In my opinion it was incorrect that this got closed. The reasoning by msbrown was:

"What I should have written is that FD_ISSET() _can_ _be_ only a macro. I.e. there doesn't have to be an underlying function."

Though that is also true, that doesn't mean that 'const' keywords should intentionally be left out in case it *is* provided as a function. Also, even if it is a macro, requiring that the argument is 'const' also requires that the FD_ISSET() macro should work on constant fd_sets.

- Issue History
Date Modified Username Field Change
2016-03-08 01:28 philip-guenther New Issue
2016-03-08 01:28 philip-guenther Name => Philip Guenther
2016-03-08 01:28 philip-guenther Organization => OpenBSD
2016-03-08 01:28 philip-guenther Section => FD_ISSET
2016-03-08 01:28 philip-guenther Page Number => 1545
2016-03-08 01:28 philip-guenther Line Number => 50609
2016-03-10 06:08 EdSchouten Note Added: 0003093
2016-03-10 06:09 EdSchouten Note Edited: 0003093
2016-03-10 06:10 EdSchouten Note Edited: 0003093
2016-03-24 16:27 nick Relationship added duplicate of 0000220
2016-03-24 16:32 Don Cragun Interp Status => ---
2016-03-24 16:32 Don Cragun Status New => Closed
2016-03-24 16:32 Don Cragun Resolution Open => Duplicate

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