qemu-e2k/include/qemu
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
..
acl.h Clean up ill-advised or unusual header guards 2016-07-12 16:20:46 +02:00
atomic.h atomic.h: comment on use of atomic_read/set 2016-10-04 10:00:25 +02:00
base64.h Clean up ill-advised or unusual header guards 2016-07-12 16:20:46 +02:00
bcd.h Clean up decorations and whitespace around header guards 2016-07-12 16:20:46 +02:00
bitmap.h bitmap: refine and move BITMAP_{FIRST/LAST}_WORD_MASK 2016-10-08 11:25:29 +03:00
bitops.h bitops: Add MAKE_64BIT_MASK macro 2016-07-04 13:15:22 +01:00
bswap.h bswap.h: Document cpu_to_* and *_to_cpu conversion functions 2016-07-12 15:08:53 +01:00
buffer.h Clean up ill-advised or unusual header guards 2016-07-12 16:20:46 +02:00
compatfd.h
compiler.h compiler: Swap 'public domain' header for license 2016-09-27 11:57:29 +02:00
config-file.h Clean up header guards that don't match their file name 2016-07-12 16:19:16 +02:00
coroutine_int.h coroutine: add a macro for the coroutine stack size 2016-09-29 14:13:39 +02:00
coroutine.h coroutine: add qemu_coroutine_entered() function 2016-09-28 17:11:23 +01:00
crc32c.h
cutils.h cutils: Add test for buffer_is_zero 2016-09-13 19:13:32 +02:00
envlist.h
error-report.h Clean up header guards that don't match their file name 2016-07-12 16:19:16 +02:00
event_notifier.h event-notifier: Add "is_external" parameter 2016-04-22 16:43:56 +02:00
fifo8.h Clean up header guards that don't match their file name 2016-07-12 16:19:16 +02:00
fifo32.h hw: Clean up includes 2016-06-07 18:19:23 +03:00
fprintf-fn.h Clean up decorations and whitespace around header guards 2016-07-12 16:20:46 +02:00
hbitmap.h Clean up decorations and whitespace around header guards 2016-07-12 16:20:46 +02:00
help_option.h Clean up decorations and whitespace around header guards 2016-07-12 16:20:46 +02:00
host-utils.h Clean up decorations and whitespace around header guards 2016-07-12 16:20:46 +02:00
id.h Clean up decorations and whitespace around header guards 2016-07-12 16:20:46 +02:00
int128.h
iov.h include/qemu/iov.h: Don't include qemu-common.h 2016-03-22 22:20:16 +01:00
jhash.h Jhash: add linux kernel jhashtable in qemu 2016-09-27 17:54:21 +08:00
log.h tcg: Lower indirect registers in a separate pass 2016-08-05 21:44:40 +05:30
main-loop.h coroutine: move entry argument to qemu_coroutine_create 2016-07-13 13:26:02 +02:00
memfd.h
mmap-alloc.h Clean up ill-advised or unusual header guards 2016-07-12 16:20:46 +02:00
module.h blockdev: Add dynamic module loading for block drivers 2016-09-20 22:12:03 +02:00
notify.h
option_int.h Clean up header guards that don't match their file name 2016-07-12 16:19:16 +02:00
option.h Clean up header guards that don't match their file name 2016-07-12 16:19:16 +02:00
osdep.h build: Work around SIZE_MAX bug in OSX headers 2016-10-11 19:22:20 +01:00
path.h Clean up decorations and whitespace around header guards 2016-07-12 16:20:46 +02:00
processor.h include/processor.h: define cpu_relax() 2016-06-11 23:10:17 +00:00
qdist.h clean-includes: run it once more 2016-06-16 18:39:03 +02:00
qht.h util/qht: Document memory ordering assumptions 2016-08-02 12:03:58 +02:00
queue.h qtail: clean up direct access to tqe_prev field 2016-09-13 19:08:41 +02:00
range.h range: Replace internal representation of Range 2016-07-04 16:49:33 +03:00
ratelimit.h Improve block job rate limiting for small bandwidth values 2016-07-13 13:41:38 +02:00
rcu_queue.h Clean up decorations and whitespace around header guards 2016-07-12 16:20:46 +02:00
rcu.h all: Remove unnecessary glib.h includes 2016-06-07 18:19:24 +03:00
readline.h Clean up decorations and whitespace around header guards 2016-07-12 16:20:46 +02:00
rfifolock.h
seqlock.h seqlock: use atomic writes for the sequence 2016-10-04 10:00:26 +02:00
sockets.h util: Drop inet_listen() 2016-08-02 12:03:58 +02:00
thread-posix.h Clean up ill-advised or unusual header guards 2016-07-12 16:20:46 +02:00
thread-win32.h Clean up ill-advised or unusual header guards 2016-07-12 16:20:46 +02:00
thread.h Clean up ill-advised or unusual header guards 2016-07-12 16:20:46 +02:00
throttle.h
timed-average.h
timer.h * minor patches here and there 2016-09-15 10:24:22 +01:00
typedefs.h migration: delete QEMUSizedBuffer struct 2016-05-26 11:31:58 +05:30
unicode.h Clean up decorations and whitespace around header guards 2016-07-12 16:20:46 +02:00
uri.h Remove unused function declarations 2016-09-15 15:32:22 +03:00
uuid.h vl: Switch qemu_uuid to QemuUUID 2016-09-23 11:42:52 +08:00
xattr.h