diff options
author | ebotcazou <ebotcazou@138bc75d-0d04-0410-961f-82ee72b054a4> | 2010-07-21 15:02:09 +0000 |
---|---|---|
committer | ebotcazou <ebotcazou@138bc75d-0d04-0410-961f-82ee72b054a4> | 2010-07-21 15:02:09 +0000 |
commit | c9395ca8a1874b9a1b6bff329d8dc53f22e495e9 (patch) | |
tree | 49ebe88babaf5903e5fcceabc4d8a5ff5f007794 /libiberty/make-temp-file.c | |
parent | 1e0510e14349695b26cf843903dc54e2482ee8a8 (diff) | |
download | ppe42-gcc-c9395ca8a1874b9a1b6bff329d8dc53f22e495e9.tar.gz ppe42-gcc-c9395ca8a1874b9a1b6bff329d8dc53f22e495e9.zip |
* make-temp-file.c (choose_tmpdir): Append a dot to P_tmpdir if needed.
git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@162379 138bc75d-0d04-0410-961f-82ee72b054a4
Diffstat (limited to 'libiberty/make-temp-file.c')
-rw-r--r-- | libiberty/make-temp-file.c | 7 |
1 files changed, 6 insertions, 1 deletions
diff --git a/libiberty/make-temp-file.c b/libiberty/make-temp-file.c index 13e19256534..4e3876676e2 100644 --- a/libiberty/make-temp-file.c +++ b/libiberty/make-temp-file.c @@ -121,7 +121,12 @@ choose_tmpdir (void) #endif #ifdef P_tmpdir - base = try_dir (P_tmpdir, base); + /* We really want a directory name here as if concatenated with say \dir + we do not end up with a double \\ which defines an UNC path. */ + if (strcmp (P_tmpdir, "\\") == 0) + base = try_dir ("\\.", base); + else + base = try_dir (P_tmpdir, base); #endif /* Try /var/tmp, /usr/tmp, then /tmp. */ |