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
- From: "Eli Zaretskii" <eliz at gnu dot org>
- To: mark at codesourcery dot com
- Cc: gdb-patches at sources dot redhat dot com
- Date: Thu, 21 Apr 2005 21:41:28 +0300
- Subject: Re: PATCH: Support Windows in event-loop.c
- References: <200504210549.j3L5n2nP027728@sirius.codesourcery.com>
- Reply-to: Eli Zaretskii <eliz at gnu dot org>
> Date: Wed, 20 Apr 2005 22:49:02 -0700
> From: Mark Mitchell <mark@codesourcery.com>
>
> This patch adds support for Windows to event-loop.c. The key issue is
> that "select" on Windows only works on sockets; it does not work on
> general file descriptors. For that, one must use
> WaitForMultipleObjects, and that requires converting file descriptors
> (as used by read/write/open/close) to native HANDLEs.
Ouch! ugly OS-dependent #ifdef's in event-loop.c!
Is it perhaps possible to write an emulation of `select' that would
handle file handles as well, put it on win32-nat.c, say, and then
leave event-loop.c more or less alone? That would be much cleaner, I
think.