[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[PATCH 08/12] Move HOST_LONG_BITS to compiler.h
|
From: |
marcandre . lureau |
|
Subject: |
[PATCH 08/12] Move HOST_LONG_BITS to compiler.h |
|
Date: |
Thu, 24 Feb 2022 22:36:57 +0400 |
From: Marc-André Lureau <marcandre.lureau@redhat.com>
This will help to make common code independent.
Signed-off-by: Marc-André Lureau <marcandre.lureau@redhat.com>
---
include/qemu/compiler.h | 3 +++
include/qemu/osdep.h | 3 ---
2 files changed, 3 insertions(+), 3 deletions(-)
diff --git a/include/qemu/compiler.h b/include/qemu/compiler.h
index 8c7da00c56ba..553e49aac2ad 100644
--- a/include/qemu/compiler.h
+++ b/include/qemu/compiler.h
@@ -9,6 +9,9 @@
#define HOST_BIG_ENDIAN (__BYTE_ORDER__ == __ORDER_BIG_ENDIAN__)
+/* HOST_LONG_BITS is the size of a native pointer in bits. */
+#define HOST_LONG_BITS (__SIZEOF_POINTER__ * 8)
+
#if defined __clang_analyzer__ || defined __COVERITY__
#define QEMU_STATIC_ANALYSIS 1
#endif
diff --git a/include/qemu/osdep.h b/include/qemu/osdep.h
index cea7303c78a4..4711aad22803 100644
--- a/include/qemu/osdep.h
+++ b/include/qemu/osdep.h
@@ -260,9 +260,6 @@ G_NORETURN extern void QEMU_ERROR("code path is reachable")
#define TIME_MAX TYPE_MAXIMUM(time_t)
#endif
-/* HOST_LONG_BITS is the size of a native pointer in bits. */
-#define HOST_LONG_BITS (__SIZEOF_POINTER__ * 8)
-
/* Mac OSX has a <stdint.h> bug that incorrectly defines SIZE_MAX with
* the wrong type. Our replacement isn't usable in preprocessor
* expressions, but it is sufficient for our needs. */
--
2.35.1.273.ge6ebfd0e8cbb
- Re: [PATCH 04/12] compiler.h: replace QEMU_NORETURN with G_NORETURN, (continued)
- [PATCH 06/12] Replace config-time define HOST_WORDS_BIGENDIAN, marcandre . lureau, 2022/02/24
- [PATCH 09/12] scripts/modinfo-collect: remove unused/dead code, marcandre . lureau, 2022/02/24
- [PATCH 08/12] Move HOST_LONG_BITS to compiler.h,
marcandre . lureau <=
- [PATCH 11/12] util: remove the net/net.h dependency, marcandre . lureau, 2022/02/24
- [PATCH 07/12] Simplify HOST_LONG_BITS, marcandre . lureau, 2022/02/24
- [PATCH 10/12] util: remove needless includes, marcandre . lureau, 2022/02/24
- [PATCH 12/12] qapi: remove needless include, marcandre . lureau, 2022/02/24