Bug 5400 – Add const to FD_ISSET

Status
RESOLVED
Resolution
FIXED
Severity
blocker
Priority
P2
Component
druntime
Product
D
Version
D2
Platform
All
OS
Linux
Creation time
2011-01-02T05:51:00Z
Last change time
2011-01-02T10:43:03Z
Assigned to
sean
Creator
eric.estievenart

Comments

Comment #0 by eric.estievenart — 2011-01-02T05:51:46Z
Since druntime/import/core/sys/posix/sys/select.di defines wrongly FD_ISSET as: extern (D) bool FD_ISSET(int fd, fd_set* fdset) { return (fdset.fds_bits[__FDELT(fd)] & __FDMASK(fd)) == 0; } instead of return (fdset.fds_bits[__FDELT(fd)] & __FDMASK(fd)) != 0; => Socket.select does not work at all. BTW, should be const: bool FD_ISSET(int fd, const(fd_set)* fdset) so constness could be propagated on SocketSet... BTW (bis) select() should be in a separate module...
Comment #1 by braddr — 2011-01-02T10:43:03Z
The ISSET bug was addressed in bug 5209 which has already been fixed for the next release. I went ahead and added the const-ness to the isset set parameter. druntime r471 -- For the rest, you'll need to provide more details. Since this report seems to be two different parts, I'm going to mark it resolved due to the first part. Please re-file the second half as a separate report with enough specificity to allow someone to reproduce the problem. IE, include code that compiles and shows the bug. Thanks, Brad