2
0
mirror of git://gcc.gnu.org/git/gcc.git synced 2025-04-13 12:11:08 +08:00

[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
This commit is contained in:
Arnaud Charlet 2009-04-20 11:38:27 +02:00
parent 16212e894a
commit 3568b27142
8 changed files with 164 additions and 26 deletions

@ -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.

@ -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);
---------
-- "+" --

@ -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);
---------
-- "+" --

@ -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);

@ -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;

@ -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

@ -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;

@ -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