]> git.ipfire.org Git - thirdparty/gcc.git/commitdiff
* make-temp-file.c (choose_tmpdir): Append a dot to P_tmpdir if needed.
authorPascal Obry <obry@adacore.com>
Wed, 21 Jul 2010 15:02:09 +0000 (15:02 +0000)
committerEric Botcazou <ebotcazou@gcc.gnu.org>
Wed, 21 Jul 2010 15:02:09 +0000 (15:02 +0000)
From-SVN: r162379

libiberty/ChangeLog
libiberty/make-temp-file.c

index 1b1610b6929aaddc789c9ef375b794688feabfe2..0a31b0c4c454fa18cff7324bf087952273bc9711 100644 (file)
@@ -1,3 +1,7 @@
+2010-07-21  Pascal Obry  <obry@adacore.com>
+
+       * make-temp-file.c (choose_tmpdir): Append a dot to P_tmpdir if needed.
+
 2010-07-06  Ken Werner  <ken.werner@de.ibm.com>
 
        * floatformat.c (floatformat_ieee_half_big): New variable.
index 13e192565340266e80d40ff2bc56a8d6179b6325..4e3876676e2721284b15ed6c4b7ee37e022ed5c7 100644 (file)
@@ -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.  */