io.h: Change DEFAULT_TEMPDIR to /tmp instead of /var/tmp.

* 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
This commit is contained in:
Francois-Xavier Coudert 2005-08-07 00:57:46 +02:00 committed by François-Xavier Coudert
parent 9f6206d9df
commit e087fdd81c
3 changed files with 11 additions and 3 deletions

View 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.

View 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. */

View 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;