aboutsummaryrefslogtreecommitdiff
path: root/libiberty/make-temp-file.c
diff options
context:
space:
mode:
authorDJ Delorie <dj@redhat.com>2010-07-21 16:08:01 +0000
committerDJ Delorie <dj@redhat.com>2010-07-21 16:08:01 +0000
commitae30dc00b43017845ab092fd3fbb2004bfb36d63 (patch)
tree62ee2b6e7edb9ac757d90a8404dc4b4aa14407a1 /libiberty/make-temp-file.c
parent883df6ddea77e818a9d516c3d1b34467c71a7b3d (diff)
downloadgdb-ae30dc00b43017845ab092fd3fbb2004bfb36d63.zip
gdb-ae30dc00b43017845ab092fd3fbb2004bfb36d63.tar.gz
gdb-ae30dc00b43017845ab092fd3fbb2004bfb36d63.tar.bz2
merge from gcc
Diffstat (limited to 'libiberty/make-temp-file.c')
-rw-r--r--libiberty/make-temp-file.c7
1 files changed, 6 insertions, 1 deletions
diff --git a/libiberty/make-temp-file.c b/libiberty/make-temp-file.c
index 13e1925..4e38766 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. */