Commit e10f759e by Tobias Burnus Committed by Tobias Burnus

unix.c (tempfile_open): Pass mode to "open" for O_CREAT.

2012-05-16  Tobias Burnus  <burnus@net-b.de>

        * io/unix.c (tempfile_open): Pass mode to "open" for O_CREAT.

From-SVN: r187604
parent 4677d2eb
2012-05-16 Tobias Burnus <burnus@net-b.de>
* io/unix.c (tempfile_open): Pass mode to "open" for O_CREAT.
2012-05-14 Janne Blomqvist <jb@gcc.gnu.org> 2012-05-14 Janne Blomqvist <jb@gcc.gnu.org>
PR fortran/52428 PR fortran/52428
......
...@@ -1099,9 +1099,9 @@ tempfile_open (const char *tempdir, char **fname) ...@@ -1099,9 +1099,9 @@ tempfile_open (const char *tempdir, char **fname)
#if defined(HAVE_CRLF) && defined(O_BINARY) #if defined(HAVE_CRLF) && defined(O_BINARY)
fd = open (template, O_RDWR | O_CREAT | O_EXCL | O_BINARY, fd = open (template, O_RDWR | O_CREAT | O_EXCL | O_BINARY,
S_IRUSR | S_IWUSR); S_IRUSR | S_IWUSR, 0600);
#else #else
fd = open (template, O_RDWR | O_CREAT | O_EXCL, S_IRUSR | S_IWUSR); fd = open (template, O_RDWR | O_CREAT | O_EXCL, S_IRUSR | S_IWUSR, 0600);
#endif #endif
} }
while (fd == -1 && errno == EEXIST); while (fd == -1 && errno == EEXIST);
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment