]> gcc.gnu.org Git - gcc.git/commitdiff
io.h: Change DEFAULT_TEMPDIR to /tmp instead of /var/tmp.
authorFrancois-Xavier Coudert <coudert@clipper.ens.fr>
Sat, 6 Aug 2005 22:57:46 +0000 (00:57 +0200)
committerFrançois-Xavier Coudert <fxcoudert@gcc.gnu.org>
Sat, 6 Aug 2005 22:57:46 +0000 (22:57 +0000)
* io/io.h: Change DEFAULT_TEMPDIR to /tmp instead of /var/tmp.
* io/unix.c (tempfile): Look at the TEMP environment variable
to find the temporary files directory. Whitespace correction.

From-SVN: r102822

libgfortran/ChangeLog
libgfortran/io/io.h
libgfortran/io/unix.c

index 79e8f9bfe58993bc527d2c6b8bc45311470dd1b1..cff23fabceea73819b3a1ce702e0ff84ba7d6d6a 100644 (file)
@@ -1,4 +1,10 @@
-2005-08-04  Francois-Xavier Coudert  <coudert@clipper.ens.fr>
+2005-08-07  Francois-Xavier Coudert  <coudert@clipper.ens.fr>
+
+       * io/io.h: Change DEFAULT_TEMPDIR to /tmp instead of /var/tmp.
+       * io/unix.c (tempfile): Look at the TEMP environment variable
+       to find the temporary files directory. Whitespace correction.
+
+2005-08-06  Francois-Xavier Coudert  <coudert@clipper.ens.fr>
 
        * io/unix.c: Add O_RDWR to open() call.
 
index 37bdb3ebdfac9ef90abaa91a100f5ddaabc83c8d..3c932fc63037c763ea37800652577a80d88ee66f 100644 (file)
@@ -33,7 +33,7 @@ Boston, MA 02111-1307, USA.  */
 #include <setjmp.h>
 #include "libgfortran.h"
 
-#define DEFAULT_TEMPDIR "/var/tmp"
+#define DEFAULT_TEMPDIR "/tmp"
 
 /* Basic types used in data transfers.  */
 
index 56df254d380b7441d249e63e6dfed3ab976c5c09..e6b0478af232abe4dcdc147f7a7ae4f387d95bac 100644 (file)
@@ -983,6 +983,8 @@ tempfile (void)
   tempdir = getenv ("GFORTRAN_TMPDIR");
   if (tempdir == NULL)
     tempdir = getenv ("TMP");
+  if (tempdir == NULL)
+    tempdir = getenv ("TEMP");
   if (tempdir == NULL)
     tempdir = DEFAULT_TEMPDIR;
 
@@ -998,7 +1000,7 @@ tempfile (void)
 
   if (mktemp (template))
     do
-      fd = open (template, O_RDWR |O_CREAT | O_EXCL, S_IREAD | S_IWRITE);
+      fd = open (template, O_RDWR | O_CREAT | O_EXCL, S_IREAD | S_IWRITE);
     while (!(fd == -1 && errno == EEXIST) && mktemp (template));
   else
     fd = -1;
This page took 0.071958 seconds and 5 git commands to generate.