This is the mail archive of the
gcc-patches@gcc.gnu.org
mailing list for the GCC project.
Re: [PATCH, fortran] PR 53379 Backtrace on error termination
- From: David Edelsohn <dje dot gcc at gmail dot com>
- To: FX <fxcoudert at gmail dot com>
- Cc: GCC Patches <gcc-patches at gcc dot gnu dot org>, Fortran List <fortran at gcc dot gnu dot org>, Janne Blomqvist <blomqvist dot janne at gmail dot com>, Ian Lance Taylor <ian at airs dot com>
- Date: Tue, 8 Sep 2015 09:53:54 -0400
- Subject: Re: [PATCH, fortran] PR 53379 Backtrace on error termination
- Authentication-results: sourceware.org; auth=none
- References: <CAGWvnymArrXV9uWhkLBow6Di8_WaZP_w3fO-kf3cwbg6nWr8=A at mail dot gmail dot com> <5474EA6F-E6C0-4FA0-B299-C0D9558D6ACB at gmail dot com> <CAGWvny==F7BJ3SfiJQzaUcL3E0nvjOSe+LmRSkLYyhBUc_Lcsg at mail dot gmail dot com> <CAGWvnynRJVQUrpJfBvjkiF_vx2HQY01uOZNQvEP2kVqbtc=rMw at mail dot gmail dot com> <9A070869-B851-4D20-A4E3-3D4D9746A6E3 at gmail dot com>
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