From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 14880 invoked by alias); 23 Nov 2010 03:25:57 -0000 Received: (qmail 14845 invoked by uid 22791); 23 Nov 2010 03:25:56 -0000 X-SWARE-Spam-Status: No, hits=-6.2 required=5.0 tests=AWL,BAYES_00,RCVD_IN_DNSWL_HI,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; Tue, 23 Nov 2010 03:25:50 +0000 Received: from int-mx11.intmail.prod.int.phx2.redhat.com (int-mx11.intmail.prod.int.phx2.redhat.com [10.5.11.24]) by mx1.redhat.com (8.13.8/8.13.8) with ESMTP id oAN3Pb72012287 (version=TLSv1/SSLv3 cipher=DHE-RSA-AES256-SHA bits=256 verify=OK); Mon, 22 Nov 2010 22:25:37 -0500 Received: from host0.dyn.jankratochvil.net (ovpn01.gateway.prod.ext.phx2.redhat.com [10.5.9.1]) by int-mx11.intmail.prod.int.phx2.redhat.com (8.14.4/8.14.4) with ESMTP id oAN3PWgx015556 (version=TLSv1/SSLv3 cipher=DHE-RSA-AES256-SHA bits=256 verify=NO); Mon, 22 Nov 2010 22:25:37 -0500 Received: from host0.dyn.jankratochvil.net (localhost.localdomain [127.0.0.1]) by host0.dyn.jankratochvil.net (8.14.4/8.14.4) with ESMTP id oAN3PV2E021255; Tue, 23 Nov 2010 04:25:31 +0100 Received: (from jkratoch@localhost) by host0.dyn.jankratochvil.net (8.14.4/8.14.4/Submit) id oAN3PVI0021254; Tue, 23 Nov 2010 04:25:31 +0100 Date: Tue, 23 Nov 2010 03:25:00 -0000 From: Jan Kratochvil To: Joel Brobecker Cc: gdb-patches@sourceware.org Subject: Re: [RFA/Python] Fix procfs.c build failure on 32bit solaris (_FILE_OFFSET_BITS) Message-ID: <20101123032531.GA21016@host0.dyn.jankratochvil.net> References: <1290474834-1945-1-git-send-email-brobecker@adacore.com> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <1290474834-1945-1-git-send-email-brobecker@adacore.com> 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: 2010-11/txt/msg00342.txt.bz2 On Tue, 23 Nov 2010 02:13:54 +0100, Joel Brobecker wrote: > +#ifdef _FILE_OFFSET_BITS > +#define OLD_FILE_OFFSET_BITS _FILE_OFFSET_BITS > #undef _FILE_OFFSET_BITS > +#endif > > #if HAVE_LIBPYTHON2_4 > #include "python2.4/Python.h" > @@ -62,6 +69,13 @@ typedef int Py_ssize_t; > #error "Unable to find usable Python.h" > #endif > > +/* Restore the original _FILE_OFFSET_BITS value if applicable. */ > +#ifdef OLD_FILE_OFFSET_BITS > +#undef _FILE_OFFSET_BITS > +#define _FILE_OFFSET_BITS OLD_FILE_OFFSET_BITS > +#undef OLD_FILE_OFFSET_BITS > +#endif > + Without any comments on the Solaris specifics such saving of macro content cannot work. cpp macros expand only during their final use, not as right hand side of a #define line. _FILE_OFFSET_BITS will have content `OLD_FILE_OFFSET_BITS' at the end, if it had any content in the beginning. Regards, Jan