[patch] fix fortran regressions on FreeBSD10.0/11.0
Jakub Jelinek
jakub@redhat.com
Tue Dec 17 06:52:00 GMT 2013
On Tue, Dec 17, 2013 at 06:19:43AM +0100, Andreas Tobler wrote:
> The below patch allows me to get back to normal, means zero unexpected
> fails, on FreeBSD. The patch has been tested on Linux/x86 as well, no
> regressions.
On Linux, mkostemp performs on flags:
(flags & ~O_ACCMODE) | O_RDWR | O_CREAT | O_EXCL
before passing it to open(2), so the patch makes no real change on Linux.
> 2013-12-17 Andreas Tobler <andreast@gcc.gnu.org>
>
> * io/unix.c (tempfile_open): Only use the needed flag O_CLOEXEC.
>
>
> Index: io/unix.c
> ===================================================================
> --- io/unix.c (revision 206039)
> +++ io/unix.c (working copy)
> @@ -1124,7 +1124,7 @@
> #endif
>
> #if defined(HAVE_MKOSTEMP) && defined(O_CLOEXEC)
> - fd = mkostemp (template, O_RDWR | O_CREAT | O_EXCL | O_CLOEXEC);
> + fd = mkostemp (template, O_CLOEXEC);
> #else
> fd = mkstemp (template);
> set_close_on_exec (fd);
Jakub
More information about the Fortran
mailing list