This is the mail archive of the gcc-patches@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]

Re: [PATCH, fortran] PR 53379 Backtrace on error termination


On Tue, Sep 8, 2015 at 9:51 AM, FX <fxcoudert@gmail.com> wrote:
>> #define _FCLOEXEC       0x0000001000000000L
>> #define O_CLOEXEC       _FCLOEXEC       /* sets FD_CLOEXEC on open      */
>
> Thatâs weird, and definitely an AIX bug: http://pubs.opengroup.org/onlinepubs/9699919799/functions/open.html

Welcome to AIX :-/

> How does that even work? open() takes int as second arg.

No one else uses it? ;-)

The following kluge works:

Index: posix.c
===================================================================
--- posix.c     (revision 227528)
+++ posix.c     (working copy)
@@ -45,6 +45,10 @@
 #define O_BINARY 0
 #endif

+#ifdef _AIX
+#undef O_CLOEXEC
+#endif
+
 #ifndef O_CLOEXEC
 #define O_CLOEXEC 0
 #endif

Thanks, David


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