From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from mailman by lists.gnu.org with archive (Exim 4.43) id 1LetUJ-0001qG-Ll for mharc-grub-devel@gnu.org; Wed, 04 Mar 2009 10:58:27 -0500 Received: from mailman by lists.gnu.org with tmda-scanned (Exim 4.43) id 1LetUH-0001pa-JN for grub-devel@gnu.org; Wed, 04 Mar 2009 10:58:25 -0500 Received: from exim by lists.gnu.org with spam-scanned (Exim 4.43) id 1LetUF-0001oB-VZ for grub-devel@gnu.org; Wed, 04 Mar 2009 10:58:25 -0500 Received: from [199.232.76.173] (port=55981 helo=monty-python.gnu.org) by lists.gnu.org with esmtp (Exim 4.43) id 1LetUF-0001o5-RV for grub-devel@gnu.org; Wed, 04 Mar 2009 10:58:23 -0500 Received: from fg-out-1718.google.com ([72.14.220.154]:27420) by monty-python.gnu.org with esmtp (Exim 4.60) (envelope-from ) id 1LetUF-0001RB-6m for grub-devel@gnu.org; Wed, 04 Mar 2009 10:58:23 -0500 Received: by fg-out-1718.google.com with SMTP id l27so243557fgb.30 for ; Wed, 04 Mar 2009 07:58:21 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=gamma; h=domainkey-signature:received:received:subject:from:to:in-reply-to :references:content-type:date:message-id:mime-version:x-mailer; bh=zuzhMfy/q07JdPRsebPlaeXx4R8fwqWGnbatDnu07f0=; b=cpOI/uSrQ9ro/0kqBO+Kl5tUQnap1/5Ps6gZjrt33K4FemHZZSvgC/vLmqOoXZM3c5 0UcCjMWaVMNFh4fsYoEvg5iJ9S5TcxBsm3UAgRrgJq2ha1R616onKXqj376yKYfDt/ES IHw7BMjMhcrk2vecjeXMtYArbE/1ZdkCbGCJs= DomainKey-Signature: a=rsa-sha1; c=nofws; d=gmail.com; s=gamma; h=subject:from:to:in-reply-to:references:content-type:date:message-id :mime-version:x-mailer; b=pkmPiv2Kk5hgZisfu9eKETtktZjYMD5BiuX1odlZDDD9Rv5vwXsByAnTkkMeQfScxc 1hYzJGp8GzyXhozbGh7EWzOf17AXRsfIz8a6Y6EWi3jEu1K2JwUTOnI+4TJ+ZbdseQbP r5sdO0xbMD366dw9lKnE6tGoah+loyRylTfYs= Received: by 10.86.96.18 with SMTP id t18mr208654fgb.25.1236182301291; Wed, 04 Mar 2009 07:58:21 -0800 (PST) Received: from ?192.168.1.100? (213.37.137.93.dyn.user.ono.com [213.37.137.93]) by mx.google.com with ESMTPS id d6sm2052032fga.32.2009.03.04.07.58.20 (version=SSLv3 cipher=RC4-MD5); Wed, 04 Mar 2009 07:58:20 -0800 (PST) From: Javier =?ISO-8859-1?Q?Mart=EDn?= To: The development of GRUB 2 In-Reply-To: <20090304.033605.238092958.davem@davemloft.net> References: <20090303.181513.19285049.davem@davemloft.net> <49AE6756.10404@nic.fi> <20090304.033605.238092958.davem@davemloft.net> Content-Type: multipart/signed; micalg="pgp-sha1"; protocol="application/pgp-signature"; boundary="=-2lcx3zl8ZelC6S6LCLhn" Date: Wed, 04 Mar 2009 16:58:22 +0100 Message-Id: <1236182302.31907.11.camel@localhost> Mime-Version: 1.0 X-Mailer: Evolution 2.24.3 X-detected-operating-system: by monty-python.gnu.org: GNU/Linux 2.6 (newer, 2) 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: Wed, 04 Mar 2009 15:58:25 -0000 --=-2lcx3zl8ZelC6S6LCLhn Content-Type: text/plain; charset="UTF-8" Content-Transfer-Encoding: quoted-printable El mi=C3=A9, 04-03-2009 a las 03:36 -0800, David Miller escribi=C3=B3: > From: Vesa J=C3=A4=C3=A4skel=C3=A4inen > Date: Wed, 04 Mar 2009 13:34:46 +0200 >=20 > > David Miller wrote: > > > diff --git a/include/grub/sparc64/setjmp.h b/include/grub/sparc64/set= jmp.h > > > index 12d8e01..183a820 100644 > > > --- a/include/grub/sparc64/setjmp.h > > > +++ b/include/grub/sparc64/setjmp.h > > > @@ -19,8 +19,7 @@ > > > #ifndef GRUB_SETJMP_CPU_HEADER > > > #define GRUB_SETJMP_CPU_HEADER 1 > > > =20 > > > -/* FIXME (sparc64). */ > > > -typedef unsigned long grub_jmp_buf[20]; > > > +typedef unsigned long grub_jmp_buf[3]; > >=20 > > I assume unsigned long is 64bit in sparc? >=20 > Yes, for sparc64 long is always 64-bit, no exceptions. >=20 > > Would it be more practical to use grub_uint64_t? >=20 > This is a "sparc64" file, so I don't think so. Next month, or maybe next year, someone will need to fix some bug on sparc64 code without being sparc64-savvy, maybe because (like it's already happened) there are no sparc people available. That day people like Bean, Felix, Marco or Robert (to name just a few of the big gurus here) may have to decide between editing a sparc64 file or give up on maintaining the platform. That day it would be really good for them to visually know that "unsigned long" is 64-bit in sparc, instead of having to go see the docs. This is the real utility of typedefs (and the [u]intNN_t types from C99): if you statically _know_ that some variable is going to be 64 bits long because the _platform_ requires it, why not make it explicit? It will be easier for readers and maintainers. As an example of what this entails, the failure to think with the future in mind has extraordinarily hampered the 32->64 bit transition: many Windows apps (among them the Vorbis codecs!) had be nearly rewritten because they used "unsigned long" interchangeably with pointer types. I still wonder if it would have been so difficult to use "void*", and the proper types for pointer arithmetic. --=20 -- Lazy, Oblivious, Rational Disaster -- Habbit --=-2lcx3zl8ZelC6S6LCLhn Content-Type: application/pgp-signature; name="signature.asc" Content-Description: Esta parte del mensaje =?ISO-8859-1?Q?est=E1?= firmada digitalmente -----BEGIN PGP SIGNATURE----- Version: GnuPG v1.4.9 (GNU/Linux) iQIcBAABAgAGBQJJrqUaAAoJEKSl+Fbdeo72/WAP/1gyFdBgHmq8WG+i+GAd/w9f vlJe7AHmbeHPh+B8wlkpD2Pp2fQiGsZcQOI10qwiKjgff/biOJLxY5qbz/btQP6v j4SRltNNqOG8l2le7b5gDiMa86aSXRgN9LIX79aV2UUbVQ686m5/afnsUGdVjr83 jjXcoyfUTo4MRAsUUIaXpt0gVrEz8t+1cpCCZ6BeR2v8VwCycA5cuU6V+52l2oNV TViCXCIQSJVCdk5kyTDcNm5BYcdZD6fSbT9HTBVdZkxt4QJgLpqLVIcVjKVv0xIn JfBfvMb93G01GhABNRbkIBLVJLpv2QKbRhVXVTFBOVvCNHPmLMXKlAFv1EkHYQmF JD+G9Extm26akCMEAxHc5aWSzac0IniaohH66HgsZiLQmKFjmejuxeLVTPSEx9cE C20y8sK1pi+48Tx8MoVX5Mb+axzrZyUrr7NcHMA29skhl041UnPej5D9NycmU9zZ 5RrgoV8HbvCKIMq7YdozR6O37CJgXj5IKzbtablDgRBfaimeZdokMLM105i+A44B xdL3uxkqXJ9pyjFc3ewdehUpO+8in7MH9rsFMWsqMmVBBUA3VeIg12RtNw1mFxJN dXdKGJcQQ7/CbuPyuDFWh+6Gk5g/5mdzJGq2QXQj6LYX9LbDZliupBv9E/jjfGQB jpMg1GHFvKcaVGOQsXR1 =dGab -----END PGP SIGNATURE----- --=-2lcx3zl8ZelC6S6LCLhn--