From 42dfafa935db4f6f368499108307676dbf1317cc Mon Sep 17 00:00:00 2001 From: Janne Blomqvist Date: Thu, 22 Dec 2011 22:44:32 +0200 Subject: PR 51646 Use POSIX mode flags in open() argument. 2011-12-22 Janne Blomqvist Tobias Burnus 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 From-SVN: r182638 --- libgfortran/io/unix.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) (limited to 'libgfortran/io') 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); -- cgit v1.1