All of lore.kernel.org
 help / color / mirror / Atom feed
From: Peter Maydell <peter.maydell@linaro.org>
To: qemu-devel@nongnu.org
Cc: Paolo Bonzini <pbonzini@redhat.com>,
	"Daniel P. Berrange" <berrange@redhat.com>
Subject: [PATCH for-6.0? 0/6] extern "C" overhaul for C++ files
Date: Fri, 16 Apr 2021 14:55:37 +0100	[thread overview]
Message-ID: <20210416135543.20382-1-peter.maydell@linaro.org> (raw)

Hi; this patchseries is:
 (1) a respin of Paolo's patches, with the review issue Dan
     noticed fixed (ie handle arm-a64.cc too)
 (2) a copy of my "osdep.h: Move system includes to top" patch
 (3) some new patches which try to more comprehensively address
     the extern "C" issue

I've marked this "for-6.0?", but more specifically:
 * I think patches 1 and 2 should go in if we do an rc4
   (and maybe we should do an rc4 given various things that
   have appeared that aren't individually rc4-worthy)
 * patches 3-6 are definitely 6.1 material

We have 2 C++ files in the tree which need to include QEMU
headers: disas/arm-a64.cc and disas/nanomips.cpp. These
include only osdep.h and dis-asm.h, so it is sufficient to
extern-C-ify those two files only.

I'm not wildly enthusiastic about this because it's pretty
invasive (and needs extending if we ever find we need to
include further headers from C++), but it seems to be what
C++ forces upon us...

Patches 1, 2 and 3 have been reviewed (I kept Dan's r-by on
patch 1 since the change to it is just fixing the thing he
noticed). Further review, and opinions on the 6.0-ness, whether
we should do an rc4, etc, appreciated.

thanks
-- PMM

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

Peter Maydell (4):
  include/qemu/osdep.h: Move system includes to top
  osdep: Make os-win32.h and os-posix.h handle 'extern "C"' themselves
  include/qemu/bswap.h: Handle being included outside extern "C" block
  include/disas/dis-asm.h: Handle being included outside 'extern "C"'

 include/disas/dis-asm.h   | 12 ++++++++++--
 include/qemu/bswap.h      | 26 ++++++++++++++++++++++----
 include/qemu/compiler.h   |  6 ++++++
 include/qemu/osdep.h      | 34 +++++++++++++++++++++++++++-------
 include/sysemu/os-posix.h |  8 ++++++++
 include/sysemu/os-win32.h |  8 ++++++++
 disas/arm-a64.cc          |  2 --
 disas/nanomips.cpp        |  2 --
 8 files changed, 81 insertions(+), 17 deletions(-)

-- 
2.20.1



             reply	other threads:[~2021-04-16 13:56 UTC|newest]

Thread overview: 21+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2021-04-16 13:55 Peter Maydell [this message]
2021-04-16 13:55 ` [PATCH for-6.0? 1/6] osdep: include glib-compat.h before other QEMU headers Peter Maydell
2021-04-16 17:16   ` Richard Henderson
2021-04-16 13:55 ` [PATCH for-6.0? 2/6] osdep: protect qemu/osdep.h with extern "C" Peter Maydell
2021-04-16 17:17   ` Richard Henderson
2021-04-16 13:55 ` [PATCH for-6.0? 3/6] include/qemu/osdep.h: Move system includes to top Peter Maydell
2021-04-16 17:17   ` Richard Henderson
2021-04-16 13:55 ` [PATCH for-6.0? 4/6] osdep: Make os-win32.h and os-posix.h handle 'extern "C"' themselves Peter Maydell
2021-04-16 16:25   ` Paolo Bonzini
2021-04-16 16:25     ` Peter Maydell
2021-04-16 17:17   ` Richard Henderson
2021-04-16 13:55 ` [PATCH for-6.0? 5/6] include/qemu/bswap.h: Handle being included outside extern "C" block Peter Maydell
2021-04-16 17:18   ` Richard Henderson
2021-04-16 13:55 ` [PATCH for-6.0? 6/6] include/disas/dis-asm.h: Handle being included outside 'extern "C"' Peter Maydell
2021-04-16 17:18   ` Richard Henderson
2021-04-16 14:03 ` [PATCH for-6.0? 0/6] extern "C" overhaul for C++ files no-reply
2021-04-16 14:56 ` Philippe Mathieu-Daudé
2021-04-16 16:28 ` Paolo Bonzini
2021-04-16 17:07   ` Peter Maydell
2021-04-16 18:31     ` Paolo Bonzini
2021-05-04 10:43 ` Peter Maydell

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=20210416135543.20382-1-peter.maydell@linaro.org \
    --to=peter.maydell@linaro.org \
    --cc=berrange@redhat.com \
    --cc=pbonzini@redhat.com \
    --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.