[Issue 5209] posix/sys/select.d: FD_ISSET function should return bool

2010-12-21 Thread d-bugmail
http://d.puremagic.com/issues/show_bug.cgi?id=5209


Iain Buclaw ibuc...@ubuntu.com changed:

   What|Removed |Added

   Severity|major   |critical


--- Comment #2 from Iain Buclaw ibuc...@ubuntu.com 2010-12-21 13:33:04 PST ---
Bumping priority:

It appears *ONE* of the functions has been changed to a boolean. But what's
utterly worse is that:


extern (D) bool FD_ISSET( int fd, fd_set* fdset )
{
return (fdset.fds_bits[__FDELT( fd )]  __FDMASK( fd )) == 0;
}

should be != 0

Regards

-- 
Configure issuemail: http://d.puremagic.com/issues/userprefs.cgi?tab=email
--- You are receiving this mail because: ---


[Issue 5209] posix/sys/select.d: FD_ISSET function should return bool

2010-12-21 Thread d-bugmail
http://d.puremagic.com/issues/show_bug.cgi?id=5209


Brad Roberts bra...@puremagic.com changed:

   What|Removed |Added

 CC||bra...@puremagic.com


--- Comment #3 from Brad Roberts bra...@puremagic.com 2010-12-21 13:43:47 PST 
---
Would you do me a favor and write up a block of unit tests for those functions?
 I'll apply both together.

-- 
Configure issuemail: http://d.puremagic.com/issues/userprefs.cgi?tab=email
--- You are receiving this mail because: ---


[Issue 5209] posix/sys/select.d: FD_ISSET function should return bool

2010-12-21 Thread d-bugmail
http://d.puremagic.com/issues/show_bug.cgi?id=5209



--- Comment #4 from Iain Buclaw ibuc...@ubuntu.com 2010-12-21 16:33:12 PST ---
Created an attachment (id=852)
unittest for sys.select

Well the most obvious thing it affects is std.socket;


import std.socket;

unittest
{
SocketSet sset = new SocketSet(24);

// All socket descriptors should not be set before using them.
for (socket_t i = 0; i  sset.max; i++)
{
assert(! sset.isSet(i));
}
}


Is the attached file OK? :~)

-- 
Configure issuemail: http://d.puremagic.com/issues/userprefs.cgi?tab=email
--- You are receiving this mail because: ---


[Issue 5209] posix/sys/select.d: FD_ISSET function should return bool

2010-12-21 Thread d-bugmail
http://d.puremagic.com/issues/show_bug.cgi?id=5209


Brad Roberts bra...@puremagic.com changed:

   What|Removed |Added

 Status|NEW |RESOLVED
 Resolution||FIXED
 AssignedTo|s...@invisibleduck.org  |bra...@puremagic.com


--- Comment #5 from Brad Roberts bra...@puremagic.com 2010-12-21 16:54:21 PST 
---
Checked in both the fix and the unittests in r453 and r454.

Thanks for the patches.

-- 
Configure issuemail: http://d.puremagic.com/issues/userprefs.cgi?tab=email
--- You are receiving this mail because: ---


[Issue 5209] posix/sys/select.d: FD_ISSET function should return bool

2010-11-13 Thread d-bugmail
http://d.puremagic.com/issues/show_bug.cgi?id=5209



--- Comment #1 from Iain Buclaw ibuc...@ubuntu.com 2010-11-13 06:18:41 PST ---
Created an attachment (id=809)
patch for 5209

-- 
Configure issuemail: http://d.puremagic.com/issues/userprefs.cgi?tab=email
--- You are receiving this mail because: ---