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 11:56:02 -0700
> From: Mark Mitchell <mark@codesourcery.com>
> CC: gdb-patches@sources.redhat.com
>
> Eli Zaretskii wrote:
>
> > Is it perhaps possible to write an emulation of `select' that would
> > handle file handles as well
>
> Well, Cygwin has select, so it is *possible*. But, it's not easy, and
> it doesn't really map terribly well onto what Windows provides.
Perhaps you could look at w32proc.c:sys_select in the Emacs
distribution, and copy its code with minimal changes.
> As Daniel says, this is very much analogous to poll/select; different
> systems provide different low-level mechanisms for waiting for input.
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.