qemu-e2k/include
Eric Blake 6b39b06339 build: Work around SIZE_MAX bug in OSX headers
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 if we cared about
using SIZE_T in a #if expression), just hard-code it with a cast.
This is not a strict C99-compliant definition, because it doesn't
work in the preprocessor, but if we later need that, the build
will break on Mac to inform us to improve our replacement at that
time.

See also https://patchwork.ozlabs.org/patch/542327/ for an
instance where the wrong type trips us up if we don't fix it
for good in osdep.h.

Some versions of glibc make a similar mistake with SSIZE_MAX; the
goal is that the approach of this patch could be copied to work
around that problem if it ever becomes important to us.

Signed-off-by: Eric Blake <eblake@redhat.com>
Reviewed-by: Markus Armbruster <armbru@redhat.com>
Message-id: 1476200784-17210-1-git-send-email-eblake@redhat.com
Reviewed-by: John Arbuckle <programmingkidx@gmail.com>
Tested-by: Peter Maydell <peter.maydell@linaro.org>
Signed-off-by: Peter Maydell <peter.maydell@linaro.org>
2016-10-11 19:22:20 +01:00
..
block async: add aio_bh_schedule_oneshot 2016-10-07 13:34:07 +02:00
crypto
disas
exec tcg: Make tb_flush() thread safe 2016-09-27 11:57:30 +02:00
fpu
hw virtio, pc: fixes and features 2016-10-10 16:23:40 +01:00
io
libdecnumber
migration
monitor
net
qapi
qemu build: Work around SIZE_MAX bug in OSX headers 2016-10-11 19:22:20 +01:00
qom cpus-common: lock-free fast path for cpu_exec_start/end 2016-09-27 11:57:30 +02:00
standard-headers
sysemu virtio, pc: fixes and features 2016-10-10 16:23:40 +01:00
ui spice/gl: render DisplaySurface via opengl 2016-09-28 12:49:36 +02:00
elf.h
glib-compat.h
qemu-common.h
qemu-io.h
trace-tcg.h
trace.h