This is the mail archive of the
gcc@gcc.gnu.org
mailing list for the GCC project.
Re: g-socket.adb error
- From: Laurent GUERBY <laurent at guerby dot net>
- To: Joel Sherrill <joel dot sherrill at oarcorp dot com>, quinot at adacore dot com
- Cc: gcc at gcc dot gnu dot org
- Date: Sat, 04 Jul 2009 13:16:32 +0200
- Subject: Re: g-socket.adb error
- References: <4A4E5253.3050507@oarcorp.com>
On Fri, 2009-07-03 at 13:47 -0500, Joel Sherrill wrote:
> Hi,
>
> Apparently no one has hit this case. RTEMS does
> not have two error codes that g-socket.adb
> maps back. From s-oscons.ads:
>
> ESHUTDOWN : constant := -1; -- Cannot send once
> shutdown
> ESOCKTNOSUPPORT : constant := -1; -- Socket type not
> supported
>
> This results in a compilation error in g-socket.adb
> in the switch since they both have the same value:
>
> g-socket.adb:1775:15: duplication of choice value at line 1773
>
> Any thoughts?
Just above the case there is already one case of duplicate
error code handled by an explicit "if" instead of "case":
if EAGAIN /= EWOULDBLOCK and then Error_Value = EAGAIN then
return Resource_Temporarily_Unavailable;
end if;
I guess moving from case to if would be an appropriate way to fix
this RTEMS issue (assuming this is the only conflict), Thomas is in Cc.
Laurent