From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 6752 invoked by alias); 20 Apr 2012 07:21:23 -0000 Received: (qmail 6742 invoked by uid 22791); 20 Apr 2012 07:21:21 -0000 X-SWARE-Spam-Status: No, hits=-6.3 required=5.0 tests=AWL,BAYES_00,KHOP_RCVD_UNTRUST,RCVD_IN_DNSWL_HI,RCVD_IN_HOSTKARMA_W,SPF_HELO_PASS,T_RP_MATCHES_RCVD X-Spam-Check-By: sourceware.org Received: from mx1.redhat.com (HELO mx1.redhat.com) (209.132.183.28) by sourceware.org (qpsmtpd/0.43rc1) with ESMTP; Fri, 20 Apr 2012 07:21:03 +0000 Received: from int-mx02.intmail.prod.int.phx2.redhat.com (int-mx02.intmail.prod.int.phx2.redhat.com [10.5.11.12]) by mx1.redhat.com (8.14.4/8.14.4) with ESMTP id q3K7L17Q026817 (version=TLSv1/SSLv3 cipher=DHE-RSA-AES256-SHA bits=256 verify=OK); Fri, 20 Apr 2012 03:21:01 -0400 Received: from host2.jankratochvil.net (ovpn-116-17.ams2.redhat.com [10.36.116.17]) by int-mx02.intmail.prod.int.phx2.redhat.com (8.13.8/8.13.8) with ESMTP id q3K7KuCZ028819 (version=TLSv1/SSLv3 cipher=DHE-RSA-AES128-SHA bits=128 verify=NO); Fri, 20 Apr 2012 03:20:59 -0400 Date: Fri, 20 Apr 2012 07:50:00 -0000 From: Jan Kratochvil To: Siddhesh Poyarekar Cc: Ulrich Weigand , Tom Tromey , gdb-patches@sourceware.org Subject: [obv] Fix python-2.4 compilation compat. [Re: [commit] [PATCH] Allow 64-bit enum values] Message-ID: <20120420072056.GA12991@host2.jankratochvil.net> References: <20120418065627.GA31851@host2.jankratochvil.net> <201204191638.q3JGc7YI008735@d06av02.portsmouth.uk.ibm.com> <20120420081720.4167fb93@spoyarek> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <20120420081720.4167fb93@spoyarek> User-Agent: Mutt/1.5.21 (2010-09-15) X-IsSubscribed: yes Mailing-List: contact gdb-patches-help@sourceware.org; run by ezmlm Precedence: bulk List-Id: List-Subscribe: List-Archive: List-Post: List-Help: , Sender: gdb-patches-owner@sourceware.org X-SW-Source: 2012-04/txt/msg00661.txt.bz2 On Fri, 20 Apr 2012 04:47:20 +0200, Siddhesh Poyarekar wrote: > On Thu, 19 Apr 2012 18:38:07 +0200 (CEST), Ulrich wrote: > > This causes a build failure for me due to: > > py-type.c: In function 'convert_field': > > py-type.c:186: warning: passing argument 2 of > > 'PyObject_SetAttrString' discards qualifiers from pointer target type [...] > I think you should be able to patch that header safely. GDB Python is kept compatible backwards to python-2.4 (although testsuite is lacking that compatibility). At least Red Hat even needs that compatibility for RHEL-5. Added CentOS-5 (and CentOS-6) for the automatic nightly regression testing of CVS HEAD. Checked in. I do not think autoconf-checking is worth this case. Thanks, Jan http://sourceware.org/ml/gdb-cvs/2012-04/msg00163.html --- src/gdb/ChangeLog 2012/04/19 20:18:22 1.14140 +++ src/gdb/ChangeLog 2012/04/20 07:17:53 1.14141 @@ -1,3 +1,9 @@ +2012-04-20 Jan Kratochvil + + Fix compilation compatibility with python-2.4 + * python/py-type.c (convert_field): Cast ADDRSTRING for + PyObject_SetAttrString as non-const. New comment. + 2012-04-19 Tom Tromey * top.c (quit_target): Use all_cleanups. --- src/gdb/python/py-type.c 2012/04/18 06:46:46 1.37 +++ src/gdb/python/py-type.c 2012/04/20 07:17:58 1.38 @@ -183,7 +183,8 @@ if (!arg) goto fail; - if (PyObject_SetAttrString (result, attrstring, arg) < 0) + /* At least python-2.4 had the second parameter non-const. */ + if (PyObject_SetAttrString (result, (char *) attrstring, arg) < 0) goto failarg; }