From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 12289 invoked by alias); 3 Feb 2006 23:39:39 -0000 Received: (qmail 12276 invoked by uid 22791); 3 Feb 2006 23:39:38 -0000 X-Spam-Check-By: sourceware.org Received: from cgf.cx (HELO cgf.cx) (24.61.23.223) by sourceware.org (qpsmtpd/0.31) with ESMTP; Fri, 03 Feb 2006 23:39:37 +0000 Received: by cgf.cx (Postfix, from userid 201) id C10E213C0F8; Fri, 3 Feb 2006 18:39:35 -0500 (EST) Date: Fri, 03 Feb 2006 23:39:00 -0000 From: Christopher Faylor To: gdb-patches@sourceware.org Subject: Re: RFA: Support Windows extended error numbers in safe_strerror Message-ID: <20060203233935.GA13238@trixie.casa.cgf.cx> Mail-Followup-To: gdb-patches@sourceware.org References: <20060203215455.GA3501@nevyn.them.org> <200602032325.k13NPJ6g028001@elgar.sibelius.xs4all.nl> Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <200602032325.k13NPJ6g028001@elgar.sibelius.xs4all.nl> User-Agent: Mutt/1.5.11 Mailing-List: contact gdb-patches-help@sourceware.org; run by ezmlm Precedence: bulk List-Subscribe: List-Archive: List-Post: List-Help: , Sender: gdb-patches-owner@sourceware.org X-SW-Source: 2006-02/txt/msg00052.txt.bz2 On Sat, Feb 04, 2006 at 12:25:19AM +0100, Mark Kettenis wrote: >> Date: Fri, 3 Feb 2006 16:54:55 -0500 >> From: Daniel Jacobowitz >> >> This is an improved version of a patch Mark Mitchell submitted last >> year. If you give strerror() anything above 42 (sys_nerr) on Windows, >> it gives you back "Unknown error" - particularly unfortunate since >> WSAECONNREFUSED is way above there, so connecting to a closed socket >> will give you a generic error message. This patch lets us try an >> OS-specific interface to fetch an error string. >> >> [Actually you need my next patch too to get the connection refused message; >> right now you'll get a timeout.] >> >> Any comments on this patch? > >I think this is ugly. When the win32 support was added, we were told >that only minimal changes were necessary. But people keep pushing >#ifdef EVIL_CLOSED_SOURCE_PLATFORM_FROM_REDMOND patches. > >GDB is written for POSIX systems. It's clear that Windows isn't even >remotely POSIX compliant. Hmm. As it turns out, I have some email sitting in my "to be sent" folder that I've held back on sending which is tangentially related to this. The gist of the email is that I'm not happy having to support windows-specific workarounds in gdb while standing on my head in cygwin-land to make sure that as few workarounds as possible are needed for programs like gdb. I'm concerned that the MinGW patches are going to eventually start encroaching on win32-nat.c (which we've already seen). I don't *want* to litter that file with any special non-cygwin accommodations. I feel hypocritical here because I've suggested several times that the MinGW people should be sending their patches to the gdb list but now that that day is here, I find that I have no interest in worrying about windows-native issues at all. So, my email suggested that if MinGW is important to gdb then I probably shouldn't be the maintainer for Windows. I do understand why people like Codesourcery want a native version of gdb. That doesn't mean that I have to happily support it, though. So, I'm not sure what to do here. I agree with Mark, though (and with Ulrich Drepper when he made points about non-POSIX systems in his blog). cgf