From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from eggs.gnu.org ([2001:4830:134:3::10]:58749) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1bL9DY-0003Z7-K7 for qemu-devel@nongnu.org; Thu, 07 Jul 2016 09:19:49 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1bL9DR-000482-Kb for qemu-devel@nongnu.org; Thu, 07 Jul 2016 09:19:47 -0400 Received: from mx1.redhat.com ([209.132.183.28]:32775) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1bL9DR-00047n-FD for qemu-devel@nongnu.org; Thu, 07 Jul 2016 09:19:41 -0400 From: Markus Armbruster References: <1467893404-10521-1-git-send-email-pbonzini@redhat.com> Date: Thu, 07 Jul 2016 15:19:38 +0200 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") Message-ID: <87furlmvpx.fsf@dusky.pond.sub.org> MIME-Version: 1.0 Content-Type: text/plain Subject: Re: [Qemu-devel] [PATCH] disas: avoid including everything in headers compiled from C++ List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , To: Paolo Bonzini Cc: qemu-devel@nongnu.org, Peter Maydell , sbruno@freebsd.org Paolo Bonzini 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 > Tested-by: Sean Bruno > Cc: Peter Maydell > Cc: Markus Armbruster > Signed-off-by: Paolo Bonzini > --- > 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