This is the mail archive of the
gdb-patches@sourceware.org
mailing list for the GDB project.
Re: RFA: Support Windows extended error numbers in safe_strerror
> Date: Mon, 6 Feb 2006 12:35:50 -0500
> From: Daniel Jacobowitz <drow@false.org>
>
> 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