summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorcharlet <charlet@138bc75d-0d04-0410-961f-82ee72b054a4>2005-11-15 14:05:07 +0000
committercharlet <charlet@138bc75d-0d04-0410-961f-82ee72b054a4>2005-11-15 14:05:07 +0000
commit27d8e38726d5e53bb5ce1fc3712a2ac4697e02c7 (patch)
tree287cd3d04c826a6a6368080b7dd7cad3885db27f
parentaa0231788d4732268ee5b21fa889ec37d918ad14 (diff)
downloadppe42-gcc-27d8e38726d5e53bb5ce1fc3712a2ac4697e02c7.tar.gz
ppe42-gcc-27d8e38726d5e53bb5ce1fc3712a2ac4697e02c7.zip
2005-11-14 Vincent Celier <celier@adacore.com>
* tempdir.adb (Tempdir): Do not use environment variable TMPDIR if it designates a non existent directory. git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@107012 138bc75d-0d04-0410-961f-82ee72b054a4
-rw-r--r--gcc/ada/tempdir.adb7
1 files changed, 5 insertions, 2 deletions
diff --git a/gcc/ada/tempdir.adb b/gcc/ada/tempdir.adb
index 7daea87e5c6..a0b8adacac7 100644
--- a/gcc/ada/tempdir.adb
+++ b/gcc/ada/tempdir.adb
@@ -6,7 +6,7 @@
-- --
-- B o d y --
-- --
--- Copyright (C) 2003 Free Software Foundation, Inc. --
+-- Copyright (C) 2003-2005 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- --
@@ -114,7 +114,10 @@ begin
Dir : String_Access := Getenv (Tmpdir);
begin
- if Dir'Length > 0 and then Is_Absolute_Path (Dir.all) then
+ if Dir'Length > 0 and then
+ Is_Absolute_Path (Dir.all) and then
+ Is_Directory (Dir.all)
+ then
Temp_Dir := new String'(Normalize_Pathname (Dir.all));
end if;
OpenPOWER on IntegriCloud