summaryrefslogtreecommitdiff
path: root/gcc/ada/g-socket.adb
diff options
context:
space:
mode:
authorcharlet <charlet@138bc75d-0d04-0410-961f-82ee72b054a4>2009-04-20 10:04:20 +0000
committercharlet <charlet@138bc75d-0d04-0410-961f-82ee72b054a4>2009-04-20 10:04:20 +0000
commitf38c80845185fcfa4b73fb4ef523aada041d574d (patch)
treeb23a67d3b31cdacbd0d5bfed4a0cbc29af7252a7 /gcc/ada/g-socket.adb
parenteec7772e67389de1629bf1f8ad0673cc4695faba (diff)
downloadgcc-f38c80845185fcfa4b73fb4ef523aada041d574d.tar.gz
2009-04-20 Thomas Quinot <quinot@adacore.com>
* sem_type.adb, ali.adb, erroutc.adb: Minor code reorganization (no behaviour change): Use Append instead of Increment_Last followed by assignment. 2009-04-20 Hristian Kirtchev <kirtchev@adacore.com> * exp_ch3.adb (Make_Predefined_Primitive_Specs): Do not generate the declarations of all primitives associated with dispatching asynchronous, conditional and timed selects when dispaching calls are forbidden and select statements are not allowed (such as in Ravenscar). (Predefined_Primitive_Bodies): Ditto for bodies. * exp_disp.ad (Make_DT): Do not create and populate the Select_Specific_Data of the dispatch table when dispatching calls are forbidden and select statements are not allowed (such as in Ravenscar). 2009-04-20 Robert Dewar <dewar@adacore.com> * a-tifiio.adb: Minor reformatting 2009-04-20 Thomas Quinot <quinot@adacore.com> * g-socthi-vms.adb, g-socket.adb, g-socket.ads: inet_aton(3), unlike other C library functions, report *failure* with a zero status, and success with a non-zero status. 2009-04-20 Bob Duff <duff@adacore.com> * sem.ads, sem.adb (Walk_Library_Items): New generic procedure. (Semantics): After analyzing each unit, Append it to the Comp_Unit_List, if appropriate. * gnat1drv.adb (Check_Library_Items): New procedure for debugging purposes. (Gnat1drv): Correct comment regarding Back_End_Mode. 2009-04-20 Eric Botcazou <ebotcazou@adacore.com> * gnat_ugn.texi: Add documentation for -fno-inline-small-functions. git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@146389 138bc75d-0d04-0410-961f-82ee72b054a4
Diffstat (limited to 'gcc/ada/g-socket.adb')
-rw-r--r--gcc/ada/g-socket.adb6
1 files changed, 5 insertions, 1 deletions
diff --git a/gcc/ada/g-socket.adb b/gcc/ada/g-socket.adb
index f5b5d4758ec..962a8fbae60 100644
--- a/gcc/ada/g-socket.adb
+++ b/gcc/ada/g-socket.adb
@@ -179,6 +179,10 @@ package body GNAT.Sockets is
-- Reconstruct a Duration value from a Timeval record (seconds and
-- microseconds).
+ procedure Raise_Socket_Error (Error : Integer);
+ -- Raise Socket_Error with an exception message describing the error code
+ -- from errno.
+
procedure Raise_Host_Error (H_Error : Integer);
-- Raise Host_Error exception with message describing error code (note
-- hstrerror seems to be obsolete) from h_errno.
@@ -1288,7 +1292,7 @@ package body GNAT.Sockets is
Res := Inet_Aton (To_Chars_Ptr (Img'Unchecked_Access), Addr'Address);
- if Res = Failure then
+ if Res = 0 then
Raise_Socket_Error (SOSC.EINVAL);
end if;