qemu/disas
Paolo Bonzini 875df03b22 osdep: protect qemu/osdep.h with extern "C"
System headers may include templates if compiled with a C++ compiler,
which cause the compiler to complain if qemu/osdep.h is included
within a C++ source file's 'extern "C"' block.  Add
an 'extern "C"' block directly to qemu/osdep.h, so that
system headers can be kept out of it.

There is a stray declaration early in qemu/osdep.h, which needs
to be special cased.  Add a definition in qemu/compiler.h to
make it look nice.

config-host.h, CONFIG_TARGET, exec/poison.h and qemu/compiler.h
are included outside the 'extern "C"' block; that is not
an issue because they consist entirely of preprocessor directives.

This allows us to move the include of osdep.h in our two C++
source files outside the extern "C" block they were previously
using for it, which in turn means that they compile successfully
against newer versions of glib which insist that glib.h is
*not* inside an extern "C" block.

Signed-off-by: Paolo Bonzini <pbonzini@redhat.com>
Reviewed-by: Daniel P. Berrangé <berrange@redhat.com>
Acked-by: Paolo Bonzini <pbonzini@redhat.com>
Signed-off-by: Peter Maydell <peter.maydell@linaro.org>
Reviewed-by: Richard Henderson <richard.henderson@linaro.org>
Message-id: 20210416135543.20382-3-peter.maydell@linaro.org
[PMM: Moved disas/arm-a64.cc osdep.h include out of its extern "C" block;
 explained in commit message why we're doing this]
Signed-off-by: Peter Maydell <peter.maydell@linaro.org>
2021-04-17 18:44:30 +01:00
..
libvixl disas/libvixl: Fix fall-through annotation for GCC >= 7 2020-12-18 09:14:22 +01:00
alpha.c disas: Rename include/disas/bfd.h back to include/disas/dis-asm.h 2019-04-18 22:18:59 +02:00
arm-a64.cc osdep: protect qemu/osdep.h with extern "C" 2021-04-17 18:44:30 +01:00
arm.c disas: Rename include/disas/bfd.h back to include/disas/dis-asm.h 2019-04-18 22:18:59 +02:00
capstone.c disas: Push const down through host disassembly 2021-01-07 05:09:42 -10:00
cris.c cris: do not leak struct cris_disasm_data 2019-10-04 18:49:17 +02:00
hexagon.c Hexagon (disas) disassembler 2021-02-18 07:48:22 -08:00
hppa.c disas/: fix some comment spelling errors 2020-09-17 20:40:08 +02:00
i386.c Include qemu-common.h exactly where needed 2019-06-12 13:20:20 +02:00
lm32.c nomaintainer: Fix Lesser GPL version number 2020-11-15 17:04:40 +01:00
m68k.c disas/: fix some comment spelling errors 2020-09-17 20:40:08 +02:00
meson.build Hexagon (disas) disassembler 2021-02-18 07:48:22 -08:00
microblaze.c disas: Rename include/disas/bfd.h back to include/disas/dis-asm.h 2019-04-18 22:18:59 +02:00
mips.c target/mips: Add implementation of GINVT instruction 2020-01-29 19:28:52 +01:00
moxie.c disas: Rename include/disas/bfd.h back to include/disas/dis-asm.h 2019-04-18 22:18:59 +02:00
nanomips.cpp osdep: protect qemu/osdep.h with extern "C" 2021-04-17 18:44:30 +01:00
nanomips.h Clean up header guards that don't match their file name 2019-05-13 08:58:55 +02:00
nios2.c disas: Rename include/disas/bfd.h back to include/disas/dis-asm.h 2019-04-18 22:18:59 +02:00
ppc.c disas/: fix some comment spelling errors 2020-09-17 20:40:08 +02:00
riscv.c disas/riscv: Fix rdinstreth constraint 2019-06-27 02:47:04 -07:00
s390.c Include qemu-common.h exactly where needed 2019-06-12 13:20:20 +02:00
sh4.c disas/sh4: Add missing fallthrough annotations 2020-07-13 11:40:52 +02:00
sparc.c disas: Rename include/disas/bfd.h back to include/disas/dis-asm.h 2019-04-18 22:18:59 +02:00
xtensa.c disas: Rename include/disas/bfd.h back to include/disas/dis-asm.h 2019-04-18 22:18:59 +02:00