All of lore.kernel.org
 help / color / mirror / Atom feed
From: Paolo Bonzini <pbonzini@redhat.com>
To: qemu-devel@nongnu.org
Cc: peter.maydell@linaro.org, berrange@redhat.com
Subject: [PATCH 0/2] osdep: allow including qemu/osdep.h outside extern "C"
Date: Tue, 13 Apr 2021 13:37:39 +0200	[thread overview]
Message-ID: <20210413113741.214867-1-pbonzini@redhat.com> (raw)

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



             reply	other threads:[~2021-04-13 11:41 UTC|newest]

Thread overview: 7+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2021-04-13 11:37 Paolo Bonzini [this message]
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

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=20210413113741.214867-1-pbonzini@redhat.com \
    --to=pbonzini@redhat.com \
    --cc=berrange@redhat.com \
    --cc=peter.maydell@linaro.org \
    --cc=qemu-devel@nongnu.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.