* 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.
git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@146585
138bc75d-0d04-0410-961f-
82ee72b054a4
+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
procedure Create_Mapping_File
(Project : Project_Id;
- Language : Language_Index;
+ Language : Name_Id;
In_Tree : Project_Tree_Ref;
Name : out Path_Name_Type)
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);
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
-- --
-- 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- --
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