summaryrefslogtreecommitdiff
path: root/gcc/ada/prj-nmsc.adb
diff options
context:
space:
mode:
authorcharlet <charlet@138bc75d-0d04-0410-961f-82ee72b054a4>2004-03-18 15:18:36 +0000
committercharlet <charlet@138bc75d-0d04-0410-961f-82ee72b054a4>2004-03-18 15:18:36 +0000
commit40a4417ac1453bf453e5f204d2b981a342252f5d (patch)
treec005e46c28cc0d31445b8654f494f202ecaac7fd /gcc/ada/prj-nmsc.adb
parentd10d29c07cd3778710a992d364941427b123f683 (diff)
downloadgcc-40a4417ac1453bf453e5f204d2b981a342252f5d.tar.gz
2004-03-18 Arnaud Charlet <charlet@act-europe.fr>
* 5atpopsp.adb: Remove RTEMS from list of platforms using this file. Code clean up: * 5ataprop.adb, 5ftaprop.adb, 5htaprop.adb, 5itaprop.adb, 5staprop.adb, 5vtaprop.adb, 5wtaprop.adb, 7staprop.adb (Finalize_TCB): Use Specific.Set instead of direct call to e.g pthread_setspecific. 2004-03-18 Thomas Quinot <quinot@act-europe.fr> * adaint.c: Update comments. * Makefile.in: set PREFIX_OBJS, SYMLIB, THREADSLIB, and GNATLIB_SHARED for FreeBSD. 2004-03-18 Jose Ruiz <ruiz@act-europe.fr> * init.c [VxWorks]: Do not fix the stack size for the environment task. When needed (stack checking) the stack size is retrieved from the VxWorks kernel. * Makefile.in: Flag -nostdinc is required when building the run time for avoiding looking for files in the base compiler. Add the VxWorks specific version of the package body for System.Stack_checking.Operations (5zstchop.adb). * Make-lang.in: Add the object file for System.Stack_Checking.Operations. * Makefile.rtl: Add object file for the package System.Stack_Checking.Operations. * s-stchop.ads, s-stchop.adb, 5zstchop.adb: New files. * s-stache.ads, s-stache.adb: Move the operations related to stack checking from this package to package System.Stack_Checking.Operations. This way, stack checking operations are only linked in the final executable when using the -fstack-check flag. 2004-03-18 Doug Rupp <rupp@gnat.com> * Makefile.in [VMS]: Handle 64 bit specs (5qsystem.ads, 5xcrtl.ads). Reorganize ifeq's. * 5qsystem.ads, 5xcrtl.ads: New files. 2004-03-18 Vincent Celier <celier@gnat.com> * prj.adb (Reset): Reset hash table Files_Htable * prj-env.adb (Source_Paths, Object_Paths): New tables. (Add_To_Source_Path, Add_To_Object_Path): New procedures, to replace the procedures Add_To_Path_File. (Set_Ada_Paths): Accumulate source and object dirs in the tables, making sure that each directory is present only once and, for object dirs, when a directory already present is added, the duplicate is removed and the directory is always put as the last in the table. Write the path files at the end of these accumulations. * prj-nmsc.adb (Record_Source): Add source file name in hash table Files_Htable for all sources. * prj-proc.adb (Process): Remove restrictions between not directly related extending projects. 2004-03-18 Emmanuel Briot <briot@act-europe.fr> * prj-nmsc.ads, prj-nmsc.adb (Ada_Check): New parameter Trusted_Mode. (Find_Sources): Minor speed optimization. * prj-proc.ads, prj-proc.adb (Check, Recursive_Check, Process): New parameter Trusted_Mode. 2004-03-18 Sergey Rybin <rybin@act-europe.fr> * scn.adb (Determine_License): Take into account a degenerated case when the source contains only comments. 2004-03-18 Ed Schonberg <schonberg@gnat.com> * sem_warn.adb (Check_References): For a warning on a selected component that does not come from source, locate an uninitialized component of the record type to produce a more precise error message. git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@79623 138bc75d-0d04-0410-961f-82ee72b054a4
Diffstat (limited to 'gcc/ada/prj-nmsc.adb')
-rw-r--r--gcc/ada/prj-nmsc.adb28
1 files changed, 17 insertions, 11 deletions
diff --git a/gcc/ada/prj-nmsc.adb b/gcc/ada/prj-nmsc.adb
index 7ad849b1a4c..51d5e0e8253 100644
--- a/gcc/ada/prj-nmsc.adb
+++ b/gcc/ada/prj-nmsc.adb
@@ -587,7 +587,8 @@ package body Prj.Nmsc is
procedure Ada_Check
(Project : Project_Id;
- Report_Error : Put_Line_Access)
+ Report_Error : Put_Line_Access;
+ Trusted_Mode : Boolean)
is
Data : Project_Data;
Languages : Variable_Value := Nil_Variable_Value;
@@ -665,9 +666,12 @@ package body Prj.Nmsc is
Source_Recorded := False;
Element := String_Elements.Table (Source_Dir);
if Element.Value /= No_Name then
+ Get_Name_String (Element.Display_Value);
declare
Source_Directory : constant String :=
- Get_Name_String (Element.Display_Value);
+ Name_Buffer (1 .. Name_Len) & Directory_Separator;
+ Dir_Last : constant Natural :=
+ Compute_Directory_Last (Source_Directory);
begin
if Current_Verbosity = High then
@@ -677,7 +681,8 @@ package body Prj.Nmsc is
-- We look to every entry in the source directory
- Open (Dir, Source_Directory);
+ Open (Dir, Source_Directory
+ (Source_Directory'First .. Dir_Last));
-- Canonical_Case_File_Name (Source_Directory);
@@ -693,20 +698,16 @@ package body Prj.Nmsc is
declare
File_Name : constant Name_Id := Name_Find;
- Dir : constant String :=
- Source_Directory &
- Directory_Separator;
- Dir_Last : constant Natural :=
- Compute_Directory_Last (Dir);
Path : constant String :=
Normalize_Pathname
(Name => Name_Buffer (1 .. Name_Len),
- Directory => Dir (Dir'First .. Dir_Last));
+ Directory => Source_Directory
+ (Source_Directory'First .. Dir_Last),
+ Resolve_Links => not Trusted_Mode);
Path_Name : Name_Id;
begin
- if Is_Regular_File (Path) then
-
+ if Trusted_Mode or else Is_Regular_File (Path) then
Name_Len := Path'Length;
Name_Buffer (1 .. Name_Len) := Path;
Path_Name := Name_Find;
@@ -3750,6 +3751,11 @@ package body Prj.Nmsc is
(The_Unit_Data.File_Names (Unit_Kind).Name);
end if;
+ -- Record the file name in the hash table Files_Htable
+
+ Unit_Prj := (Unit => The_Unit, Project => Project);
+ Files_Htable.Set (Canonical_File_Name, Unit_Prj);
+
The_Unit_Data.File_Names (Unit_Kind) :=
(Name => Canonical_File_Name,
Display_Name => File_Name,