https://gcc.gnu.org/bugzilla/show_bug.cgi?id=66936
Francois-Xavier Coudert <fxcoudert at gcc dot gnu.org> changed: What |Removed |Added ---------------------------------------------------------------------------- Status|UNCONFIRMED |NEW Last reconfirmed| |2015-08-06 CC| |fxcoudert at gcc dot gnu.org Assignee|unassigned at gcc dot gnu.org |fxcoudert at gcc dot gnu.org Ever confirmed|0 |1 --- Comment #11 from Francois-Xavier Coudert <fxcoudert at gcc dot gnu.org> --- What I do not understand is how this didn't show up before now, since the relevant libgfortran code was committed in 2012, and the mingw-w64 project has been providing gfortran builds throughout this time. Other than that, I would simply suggest we don't use umask() on mingw targets (no need to make useless system calls): Index: io/unix.c =================================================================== --- io/unix.c (revision 226632) +++ io/unix.c (working copy) @@ -1083,6 +1083,14 @@ set_close_on_exec (int fd __attribute__ } +/* On mingw, we don't use umask in the function below, because it + doesn't support the user/group/other-based permissions. */ + +#ifdef __MINGW32__ +#undef HAVE_UMASK +#endif + + /* Helper function for tempfile(). Tries to open a temporary file in the directory specified by tempdir. If successful, the file name is stored in fname and the descriptor returned. Returns -1 on Can someone (Keith?) actually confirm that this restores the build on mingw32? (It should, but double-checking never hurts.)