From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 14738 invoked by alias); 21 Apr 2005 18:49:44 -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 14696 invoked from network); 21 Apr 2005 18:49:38 -0000 Received: from unknown (HELO nevyn.them.org) (66.93.172.17) by sourceware.org with SMTP; 21 Apr 2005 18:49:38 -0000 Received: from drow by nevyn.them.org with local (Exim 4.50 #1 (Debian)) id 1DOgk5-0002Wq-5J; Thu, 21 Apr 2005 14:49:37 -0400 Date: Thu, 21 Apr 2005 18:49:00 -0000 From: Daniel Jacobowitz To: Eli Zaretskii Cc: mark@codesourcery.com, gdb-patches@sources.redhat.com Subject: Re: PATCH: Support Windows in event-loop.c Message-ID: <20050421184937.GA9638@nevyn.them.org> Mail-Followup-To: Eli Zaretskii , mark@codesourcery.com, gdb-patches@sources.redhat.com References: <200504210549.j3L5n2nP027728@sirius.codesourcery.com> <01c546a1$Blat.v2.4$e03250c0@zahav.net.il> Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <01c546a1$Blat.v2.4$e03250c0@zahav.net.il> User-Agent: Mutt/1.5.8i X-SW-Source: 2005-04/txt/msg00253.txt.bz2 On Thu, Apr 21, 2005 at 09:41:28PM +0300, Eli Zaretskii wrote: > > 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. If so, please don't use win32-nat.c; this is Windows hosting support rather than Windows native debugging support. Honestly, I don't find Mark's changes any worse than the already present ifdefs to select between select and poll. It's the same sort of choice. -- Daniel Jacobowitz CodeSourcery, LLC