Received: from mailman by lists.gnu.org with archive (Exim 4.43) id 1MTc5L-000275-9g for mharc-grub-devel@gnu.org; Wed, 22 Jul 2009 09:42:19 -0400 Received: from mailman by lists.gnu.org with tmda-scanned (Exim 4.43) id 1MTc5K-00026h-3Q for grub-devel@gnu.org; Wed, 22 Jul 2009 09:42:18 -0400 Received: from exim by lists.gnu.org with spam-scanned (Exim 4.43) id 1MTc5F-00026L-A2 for grub-devel@gnu.org; Wed, 22 Jul 2009 09:42:17 -0400 Received: from [199.232.76.173] (port=38070 helo=monty-python.gnu.org) by lists.gnu.org with esmtp (Exim 4.43) id 1MTc5F-00026I-45 for grub-devel@gnu.org; Wed, 22 Jul 2009 09:42:13 -0400 Received: from mail-bw0-f223.google.com ([209.85.218.223]:44262) by monty-python.gnu.org with esmtp (Exim 4.60) (envelope-from ) id 1MTc5E-0004VI-JQ for grub-devel@gnu.org; Wed, 22 Jul 2009 09:42:12 -0400 Received: by bwz23 with SMTP id 23so108793bwz.42 for ; Wed, 22 Jul 2009 06:42:07 -0700 (PDT) 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=OeeHkh88nRmkOacyutMBztnnXJpq0HPALWexSN4Jl/k=; b=DAlI7t6sp+KF1HIMzJxGdVcB6GKLj6K3dqHIF+vHepcyfoJmMnxENRdGrgEOEvNGuI XXQufWJPdP86ZfxsYzqXxBfzS3vKtmcwS4aIe6mwN8b1gzPdzcRE/tilJt2pm+OgB2Wn XON4m14sm+FhYoZpIvxSsHv1odcaYIKg3vSkY= 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=dQGFY25Q8ktWdbQ4E/vc5DSdaXxarI/NZv2FSyLMb0DQ9VlLKavrBWVyelQ2XUDT6A Bl0EMr7hgGea0xa4gSK7Fk4acuqenSB9D8sUBGkjKwYNuLFqMms36m3OwXrVj1QWA2SQ lekMjManbuNCBr16RBjkkvjgHBccR01Vl2BXw= Received: by 10.103.165.5 with SMTP id s5mr351335muo.86.1248270126929; Wed, 22 Jul 2009 06:42:06 -0700 (PDT) Received: from ?192.168.1.100? (89.141.11.145.dyn.user.ono.com [89.141.11.145]) by mx.google.com with ESMTPS id y2sm1952583mug.46.2009.07.22.06.42.05 (version=SSLv3 cipher=RC4-MD5); Wed, 22 Jul 2009 06:42:05 -0700 (PDT) From: Javier =?ISO-8859-1?Q?Mart=EDn?= To: The development of GRUB 2 In-Reply-To: References: <4A627C5A.5070700@isaac.cedarswampstudios.org> <1248263254.10302.11.camel@accesodirecto.casa> Content-Type: multipart/signed; micalg="pgp-sha1"; protocol="application/pgp-signature"; boundary="=-mOGwPQer+y6Nr1e/D1bt" Date: Wed, 22 Jul 2009 15:42:08 +0200 Message-Id: <1248270128.10302.14.camel@accesodirecto.casa> Mime-Version: 1.0 X-Mailer: Evolution 2.26.1 X-detected-operating-system: by monty-python.gnu.org: GNU/Linux 2.6 (newer, 2) Subject: Re: [PATCH] New object format 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, 22 Jul 2009 13:42:18 -0000 --=-mOGwPQer+y6Nr1e/D1bt Content-Type: text/plain; charset="UTF-8" Content-Transfer-Encoding: quoted-printable El mi=C3=A9, 22-07-2009 a las 21:34 +0800, Bean escribi=C3=B3: > 2009/7/22 Javier Mart=C3=ADn : > > El mi=C3=A9, 22-07-2009 a las 19:12 +0800, Bean escribi=C3=B3: > >> Fix some wrong assumption in types.h and efi header files. For > >> example, grub_efi_uint_t is defined as unsigned long, but it should be > >> grub_uint64_t in 64-bit EFI, this problem won't show previously as > >> unsigned long is 64-bit in elf64 gcc, but it's 32-bit in mingw-w64 > >> gcc. > > I think you haven't corrected _all_ such assumptions. For example, in > > your grub/types.h: > > > > #if GRUB_CPU_SIZEOF_VOID_P =3D=3D 8 > > # define GRUB_ULONG_MAX 18446744073709551615UL > > # define GRUB_LONG_MAX 9223372036854775807L > > # define GRUB_LONG_MIN (-9223372036854775807L - 1) > > #else > > # define GRUB_ULONG_MAX 4294967295UL > > # define GRUB_LONG_MAX 2147483647L > > # define GRUB_LONG_MIN (-2147483647L - 1) > > #endif > > > > In mingw64, sizeof(void*) =3D 8, but ULONG_MAX =3D 2^32-1. > > grub/machine/types.h defines a GRUB_TARGET_SIZEOF_LONG that might be > > suitable for this. Or am I mixing "target" with "host"? >=20 > Hi, >=20 > Oh, thanks for the note. In fact, we can use GRUB_CPU_SIZEOF_LONG, > its value is GRUB_TARGET_SIZEOF_LONG when building target, and > SIZEOF_LONG when building utilities. Wonderful idea. I'm researching this for a possible implementation of a GRUB equivalent to the C99 fixed-length integers print specifiers like PRIx64. It would most likely go into , so I'm paying special attention to anyone working on that file. > As GRUB_CPU_SIZEOF_LONG doesn't necessary equal to > GRUB_CPU_SIZEOF_VOID_P. (It actually avoid this by generating an > #errror message when GRUB_CPU_SIZEOF_VOID_P !=3D GRUB_CPU_SIZEOF_LONG). I think you lost me here. This check is in the trunk GRUB, but not in your "lib" branch, and actually it would make it impossible to build on mingw64, where void* is 64-bit and long is 32-bit. --=20 -- Lazy, Oblivious, Recurrent Disaster -- Habbit --=-mOGwPQer+y6Nr1e/D1bt Content-Type: application/pgp-signature; name="signature.asc" Content-Description: Esto es una parte de mensaje firmado digitalmente -----BEGIN PGP SIGNATURE----- Version: GnuPG v1.4.9 (GNU/Linux) iQIcBAABAgAGBQJKZxcrAAoJEKSl+Fbdeo72vaIQAJAZsDAniiWbb13ynoTRhcmr O5secVViUqEQZw/j6+w1uVFEUf+jjWDtSXlF2nzgv3n2PFSQsQ30sk16mMqxBirG 0O6QVBmGdwpiuaPzxyXhRh6sgMIEEbo8U4UNf7GaK/NcmMY01Lv8DX/odFneNLmB qKAPHB0qBltZhBy7S+oAYJspygHami3mhB+/v9MZbJvejXOHHqddasp/EnTp83At A1nke0/I7DIPKNGxz1cgxUFhvbtfdnKltujDgKRAAAI3JEBo2jNEQj85zUugKABs LlkzTl7dtydrxTwaQfv9RilfbjwfqLBncQtgtLywDH9fOYaTZyQf0Wi5lChhojk+ W9p3vl18lu0+Tg69mOv7TH2BptqF79+tLxzMyonikiozdjXSmiQ7uIjkqllvRUxi lCjw1GkG8GAdPPEolGCmFWsO1X0IZIzC2jyRdHd3CRXqRws8O9NbPh1SmWhcfVaI jSL5jKeZSa4rMbR26GbjvJ7y0eJrfpzpIt0I5/zemppgdv52cHQK+w10JLR7LlBu tCZldxVnsLlh1Opg35olMw3PW9OwtD08BmH9Sc9+GkpRGqw9J/so7BG8/t5YHO/B o8HYRAg/XQAoIumvnt/F2ibpNK8FrcBZ6qclfGtG0rVjWyQCudnD8Fu+x7J2y/if LSqYzrpTmXnkzEe/ew3t =YdZk -----END PGP SIGNATURE----- --=-mOGwPQer+y6Nr1e/D1bt--