]> git.ipfire.org Git - thirdparty/gcc.git/commitdiff
[multiple changes]
authorArnaud Charlet <charlet@gcc.gnu.org>
Mon, 20 Apr 2009 09:38:27 +0000 (11:38 +0200)
committerArnaud Charlet <charlet@gcc.gnu.org>
Mon, 20 Apr 2009 09:38:27 +0000 (11:38 +0200)
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

gcc/ada/ChangeLog
gcc/ada/a-calend-vms.adb
gcc/ada/a-calend.adb
gcc/ada/g-socket.ads
gcc/ada/g-sttsne-vxworks.adb
gcc/ada/mlib-prj.adb
gcc/ada/prj-nmsc.adb
gcc/ada/s-oscons-tmplt.c

index d5a0cd7ad48b72503e5e12a68f8c928cd7ddb00e..bcebd6e54ed34b11f4caf7f39f479d973e7da54f 100644 (file)
@@ -1,3 +1,64 @@
+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.
index ef97fa412ab3f76259cf1d0618888991e19d12b6..374ea715ff62700c51361fcaa87b5ab62738b95f 100644 (file)
@@ -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);
 
    ---------
    -- "+" --
index 9aa88521b90570594ff90f1a4a559a58f9555788..4c340eec0d19b247509d649028470bfc363be3c7 100644 (file)
@@ -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);
 
    ---------
    -- "+" --
index 96d3428261de8554658f99ea0a224290a2ea7411..3680d751ff6ce8d32accafe4220093811bb5b0f8 100644 (file)
@@ -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);
 
index be0578d048c62759567cf3ed1da18b36fa430473..a91cd873c3bd516adb4d8a62ef574e2e86eb62dc 100644 (file)
@@ -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;
 
index 66951e63dd2aadad5ce560d9f06632cf583466af..3256bf754917b2989e57e05e816321d4f631aeaa 100644 (file)
@@ -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
index e9bc518de69fb9978c98a1831b4723baa0ec2427..158e75bc174a7096803c51751231c9c021890c78 100644 (file)
@@ -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;
index e6e1849154292e2bafa6e190ff17bcb07be8b9fa..be35f1b216d2b35593038c2457c25c80a5bd3c1c 100644 (file)
@@ -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