From patchwork Thu Jul 7 12:10:04 2016 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Paolo Bonzini X-Patchwork-Id: 9218833 Return-Path: Received: from mail.wl.linuxfoundation.org (pdx-wl-mail.web.codeaurora.org [172.30.200.125]) by pdx-korg-patchwork.web.codeaurora.org (Postfix) with ESMTP id 351AC60467 for ; Thu, 7 Jul 2016 12:10:33 +0000 (UTC) Received: from mail.wl.linuxfoundation.org (localhost [127.0.0.1]) by mail.wl.linuxfoundation.org (Postfix) with ESMTP id 26745288C4 for ; Thu, 7 Jul 2016 12:10:33 +0000 (UTC) Received: by mail.wl.linuxfoundation.org (Postfix, from userid 486) id 19DF6288C6; Thu, 7 Jul 2016 12:10:33 +0000 (UTC) X-Spam-Checker-Version: SpamAssassin 3.3.1 (2010-03-16) on pdx-wl-mail.web.codeaurora.org X-Spam-Level: X-Spam-Status: No, score=-6.8 required=2.0 tests=BAYES_00,DKIM_SIGNED, RCVD_IN_DNSWL_HI,T_DKIM_INVALID autolearn=ham version=3.3.1 Received: from lists.gnu.org (lists.gnu.org [208.118.235.17]) (using TLSv1 with cipher AES256-SHA (256/256 bits)) (No client certificate requested) by mail.wl.linuxfoundation.org (Postfix) with ESMTPS id 78B4E288C5 for ; Thu, 7 Jul 2016 12:10:32 +0000 (UTC) Received: from localhost ([::1]:39446 helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1bL88V-0004yJ-9z for patchwork-qemu-devel@patchwork.kernel.org; Thu, 07 Jul 2016 08:10:31 -0400 Received: from eggs.gnu.org ([2001:4830:134:3::10]:41523) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1bL88D-0004yC-4Q for qemu-devel@nongnu.org; Thu, 07 Jul 2016 08:10:14 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1bL888-0005Wi-UE for qemu-devel@nongnu.org; Thu, 07 Jul 2016 08:10:12 -0400 Received: from mail-wm0-x244.google.com ([2a00:1450:400c:c09::244]:35257) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1bL888-0005WT-Ni for qemu-devel@nongnu.org; Thu, 07 Jul 2016 08:10:08 -0400 Received: by mail-wm0-x244.google.com with SMTP id a66so4983724wme.2 for ; Thu, 07 Jul 2016 05:10:08 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20120113; h=sender:from:to:cc:subject:date:message-id; bh=f14l/CGoIBJo7uFQ65q8YijlucqJZf9jm2vtazJvIHU=; b=TW6k7rrGltMgyENQ55BUh2IAs0fA6RbJOgfPrjELS6hurcrMhbGstiZCEXZH2zuO3k LC8IaW1OaWnbwglO3+fuWc0MkwUKJ+tvARo6/IF6vUuqDk81TOMzboiWIixo7Z1J5rY7 fgLYxZMnHSphM3lA8T4DEAaobyS4oBfs+u/xACYk9wHiXP+Tc3sRbah12vfptv0uFdfz kiGYs4/dB1jmzBDGMcuM6Cmht71b2XuuIhJg2AhKNO9qanFPoeQbFkptwknYHOTewavC JXxx+Ywqv4QaaycAvWX9rKdJDpezsL7Db0JcmC82JGP0P5it98W0HNn6iz0Bi25up7FQ oU/Q== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20130820; h=x-gm-message-state:sender:from:to:cc:subject:date:message-id; bh=f14l/CGoIBJo7uFQ65q8YijlucqJZf9jm2vtazJvIHU=; b=XeSGWT1oXv89iyN00PI/WlxcDZNAkhNChKvX7f+4vkEV3C0q7UOiutFrf6eoIUg2Zu ZRfzzz7R/ZcoGmEQDx63LnueZFeNjqhEuBHFi+mLThXK1uM8cfTnyOe12qlrrN31UwGd wr9TjZo3FpR54CcuzLjnsY/NNTYmbZHj2PPkASfSbDMFxMZKIIvh91OgHb7kDc+U8UA2 NvMks1UYBb7JjrypK4uo3AuFXE3s+LV6E2d/sQOMBI89MG4DnZ5C2/URghlp16gHIxIN 8C+mXoUNZ+q/HZLeUku7PPv6y8kS0y27VAMXJ0H5QQp4FcQ78SlQa2dLfTyBR9mweU0/ qMJA== X-Gm-Message-State: ALyK8tIfSaC1D1rtyW/jfrxRGfOL8pA3juJxNgHP15o8svgdsi8vDqK12OIGZ3cV6OR3eA== X-Received: by 10.28.148.21 with SMTP id w21mr277350wmd.9.1467893408125; Thu, 07 Jul 2016 05:10:08 -0700 (PDT) Received: from donizetti.lan (94-39-188-118.adsl-ull.clienti.tiscali.it. [94.39.188.118]) by smtp.gmail.com with ESMTPSA id l1sm3633391wjy.17.2016.07.07.05.10.06 (version=TLS1_2 cipher=ECDHE-RSA-AES128-GCM-SHA256 bits=128/128); Thu, 07 Jul 2016 05:10:06 -0700 (PDT) From: Paolo Bonzini To: qemu-devel@nongnu.org Date: Thu, 7 Jul 2016 14:10:04 +0200 Message-Id: <1467893404-10521-1-git-send-email-pbonzini@redhat.com> X-Mailer: git-send-email 2.7.4 X-detected-operating-system: by eggs.gnu.org: GNU/Linux 2.2.x-3.x [generic] X-Received-From: 2a00:1450:400c:c09::244 Subject: [Qemu-devel] [PATCH] disas: avoid including everything in headers compiled from C++ X-BeenThere: qemu-devel@nongnu.org X-Mailman-Version: 2.1.21 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Cc: Peter Maydell , sbruno@freebsd.org, Markus Armbruster Errors-To: qemu-devel-bounces+patchwork-qemu-devel=patchwork.kernel.org@nongnu.org Sender: "Qemu-devel" X-Virus-Scanned: ClamAV using ClamSMTP 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 Reviewed-by: Markus Armbruster --- 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;