]> git.proxmox.com Git - mirror_qemu.git/commitdiff
Move HOST_LONG_BITS to compiler.h
authorMarc-André Lureau <marcandre.lureau@redhat.com>
Thu, 24 Feb 2022 14:49:53 +0000 (18:49 +0400)
committerMarc-André Lureau <marcandre.lureau@redhat.com>
Tue, 22 Mar 2022 10:46:11 +0000 (14:46 +0400)
This will help to make common code independent.

Signed-off-by: Marc-André Lureau <marcandre.lureau@redhat.com>
Reviewed-by: Richard Henderson <richard.henderson@linaro.org>
Reviewed-by: Philippe Mathieu-Daudé <f4bug@amsat.org>
include/qemu/compiler.h
include/qemu/osdep.h

index 0a5e67fb970e361224014eae7b04f5de8c41a985..d9359859d4358f637c8fdd9baa5c14a13f8eaa1e 100644 (file)
@@ -7,6 +7,11 @@
 #ifndef COMPILER_H
 #define COMPILER_H
 
+#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
index 8b070dee21c4bd60c2cbebcd82b33a75c8bb3e42..9f06bf536fb108d80a50deace7201dfb6fcf0a78 100644 (file)
@@ -244,9 +244,6 @@ extern "C" {
 #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. */