From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 12312 invoked by alias); 6 Feb 2006 22:55:14 -0000 Received: (qmail 12302 invoked by uid 22791); 6 Feb 2006 22:55:14 -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; Mon, 06 Feb 2006 22:55:12 +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 k16Msab1028184; Mon, 6 Feb 2006 23:54:36 +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 k16MsasP026040; Mon, 6 Feb 2006 23:54:36 +0100 (CET) Received: (from kettenis@localhost) by elgar.sibelius.xs4all.nl (8.13.4/8.13.4/Submit) id k16MsagK009925; Mon, 6 Feb 2006 23:54:36 +0100 (CET) Date: Mon, 06 Feb 2006 22:55:00 -0000 Message-Id: <200602062254.k16MsagK009925@elgar.sibelius.xs4all.nl> From: Mark Kettenis To: drow@false.org CC: gdb-patches@sourceware.org In-reply-to: <20060206173550.GB22947@nevyn.them.org> (message from Daniel Jacobowitz on Mon, 6 Feb 2006 12:35:50 -0500) Subject: Re: RFA: Support Windows extended error numbers in safe_strerror References: <20060203215455.GA3501@nevyn.them.org> <20060206173550.GB22947@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/msg00138.txt.bz2 > Date: Mon, 6 Feb 2006 12:35:50 -0500 > From: Daniel Jacobowitz > > On Fri, Feb 03, 2006 at 04:54:55PM -0500, Daniel Jacobowitz wrote: > > 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? > > There were plenty :-) Is this better? > > We had finally eliminated the XM files in favor of autoconf checks. > This patch re-adds an xm-*.h header file, but I think it's still > the best of our options. We can restrict our use of these headers > to things where autoconf is a bad fit - like right here. No please don't do that. There's got to be a better way. Is it possible to write a complete replacement for strerror for MinGW and put that one in mingw-hdep.c? Mark