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
- From: Mark Kettenis <mark dot kettenis at xs4all dot nl>
- To: drow at false dot org
- Cc: gdb-patches at sourceware dot org
- Date: Sat, 4 Feb 2006 00:25:19 +0100 (CET)
- Subject: Re: RFA: Support Windows extended error numbers in safe_strerror
- References: <20060203215455.GA3501@nevyn.them.org>
> Date: Fri, 3 Feb 2006 16:54:55 -0500
> From: Daniel Jacobowitz <drow@false.org>
>
> 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