aboutsummaryrefslogtreecommitdiff
path: root/include/exec
diff options
context:
space:
mode:
authorMartin Husemann <martin@duskware.de>2014-01-18 14:47:23 +0100
committerMichael Tokarev <mjt@tls.msk.ru>2014-02-01 13:42:38 +0400
commitdc9a353cf7de78b9fae3e46410803d487fd2fc8f (patch)
tree3db92ecd8faaae0a62088652a5c915bb55aec24b /include/exec
parent89e4a51ca9546a7bbe1998c4e3d4a3ac3a0c19be (diff)
qemu 1.7.0 does not build on NetBSD
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 <martin@NetBSD.org> Reviewed-by: Peter Maydell <peter.maydell@linaro.org> Reviewed-by: Andreas Färber <afaerber@suse.de> Signed-off-by: Michael Tokarev <mjt@tls.msk.ru>
Diffstat (limited to 'include/exec')
-rw-r--r--include/exec/softmmu_template.h5
1 files changed, 4 insertions, 1 deletions
diff --git a/include/exec/softmmu_template.h b/include/exec/softmmu_template.h
index c6a544069c..8712dcd091 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