This is the mail archive of the gcc-bugs@gcc.gnu.org mailing list for the GCC project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

[Bug libfortran/66936] io/unix.c gratuitously uses S_IRWXG and S_IRWXO on the basis that umask() is available


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

--- Comment #10 from Keith Marshall <keith.marshall at mailinator dot com> ---
(In reply to Andrew Pinski from comment #9)
> Well it is a libgfortran bug yes.

Which, being pedantic, makes it a GCC bug, because libgfortran is a component
of GCC.

>  What we could do add to io/unix.c:
> #if MINGW && !defined(S_IRWXG)
> #define S_IRWXG 0
> #endif
> #if MINGW && !defined(S_IRWXO)
> #define S_IRWXO 0
> #endif
> 
> And that will allow it to work correctly.

Conceptually, yes; you'd actually need to test on __MINGW32__, or maybe even
more generically on _WIN32, rather than on (nonexistent) MINGW.  However, that
seems every bit as much of a kludge as my own work-around.  Realistically,
calling umask() in this context on native windows would seem to be completely
redundant anyway; I can't see how it will actually achieve anything, since all
it will do will be to reproduce the already existing state, at the time of the
call.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]