public inbox for gcc-bugs@sourceware.org
help / color / mirror / Atom feed
* [Bug libfortran/66936] New: io/unix.c gratuitously uses S_IRWXG and S_IRWXO on the basis that mkstemp() is available
@ 2015-07-19 15:14 keith.marshall at mailinator dot com
  2015-07-19 15:44 ` [Bug libfortran/66936] " kargl at gcc dot gnu.org
                   ` (20 more replies)
  0 siblings, 21 replies; 22+ messages in thread
From: keith.marshall at mailinator dot com @ 2015-07-19 15:14 UTC (permalink / raw)
  To: gcc-bugs

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.


^ permalink raw reply	[flat|nested] 22+ messages in thread

end of thread, other threads:[~2015-08-18 20:03 UTC | newest]

Thread overview: 22+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2015-07-19 15:14 [Bug libfortran/66936] New: io/unix.c gratuitously uses S_IRWXG and S_IRWXO on the basis that mkstemp() is available keith.marshall at mailinator dot com
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 ` kargl at gcc dot gnu.org
2015-07-19 18:05 ` sgk at troutmask dot apl.washington.edu
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

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).