public inbox for gcc-bugs@sourceware.org
help / color / mirror / Atom feed
From: "keith.marshall at mailinator dot com" <gcc-bugzilla@gcc.gnu.org>
To: gcc-bugs@gcc.gnu.org
Subject: [Bug libfortran/66936] New: io/unix.c gratuitously uses S_IRWXG and S_IRWXO on the basis that mkstemp() is available
Date: Sun, 19 Jul 2015 15:14:00 -0000	[thread overview]
Message-ID: <bug-66936-4@http.gcc.gnu.org/bugzilla/> (raw)

https://gcc.gnu.org/bugzilla/show_bug.cgi?id=66936

            Bug ID: 66936
           Summary: io/unix.c gratuitously uses S_IRWXG and S_IRWXO on the
                    basis that mkstemp() is available
           Product: gcc
           Version: unknown
            Status: UNCONFIRMED
          Severity: normal
          Priority: P3
         Component: libfortran
          Assignee: unassigned at gcc dot gnu.org
          Reporter: keith.marshall at mailinator dot com
  Target Milestone: ---

Created attachment 36013
  --> https://gcc.gnu.org/bugzilla/attachment.cgi?id=36013&action=edit
Kludge to work around issue for mingw32

When building GCC, with FORTRAN language support, for mingw32 with the
mingwrt-3.21+ runtime library from MinGW.org installed, the build fails in
libgfortran/io/unix.c, because the tempfile_open() function gratuitously
assumes that, if HAVE_MKSTEMP is defined, then it must invoke:

  mode_mask = umask (S_IXUSR | S_IRWXG | S_IRWXO);

regardless of whether or not those access mode flags are defined.  Of course,
the assumption is invalid: while S_IXUSR may have some semblance of meaning on
a windows host, and is defined, S_IRWXG and S_IRWXO are meaningless, and are
not.

Now, I can kludge around this, with the attached patch, but I suspect that it
doesn't represent a true solution.


             reply	other threads:[~2015-07-19 15:14 UTC|newest]

Thread overview: 22+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2015-07-19 15:14 keith.marshall at mailinator dot com [this message]
2015-07-19 15:44 ` [Bug libfortran/66936] " kargl at gcc dot gnu.org
2015-07-19 17:29 ` keith.marshall at mailinator dot com
2015-07-19 18:05 ` sgk at troutmask dot apl.washington.edu
2015-07-19 18:05 ` kargl at gcc dot gnu.org
2015-07-19 19:52 ` [Bug libfortran/66936] io/unix.c gratuitously uses S_IRWXG and S_IRWXO on the basis that umask() " kargl at gcc dot gnu.org
2015-07-19 20:50 ` keith.marshall at mailinator dot com
2015-07-19 21:04 ` keith.marshall at mailinator dot com
2015-07-19 21:42 ` kargl at gcc dot gnu.org
2015-07-19 22:17 ` keith.marshall at mailinator dot com
2015-07-20  9:19 ` pinskia at gcc dot gnu.org
2015-07-20 15:26 ` keith.marshall at mailinator dot com
2015-08-06 16:57 ` fxcoudert at gcc dot gnu.org
2015-08-06 18:11 ` sgk at troutmask dot apl.washington.edu
2015-08-06 18:14 ` fxcoudert at gcc dot gnu.org
2015-08-09  8:53 ` fxcoudert at gcc dot gnu.org
2015-08-09 16:02 ` sgk at troutmask dot apl.washington.edu
2015-08-09 16:44 ` fxcoudert at gcc dot gnu.org
2015-08-09 16:47 ` fxcoudert at gcc dot gnu.org
2015-08-18 17:56 ` keith.marshall at mailinator dot com
2015-08-18 19:58 ` fxcoudert at gcc dot gnu.org
2015-08-18 20:03 ` fxcoudert at gcc dot gnu.org

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=bug-66936-4@http.gcc.gnu.org/bugzilla/ \
    --to=gcc-bugzilla@gcc.gnu.org \
    --cc=gcc-bugs@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).