From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 7964 invoked by alias); 3 Feb 2006 23:25:58 -0000 Received: (qmail 7956 invoked by uid 22791); 3 Feb 2006 23:25:57 -0000 X-Spam-Check-By: sourceware.org Received: from sibelius.xs4all.nl (HELO sibelius.xs4all.nl) (82.92.89.47) by sourceware.org (qpsmtpd/0.31) with ESMTP; Fri, 03 Feb 2006 23:25:55 +0000 Received: from elgar.sibelius.xs4all.nl (root@elgar.sibelius.xs4all.nl [192.168.0.2]) by sibelius.xs4all.nl (8.13.4/8.13.4) with ESMTP id k13NPJSY027802; Sat, 4 Feb 2006 00:25:19 +0100 (CET) Received: from elgar.sibelius.xs4all.nl (kettenis@localhost.sibelius.xs4all.nl [127.0.0.1]) by elgar.sibelius.xs4all.nl (8.13.4/8.13.3) with ESMTP id k13NPJ1W025755; Sat, 4 Feb 2006 00:25:19 +0100 (CET) Received: (from kettenis@localhost) by elgar.sibelius.xs4all.nl (8.13.4/8.13.4/Submit) id k13NPJ6g028001; Sat, 4 Feb 2006 00:25:19 +0100 (CET) Date: Fri, 03 Feb 2006 23:25:00 -0000 Message-Id: <200602032325.k13NPJ6g028001@elgar.sibelius.xs4all.nl> From: Mark Kettenis To: drow@false.org CC: gdb-patches@sourceware.org In-reply-to: <20060203215455.GA3501@nevyn.them.org> (message from Daniel Jacobowitz on Fri, 3 Feb 2006 16:54:55 -0500) Subject: Re: RFA: Support Windows extended error numbers in safe_strerror References: <20060203215455.GA3501@nevyn.them.org> 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/msg00051.txt.bz2 > 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. Mark