summaryrefslogtreecommitdiff
path: root/libgfortran/io
diff options
context:
space:
mode:
authorjb <jb@138bc75d-0d04-0410-961f-82ee72b054a4>2011-12-22 20:44:32 +0000
committerjb <jb@138bc75d-0d04-0410-961f-82ee72b054a4>2011-12-22 20:44:32 +0000
commitec55604a1cb0e41cfe5d999983d7f512cf23ddd8 (patch)
treeb51c2b0e0174c8fedc4a4c39e1f7692f16814598 /libgfortran/io
parented845d9d6d471baa1a22124a5465dfa9d9c4801a (diff)
downloadgcc-ec55604a1cb0e41cfe5d999983d7f512cf23ddd8.tar.gz
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. git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@182638 138bc75d-0d04-0410-961f-82ee72b054a4
Diffstat (limited to 'libgfortran/io')
-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 f320733e859..6eef3f99a0a 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);