From: Markus Armbruster <armbru@redhat.com>
To: Paolo Bonzini <pbonzini@redhat.com>
Cc: qemu-devel@nongnu.org, Peter Maydell <peter.maydell@linaro.org>,
sbruno@freebsd.org
Subject: Re: [Qemu-devel] [PATCH] disas: avoid including everything in headers compiled from C++
Date: Thu, 07 Jul 2016 15:19:38 +0200 [thread overview]
Message-ID: <87furlmvpx.fsf@dusky.pond.sub.org> (raw)
In-Reply-To: <1467893404-10521-1-git-send-email-pbonzini@redhat.com> (Paolo Bonzini's message of "Thu, 7 Jul 2016 14:10:04 +0200")
Paolo Bonzini <pbonzini@redhat.com> writes:
> disas/arm-a64.cc is careful to include only the bare minimum that
> it needs---qemu/osdep.h and disas/bfd.h. Unfortunately, disas/bfd.h
> then includes qemu-common.h, which brings in qemu/option.h and from
> there we get the kitchen sink.
>
> This causes problems because for example QEMU's atomic macros
> conflict with C++ atomic types. But really all that bfd.h needs
> is the fprintf_function typedef, so replace the inclusion of
> qemu-common.h with qemu/fprintf-fn.h.
>
> Reported-by: Sean Bruno <sbruno@freebsd.org>
> Tested-by: Sean Bruno <sbruno@freebsd.org>
> Cc: Peter Maydell <peter.maydell@linaro.org>
> Cc: Markus Armbruster <armbru@redhat.com>
> Signed-off-by: Paolo Bonzini <pbonzini@redhat.com>
> ---
> include/disas/bfd.h | 2 +-
> 1 file changed, 1 insertion(+), 1 deletion(-)
>
> diff --git a/include/disas/bfd.h b/include/disas/bfd.h
> index a112e9c..a87b8a1 100644
> --- a/include/disas/bfd.h
> +++ b/include/disas/bfd.h
> @@ -9,7 +9,7 @@
> #ifndef DIS_ASM_H
> #define DIS_ASM_H
>
> -#include "qemu-common.h"
> +#include "qemu/fprintf-fn.h"
>
> typedef void *PTR;
> typedef uint64_t bfd_vma;
I'm sitting on a series that purges qemu-common.h from headers. It
makes the same change. I haven't posted it because I want to rebase it
onto the "make check-headers" series first. Anyway,
Reviewed-by: Markus Armbruster <armbru@redhat.com>
prev parent reply other threads:[~2016-07-07 13:19 UTC|newest]
Thread overview: 2+ messages / expand[flat|nested] mbox.gz Atom feed top
2016-07-07 12:10 [Qemu-devel] [PATCH] disas: avoid including everything in headers compiled from C++ Paolo Bonzini
2016-07-07 13:19 ` Markus Armbruster [this message]
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=87furlmvpx.fsf@dusky.pond.sub.org \
--to=armbru@redhat.com \
--cc=pbonzini@redhat.com \
--cc=peter.maydell@linaro.org \
--cc=qemu-devel@nongnu.org \
--cc=sbruno@freebsd.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.