summaryrefslogtreecommitdiff
path: root/gcc/ada/g-socket.adb
diff options
context:
space:
mode:
authorArnaud Charlet <charlet@gcc.gnu.org>2009-04-20 12:04:20 +0200
committerArnaud Charlet <charlet@gcc.gnu.org>2009-04-20 12:04:20 +0200
commitc09a557e3abfb7250930d64dc9d07cdc1779a281 (patch)
treeb23a67d3b31cdacbd0d5bfed4a0cbc29af7252a7 /gcc/ada/g-socket.adb
parent7e728b0f0d131c8f9016b89a08f77e4f6479cbbb (diff)
downloadgcc-c09a557e3abfb7250930d64dc9d07cdc1779a281.tar.gz
[multiple changes]
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. From-SVN: r146389
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;