From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from eggs.gnu.org ([140.186.70.92]:49859) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1QQo80-0007x5-6D for qemu-devel@nongnu.org; Sun, 29 May 2011 18:06:33 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1QQo7z-0006uq-Bb for qemu-devel@nongnu.org; Sun, 29 May 2011 18:06:32 -0400 Received: from mail-yx0-f173.google.com ([209.85.213.173]:41549) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1QQo7z-0006ug-98 for qemu-devel@nongnu.org; Sun, 29 May 2011 18:06:31 -0400 Received: by yxk8 with SMTP id 8so1539582yxk.4 for ; Sun, 29 May 2011 15:06:30 -0700 (PDT) Message-ID: <4DE2C364.6060601@codemonkey.ws> Date: Sun, 29 May 2011 17:06:28 -0500 From: Anthony Liguori MIME-Version: 1.0 References: <1305814662-16184-1-git-send-email-avi@redhat.com> In-Reply-To: <1305814662-16184-1-git-send-email-avi@redhat.com> Content-Type: text/plain; charset=ISO-8859-1; format=flowed Content-Transfer-Encoding: 7bit Subject: Re: [Qemu-devel] [PATCH] #include cleanliness List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , To: Avi Kivity Cc: qemu-devel@nongnu.org On 05/19/2011 09:17 AM, Avi Kivity wrote: > My mother always told me to explicitly #include any headers need to compile > a file, instead of relying on other #includes to bring them in. This patch > fixes up targphys.h and cpu-common.h in this regard. > > Signed-off-by: Avi Kivity > --- > cpu-common.h | 4 ++++ > targphys.h | 2 ++ > 2 files changed, 6 insertions(+), 0 deletions(-) > > diff --git a/cpu-common.h b/cpu-common.h > index 151c32c..2009adc 100644 > --- a/cpu-common.h > +++ b/cpu-common.h > @@ -18,6 +18,10 @@ > #include "bswap.h" > #include "qemu-queue.h" > > +#include "qemu-common.h" > + > +#include qemu-common.h should include stdbool. The idea behind qemu-common.h is to avoid direct includes to help with portability. Regards, Anthony Liguori > + > #if !defined(CONFIG_USER_ONLY) > > enum device_endian { > diff --git a/targphys.h b/targphys.h > index 95648d6..501add2 100644 > --- a/targphys.h > +++ b/targphys.h > @@ -3,6 +3,8 @@ > #ifndef TARGPHYS_H > #define TARGPHYS_H > > +#include > + > #ifdef TARGET_PHYS_ADDR_BITS > /* target_phys_addr_t is the type of a physical address (its size can > be different from 'target_ulong'). */