From patchwork Mon Feb 8 15:36:46 2016 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Eric Blake X-Patchwork-Id: 8251241 Return-Path: X-Original-To: patchwork-qemu-devel@patchwork.kernel.org Delivered-To: patchwork-parsemail@patchwork2.web.kernel.org Received: from mail.kernel.org (mail.kernel.org [198.145.29.136]) by patchwork2.web.kernel.org (Postfix) with ESMTP id 68A73BEEE5 for ; Mon, 8 Feb 2016 15:37:09 +0000 (UTC) Received: from mail.kernel.org (localhost [127.0.0.1]) by mail.kernel.org (Postfix) with ESMTP id AA286203B4 for ; Mon, 8 Feb 2016 15:37:08 +0000 (UTC) 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.kernel.org (Postfix) with ESMTPS id EEF22203B8 for ; Mon, 8 Feb 2016 15:37:06 +0000 (UTC) Received: from localhost ([::1]:45849 helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1aSns9-0003yf-Cl for patchwork-qemu-devel@patchwork.kernel.org; Mon, 08 Feb 2016 10:37:05 -0500 Received: from eggs.gnu.org ([2001:4830:134:3::10]:46393) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1aSns1-0003yW-LQ for qemu-devel@nongnu.org; Mon, 08 Feb 2016 10:36:58 -0500 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1aSnrx-0000QP-KX for qemu-devel@nongnu.org; Mon, 08 Feb 2016 10:36:57 -0500 Received: from resqmta-po-04v.sys.comcast.net ([96.114.154.163]:44553) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1aSnrx-0000QI-Da for qemu-devel@nongnu.org; Mon, 08 Feb 2016 10:36:53 -0500 Received: from resomta-po-02v.sys.comcast.net ([96.114.154.226]) by resqmta-po-04v.sys.comcast.net with comcast id FrcL1s0014tLnxL01rcrAA; Mon, 08 Feb 2016 15:36:51 +0000 Received: from red.redhat.com ([24.10.254.122]) by resomta-po-02v.sys.comcast.net with comcast id Frcn1s00L2fD5rL01rcqfX; Mon, 08 Feb 2016 15:36:51 +0000 From: Eric Blake To: qemu-devel@nongnu.org Date: Mon, 8 Feb 2016 08:36:46 -0700 Message-Id: <1454945806-14090-1-git-send-email-eblake@redhat.com> X-Mailer: git-send-email 2.5.0 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=comcast.net; s=q20140121; t=1454945811; bh=xgnBOEY0GyEGbydLesB1U5k5lQjRaD4oE82KX+m6mdE=; h=Received:Received:From:To:Subject:Date:Message-Id; b=G5yAE8y3bPpFITaxG25KSkgqy0GydJNhaC970D14c4UTKH4kfydUK/gkS6AbKeHof WetxpBk2L7oglCqv29erD4IXuXsuPEFpTQfQv76KHfFsRZA2B3CyuiIpHuXIsQJVwB Wkgy3Uz1NlTb832wn9HuEjt6ukEInnafWdHnrhXdAxfRoszrUvJnoNjtz5/LF9hrc0 2zFif8Wc0BNRDlfGOzTLH3FsAk3F5jKPiqfK85onzxi6QV1qvWpzDJEjCpwQJDm2J5 Ccj9+lau6x0rpRb4eTuNPQ8FLRYUa+cE1tSaLGch22HXiGzyW8ACkpuy1y68H0U+8F W6deatbEPBDSQ== X-detected-operating-system: by eggs.gnu.org: Genre and OS details not recognized. X-Received-From: 96.114.154.163 Cc: peter.maydell@linaro.org, armbru@redhat.com, Michael Roth Subject: [Qemu-devel] [PATCH] 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+patchwork-qemu-devel=patchwork.kernel.org@nongnu.org Sender: qemu-devel-bounces+patchwork-qemu-devel=patchwork.kernel.org@nongnu.org X-Spam-Status: No, score=-6.8 required=5.0 tests=BAYES_00,DKIM_SIGNED, RCVD_IN_DNSWL_HI, T_DKIM_INVALID, UNPARSEABLE_RELAY autolearn=ham version=3.3.1 X-Spam-Checker-Version: SpamAssassin 3.3.1 (2010-03-16) on mail.kernel.org X-Virus-Scanned: ClamAV using ClamSMTP 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 --- 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 91c5a4e..f831621 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 07bcb73..544ae12 100644 --- a/scripts/qapi-event.py +++ b/scripts/qapi-event.py @@ -159,6 +159,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 d3f631a..7b0dca8 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 0fdcebc..0cc9b08 100644 --- a/scripts/qapi-visit.py +++ b/scripts/qapi-visit.py @@ -435,6 +435,7 @@ h_comment = ''' c_comment, h_comment) fdef.write(mcgen(''' +#include "qemu/osdep.h" #include "qemu-common.h" #include "%(prefix)sqapi-visit.h" ''',