This is the mail archive of the
mailing list for the GCC project.
Re: [patch] GNAT s-oscons-tmplt.c multiple undefined errnos
- From: Arnaud Charlet <charlet at adacore dot com>
- To: Joel Sherrill <joel dot sherrill at oarcorp dot com>
- Cc: "gcc-patches at gcc dot gnu dot org" <gcc-patches at gcc dot gnu dot org>, Thomas Quinot <quinot at adacore dot com>
- Date: Tue, 13 Apr 2010 16:03:57 +0200
- Subject: Re: [patch] GNAT s-oscons-tmplt.c multiple undefined errnos
- References: <4BC474E7.email@example.com>
> The file s-oscons-tmplt.c defines all the errno
> constants not available on a target to -1. When
> a target is missing the right combination of two
> or more errno's, there is a case statement in
> g-socket.adb (Resolve_Error) which ends up with
> two when's with -1 which is an error. The attached
> patch gives each undefined errno a unique value.
I've asked Thomas to review your change which is not OK:
The patch does not achieve its objective:
> +# define ECONNREFUSED -8
> +# define ECONNRESET -8
So in any case it need to be fixed.
More generally I don't really like the idea of essentially ignoring
undefined errno values, and we should ask Joel what specific situation
he is trying to address, and what are the specific missing values he is
seeing, and discuss how best to address that on a case-by-case basis.
There is really no justification in providing junk values for these
constants, and the expected situation really is to have them all defined
(technically we should #error in any case where the macro isn't already