From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 49855 invoked by alias); 31 Aug 2016 23:41:15 -0000 Mailing-List: contact gdb-help@sourceware.org; run by ezmlm Precedence: bulk List-Id: List-Subscribe: List-Archive: List-Post: List-Help: , Sender: gdb-owner@sourceware.org Received: (qmail 49821 invoked by uid 89); 31 Aug 2016 23:41:10 -0000 Authentication-Results: sourceware.org; auth=none X-Virus-Found: No X-Spam-SWARE-Status: No, score=-1.8 required=5.0 tests=AWL,BAYES_00,RCVD_IN_DNSWL_NONE,SPF_PASS autolearn=ham version=3.3.2 spammy=Evans, Doug, Hx-languages-length:1185, territory X-HELO: rock.gnat.com Received: from rock.gnat.com (HELO rock.gnat.com) (205.232.38.15) by sourceware.org (qpsmtpd/0.93/v0.84-503-g423c35a) with ESMTP; Wed, 31 Aug 2016 23:41:09 +0000 Received: from localhost (localhost.localdomain [127.0.0.1]) by filtered-rock.gnat.com (Postfix) with ESMTP id 92CBF1171CE; Wed, 31 Aug 2016 19:41:07 -0400 (EDT) Received: from rock.gnat.com ([127.0.0.1]) by localhost (rock.gnat.com [127.0.0.1]) (amavisd-new, port 10024) with LMTP id XSWMpMI8rB0e; Wed, 31 Aug 2016 19:41:07 -0400 (EDT) Received: from joel.gnat.com (localhost.localdomain [127.0.0.1]) by rock.gnat.com (Postfix) with ESMTP id 4C6641171A5; Wed, 31 Aug 2016 19:41:07 -0400 (EDT) Received: by joel.gnat.com (Postfix, from userid 1000) id 9884B42318; Wed, 31 Aug 2016 16:41:05 -0700 (PDT) Date: Wed, 31 Aug 2016 23:41:00 -0000 From: Joel Brobecker To: David Edelsohn Cc: Andreas Schwab , "gdb@sourceware.org" Subject: Re: GDB Python extension on AIX Message-ID: <20160831234105.GG4538@adacore.com> References: <20160818072133.GB3037@adacore.com> <20160819054928.GB2983@adacore.com> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: User-Agent: Mutt/1.5.23 (2014-03-12) X-SW-Source: 2016-08/txt/msg00064.txt.bz2 > Would the appended patch be an acceptable approach? Sorry for the late reply (holidays and traveling). That would seem reasonable to me, but patches in the python/ subdir have traditionally been Tom and Doug's territory. My suggestion is to modify your comment about AIX to include the issue you've been describing in this email chain, to make it easier to remember why the workaround should not be applied on AIX, and then resubmit on gdb-patches, with Doug Evans in Cc:. > gdb/ > * python/python-internal.h: Don't redefine _POSIX_C_SOURCE and > _XOPEN_SOURCE on AIX. > > diff --git a/gdb/python/python-internal.h b/gdb/python/python-internal.h > index 8545c7b..6378ccc 100644 > --- a/gdb/python/python-internal.h > +++ b/gdb/python/python-internal.h > @@ -72,8 +72,12 @@ > To work around this, undef _POSIX_C_SOURCE before we include Python.h. > > Same problem with _XOPEN_SOURCE. */ > + > +/* A kludge to avoid overriding on AIX. */ > +#ifndef _AIX > #undef _POSIX_C_SOURCE > #undef _XOPEN_SOURCE > +#endif > > /* On sparc-solaris, /usr/include/sys/feature_tests.h defines > _FILE_OFFSET_BITS, which pyconfig.h also defines. Same work -- Joel