From c42aba6bb38df822c6b1cd3cb6c59c5b6eef88e3 Mon Sep 17 00:00:00 2001 From: Arnaud Charlet Date: Thu, 21 Apr 2016 11:39:38 +0200 Subject: [multiple changes] 2016-04-21 Ed Schonberg * sem_ch3.adb (Analyze_Subtype_Declaration): A subtype declaration with no aspects, whose subtype_mark is a subtype with predicates, inherits the list of subprograms for the type. 2016-04-21 Arnaud Charlet * exp_aggr.adb (Has_Per_Object_Constraint): Refine previous change. 2016-04-21 Thomas Quinot * g-socket.adb (Raise_Host_Error): Include additional Name parameter. 2016-04-21 Ed Schonberg * lib-writ.adb (Write_ALI): Do not record in ali file units that are present in the files table but not analyzed. These units are present because they appear in the context of units named in limited_with clauses, and the unit being compiled does not depend semantically on them. 2016-04-21 Ed Schonberg * sem_ch6.adb (Analyze_Subprogram_Body_Helper): Simplify code to create the procedure body for an function returning an array type, when generating C code. Reuse the subprogram body rather than creating a new one, both as an efficiency measure and because in an instance the body may contain global references that must be preserved. From-SVN: r235324 --- gcc/ada/g-socket.adb | 16 +++++++++------- 1 file changed, 9 insertions(+), 7 deletions(-) (limited to 'gcc/ada/g-socket.adb') diff --git a/gcc/ada/g-socket.adb b/gcc/ada/g-socket.adb index 5943008..2baa4f7 100644 --- a/gcc/ada/g-socket.adb +++ b/gcc/ada/g-socket.adb @@ -6,7 +6,7 @@ -- -- -- B o d y -- -- -- --- Copyright (C) 2001-2014, AdaCore -- +-- Copyright (C) 2001-2016, AdaCore -- -- -- -- GNAT is free software; you can redistribute it and/or modify it under -- -- terms of the GNU General Public License as published by the Free Soft- -- @@ -185,9 +185,10 @@ package body GNAT.Sockets is -- Raise Socket_Error with an exception message describing the error code -- from errno. - procedure Raise_Host_Error (H_Error : Integer); + procedure Raise_Host_Error (H_Error : Integer; Name : String); -- Raise Host_Error exception with message describing error code (note - -- hstrerror seems to be obsolete) from h_errno. + -- hstrerror seems to be obsolete) from h_errno. Name is the name + -- or address that was being looked up. procedure Narrow (Item : in out Socket_Set_Type); -- Update Last as it may be greater than the real last socket @@ -973,7 +974,7 @@ package body GNAT.Sockets is Res'Access, Buf'Address, Buflen, Err'Access) /= 0 then Netdb_Unlock; - Raise_Host_Error (Integer (Err)); + Raise_Host_Error (Integer (Err), Image (Address)); end if; begin @@ -1015,7 +1016,7 @@ package body GNAT.Sockets is (HN, Res'Access, Buf'Address, Buflen, Err'Access) /= 0 then Netdb_Unlock; - Raise_Host_Error (Integer (Err)); + Raise_Host_Error (Integer (Err), Name); end if; return H : constant Host_Entry_Type := @@ -1700,11 +1701,12 @@ package body GNAT.Sockets is -- Raise_Host_Error -- ---------------------- - procedure Raise_Host_Error (H_Error : Integer) is + procedure Raise_Host_Error (H_Error : Integer; Name : String) is begin raise Host_Error with Err_Code_Image (H_Error) - & Host_Error_Messages.Host_Error_Message (H_Error); + & Host_Error_Messages.Host_Error_Message (H_Error) + & ": " & Name; end Raise_Host_Error; ------------------------ -- cgit v1.1