From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 76484 invoked by alias); 21 Feb 2019 17:55:45 -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 76476 invoked by uid 89); 21 Feb 2019 17:55:45 -0000 Authentication-Results: sourceware.org; auth=none X-Spam-SWARE-Status: No, score=-1.4 required=5.0 tests=BAYES_00,KAM_NUMSUBJECT,RCVD_IN_DNSWL_NONE autolearn=no version=3.3.2 spammy=Hx-languages-length:1133, 2.4 X-HELO: mail-wr1-f47.google.com Received: from mail-wr1-f47.google.com (HELO mail-wr1-f47.google.com) (209.85.221.47) by sourceware.org (qpsmtpd/0.93/v0.84-503-g423c35a) with ESMTP; Thu, 21 Feb 2019 17:55:44 +0000 Received: by mail-wr1-f47.google.com with SMTP id q1so31601720wrp.7 for ; Thu, 21 Feb 2019 09:55:43 -0800 (PST) Return-Path: Received: from ?IPv6:2001:8a0:f913:f700:75e6:857f:3506:a1f4? ([2001:8a0:f913:f700:75e6:857f:3506:a1f4]) by smtp.gmail.com with ESMTPSA id v18sm23624946wrr.90.2019.02.21.09.55.40 (version=TLS1_2 cipher=ECDHE-RSA-AES128-GCM-SHA256 bits=128/128); Thu, 21 Feb 2019 09:55:41 -0800 (PST) Subject: Re: Proposal: Drop GDB support for Python versions < 2.6 To: Kevin Buettner , gdb@sourceware.org References: <20190220134506.13960235@f29-4.lan> From: Pedro Alves Message-ID: Date: Thu, 21 Feb 2019 17:55:00 -0000 User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:52.0) Gecko/20100101 Thunderbird/52.9.1 MIME-Version: 1.0 In-Reply-To: <20190220134506.13960235@f29-4.lan> Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 7bit X-SW-Source: 2019-02/txt/msg00048.txt.bz2 If we do this, it'd be good to go over gdb/python/python-internal.h and remove obsolete workarounds such as: ~~~ /* The second argument to PyObject_GetAttrString was missing the 'const' qualifier in Python-2.4. Hence, we wrap it in a function to avoid errors when compiled with -Werror. */ static inline PyObject * gdb_PyObject_GetAttrString (PyObject *obj, const char *attr) /* ARI: editCase function */ { return PyObject_GetAttrString (obj, (char *) attr); } #define PyObject_GetAttrString(obj, attr) gdb_PyObject_GetAttrString (obj, attr) ~~~ /* Python 2.4 doesn't include stdint.h soon enough to get {u,}intptr_t needed by pyport.h. */ /* /usr/include/features.h on linux systems will define _POSIX_C_SOURCE if it sees _GNU_SOURCE (which config.h will define). pyconfig.h defines _POSIX_C_SOURCE to a different value than /usr/include/features.h does causing compilation to fail. To work around this, undef _POSIX_C_SOURCE before we include Python.h. Same problem with _XOPEN_SOURCE. */ #undef _POSIX_C_SOURCE #undef _XOPEN_SOURCE ~~~ etc. Thanks, Pedro Alves