From 803837606552911d8815de1a71bdd579b8579db9 Mon Sep 17 00:00:00 2001 From: charlet Date: Mon, 20 Apr 2009 08:26:13 +0000 Subject: 2009-04-20 Hristian Kirtchev * a-calend.adb: Remove types char_Pointer, int, tm and tm_Pointer. (localtime_tzoff): This routine no longer accepts an actual of type tm_Pointer. (UTC_Time_Offset): Remove local variable Secs_TM. * sysdep.c (__gnat_localtime_tzoff): This routine no longer accepts an actual of type struct tm*. Add local variable of type struct tm for all targets that provide localtime_r and need to invoke it. 2009-04-20 Thomas Quinot * s-oscons-tmplt.c, g-socket.adb, g-socket.ads (GNAT.Sockets.Resolve_Error): Add case of EPIPE Add case of EAGAIN for platforms where it is not equal to EWOULDBLOCK git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@146369 138bc75d-0d04-0410-961f-82ee72b054a4 --- gcc/ada/g-socket.adb | 17 ++++++++++++++--- 1 file changed, 14 insertions(+), 3 deletions(-) (limited to 'gcc/ada/g-socket.adb') diff --git a/gcc/ada/g-socket.adb b/gcc/ada/g-socket.adb index 1250607179f..784d0626bad 100644 --- a/gcc/ada/g-socket.adb +++ b/gcc/ada/g-socket.adb @@ -1681,6 +1681,17 @@ package body GNAT.Sockets is end case; end if; + -- Special case: EAGAIN may be the same value as EWOULDBLOCK, so we + -- can't include it in the case statement below. + + pragma Warnings (Off); + -- Condition "EAGAIN /= EWOULDBLOCK" is known at compile time + + if EAGAIN /= EWOULDBLOCK and then Error_Value = EAGAIN then + return Resource_Temporarily_Unavailable; + end if; + pragma Warnings (On); + case Error_Value is when ENOERROR => return Success; when EACCES => return Permission_Denied; @@ -1716,6 +1727,7 @@ package body GNAT.Sockets is when ENOTSOCK => return Socket_Operation_On_Non_Socket; when EOPNOTSUPP => return Operation_Not_Supported; when EPFNOSUPPORT => return Protocol_Family_Not_Supported; + when EPIPE => return Broken_Pipe; when EPROTONOSUPPORT => return Protocol_Not_Supported; when EPROTOTYPE => return Protocol_Wrong_Type_For_Socket; when ESHUTDOWN => return @@ -1724,10 +1736,9 @@ package body GNAT.Sockets is when ETIMEDOUT => return Connection_Timed_Out; when ETOOMANYREFS => return Too_Many_References; when EWOULDBLOCK => return Resource_Temporarily_Unavailable; - when others => null; - end case; - return Cannot_Resolve_Error; + when others => return Cannot_Resolve_Error; + end case; end Resolve_Error; ----------------------- -- cgit v1.2.1