From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 16489 invoked by alias); 8 Mar 2007 16:08:59 -0000 Received: (qmail 16481 invoked by uid 22791); 8 Mar 2007 16:08:59 -0000 X-Spam-Check-By: sourceware.org Received: from pentafluge.infradead.org (HELO pentafluge.infradead.org) (213.146.154.40) by sourceware.org (qpsmtpd/0.31) with ESMTP; Thu, 08 Mar 2007 16:08:55 +0000 Received: from hch by pentafluge.infradead.org with local (Exim 4.63 #1 (Red Hat Linux)) id 1HPLAi-0002mS-4B; Thu, 08 Mar 2007 16:08:52 +0000 Date: Thu, 08 Mar 2007 16:08:00 -0000 From: Christoph Hellwig To: Arjan van de Ven Cc: Christoph Hellwig , Roman Zippel , David Brown , Linux Kernel Mailing List , gdb@sourceware.org Subject: Re: PAGE_SIZE Availability Inconsistency Message-ID: <20070308160852.GB9916@infradead.org> Mail-Followup-To: Christoph Hellwig , Arjan van de Ven , Roman Zippel , David Brown , Linux Kernel Mailing List , gdb@sourceware.org References: <9c21eeae0703051555x1884fd7cse7968a71ec04eb27@mail.gmail.com> <20070306092917.GA5226@infradead.org> <200703080318.04631.zippel@linux-m68k.org> <20070308090031.GB7373@infradead.org> <1173369229.3550.2.camel@laptopd505.fenrus.org> Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <1173369229.3550.2.camel@laptopd505.fenrus.org> User-Agent: Mutt/1.4.2.2i X-SRS-Rewrite: SMTP reverse-path rewritten from by pentafluge.infradead.org See http://www.infradead.org/rpr.html 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 X-SW-Source: 2007-03/txt/msg00136.txt.bz2 On Thu, Mar 08, 2007 at 07:53:49AM -0800, Arjan van de Ven wrote: > > > > PAGE_SIZE should not be available at all. Please use getpagesize() > > > > instead. > > > > > > While I agree, NBPG is a bit of a problem, although it's only needed for aout > > > coredumps AFAICT, but still needed to compile e.g. gdb. > > > > So we should export this one with an arbitrary value (on multiple page > > size architectures) and a warning, maybe even an __deprecated attached to > > it. > > if we think the kernel should export this one, we could do > > #ifndef __KERNEL__ > #define PAGE_SIZE getpagesize() > #endif No, no no. We should never export PAGE_SIZE. We might export NBPG as deprecated symbol for gdb if it really needs it, but that should happen only on a.out systems, and it it should be a true constant, not depending on PAGE_SIZE. I've Cc'ed the gdb list on whether they have any comments on this issue.