diff options
-rw-r--r-- | gcc/ada/ChangeLog | 11 | ||||
-rw-r--r-- | gcc/ada/prj-env.adb | 12 | ||||
-rw-r--r-- | gcc/ada/prj-env.ads | 9 | ||||
-rw-r--r-- | gcc/ada/tempdir.adb | 6 |
4 files changed, 29 insertions, 9 deletions
diff --git a/gcc/ada/ChangeLog b/gcc/ada/ChangeLog index 68b28f8..a1b8ad1 100644 --- a/gcc/ada/ChangeLog +++ b/gcc/ada/ChangeLog @@ -1,3 +1,14 @@ +2009-04-22 Vincent Celier <celier@adacore.com> + + * tempdir.adb (Create_Temp_File): Add a diagnostic in verbose mode when + the temporary file cannot be created, indicating the directory when the + creation was attempted. + +2009-04-22 Emmanuel Briot <briot@adacore.com> + + * prj-env.adb, prj-env.ads (Create_Mapping_File): we need to compare + the language names, not their indices. + 2009-04-22 Emmanuel Briot <briot@adacore.com> * prj.ads, prj-nmsc.adb, prj-env.adb, prj-env.ads diff --git a/gcc/ada/prj-env.adb b/gcc/ada/prj-env.adb index ed4dc6c..3be4531 100644 --- a/gcc/ada/prj-env.adb +++ b/gcc/ada/prj-env.adb @@ -1221,7 +1221,7 @@ package body Prj.Env is procedure Create_Mapping_File (Project : Project_Id; - Language : Language_Index; + Language : Name_Id; In_Tree : Project_Tree_Ref; Name : out Path_Name_Type) is @@ -1330,14 +1330,14 @@ package body Prj.Env is for Proj in Present'Range loop if Present (Proj) then Source := In_Tree.Projects.Table (Proj).First_Source; - while Source /= No_Source loop Src_Data := In_Tree.Sources.Table (Source); - if In_Tree.Sources.Table (Source).Language = Language - and then not Src_Data.Locally_Removed - and then Src_Data.Replaced_By = No_Source - and then Src_Data.Path.Name /= No_Path + if In_Tree.Languages_Data.Table + (In_Tree.Sources.Table (Source).Language).Name = Language + and then not Src_Data.Locally_Removed + and then Src_Data.Replaced_By = No_Source + and then Src_Data.Path.Name /= No_Path then if Src_Data.Unit /= No_Name then Get_Name_String (Src_Data.Unit); diff --git a/gcc/ada/prj-env.ads b/gcc/ada/prj-env.ads index c45d09a..b4aa8e4 100644 --- a/gcc/ada/prj-env.ads +++ b/gcc/ada/prj-env.ads @@ -50,12 +50,17 @@ package Prj.Env is procedure Create_Mapping_File (Project : Project_Id; - Language : Language_Index; + Language : Name_Id; In_Tree : Project_Tree_Ref; Name : out Path_Name_Type); -- Create a temporary mapping file for project Project. For each source or - -- template of Language in the of Project, put the mapping of its file + -- template of Language in the Project, put the mapping of its file -- name and path name in this file. + -- + -- Implementation note: we pass a language name, not a language_index here, + -- since the latter would have to match exactly the index of that language + -- for the specified project, and that is not information available in + -- buildgpr.adb procedure Set_Mapping_File_Initial_State_To_Empty; -- When creating a mapping file, create an empty map. This case occurs diff --git a/gcc/ada/tempdir.adb b/gcc/ada/tempdir.adb index f814335..1612140 100644 --- a/gcc/ada/tempdir.adb +++ b/gcc/ada/tempdir.adb @@ -6,7 +6,7 @@ -- -- -- B o d y -- -- -- --- Copyright (C) 2003-2007, Free Software Foundation, Inc. -- +-- Copyright (C) 2003-2009, Free Software Foundation, Inc. -- -- -- -- 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- -- @@ -94,6 +94,10 @@ package body Tempdir is end if; if FD = Invalid_FD then + if Verbose_Mode then + Write_Line ("could not create temporary file in " & Directory); + end if; + Name := No_Path; else |