This is the mail archive of the
gdb-patches@sources.redhat.com
mailing list for the GDB project.
Re: PATCH: Support Windows in event-loop.c
> Date: Thu, 21 Apr 2005 16:56:17 -0400
> From: Daniel Jacobowitz <drow@false.org>
> Cc: Mark Mitchell <mark@codesourcery.com>, gdb-patches@sources.redhat.com
>
> > It isn't analogous: HAVE_POLL tests for a system-independent
> > functionality, not unlike HAVE_UNISTD_H, while USE_WIN32API tests for
> > an OS-specific misfeature and names an OS-specific macro.
>
> I don't follow this objection:
>
> - I don't think that we get to call OS-specific interfaces
> "misfeatures".
I'm now sorry that I used the word "misfeature" because it drew your
attention away from the real objection. But since you asked: the
misfeature here is that `select' works only on sockets.
> - I don't think that answering your objection with an autoconf test for
> WaitForMultipleObjects would make you any happier. Would it?
No. The real issue is that WIN32API is an alias for _WIN32 and its
ilk, something we spent some time weeding out several months ago; and
that the code inside the ifdef calls WaitForMultipleObjects, which is
a Windows-specific function not standardized anywhere else.
> How does the fact that only Windows provides WaitForMultipleObjects
> make it conceptually different from the fact that a bunch of systems
> provide poll, and a bunch don't?
The difference is that `select' and `poll' are both Posix functions,
while WaitForMultipleObjects is MS-Windows specific.