aboutsummaryrefslogtreecommitdiff
path: root/libgfortran/io/unix.c
diff options
context:
space:
mode:
authorJanne Blomqvist <jb@gcc.gnu.org>2011-12-22 22:44:32 +0200
committerJanne Blomqvist <jb@gcc.gnu.org>2011-12-22 22:44:32 +0200
commit42dfafa935db4f6f368499108307676dbf1317cc (patch)
treeb51c2b0e0174c8fedc4a4c39e1f7692f16814598 /libgfortran/io/unix.c
parentbbe847a162d99872542c9574301b2bfc19c6b365 (diff)
downloadgcc-42dfafa935db4f6f368499108307676dbf1317cc.zip
gcc-42dfafa935db4f6f368499108307676dbf1317cc.tar.gz
gcc-42dfafa935db4f6f368499108307676dbf1317cc.tar.bz2
PR 51646 Use POSIX mode flags in open() argument.
2011-12-22 Janne Blomqvist <jb@gcc.gnu.org> Tobias Burnus <burnus@net-b.de> PR libfortran/51646 * acinclude.m4 (LIBGFOR_CHECK_UNLINK_OPEN_FILE): Use POSIX mode flags, omit mode argument when flags argument does not have O_CREAT. * io/unix.c (tempfile): Use POSIX mode flags. * configure: Regenerate. Co-Authored-By: Tobias Burnus <burnus@net-b.de> From-SVN: r182638
Diffstat (limited to 'libgfortran/io/unix.c')
-rw-r--r--libgfortran/io/unix.c4
1 files changed, 2 insertions, 2 deletions
diff --git a/libgfortran/io/unix.c b/libgfortran/io/unix.c
index f320733..6eef3f9 100644
--- a/libgfortran/io/unix.c
+++ b/libgfortran/io/unix.c
@@ -1112,9 +1112,9 @@ tempfile (st_parameter_open *opp)
#if defined(HAVE_CRLF) && defined(O_BINARY)
fd = open (template, O_RDWR | O_CREAT | O_EXCL | O_BINARY,
- S_IREAD | S_IWRITE);
+ S_IRUSR | S_IWUSR);
#else
- fd = open (template, O_RDWR | O_CREAT | O_EXCL, S_IREAD | S_IWRITE);
+ fd = open (template, O_RDWR | O_CREAT | O_EXCL, S_IRUSR | S_IWUSR);
#endif
}
while (fd == -1 && errno == EEXIST);