[omniORB] Mingw win32 bug
Duncan Grisby
duncan at grisby.org
Mon Sep 13 17:36:49 BST 2004
On Monday 13 September, "Al Slater" wrote:
[...]
> If I am reading the above code correctly, fd is set to 0 at the
> beginning. If __WIN32__ is true then the while loop is ommitted (so fd
> is never set to anything) and then select is only called if fd is not
> equal to 0. So, is the select never being called on win32?
Oh dear. That really is very stupid. Or rather, I really am very
stupid.
The fix is to add a #else that sets fd to total in the case of
Windows:
#ifndef __WIN32__
// Win32 ignores the first argument to select()
while (total) {
if (FD_ISSET(fd,&rfds)) {
maxfd = fd;
total--;
}
fd++;
}
#else
fd = total;
#endif
I'm about to check that in.
Cheers,
Duncan.
--
-- Duncan Grisby --
-- duncan at grisby.org --
-- http://www.grisby.org --
--
-- Duncan Grisby --
-- duncan at grisby.org --
-- http://www.grisby.org --
More information about the omniORB-list
mailing list