From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 7190 invoked by alias); 21 Apr 2005 18:46:16 -0000 Mailing-List: contact gdb-patches-help@sources.redhat.com; run by ezmlm Precedence: bulk List-Subscribe: List-Archive: List-Post: List-Help: , Sender: gdb-patches-owner@sources.redhat.com Received: (qmail 3605 invoked from network); 21 Apr 2005 18:43:58 -0000 Received: from unknown (HELO legolas.inter.net.il) (192.114.186.24) by sourceware.org with SMTP; 21 Apr 2005 18:43:58 -0000 Received: from zaretski (IGLD-80-230-73-48.inter.net.il [80.230.73.48]) by legolas.inter.net.il (MOS 3.5.6-GR) with ESMTP id EFG66856 (AUTH halo1); Thu, 21 Apr 2005 21:42:39 +0300 (IDT) Date: Thu, 21 Apr 2005 18:46:00 -0000 From: "Eli Zaretskii" To: mark@codesourcery.com Message-ID: <01c546a1$Blat.v2.4$e03250c0@zahav.net.il> Content-Transfer-Encoding: 7BIT Content-Type: text/plain; charset=ISO-8859-1 CC: gdb-patches@sources.redhat.com In-reply-to: <200504210549.j3L5n2nP027728@sirius.codesourcery.com> (message from Mark Mitchell on Wed, 20 Apr 2005 22:49:02 -0700) Subject: Re: PATCH: Support Windows in event-loop.c Reply-to: Eli Zaretskii References: <200504210549.j3L5n2nP027728@sirius.codesourcery.com> X-SW-Source: 2005-04/txt/msg00252.txt.bz2 > Date: Wed, 20 Apr 2005 22:49:02 -0700 > From: Mark Mitchell > > 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.