This is the mail archive of the gdb-patches@sources.redhat.com mailing list for the GDB project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

Re: PATCH: Support Windows in event-loop.c


> 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.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]