From: charlet Date: Wed, 22 Apr 2009 15:06:51 +0000 (+0000) Subject: 2009-04-22 Vincent Celier X-Git-Url: http://git.ipfire.org/?a=commitdiff_plain;h=20fe27256bed1719937e7b5f52f545d69950c634;p=thirdparty%2Fgcc.git 2009-04-22 Vincent Celier * 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 * prj-env.adb, prj-env.ads (Create_Mapping_File): we need to compare the language names, not their indices. git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@146585 138bc75d-0d04-0410-961f-82ee72b054a4 --- diff --git a/gcc/ada/ChangeLog b/gcc/ada/ChangeLog index 68b28f80a2f1..a1b8ad128ed0 100644 --- a/gcc/ada/ChangeLog +++ b/gcc/ada/ChangeLog @@ -1,3 +1,14 @@ +2009-04-22 Vincent Celier + + * 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 + + * prj-env.adb, prj-env.ads (Create_Mapping_File): we need to compare + the language names, not their indices. + 2009-04-22 Emmanuel Briot * 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 ed4dc6caf0e4..3be453141429 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 c45d09aa8fef..b4aa8e4fa5e1 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 f8143354b8a3..1612140b3eca 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