From: Tobias Burnus <burnus@net-b.de>
To: gcc patches <gcc-patches@gcc.gnu.org>, gfortran <fortran@gcc.gnu.org>
Subject: [Patch, libgfortran, committed] Remove send "mode" argument to POSIX "open"
Date: Thu, 31 May 2012 06:11:00 -0000 [thread overview]
Message-ID: <4FC70B88.2040201@net-b.de> (raw)
[-- Attachment #1: Type: text/plain, Size: 324 bytes --]
As Robert Mason pointed out, the POSIX open call already contains the
mode ("S_IRUSR | S_IWUSR" is the same as 0600).
I somehow must have missed the "," and read it as "|". The extra
argument does not harm as open is variadic; nonetheless, it makes sense
to remove the extra argument.
Committed as Rev. 188048.
Tobias
[-- Attachment #2: commit.log --]
[-- Type: text/x-log, Size: 1091 bytes --]
Index: libgfortran/ChangeLog
===================================================================
--- libgfortran/ChangeLog (Revision 188023)
+++ libgfortran/ChangeLog (Arbeitskopie)
@@ -1,3 +1,10 @@
+2012-05-31 Tobias Burnus <burnus@net-b.de>
+
+ Revert:
+ 2012-05-16 Tobias Burnus <burnus@net-b.de>
+
+ * io/unix.c (tempfile_open): Pass mode to "open" for O_CREAT.
+
2012-05-30 Tobias Burnus <burnus@net-b.de>
* io/io.h: Fix comment typos.
Index: libgfortran/io/unix.c
===================================================================
--- libgfortran/io/unix.c (Revision 188023)
+++ libgfortran/io/unix.c (Arbeitskopie)
@@ -1099,9 +1099,9 @@ tempfile_open (const char *tempdir, char **fname)
#if defined(HAVE_CRLF) && defined(O_BINARY)
fd = open (template, O_RDWR | O_CREAT | O_EXCL | O_BINARY,
- S_IRUSR | S_IWUSR, 0600);
+ S_IRUSR | S_IWUSR);
#else
- fd = open (template, O_RDWR | O_CREAT | O_EXCL, S_IRUSR | S_IWUSR, 0600);
+ fd = open (template, O_RDWR | O_CREAT | O_EXCL, S_IRUSR | S_IWUSR);
#endif
}
while (fd == -1 && errno == EEXIST);
reply other threads:[~2012-05-31 6:11 UTC|newest]
Thread overview: [no followups] expand[flat|nested] mbox.gz Atom feed
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=4FC70B88.2040201@net-b.de \
--to=burnus@net-b.de \
--cc=fortran@gcc.gnu.org \
--cc=gcc-patches@gcc.gnu.org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).