[Qemu-block] [PATCH v2] build: Work around SIZE_MAX bug in OSX headers

2016-10-10 Thread Eric Blake
C99 requires SIZE_MAX to be declared with the same type as the integral promotion of size_t, but OSX mistakenly defines it as an 'unsigned long long' expression even though size_t is only 'unsigned long'. Rather than futzing around with whether size_t is 32- or 64-bits wide (which would be needed

Re: [Qemu-block] [PATCH v2] build: Work around SIZE_MAX bug in OSX headers

2016-10-10 Thread Peter Maydell
On 10 October 2016 at 15:38, Eric Blake wrote: > C99 requires SIZE_MAX to be declared with the same type as the > integral promotion of size_t, but OSX mistakenly defines it as > an 'unsigned long long' expression even though size_t is only > 'unsigned long'. Rather than futzing around with wheth

Re: [Qemu-block] [PATCH v2] build: Work around SIZE_MAX bug in OSX headers

2016-10-10 Thread Eric Blake
On 10/10/2016 10:12 AM, Peter Maydell wrote: >> v2: rewrite into a configure check (not sure if directly adding a >> -D to QEMU_CFLAGS is the best, so advice welcome) > > Writing into config-host.mak would be preferable I think. > Okay, attempted in v4. >> I lack easy access to a Mac box, so t

Re: [Qemu-block] [PATCH v2] build: Work around SIZE_MAX bug in OSX headers

2016-10-10 Thread Eric Blake
On 10/10/2016 01:38 PM, Eric Blake wrote: > On 10/10/2016 10:12 AM, Peter Maydell wrote: > >>> v2: rewrite into a configure check (not sure if directly adding a >>> -D to QEMU_CFLAGS is the best, so advice welcome) >> >> Writing into config-host.mak would be preferable I think. >> > > Okay, attem