From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from mailman by lists.gnu.org with archive (Exim 4.43) id 1LfkVO-00049H-Mr for mharc-grub-devel@gnu.org; Fri, 06 Mar 2009 19:35:06 -0500 Received: from mailman by lists.gnu.org with tmda-scanned (Exim 4.43) id 1LfkVM-000495-95 for grub-devel@gnu.org; Fri, 06 Mar 2009 19:35:04 -0500 Received: from exim by lists.gnu.org with spam-scanned (Exim 4.43) id 1LfkVL-00048r-Id for grub-devel@gnu.org; Fri, 06 Mar 2009 19:35:03 -0500 Received: from [199.232.76.173] (port=40045 helo=monty-python.gnu.org) by lists.gnu.org with esmtp (Exim 4.43) id 1LfkVL-00048n-FW for grub-devel@gnu.org; Fri, 06 Mar 2009 19:35:03 -0500 Received: from [74.93.104.97] (port=53941 helo=sunset.davemloft.net) by monty-python.gnu.org with esmtp (Exim 4.60) (envelope-from ) id 1LfkVK-00028W-Sn for grub-devel@gnu.org; Fri, 06 Mar 2009 19:35:03 -0500 Received: from localhost (localhost [127.0.0.1]) by sunset.davemloft.net (Postfix) with ESMTP id 06775C8D940; Fri, 6 Mar 2009 16:34:47 -0800 (PST) Date: Fri, 06 Mar 2009 16:34:47 -0800 (PST) Message-Id: <20090306.163447.210911687.davem@davemloft.net> To: grub-devel@gnu.org, rmh@aybabtu.com From: David Miller In-Reply-To: <20090306185553.GA28703@thorin> References: <20090304.130223.202852927.davem@davemloft.net> <200903050804.07474.ml@isaac.cedarswampstudios.org> <20090306185553.GA28703@thorin> X-Mailer: Mew version 6.1 on Emacs 22.1 / Mule 5.0 (SAKAKI) Mime-Version: 1.0 Content-Type: Text/Plain; charset=us-ascii Content-Transfer-Encoding: 7bit X-detected-operating-system: by monty-python.gnu.org: GNU/Linux 2.6 (newer, 3) Cc: Subject: Re: [PATCH 1/7]: Fix sparc64 setjmp implementation. X-BeenThere: grub-devel@gnu.org X-Mailman-Version: 2.1.5 Precedence: list Reply-To: The development of GRUB 2 List-Id: The development of GRUB 2 List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sat, 07 Mar 2009 00:35:05 -0000 From: Robert Millan Date: Fri, 6 Mar 2009 19:55:53 +0100 > On Thu, Mar 05, 2009 at 08:04:07AM -0500, Isaac Dupree wrote: > > > We've been using "unsigned long" for storing virtual addresses in the > > > Linux kernel for 10+ years and it works just fine. :-) > > > > and Linux kernel uses GCC compiler in precise ways > > > > I believe that ptrdiff_t is the proper standardized type for an integer the > > size of a pointer. except... it's always signed :-) > > > > Can you just use pointer types and pointer arithmetic? > > > > also, standards aside, a common way to get such a type, is "configure" script > > testing various possibilities like "unsigned long" and "unsigned long long" > > and seeing which one is the right size for the target architecture. (not sure > > if that works when cross-compiling though) > > I think we're already using longs this way in quite a few places. It's not > such a big deal IMHO. And ironically enough, using "unsigned long" would allow us to share this header with any future 32-bit sparc GRUB support.