Commit 35afb012 by Arnaud Charlet

[multiple changes]

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.

From-SVN: r146585
parent 10d2a6f7
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
......
......@@ -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);
......
......@@ -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
......
......@@ -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
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment