aboutsummaryrefslogtreecommitdiff
path: root/gcc/ada/g-socket.adb
diff options
context:
space:
mode:
authorArnaud Charlet <charlet@gcc.gnu.org>2016-04-21 11:39:38 +0200
committerArnaud Charlet <charlet@gcc.gnu.org>2016-04-21 11:39:38 +0200
commitc42aba6bb38df822c6b1cd3cb6c59c5b6eef88e3 (patch)
tree7c88202b47a8f36b2eaebf00561b9256dd6e900f /gcc/ada/g-socket.adb
parent2c2870a1b16c867b9ef0ea6cf0a8eb16af4c1b2d (diff)
downloadgcc-c42aba6bb38df822c6b1cd3cb6c59c5b6eef88e3.zip
gcc-c42aba6bb38df822c6b1cd3cb6c59c5b6eef88e3.tar.gz
gcc-c42aba6bb38df822c6b1cd3cb6c59c5b6eef88e3.tar.bz2
[multiple changes]
2016-04-21 Ed Schonberg <schonberg@adacore.com> * 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 <charlet@adacore.com> * exp_aggr.adb (Has_Per_Object_Constraint): Refine previous change. 2016-04-21 Thomas Quinot <quinot@adacore.com> * g-socket.adb (Raise_Host_Error): Include additional Name parameter. 2016-04-21 Ed Schonberg <schonberg@adacore.com> * 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 <schonberg@adacore.com> * 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
Diffstat (limited to 'gcc/ada/g-socket.adb')
-rw-r--r--gcc/ada/g-socket.adb16
1 files changed, 9 insertions, 7 deletions
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;
------------------------