[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: [Qemu-devel] [PATCH] disas: avoid including everything in headers co
From: |
Markus Armbruster |
Subject: |
Re: [Qemu-devel] [PATCH] disas: avoid including everything in headers compiled from C++ |
Date: |
Thu, 07 Jul 2016 15:19:38 +0200 |
User-agent: |
Gnus/5.13 (Gnus v5.13) Emacs/24.5 (gnu/linux) |
Paolo Bonzini <address@hidden> 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 <address@hidden>
> Tested-by: Sean Bruno <address@hidden>
> Cc: Peter Maydell <address@hidden>
> Cc: Markus Armbruster <address@hidden>
> Signed-off-by: Paolo Bonzini <address@hidden>
> ---
> 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 <address@hidden>