diff options
author | charlet <charlet@138bc75d-0d04-0410-961f-82ee72b054a4> | 2009-04-20 08:26:13 +0000 |
---|---|---|
committer | charlet <charlet@138bc75d-0d04-0410-961f-82ee72b054a4> | 2009-04-20 08:26:13 +0000 |
commit | 803837606552911d8815de1a71bdd579b8579db9 (patch) | |
tree | bd81a0aab892d56ae076ec2454b8fbf55ef392a2 /gcc/ada/g-socket.adb | |
parent | a5b5e9bdb0d0cfb71601b7ea729153ed7fde0641 (diff) | |
download | gcc-803837606552911d8815de1a71bdd579b8579db9.tar.gz |
2009-04-20 Hristian Kirtchev <kirtchev@adacore.com>
* 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 <quinot@adacore.com>
* 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
Diffstat (limited to 'gcc/ada/g-socket.adb')
-rw-r--r-- | gcc/ada/g-socket.adb | 17 |
1 files changed, 14 insertions, 3 deletions
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; ----------------------- |