qemu-devel.nongnu.org archive mirror
 help / color / mirror / Atom feed
From: Eric Blake <eblake@redhat.com>
To: Programmingkid <programmingkidx@gmail.com>
Cc: qemu-devel qemu-devel <qemu-devel@nongnu.org>,
	Qemu-block <qemu-block@nongnu.org>, Kevin Wolf <kwolf@redhat.com>,
	Markus Armbruster <armbru@redhat.com>,
	Peter Maydell <peter.maydell@linaro.org>,
	ashijeetacharya@gmail.com
Subject: Re: [Qemu-devel] [PATCH v5] build: Work around SIZE_MAX bug in OSX headers
Date: Tue, 11 Oct 2016 13:12:01 -0500	[thread overview]
Message-ID: <5e3cd8b8-aa60-3082-8d8d-d86cb63740b0@redhat.com> (raw)
In-Reply-To: <8A105D2E-68C9-4DBD-BA28-E8D64EEFFB30@gmail.com>

[-- Attachment #1: Type: text/plain, Size: 1118 bytes --]

On 10/11/2016 01:03 PM, Programmingkid wrote:

>> +/* Mac OSX has a <stdint.h> bug that incorrectly defines SIZE_MAX with
>> + * 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 (627eae7d729277c84f8e0ac07a8caab39c92c38d) on Mac  OS 10.6.8. QEMU built without any problems 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).

> 
> Reviewed-by: John Arbuckle <programmingkidx@gmail.com>
> 

-- 
Eric Blake   eblake redhat com    +1-919-301-3266
Libvirt virtualization library http://libvirt.org


[-- Attachment #2: OpenPGP digital signature --]
[-- Type: application/pgp-signature, Size: 604 bytes --]

  reply	other threads:[~2016-10-11 18:12 UTC|newest]

Thread overview: 6+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
     [not found] <mailman.183.1476201628.12210.qemu-devel@nongnu.org>
2016-10-11 18:03 ` [Qemu-devel] [PATCH v5] build: Work around SIZE_MAX bug in OSX headers Programmingkid
2016-10-11 18:12   ` Eric Blake [this message]
2016-10-11 18:23     ` Peter Maydell
2016-10-11 19:23     ` Programmingkid
2016-10-11 15:46 Eric Blake
2016-10-11 18:05 ` Markus Armbruster

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=5e3cd8b8-aa60-3082-8d8d-d86cb63740b0@redhat.com \
    --to=eblake@redhat.com \
    --cc=armbru@redhat.com \
    --cc=ashijeetacharya@gmail.com \
    --cc=kwolf@redhat.com \
    --cc=peter.maydell@linaro.org \
    --cc=programmingkidx@gmail.com \
    --cc=qemu-block@nongnu.org \
    --cc=qemu-devel@nongnu.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).