From: Stefan Weil <sw@weilnetz.de>
To: Anthony Liguori <aliguori@us.ibm.com>
Cc: Stefan Weil <sw@weilnetz.de>, qemu-devel@nongnu.org
Subject: [Qemu-devel] [PATCH 15/15] Move definition of HOST_LONG_BITS to qemu-common.h
Date: Tue, 28 Feb 2012 22:47:17 +0100 [thread overview]
Message-ID: <1330465637-23410-16-git-send-email-sw@weilnetz.de> (raw)
In-Reply-To: <1330465637-23410-1-git-send-email-sw@weilnetz.de>
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>
---
configure | 12 ------------
qemu-common.h | 9 +++++++++
2 files changed, 9 insertions(+), 12 deletions(-)
diff --git a/configure b/configure
index d9dde96..9ae85be 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 c5e9cad..dbfce6f 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 {
--
1.7.9
next prev parent reply other threads:[~2012-02-28 21:48 UTC|newest]
Thread overview: 20+ messages / expand[flat|nested] mbox.gz Atom feed top
2012-02-28 21:47 [Qemu-devel] [PULL] Patch queue Stefan Weil
2012-02-28 21:47 ` [Qemu-devel] [PATCH 01/15] Remove macro HOST_LONG_SIZE Stefan Weil
2012-02-28 21:47 ` [Qemu-devel] [PATCH 02/15] target-alpha: Clean includes Stefan Weil
2012-02-28 21:47 ` [Qemu-devel] [PATCH 03/15] target-arm: " Stefan Weil
2012-02-28 21:47 ` [Qemu-devel] [PATCH 04/15] target-cris: " Stefan Weil
2012-02-28 21:47 ` [Qemu-devel] [PATCH 05/15] target-i386: " Stefan Weil
2012-02-28 21:47 ` [Qemu-devel] [PATCH 06/15] target-lm32: " Stefan Weil
2012-02-28 21:47 ` [Qemu-devel] [PATCH 07/15] target-m68k: " Stefan Weil
2012-02-28 21:47 ` [Qemu-devel] [PATCH 08/15] target-microblaze: " Stefan Weil
2012-02-28 21:47 ` [Qemu-devel] [PATCH 09/15] target-mips: " Stefan Weil
2012-02-28 23:51 ` Johnson, Eric
2012-02-29 5:58 ` Stefan Weil
2012-02-28 21:47 ` [Qemu-devel] [PATCH 10/15] target-ppc: " Stefan Weil
2012-02-28 21:47 ` [Qemu-devel] [PATCH 11/15] target-s390x: " Stefan Weil
2012-02-28 21:47 ` [Qemu-devel] [PATCH 12/15] target-sh4: " Stefan Weil
2012-02-28 21:47 ` [Qemu-devel] [PATCH 13/15] target-unicore32: " Stefan Weil
2012-02-28 21:47 ` [Qemu-devel] [PATCH 14/15] target-xtensa: " Stefan Weil
2012-02-28 21:47 ` Stefan Weil [this message]
2012-03-04 11:27 ` [Qemu-devel] [PULL] Patch queue Blue Swirl
-- strict thread matches above, loose matches on Subject: below --
2012-02-02 21:12 [Qemu-devel] [PATCH 00/15] Clean some includes and definitions Stefan Weil
2012-02-02 21:12 ` [Qemu-devel] [PATCH 15/15] Move definition of HOST_LONG_BITS to qemu-common.h Stefan Weil
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=1330465637-23410-16-git-send-email-sw@weilnetz.de \
--to=sw@weilnetz.de \
--cc=aliguori@us.ibm.com \
--cc=qemu-devel@nongnu.org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).