Anonymous | Login | 2024-05-04 12:37 UTC |
Main | My View | View Issues | Change Log | Docs |
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); to int FD_ISSET(int fd, const fd_set *fdset); |
||||||
Tags | No tags attached. | ||||||
Attached Files | |||||||
|
Relationships | |||||||
|
Notes | |
(0003093) EdSchouten (updater) 2016-03-10 06:08 edited on: 2016-03-10 06:10 |
This is the same as http://austingroupbugs.net/view.php?id=220 [^] 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. |
Mantis 1.1.6[^] Copyright © 2000 - 2008 Mantis Group |