qemu-devel.nongnu.org archive mirror
 help / color / mirror / Atom feed
* [PATCH 0/2] osdep: allow including qemu/osdep.h outside extern "C"
@ 2021-04-13 11:37 Paolo Bonzini
  2021-04-13 11:37 ` [PATCH 1/2] osdep: include glib-compat.h before other QEMU headers Paolo Bonzini
                   ` (3 more replies)
  0 siblings, 4 replies; 7+ messages in thread
From: Paolo Bonzini @ 2021-04-13 11:37 UTC (permalink / raw)
  To: qemu-devel; +Cc: peter.maydell, berrange

qemu/osdep.h is quite special in that, despite being part of QEMU sources,
it is included by C++ source files as well.

disas/nanomips.cpp is doing so within an 'extern "C"' block, which breaks
with latest glib due to the inclusion of templates in glib.h.

These patches implement Daniel Berrangé's idea of pushing the 'extern "C"'
block within glib.h and including system headers (including glib.h,
and in fact QEMU's own glib-compat.h too) *outside* the block.

(CI has not finished running yet, but it seems encouraging).

Paolo

Paolo Bonzini (2):
  osdep: include glib-compat.h before other QEMU headers
  osdep: protect qemu/osdep.h with extern "C"

 disas/nanomips.cpp      |  2 +-
 include/qemu/compiler.h |  6 ++++++
 include/qemu/osdep.h    | 13 +++++++++++--
 3 files changed, 18 insertions(+), 3 deletions(-)

-- 
2.30.1



^ permalink raw reply	[flat|nested] 7+ messages in thread

end of thread, other threads:[~2021-04-15 17:32 UTC | newest]

Thread overview: 7+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2021-04-13 11:37 [PATCH 0/2] osdep: allow including qemu/osdep.h outside extern "C" Paolo Bonzini
2021-04-13 11:37 ` [PATCH 1/2] osdep: include glib-compat.h before other QEMU headers Paolo Bonzini
2021-04-13 11:37 ` [PATCH 2/2] osdep: protect qemu/osdep.h with extern "C" Paolo Bonzini
2021-04-13 12:00   ` Peter Maydell
2021-04-13 11:48 ` [PATCH 0/2] osdep: allow including qemu/osdep.h outside " no-reply
2021-04-13 15:58 ` Philippe Mathieu-Daudé
2021-04-15 16:21   ` Aleksandar Rikalo

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).