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 From: =?UTF-8?q?Andreas=20F=C3=A4rber?= Date: Thu, 15 Nov 2012 04:06:37 +0100 Message-Id: <1352948807-30415-2-git-send-email-afaerber@suse.de> 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 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: quoted-printable Subject: [Qemu-devel] [PATCH 01/11] qemu-common.h: Comment about usage rules List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , To: qemu-devel@nongnu.org Cc: Eduardo Habkost , anthony@codemonkey.ws, =?UTF-8?q?Andreas=20F=C3=A4rber?= 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=C3=A4rber --- qemu-common.h | 11 ++++++++++- 1 Datei ge=C3=A4ndert, 10 Zeilen hinzugef=C3=BCgt(+), 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 @@ =20 -/* 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 definitio= n + * 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 =20 --=20 1.7.10.4