[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[Qemu-trivial] [PULL 1/7] qemu 1.7.0 does not build on NetBSD
From: |
Michael Tokarev |
Subject: |
[Qemu-trivial] [PULL 1/7] qemu 1.7.0 does not build on NetBSD |
Date: |
Sun, 2 Feb 2014 20:12:37 +0400 |
From: Martin Husemann <address@hidden>
Do not rely on int8_t (and friends) not being preprocessor
symbols (or symbols expanding to themselves). On NetBSD (for example) the
glue(u, SDATA_TYPE) results in u__int8_t, which is undefined. There is no way
to stop cpp expanding inner macros, so just add the few lines explicitly and
get rid of the magic.
Signed-off-by: Martin Husemann <address@hidden>
Reviewed-by: Peter Maydell <address@hidden>
Reviewed-by: Andreas Färber <address@hidden>
Signed-off-by: Michael Tokarev <address@hidden>
---
include/exec/softmmu_template.h | 5 ++++-
1 file changed, 4 insertions(+), 1 deletion(-)
diff --git a/include/exec/softmmu_template.h b/include/exec/softmmu_template.h
index c6a5440..8712dcd 100644
--- a/include/exec/softmmu_template.h
+++ b/include/exec/softmmu_template.h
@@ -30,23 +30,26 @@
#define SUFFIX q
#define LSUFFIX q
#define SDATA_TYPE int64_t
+#define DATA_TYPE uint64_t
#elif DATA_SIZE == 4
#define SUFFIX l
#define LSUFFIX l
#define SDATA_TYPE int32_t
+#define DATA_TYPE uint32_t
#elif DATA_SIZE == 2
#define SUFFIX w
#define LSUFFIX uw
#define SDATA_TYPE int16_t
+#define DATA_TYPE uint16_t
#elif DATA_SIZE == 1
#define SUFFIX b
#define LSUFFIX ub
#define SDATA_TYPE int8_t
+#define DATA_TYPE uint8_t
#else
#error unsupported data size
#endif
-#define DATA_TYPE glue(u, SDATA_TYPE)
/* For the benefit of TCG generated code, we want to avoid the complication
of ABI-specific return type promotion and always return a value extended
--
1.7.10.4
- [Qemu-trivial] [PULL 0/7] Trivial patches for 2014-02-02, Michael Tokarev, 2014/02/02
- [Qemu-trivial] [PULL 5/7] readline: Add missing GCC_FMT_ATTR, Michael Tokarev, 2014/02/02
- [Qemu-trivial] [PULL 2/7] osdep: drop unused #include "trace.h", Michael Tokarev, 2014/02/02
- [Qemu-trivial] [PULL 7/7] tests/.gitignore: Ignore tests/check-qom-interface, Michael Tokarev, 2014/02/02
- [Qemu-trivial] [PULL 4/7] tcg/s390: Remove sigill_handler, Michael Tokarev, 2014/02/02
- [Qemu-trivial] [PULL 1/7] qemu 1.7.0 does not build on NetBSD,
Michael Tokarev <=
- [Qemu-trivial] [PULL 6/7] hw/ppc: Remove unused defines, Michael Tokarev, 2014/02/02
- [Qemu-trivial] [PULL 3/7] i386: Add missing include file for QEMU_PACKED, Michael Tokarev, 2014/02/02
- Re: [Qemu-trivial] [Qemu-devel] [PULL 0/7] Trivial patches for 2014-02-02, Peter Maydell, 2014/02/05