diff options
author | Peter Maydell <peter.maydell@linaro.org> | 2021-04-17 20:47:32 +0100 |
---|---|---|
committer | Peter Maydell <peter.maydell@linaro.org> | 2021-04-17 20:47:32 +0100 |
commit | 0c5393a1349a72013b577dae0e1b8c9a20d277f4 (patch) | |
tree | 5dd627ea9786e61a81d531a22e437ac6254d562c /include | |
parent | 8fe9f1f891eff4e37f82622b7480ee748bf4af74 (diff) | |
parent | 277aed998ac2cd3649bf0e13b22f47769519eb61 (diff) | |
download | qemu-0c5393a1349a72013b577dae0e1b8c9a20d277f4.zip qemu-0c5393a1349a72013b577dae0e1b8c9a20d277f4.tar.gz qemu-0c5393a1349a72013b577dae0e1b8c9a20d277f4.tar.bz2 |
Merge remote-tracking branch 'remotes/pmaydell/tags/pull-target-arm-20210417' into staging
Fixes for rc4:
* Fix compile failures of C++ files with new glib headers
* mps3-an547: Use correct Cortex-M55 CPU and don't disable its FPU
* accel/tcg: Fix assertion failure executing from non-RAM with -icount
# gpg: Signature made Sat 17 Apr 2021 20:39:58 BST
# gpg: using RSA key E1A5C593CD419DE28E8315CF3C2525ED14360CDE
# gpg: issuer "peter.maydell@linaro.org"
# gpg: Good signature from "Peter Maydell <peter.maydell@linaro.org>" [ultimate]
# gpg: aka "Peter Maydell <pmaydell@gmail.com>" [ultimate]
# gpg: aka "Peter Maydell <pmaydell@chiark.greenend.org.uk>" [ultimate]
# Primary key fingerprint: E1A5 C593 CD41 9DE2 8E83 15CF 3C25 25ED 1436 0CDE
* remotes/pmaydell/tags/pull-target-arm-20210417:
accel/tcg: avoid re-translating one-shot instructions
target/arm: drop CF_LAST_IO/dc->condjump check
hw/arm/armsse: Make SSE-300 use Cortex-M55
hw/arm/armsse: Give SSE-300 its own Property array
include/qemu/osdep.h: Move system includes to top
osdep: protect qemu/osdep.h with extern "C"
osdep: include glib-compat.h before other QEMU headers
Signed-off-by: Peter Maydell <peter.maydell@linaro.org>
Diffstat (limited to 'include')
-rw-r--r-- | include/qemu/compiler.h | 6 | ||||
-rw-r--r-- | include/qemu/osdep.h | 38 |
2 files changed, 35 insertions, 9 deletions
diff --git a/include/qemu/compiler.h b/include/qemu/compiler.h index cf28bb2..091c452 100644 --- a/include/qemu/compiler.h +++ b/include/qemu/compiler.h @@ -11,6 +11,12 @@ #define QEMU_STATIC_ANALYSIS 1 #endif +#ifdef __cplusplus +#define QEMU_EXTERN_C extern "C" +#else +#define QEMU_EXTERN_C extern +#endif + #define QEMU_NORETURN __attribute__ ((__noreturn__)) #define QEMU_WARN_UNUSED_RESULT __attribute__((warn_unused_result)) diff --git a/include/qemu/osdep.h b/include/qemu/osdep.h index ba15be9..cb2a07e 100644 --- a/include/qemu/osdep.h +++ b/include/qemu/osdep.h @@ -57,7 +57,7 @@ #define daemon qemu_fake_daemon_function #include <stdlib.h> #undef daemon -extern int daemon(int, int); +QEMU_EXTERN_C int daemon(int, int); #endif #ifdef _WIN32 @@ -104,6 +104,15 @@ extern int daemon(int, int); #include <setjmp.h> #include <signal.h> +#ifdef CONFIG_IOVEC +#include <sys/uio.h> +#endif + +#if defined(__linux__) && defined(__sparc__) +/* The SPARC definition of QEMU_VMALLOC_ALIGN needs SHMLBA */ +#include <sys/shm.h> +#endif + #ifndef _WIN32 #include <sys/wait.h> #else @@ -111,6 +120,21 @@ extern int daemon(int, int); #define WEXITSTATUS(x) (x) #endif +#ifdef __APPLE__ +#include <AvailabilityMacros.h> +#endif + +/* + * This is somewhat like a system header; it must be outside any extern "C" + * block because it includes system headers itself, including glib.h, + * which will not compile if inside an extern "C" block. + */ +#include "glib-compat.h" + +#ifdef __cplusplus +extern "C" { +#endif + #ifdef _WIN32 #include "sysemu/os-win32.h" #endif @@ -119,11 +143,6 @@ extern int daemon(int, int); #include "sysemu/os-posix.h" #endif -#ifdef __APPLE__ -#include <AvailabilityMacros.h> -#endif - -#include "glib-compat.h" #include "qemu/typedefs.h" /* @@ -459,7 +478,6 @@ void qemu_anon_ram_free(void *ptr, size_t size); /* Use 1 MiB (segment size) alignment so gmap can be used by KVM. */ # define QEMU_VMALLOC_ALIGN (256 * 4096) #elif defined(__linux__) && defined(__sparc__) -#include <sys/shm.h> # define QEMU_VMALLOC_ALIGN MAX(qemu_real_host_page_size, SHMLBA) #else # define QEMU_VMALLOC_ALIGN qemu_real_host_page_size @@ -539,8 +557,6 @@ struct iovec { ssize_t readv(int fd, const struct iovec *iov, int iov_cnt); ssize_t writev(int fd, const struct iovec *iov, int iov_cnt); -#else -#include <sys/uio.h> #endif #ifdef _WIN32 @@ -722,4 +738,8 @@ static inline int platform_does_not_support_system(const char *command) } #endif /* !HAVE_SYSTEM_FUNCTION */ +#ifdef __cplusplus +} +#endif + #endif |