qemu-devel.nongnu.org archive mirror
 help / color / mirror / Atom feed
* [PATCH for-6.0? 0/6] extern "C" overhaul for C++ files
@ 2021-04-16 13:55 Peter Maydell
  2021-04-16 13:55 ` [PATCH for-6.0? 1/6] osdep: include glib-compat.h before other QEMU headers Peter Maydell
                   ` (9 more replies)
  0 siblings, 10 replies; 21+ messages in thread
From: Peter Maydell @ 2021-04-16 13:55 UTC (permalink / raw)
  To: qemu-devel; +Cc: Paolo Bonzini, Daniel P. Berrange

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



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

end of thread, other threads:[~2021-05-04 10:46 UTC | newest]

Thread overview: 21+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2021-04-16 13:55 [PATCH for-6.0? 0/6] extern "C" overhaul for C++ files Peter Maydell
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

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).