aboutsummaryrefslogtreecommitdiff
path: root/libgfortran/runtime/main.c
diff options
context:
space:
mode:
authorJanne Blomqvist <jb@gcc.gnu.org>2012-05-05 09:30:51 +0300
committerJanne Blomqvist <jb@gcc.gnu.org>2012-05-05 09:30:51 +0300
commit68ee9c0807fd3c9a66c649aa7bd3bebacfb0dff0 (patch)
treeac63807666eaf2ebc05379c848806981ba536332 /libgfortran/runtime/main.c
parent9154c66213636f44954feb8d73257560370c11c2 (diff)
downloadgcc-68ee9c0807fd3c9a66c649aa7bd3bebacfb0dff0.zip
gcc-68ee9c0807fd3c9a66c649aa7bd3bebacfb0dff0.tar.gz
gcc-68ee9c0807fd3c9a66c649aa7bd3bebacfb0dff0.tar.bz2
Fix handling of temporary files.
2012-05-05 Janne Blomqvist <jb@gcc.gnu.org> * gfortran.texi (GFORTRAN_TMPDIR): Rename to TMPDIR, explain algorithm for choosing temp directory. 2012-05-05 Janne Blomqvist <jb@gcc.gnu.org> * config.h.in: Regenerated. * configure: Regenerated. * configure.ac: Add checks for getegid and __secure_getenv. * io/unix.c (P_tmpdir): Fallback definition for macro. (tempfile_open): New function. (tempfile): Use secure_getenv, call tempfile_open to try each directory in turn. * libgfortran.h (DEFAULT_TMPDIR): Remove macro. (secure_getenv): New macro/prototype. * runtime/environ.c (secure_getenv): New function. (variable_table): Rename GFORTRAN_TMPDIR to TMPDIR. * runtime/main.c (find_addr2line): Use secure_getenv. From-SVN: r187190
Diffstat (limited to 'libgfortran/runtime/main.c')
-rw-r--r--libgfortran/runtime/main.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/libgfortran/runtime/main.c b/libgfortran/runtime/main.c
index 79659e5..72c32fc 100644
--- a/libgfortran/runtime/main.c
+++ b/libgfortran/runtime/main.c
@@ -163,7 +163,7 @@ find_addr2line (void)
{
#ifdef HAVE_ACCESS
#define A2L_LEN 10
- char *path = getenv ("PATH");
+ char *path = secure_getenv ("PATH");
if (!path)
return;
size_t n = strlen (path);