* 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
-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.
#include <setjmp.h>
#include "libgfortran.h"
-#define DEFAULT_TEMPDIR "/var/tmp"
+#define DEFAULT_TEMPDIR "/tmp"
/* Basic types used in data transfers. */
tempdir = getenv ("GFORTRAN_TMPDIR");
if (tempdir == NULL)
tempdir = getenv ("TMP");
+ if (tempdir == NULL)
+ tempdir = getenv ("TEMP");
if (tempdir == NULL)
tempdir = DEFAULT_TEMPDIR;
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;