From patchwork Tue Feb 9 15:25:07 2016 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Peter Maydell X-Patchwork-Id: 580896 Return-Path: X-Original-To: incoming@patchwork.ozlabs.org Delivered-To: patchwork-incoming@bilbo.ozlabs.org Received: from lists.gnu.org (lists.gnu.org [IPv6:2001:4830:134:3::11]) (using TLSv1 with cipher AES256-SHA (256/256 bits)) (No client certificate requested) by ozlabs.org (Postfix) with ESMTPS id 3C30214030C for ; Wed, 10 Feb 2016 02:27:04 +1100 (AEDT) Received: from localhost ([::1]:57037 helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1aTABy-0005ve-9w for incoming@patchwork.ozlabs.org; Tue, 09 Feb 2016 10:27:02 -0500 Received: from eggs.gnu.org ([2001:4830:134:3::10]:55529) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1aTAAO-0003QO-EP for qemu-devel@nongnu.org; Tue, 09 Feb 2016 10:25:25 -0500 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1aTAAI-0006Ij-1k for qemu-devel@nongnu.org; Tue, 09 Feb 2016 10:25:24 -0500 Received: from mnementh.archaic.org.uk ([2001:8b0:1d0::1]:57244) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1aTAAH-0006If-RG for qemu-devel@nongnu.org; Tue, 09 Feb 2016 10:25:17 -0500 Received: from pm215 by mnementh.archaic.org.uk with local (Exim 4.84) (envelope-from ) id 1aTAAC-0006BB-BQ; Tue, 09 Feb 2016 15:25:12 +0000 From: Peter Maydell To: qemu-devel@nongnu.org Date: Tue, 9 Feb 2016 15:25:07 +0000 Message-Id: <1455031511-23684-11-git-send-email-peter.maydell@linaro.org> X-Mailer: git-send-email 2.1.4 In-Reply-To: <1455031511-23684-1-git-send-email-peter.maydell@linaro.org> References: <1455031511-23684-1-git-send-email-peter.maydell@linaro.org> X-detected-operating-system: by eggs.gnu.org: GNU/Linux 2.2.x-3.x [generic] X-Received-From: 2001:8b0:1d0::1 Cc: patches@linaro.org Subject: [Qemu-devel] [PATCH 10/14] qapi: Clean up includes in generated files X-BeenThere: qemu-devel@nongnu.org X-Mailman-Version: 2.1.14 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: qemu-devel-bounces+incoming=patchwork.ozlabs.org@nongnu.org Sender: qemu-devel-bounces+incoming=patchwork.ozlabs.org@nongnu.org From: Eric Blake As a followup to commit cbf2115, clean up the includes in files generated by QAPI so that osdep.h is included first in .c files, and headers which it implies are not included manually. This patch is done manually, since Coccinelle (and therefore scripts/clean-includes) doesn't see into the generator scripts. Signed-off-by: Eric Blake Reviewed-by: Markus Armbruster Signed-off-by: Peter Maydell --- scripts/qapi-commands.py | 1 + scripts/qapi-event.py | 1 + scripts/qapi-introspect.py | 3 ++- scripts/qapi-types.py | 3 +-- scripts/qapi-visit.py | 1 + 5 files changed, 6 insertions(+), 3 deletions(-) diff --git a/scripts/qapi-commands.py b/scripts/qapi-commands.py index 561e47a..f68cbf7 100644 --- a/scripts/qapi-commands.py +++ b/scripts/qapi-commands.py @@ -297,6 +297,7 @@ h_comment = ''' c_comment, h_comment) fdef.write(mcgen(''' +#include "qemu/osdep.h" #include "qemu-common.h" #include "qemu/module.h" #include "qapi/qmp/types.h" diff --git a/scripts/qapi-event.py b/scripts/qapi-event.py index 720486f..954c254 100644 --- a/scripts/qapi-event.py +++ b/scripts/qapi-event.py @@ -161,6 +161,7 @@ h_comment = ''' c_comment, h_comment) fdef.write(mcgen(''' +#include "qemu/osdep.h" #include "qemu-common.h" #include "%(prefix)sqapi-event.h" #include "%(prefix)sqapi-visit.h" diff --git a/scripts/qapi-introspect.py b/scripts/qapi-introspect.py index 64f2cd0..e0f926b 100644 --- a/scripts/qapi-introspect.py +++ b/scripts/qapi-introspect.py @@ -1,7 +1,7 @@ # # QAPI introspection generator # -# Copyright (C) 2015 Red Hat, Inc. +# Copyright (C) 2015-2016 Red Hat, Inc. # # Authors: # Markus Armbruster @@ -204,6 +204,7 @@ h_comment = ''' c_comment, h_comment) fdef.write(mcgen(''' +#include "qemu/osdep.h" #include "%(prefix)sqmp-introspect.h" ''', diff --git a/scripts/qapi-types.py b/scripts/qapi-types.py index 0d86269..f8c7253 100644 --- a/scripts/qapi-types.py +++ b/scripts/qapi-types.py @@ -279,6 +279,7 @@ h_comment = ''' c_comment, h_comment) fdef.write(mcgen(''' +#include "qemu/osdep.h" #include "qapi/dealloc-visitor.h" #include "%(prefix)sqapi-types.h" #include "%(prefix)sqapi-visit.h" @@ -287,8 +288,6 @@ fdef.write(mcgen(''' # To avoid circular headers, use only typedefs.h here, not qobject.h fdecl.write(mcgen(''' -#include -#include #include "qemu/typedefs.h" ''')) diff --git a/scripts/qapi-visit.py b/scripts/qapi-visit.py index b93690b..2806336 100644 --- a/scripts/qapi-visit.py +++ b/scripts/qapi-visit.py @@ -437,6 +437,7 @@ h_comment = ''' c_comment, h_comment) fdef.write(mcgen(''' +#include "qemu/osdep.h" #include "qemu-common.h" #include "%(prefix)sqapi-visit.h" ''',