aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorArnaud Charlet <charlet@gcc.gnu.org>2009-04-20 11:38:27 +0200
committerArnaud Charlet <charlet@gcc.gnu.org>2009-04-20 11:38:27 +0200
commit3568b271428985245f19c6bbea5e59f79f42544a (patch)
treeeb7899588c7d92f99fa0ad64e72f96baad11fbfe
parent16212e894ae04b6de4d10d6992c2eabe1d6866ac (diff)
downloadgcc-3568b271428985245f19c6bbea5e59f79f42544a.zip
gcc-3568b271428985245f19c6bbea5e59f79f42544a.tar.gz
gcc-3568b271428985245f19c6bbea5e59f79f42544a.tar.bz2
[multiple changes]
2009-04-20 Thomas Quinot <quinot@adacore.com> * g-socket.ads: Add new constants: Loopback_Inet_Addr Unspecified_Group_Inet_Addr All_Hosts_Group_Inet_Addr All_Routers_Group_Inet_Addr * s-oscons-tmplt.c, g-sttsne-vxworks.adb (System.OS_Constants): Add ERANGE (Result too large). (GNAT.Sockets.Thin.Task_Safe_NetDB, VxWorks version): Add missing propagation of errno to caller. 2009-04-20 Hristian Kirtchev <kirtchev@adacore.com> * a-calend.adb, a-calend-vms.adb: Increase the number of leap seconds to 24. Increment Leap_Seconds_Count and add an entry to aggregate Leap_Second_Times. 2009-04-20 Vincent Celier <celier@adacore.com> * mlib-prj.adb (Build_Library): Use the shared library linker, if one has been declared (Library_GCC or Linker'Driver), for the driver name. * prj-nmsc.adb (Process_Linker): If Library_GCC is not declared and Linker'Driver is, use Linker'Driver as the shared library linker. (Process_Project_Level_Simple_Attributes): Issue a warning if attribute Library_GCC is declared. (Check_Library_Attributes): Set up the shared linker driver: either Library_GCC or Linker'Driver. Issue a warning if Library_GCC is declared. From-SVN: r146386
-rw-r--r--gcc/ada/ChangeLog61
-rw-r--r--gcc/ada/a-calend-vms.adb5
-rw-r--r--gcc/ada/a-calend.adb5
-rw-r--r--gcc/ada/g-socket.ads16
-rw-r--r--gcc/ada/g-sttsne-vxworks.adb10
-rw-r--r--gcc/ada/mlib-prj.adb11
-rw-r--r--gcc/ada/prj-nmsc.adb77
-rw-r--r--gcc/ada/s-oscons-tmplt.c5
8 files changed, 164 insertions, 26 deletions
diff --git a/gcc/ada/ChangeLog b/gcc/ada/ChangeLog
index d5a0cd7..bcebd6e 100644
--- a/gcc/ada/ChangeLog
+++ b/gcc/ada/ChangeLog
@@ -1,5 +1,66 @@
2009-04-20 Thomas Quinot <quinot@adacore.com>
+ * g-socket.ads: Add new constants:
+ Loopback_Inet_Addr
+ Unspecified_Group_Inet_Addr
+ All_Hosts_Group_Inet_Addr
+ All_Routers_Group_Inet_Addr
+
+ * s-oscons-tmplt.c, g-sttsne-vxworks.adb (System.OS_Constants): Add
+ ERANGE (Result too large).
+ (GNAT.Sockets.Thin.Task_Safe_NetDB, VxWorks version): Add missing
+ propagation of errno to caller.
+
+2009-04-20 Hristian Kirtchev <kirtchev@adacore.com>
+
+ * a-calend.adb, a-calend-vms.adb: Increase the number of leap seconds
+ to 24. Increment Leap_Seconds_Count and add an entry to aggregate
+ Leap_Second_Times.
+
+2009-04-20 Gary Dismukes <dismukes@adacore.com>
+
+ * sem_elim.ads (Check_For_Eliminated_Subprogram): New procedure for
+ checking for references to eliminated subprograms that should be
+ flagged.
+ (Eliminate_Error_Message): Update comment to say "references" rather
+ than "calls" (since attribute cases are handled here as well).
+
+ * sem_elim.adb (Check_For_Eliminated_Subprogram): New procedure for
+ checking for references to eliminated subprograms that should be
+ flagged. Add with and use of Sem and Sem_Util.
+
+ * sem_res.adb (Resolve_Call): Reject calls to eliminated subprograms.
+ Add with and use of Sem_Elim.
+
+ * sem_attr.adb (Analyze_Access_Attribute): Reject access attributes
+ applied to eliminated subprograms.
+ (Analyze_Attribute): Reject 'Address and 'Code_Address applied to
+ eliminated subprograms.
+ Add with and use of Sem_Elim.
+
+ * sem_disp.adb (Check_Dispatching_Call): Remove error check for calls
+ to eliminated subprograms, now handled during Resolve_Call.
+ Remove with and use of Sem_Elim.
+
+ * exp_disp.adb (Make_DT): Get Ultimate_Alias of primitive before
+ testing Is_Eliminated, for proper handling of primitive derived from
+ eliminated subprograms.
+
+2009-04-20 Vincent Celier <celier@adacore.com>
+
+ * mlib-prj.adb (Build_Library): Use the shared library linker, if one
+ has been declared (Library_GCC or Linker'Driver), for the driver name.
+
+ * prj-nmsc.adb (Process_Linker): If Library_GCC is not declared and
+ Linker'Driver is, use Linker'Driver as the shared library linker.
+ (Process_Project_Level_Simple_Attributes): Issue a warning if attribute
+ Library_GCC is declared.
+ (Check_Library_Attributes): Set up the shared linker driver: either
+ Library_GCC or Linker'Driver. Issue a warning if Library_GCC is
+ declared.
+
+2009-04-20 Thomas Quinot <quinot@adacore.com>
+
* g-socket.ads (Send_Socket): Fix misleading comment.
2009-04-20 Arnaud Charlet <charlet@adacore.com>
diff --git a/gcc/ada/a-calend-vms.adb b/gcc/ada/a-calend-vms.adb
index ef97fa4..374ea71 100644
--- a/gcc/ada/a-calend-vms.adb
+++ b/gcc/ada/a-calend-vms.adb
@@ -126,7 +126,7 @@ package body Ada.Calendar is
-- The above flag controls the usage of leap seconds in all Ada.Calendar
-- routines.
- Leap_Seconds_Count : constant Natural := 23;
+ Leap_Seconds_Count : constant Natural := 24;
---------------------
-- Local Constants --
@@ -176,7 +176,8 @@ package body Ada.Calendar is
43271712190000000,
43744320200000000,
44218656210000000,
- 46427904220000000);
+ 46427904220000000,
+ 47374848230000000);
---------
-- "+" --
diff --git a/gcc/ada/a-calend.adb b/gcc/ada/a-calend.adb
index 9aa8852..4c340ee 100644
--- a/gcc/ada/a-calend.adb
+++ b/gcc/ada/a-calend.adb
@@ -139,7 +139,7 @@ package body Ada.Calendar is
-- The above flag controls the usage of leap seconds in all Ada.Calendar
-- routines.
- Leap_Seconds_Count : constant Natural := 23;
+ Leap_Seconds_Count : constant Natural := 24;
---------------------
-- Local Constants --
@@ -212,7 +212,8 @@ package body Ada.Calendar is
-4859827181000000000,
-4812566380000000000,
-4765132779000000000,
- -4544207978000000000);
+ -4544207978000000000,
+ -4449513577000000000);
---------
-- "+" --
diff --git a/gcc/ada/g-socket.ads b/gcc/ada/g-socket.ads
index 96d3428..3680d75 100644
--- a/gcc/ada/g-socket.ads
+++ b/gcc/ada/g-socket.ads
@@ -491,6 +491,13 @@ package GNAT.Sockets is
Any_Inet_Addr : constant Inet_Addr_Type;
No_Inet_Addr : constant Inet_Addr_Type;
Broadcast_Inet_Addr : constant Inet_Addr_Type;
+ Loopback_Inet_Addr : constant Inet_Addr_Type;
+
+ -- Useful constants for IPv4 multicast addresses
+
+ Unspecified_Group_Inet_Addr : constant Inet_Addr_Type;
+ All_Hosts_Group_Inet_Addr : constant Inet_Addr_Type;
+ All_Routers_Group_Inet_Addr : constant Inet_Addr_Type;
type Sock_Addr_Type (Family : Family_Type := Family_Inet) is record
Addr : Inet_Addr_Type (Family);
@@ -1155,6 +1162,15 @@ private
(Family_Inet, (others => 0));
Broadcast_Inet_Addr : constant Inet_Addr_Type :=
(Family_Inet, (others => 255));
+ Loopback_Inet_Addr : constant Inet_Addr_Type :=
+ (Family_Inet, (127, 0, 0, 1));
+
+ Unspecified_Group_Inet_Addr : constant Inet_Addr_Type :=
+ (Family_Inet, (224, 0, 0, 0));
+ All_Hosts_Group_Inet_Addr : constant Inet_Addr_Type :=
+ (Family_Inet, (224, 0, 0, 1));
+ All_Routers_Group_Inet_Addr : constant Inet_Addr_Type :=
+ (Family_Inet, (224, 0, 0, 2));
No_Sock_Addr : constant Sock_Addr_Type := (Family_Inet, No_Inet_Addr, 0);
diff --git a/gcc/ada/g-sttsne-vxworks.adb b/gcc/ada/g-sttsne-vxworks.adb
index be0578d..a91cd87 100644
--- a/gcc/ada/g-sttsne-vxworks.adb
+++ b/gcc/ada/g-sttsne-vxworks.adb
@@ -77,9 +77,6 @@ package body GNAT.Sockets.Thin.Task_Safe_NetDB is
pragma Import (Ada, Netdb_Data);
for Netdb_Data'Address use Buf;
- pragma Unreferenced (H_Errnop);
- -- VxWorks does not provide h_errno
-
begin
pragma Assert (Addr_Type = SOSC.AF_INET);
pragma Assert (Addr_Len = In_Addr'Size / 8);
@@ -88,6 +85,7 @@ package body GNAT.Sockets.Thin.Task_Safe_NetDB is
-- data we want to return.
if Netdb_Data'Size / 8 > Buflen then
+ H_Errnop.all := SOSC.ERANGE;
return -1;
end if;
@@ -95,6 +93,7 @@ package body GNAT.Sockets.Thin.Task_Safe_NetDB is
Netdb_Data.Name'Address)
/= SOSC.OK
then
+ H_Errnop.all := C.int (Host_Errno);
return -1;
end if;
@@ -130,12 +129,10 @@ package body GNAT.Sockets.Thin.Task_Safe_NetDB is
Addr : C.int;
- pragma Unreferenced (H_Errnop);
- -- VxWorks does not provide h_errno
-
begin
Addr := VxWorks_hostGetByName (Name);
if Addr = SOSC.ERROR then
+ H_Errnop.all := C.int (Host_Errno);
return -1;
end if;
@@ -149,6 +146,7 @@ package body GNAT.Sockets.Thin.Task_Safe_NetDB is
-- data we want to return.
if Netdb_Data'Size / 8 > Buflen then
+ H_Errnop.all := SOSC.ERANGE;
return -1;
end if;
diff --git a/gcc/ada/mlib-prj.adb b/gcc/ada/mlib-prj.adb
index 66951e6..3256bf7 100644
--- a/gcc/ada/mlib-prj.adb
+++ b/gcc/ada/mlib-prj.adb
@@ -340,7 +340,6 @@ package body MLib.Prj is
Success : Boolean := False;
Library_Options : Variable_Value := Nil_Variable_Value;
- Library_GCC : Variable_Value := Nil_Variable_Value;
Driver_Name : Name_Id := No_Name;
@@ -1282,13 +1281,11 @@ package body MLib.Prj is
if Link then
- -- If attribute Library_GCC was specified, get the driver name
+ -- If attributes Library_GCC or Linker'Driver were specified, get the
+ -- driver name.
- Library_GCC :=
- Value_Of (Name_Library_GCC, Data.Decl.Attributes, In_Tree);
-
- if not Library_GCC.Default then
- Driver_Name := Library_GCC.Value;
+ if Data.Config.Shared_Lib_Driver /= No_File then
+ Driver_Name := Name_Id (Data.Config.Shared_Lib_Driver);
end if;
-- If attribute Library_Options was specified, add these additional
diff --git a/gcc/ada/prj-nmsc.adb b/gcc/ada/prj-nmsc.adb
index e9bc518..158e75b 100644
--- a/gcc/ada/prj-nmsc.adb
+++ b/gcc/ada/prj-nmsc.adb
@@ -1842,6 +1842,15 @@ package body Prj.Nmsc is
Data.Config.Linker :=
Path_Name_Type (Attribute.Value.Value);
+ -- Linker'Driver is also used to link shared libraries
+ -- if the obsolescent attribute Library_GCC has not been
+ -- specified.
+
+ if Data.Config.Shared_Lib_Driver = No_File then
+ Data.Config.Shared_Lib_Driver :=
+ File_Name_Type (Attribute.Value.Value);
+ end if;
+
elsif Attribute.Name = Name_Required_Switches then
-- Attribute Required_Switches: the minimum
@@ -2067,6 +2076,12 @@ package body Prj.Nmsc is
elsif Attribute.Name = Name_Library_GCC then
Data.Config.Shared_Lib_Driver :=
File_Name_Type (Attribute.Value.Value);
+ Error_Msg
+ (Project,
+ In_Tree,
+ "?Library_'G'C'C is an obsolescent attribute, " &
+ "use Linker''Driver instead",
+ Attribute.Value.Location);
elsif Attribute.Name = Name_Archive_Suffix then
Data.Config.Archive_Suffix :=
@@ -3613,6 +3628,10 @@ package body Prj.Nmsc is
Prj.Util.Value_Of
(Snames.Name_Library_Ali_Dir, Attributes, In_Tree);
+ Lib_GCC : constant Prj.Variable_Value :=
+ Prj.Util.Value_Of
+ (Snames.Name_Library_GCC, Attributes, In_Tree);
+
The_Lib_Kind : constant Prj.Variable_Value :=
Prj.Util.Value_Of
(Snames.Name_Library_Kind, Attributes, In_Tree);
@@ -4205,15 +4224,55 @@ package body Prj.Nmsc is
Write_Line (Kind_Name);
end if;
- if Data.Library_Kind /= Static and then
- Support_For_Libraries = Prj.Static_Only
- then
- Error_Msg
- (Project, In_Tree,
- "only static libraries are supported " &
- "on this platform",
- The_Lib_Kind.Location);
- Data.Library := False;
+ if Data.Library_Kind /= Static then
+ if Support_For_Libraries = Prj.Static_Only then
+ Error_Msg
+ (Project, In_Tree,
+ "only static libraries are supported " &
+ "on this platform",
+ The_Lib_Kind.Location);
+ Data.Library := False;
+
+ else
+ -- Check if (obsolescent) attribute Library_GCC or
+ -- Linker'Driver is declared.
+
+ if Lib_GCC.Value /= Empty_String then
+ Error_Msg
+ (Project,
+ In_Tree,
+ "?Library_'G'C'C is an obsolescent attribute, " &
+ "use Linker''Driver instead",
+ Lib_GCC.Location);
+ Data.Config.Shared_Lib_Driver :=
+ File_Name_Type (Lib_GCC.Value);
+
+ else
+ declare
+ Linker : constant Package_Id :=
+ Value_Of
+ (Name_Linker,
+ Data.Decl.Packages,
+ In_Tree);
+ Driver : constant Variable_Value :=
+ Value_Of
+ (Name => No_Name,
+ Attribute_Or_Array_Name =>
+ Name_Driver,
+ In_Package => Linker,
+ In_Tree =>
+ In_Tree);
+
+ begin
+ if Driver /= Nil_Variable_Value
+ and then Driver.Value /= Empty_String
+ then
+ Data.Config.Shared_Lib_Driver :=
+ File_Name_Type (Driver.Value);
+ end if;
+ end;
+ end if;
+ end if;
end if;
end;
end if;
diff --git a/gcc/ada/s-oscons-tmplt.c b/gcc/ada/s-oscons-tmplt.c
index e6e1849..be35f1b 100644
--- a/gcc/ada/s-oscons-tmplt.c
+++ b/gcc/ada/s-oscons-tmplt.c
@@ -471,6 +471,11 @@ CND(EPROTONOSUPPORT, "Unknown protocol")
#endif
CND(EPROTOTYPE, "Unknown protocol type")
+#ifndef ERANGE
+# define ERANGE -1
+#endif
+CND(ERANGE, "Result too large")
+
#ifndef ESHUTDOWN
# define ESHUTDOWN -1
#endif