aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rwxr-xr-xconfigure12
-rw-r--r--qemu-common.h9
2 files changed, 9 insertions, 12 deletions
diff --git a/configure b/configure
index d9dde969d..9ae85bec4 100755
--- a/configure
+++ b/configure
@@ -1291,17 +1291,6 @@ esac
fi
-# host long bits test, actually a pointer size test
-cat > $TMPC << EOF
-int sizeof_pointer_is_8[sizeof(void *) == 8 ? 1 : -1];
-EOF
-if compile_object; then
-hostlongbits=64
-else
-hostlongbits=32
-fi
-
-
##########################################
# NPTL probe
@@ -2988,7 +2977,6 @@ fi
if test "$bigendian" = "yes" ; then
echo "HOST_WORDS_BIGENDIAN=y" >> $config_host_mak
fi
-echo "HOST_LONG_BITS=$hostlongbits" >> $config_host_mak
if test "$mingw32" = "yes" ; then
echo "CONFIG_WIN32=y" >> $config_host_mak
rc_version=`cat $source_path/VERSION`
diff --git a/qemu-common.h b/qemu-common.h
index c5e9cad35..dbfce6f4c 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 {