Fix handling of temporary files.
commita291e3b6538a0697986d1a7d22aa220829998bab
authorjb <jb@138bc75d-0d04-0410-961f-82ee72b054a4>
Sat, 5 May 2012 06:30:51 +0000 (5 06:30 +0000)
committerjb <jb@138bc75d-0d04-0410-961f-82ee72b054a4>
Sat, 5 May 2012 06:30:51 +0000 (5 06:30 +0000)
treeac63807666eaf2ebc05379c848806981ba536332
parente3168f5bde2d4ceb1543c5ea0c779ee66b5f9a02
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.

git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@187190 138bc75d-0d04-0410-961f-82ee72b054a4
gcc/fortran/ChangeLog
gcc/fortran/gfortran.texi
libgfortran/ChangeLog
libgfortran/config.h.in
libgfortran/configure
libgfortran/configure.ac
libgfortran/io/unix.c
libgfortran/libgfortran.h
libgfortran/runtime/environ.c
libgfortran/runtime/main.c