From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from eggs.gnu.org ([2001:4830:134:3::10]:49017) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1bu1X8-00023u-Su for qemu-devel@nongnu.org; Tue, 11 Oct 2016 14:12:11 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1bu1X6-00010O-O8 for qemu-devel@nongnu.org; Tue, 11 Oct 2016 14:12:09 -0400 References: <8A105D2E-68C9-4DBD-BA28-E8D64EEFFB30@gmail.com> From: Eric Blake Message-ID: <5e3cd8b8-aa60-3082-8d8d-d86cb63740b0@redhat.com> Date: Tue, 11 Oct 2016 13:12:01 -0500 MIME-Version: 1.0 In-Reply-To: <8A105D2E-68C9-4DBD-BA28-E8D64EEFFB30@gmail.com> Content-Type: multipart/signed; micalg=pgp-sha256; protocol="application/pgp-signature"; boundary="2r0khVHFNdQfd2rv561tMMCvurR10RT31" Subject: Re: [Qemu-devel] [PATCH v5] build: Work around SIZE_MAX bug in OSX headers List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , To: Programmingkid Cc: qemu-devel qemu-devel , Qemu-block , Kevin Wolf , Markus Armbruster , Peter Maydell , ashijeetacharya@gmail.com This is an OpenPGP/MIME signed message (RFC 4880 and 3156) --2r0khVHFNdQfd2rv561tMMCvurR10RT31 From: Eric Blake To: Programmingkid Cc: qemu-devel qemu-devel , Qemu-block , Kevin Wolf , Markus Armbruster , Peter Maydell , ashijeetacharya@gmail.com Message-ID: <5e3cd8b8-aa60-3082-8d8d-d86cb63740b0@redhat.com> Subject: Re: [Qemu-devel] [PATCH v5] build: Work around SIZE_MAX bug in OSX headers References: <8A105D2E-68C9-4DBD-BA28-E8D64EEFFB30@gmail.com> In-Reply-To: <8A105D2E-68C9-4DBD-BA28-E8D64EEFFB30@gmail.com> Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: quoted-printable On 10/11/2016 01:03 PM, Programmingkid wrote: >> +/* Mac OSX has a bug that incorrectly defines SIZE_MAX wit= h >> + * the wrong type. Our replacement isn't usable in preprocessor >> + * expressions, but it is sufficient for our needs. */ >> +#if defined(HAVE_BROKEN_SIZE_MAX) && HAVE_BROKEN_SIZE_MAX >> +#undef SIZE_MAX >> +#define SIZE_MAX ((size_t)-1) >> +#endif >> + > I have applied your patch to the most recent git commit (627eae7d729277= c84f8e0ac07a8caab39c92c38d) on Mac OS 10.6.8. QEMU built without any pro= blems using gcc 4.9. Did you also tweak the code to make sure there was an instance of printf("%zu", SIZE_MAX) (or similar)? It's not enough that it compiles without complaint (although that helps), but also that the compiler-warning-on-printf goes away (which we currently don't have any in the tree, because we've been writing '"%zu", (size_t)SIZE_MAX' to work around the broken headers). >=20 > Reviewed-by: John Arbuckle >=20 --=20 Eric Blake eblake redhat com +1-919-301-3266 Libvirt virtualization library http://libvirt.org --2r0khVHFNdQfd2rv561tMMCvurR10RT31 Content-Type: application/pgp-signature; name="signature.asc" Content-Description: OpenPGP digital signature Content-Disposition: attachment; filename="signature.asc" -----BEGIN PGP SIGNATURE----- Version: GnuPG v2 Comment: Public key at http://people.redhat.com/eblake/eblake.gpg Comment: Using GnuPG with Thunderbird - http://www.enigmail.net/ iQEcBAEBCAAGBQJX/StxAAoJEKeha0olJ0NqpckIAKmK6RupGIC7HxKDZGnm4SAE GGIj61vE/AV+Zs1V6tNLc3QntU7d8HXQ8nZRGBuiYXZ2/PChUSJiPu0xv8wqSyeO S1q3U8TQM4jXWpfNAUsIdgrQUSHM3EWunUlcBGJ1EU8+j7AVu+f7Vc4Cj/KCArKQ SGgtM6MIUH4e4X5Wb9P1JHW4I7oZPgDMoM365u+LK3jOBZcbMYlPY/lW7l5LJE7R B1jDpQrQ5xjgoybOa+gIFP6vbuDcEerWqdaJKst4pEtEC81sKVXN6HMzrRu29I0P yzvbFBYeY/dUw5BZ++NzAAc2kmx8+RPwlEV+ktsXRPvUv/CKYd9HF9ZtPqk59Kc= =VuuA -----END PGP SIGNATURE----- --2r0khVHFNdQfd2rv561tMMCvurR10RT31--