From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from mailman by lists.gnu.org with archive (Exim 4.43) id 1LfDFp-0007DN-AA for mharc-grub-devel@gnu.org; Thu, 05 Mar 2009 08:04:49 -0500 Received: from mailman by lists.gnu.org with tmda-scanned (Exim 4.43) id 1LfDFn-0007Bw-6i for grub-devel@gnu.org; Thu, 05 Mar 2009 08:04:47 -0500 Received: from exim by lists.gnu.org with spam-scanned (Exim 4.43) id 1LfDFm-0007Bk-I9 for grub-devel@gnu.org; Thu, 05 Mar 2009 08:04:46 -0500 Received: from [199.232.76.173] (port=39287 helo=monty-python.gnu.org) by lists.gnu.org with esmtp (Exim 4.43) id 1LfDFm-0007Bh-Dh for grub-devel@gnu.org; Thu, 05 Mar 2009 08:04:46 -0500 Received: from arnold.marlboro.edu ([206.192.68.78]:59690) by monty-python.gnu.org with esmtp (Exim 4.60) (envelope-from ) id 1LfDFl-0003i4-SQ for grub-devel@gnu.org; Thu, 05 Mar 2009 08:04:46 -0500 Received: from akbar.marlboro.edu (akbar.marlboro.edu [10.1.2.5]) by arnold.marlboro.edu (Postfix) with ESMTP id 221ED178063 for ; Thu, 5 Mar 2009 08:04:16 -0500 (EST) Received: from xyz.marlboro.edu (xyz.marlboro.edu [10.1.2.29]) by akbar.marlboro.edu (Postfix) with ESMTP id 1471411E55B for ; Thu, 5 Mar 2009 08:04:16 -0500 (EST) Received: from east.localnet (mdhcp5-98.marlboro.edu [10.1.5.98]) by xyz.marlboro.edu (Postfix) with ESMTP id 39B0F3AC114 for ; Thu, 5 Mar 2009 08:04:09 -0500 (EST) From: Isaac Dupree To: grub-devel@gnu.org Date: Thu, 5 Mar 2009 08:04:07 -0500 User-Agent: KMail/1.10.4 (Linux/2.6.27-11-generic; KDE/4.1.4; x86_64; ; ) References: <49AE6756.10404@nic.fi> <1236182302.31907.11.camel@localhost> <20090304.130223.202852927.davem@davemloft.net> In-Reply-To: <20090304.130223.202852927.davem@davemloft.net> MIME-Version: 1.0 Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: 7bit Content-Disposition: inline Message-Id: <200903050804.07474.ml@isaac.cedarswampstudios.org> X-Marlboro-MailScanner-Information: Please contact techsupport@marlboro.edu for more information X-Marlboro-MailScanner: Found to be clean, clean X-Marlboro-Information: Please contact techsupport@marlboro.edu for more information X-Marlboro-MailScanner-ID: 221ED178063.782BC X-Marlboro-SpamCheck: not spam (whitelisted), SpamAssassin (not cached, score=-4.399, required 6, autolearn=disabled, ALL_TRUSTED -1.80, BAYES_00 -2.60) X-Marlboro-MailScanner-From: ml@isaac.cedarswampstudios.org X-Marlboro-MailScanner-Watermark: 1236863056.66295@mdD1kYM0D19n3WbbDxVeig X-detected-operating-system: by monty-python.gnu.org: GNU/Linux 2.6, seldom 2.4 (older, 4) 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: Thu, 05 Mar 2009 13:04:47 -0000 David Miller wrote: > "unsigned long" is always safe because it is going to be > the largest natural word size on the machine, at least > as large as a pointer will be. er... C standard doesn't guarantee this, and I think that Windows in fact has 32-bit longs on machines with 64-bit pointers > 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) -Isaac