aboutsummaryrefslogtreecommitdiff
path: root/qemu-common.h
diff options
context:
space:
mode:
authorStefan Weil <sw@weilnetz.de>2012-02-01 21:04:13 +0100
committerStefan Weil <sw@weilnetz.de>2012-02-28 22:33:43 +0100
commitc0fd260e9da7e6e60ea6bf1b0198a804f147073f (patch)
tree925ae4c4e3d0d7224ab91af1d509daa6beb31060 /qemu-common.h
parent2ad5201c1e3d53fef14af1e9eb629c180b318d89 (diff)
Move definition of HOST_LONG_BITS to qemu-common.h
Like the related macro TCG_TARGET_LONG, HOST_LONG_BITS can be determined by the C preprocessor. It is also not used in Makefiles. So there is no need to calculate it in configure, and it can be defined in qemu-common.h. Signed-off-by: Stefan Weil <sw@weilnetz.de>
Diffstat (limited to 'qemu-common.h')
-rw-r--r--qemu-common.h9
1 files changed, 9 insertions, 0 deletions
diff --git a/qemu-common.h b/qemu-common.h
index c5e9cad35e..dbfce6f4c6 100644
--- a/qemu-common.h
+++ b/qemu-common.h
@@ -65,6 +65,15 @@ typedef struct Monitor Monitor;
#define TIME_MAX LONG_MAX
#endif
+/* HOST_LONG_BITS is the size of a native pointer in bits. */
+#if UINTPTR_MAX == UINT32_MAX
+# define HOST_LONG_BITS 32
+#elif UINTPTR_MAX == UINT64_MAX
+# define HOST_LONG_BITS 64
+#else
+# error Unknown pointer size
+#endif
+
#ifndef CONFIG_IOVEC
#define CONFIG_IOVEC
struct iovec {