aboutsummaryrefslogtreecommitdiff
path: root/include
diff options
context:
space:
mode:
authorMarc-André Lureau <marcandre.lureau@redhat.com>2022-02-24 18:49:53 +0400
committerMarc-André Lureau <marcandre.lureau@redhat.com>2022-03-22 14:46:11 +0400
commit519655970ebeb7a0dfe5ad3c1d1dc17a02b7faa6 (patch)
tree8a5cdc91b99419aad95013a77515496accb20588 /include
parent77a19c6aa405e0d734faf60d77a5d293fa4716ca (diff)
downloadqemu-519655970ebeb7a0dfe5ad3c1d1dc17a02b7faa6.zip
qemu-519655970ebeb7a0dfe5ad3c1d1dc17a02b7faa6.tar.gz
qemu-519655970ebeb7a0dfe5ad3c1d1dc17a02b7faa6.tar.bz2
Move HOST_LONG_BITS to compiler.h
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>
Diffstat (limited to 'include')
-rw-r--r--include/qemu/compiler.h5
-rw-r--r--include/qemu/osdep.h3
2 files changed, 5 insertions, 3 deletions
diff --git a/include/qemu/compiler.h b/include/qemu/compiler.h
index 0a5e67f..d935985 100644
--- a/include/qemu/compiler.h
+++ b/include/qemu/compiler.h
@@ -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
diff --git a/include/qemu/osdep.h b/include/qemu/osdep.h
index 8b070de..9f06bf5 100644
--- a/include/qemu/osdep.h
+++ b/include/qemu/osdep.h
@@ -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. */