From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from [140.186.70.92] (port=49235 helo=eggs.gnu.org) by lists.gnu.org with esmtp (Exim 4.43) id 1PrQuh-0007J2-Lp for qemu-devel@nongnu.org; Mon, 21 Feb 2011 03:14:36 -0500 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1PrQug-0001xt-NJ for qemu-devel@nongnu.org; Mon, 21 Feb 2011 03:14:35 -0500 Received: from mail-ew0-f52.google.com ([209.85.215.52]:37505) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1PrQug-0001xo-Hh for qemu-devel@nongnu.org; Mon, 21 Feb 2011 03:14:34 -0500 Received: by ewy10 with SMTP id 10so403437ewy.11 for ; Mon, 21 Feb 2011 00:14:33 -0800 (PST) Sender: Paolo Bonzini Message-ID: <4D621EE6.1030005@redhat.com> Date: Mon, 21 Feb 2011 09:14:30 +0100 From: Paolo Bonzini MIME-Version: 1.0 References: <1297092100-19171-1-git-send-email-gingold@adacore.com> <20110220181429.GS18619@volta.aurel32.net> In-Reply-To: Content-Type: text/plain; charset=ISO-8859-1; format=flowed Content-Transfer-Encoding: 7bit Subject: [Qemu-devel] Re: [PATCH] scripts: add a guard macro in generated .h files List-Id: qemu-devel.nongnu.org List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , To: Tristan Gingold Cc: qemu-devel@nongnu.org, Aurelien Jarno On 02/21/2011 07:42 AM, Tristan Gingold wrote: > Mostly a style issue. It is common to always protect header files > against multiple inclusion, unless the header is meant to be included > several times (which is not the case for these config files). I > think this is a good practice. Traditionally, autoconf's config.h headers have no guards either. This can indeed cause some troubles. However, it also helps highlighting poor practices, such as libraries installing a config.h file including it from a public header. > I once got redefinition warnings for macros in config-host.h, but I > agree that adding the guard macro doesn't fix this issue. config-host.h should always be the first included header (we are poor at this) and its macros should never conflict with anything else. I think we should rather fix the problems you've seen with config-host.h, if you can still reproduce them. Paolo