From patchwork Thu Nov 15 03:06:37 2012 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 8bit X-Patchwork-Submitter: =?utf-8?q?Andreas_F=C3=A4rber?= X-Patchwork-Id: 199116 Return-Path: X-Original-To: incoming@patchwork.ozlabs.org Delivered-To: patchwork-incoming@bilbo.ozlabs.org Received: from lists.gnu.org (lists.gnu.org [208.118.235.17]) (using TLSv1 with cipher AES256-SHA (256/256 bits)) (Client did not present a certificate) by ozlabs.org (Postfix) with ESMTPS id A3D1F2C008A for ; Thu, 15 Nov 2012 14:07:53 +1100 (EST) Received: from localhost ([::1]:42018 helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1TYpny-0005uX-KY for incoming@patchwork.ozlabs.org; Wed, 14 Nov 2012 22:07:50 -0500 Received: from eggs.gnu.org ([208.118.235.92]:40375) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1TYpnB-0004DE-8J for qemu-devel@nongnu.org; Wed, 14 Nov 2012 22:07:04 -0500 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1TYpn8-0007BM-6E for qemu-devel@nongnu.org; Wed, 14 Nov 2012 22:07:01 -0500 Received: from cantor2.suse.de ([195.135.220.15]:49813 helo=mx2.suse.de) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1TYpn7-0007BC-W2 for qemu-devel@nongnu.org; Wed, 14 Nov 2012 22:06:58 -0500 Received: from relay1.suse.de (unknown [195.135.220.254]) (using TLSv1 with cipher DHE-RSA-AES256-SHA (256/256 bits)) (No client certificate requested) by mx2.suse.de (Postfix) with ESMTP id 9052BA341E; Thu, 15 Nov 2012 04:06:57 +0100 (CET) From: =?UTF-8?q?Andreas=20F=C3=A4rber?= To: qemu-devel@nongnu.org Date: Thu, 15 Nov 2012 04:06:37 +0100 Message-Id: <1352948807-30415-2-git-send-email-afaerber@suse.de> X-Mailer: git-send-email 1.7.10.4 In-Reply-To: <1352948807-30415-1-git-send-email-afaerber@suse.de> References: <1352948807-30415-1-git-send-email-afaerber@suse.de> MIME-Version: 1.0 X-detected-operating-system: by eggs.gnu.org: GNU/Linux 2.4.x X-Received-From: 195.135.220.15 Cc: Eduardo Habkost , anthony@codemonkey.ws, =?UTF-8?q?Andreas=20F=C3=A4rber?= Subject: [Qemu-devel] [PATCH 01/11] qemu-common.h: Comment about usage rules 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: Eduardo Habkost Every time we make a tiny change on a header file, we often find circular header dependency problems. To avoid this nightmare, we need to stop including qemu-common.h from other headers, and we should gradually move the declarations from the catch-all qemu-common.h header to their specific headers. This simply adds a comment documenting the rules about qemu-common.h, hoping that people will see it before including qemu-common.h from other header files, and before adding more declarations to qemu-common.h. Signed-off-by: Eduardo Habkost Signed-off-by: Andreas Färber --- qemu-common.h | 11 ++++++++++- 1 Datei geändert, 10 Zeilen hinzugefügt(+), 1 Zeile entfernt(-) diff --git a/qemu-common.h b/qemu-common.h index ac9985c..093d119 100644 --- a/qemu-common.h +++ b/qemu-common.h @@ -1,5 +1,14 @@ -/* Common header file that is included by all of qemu. */ +/* Common header file that is included by all of QEMU. + * + * This file is supposed to be included only by .c files. No header file should + * depend on qemu-common.h, as this would easily lead to circular header + * dependencies. + * + * If a header file uses a definition from qemu-common.h, that definition + * must be moved to a separate header file, and the header that uses it + * must include that header. + */ #ifndef QEMU_COMMON_H #define QEMU_COMMON_H