qemu-devel
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: [Qemu-devel] [PATCH] #include cleanliness


From: Avi Kivity
Subject: Re: [Qemu-devel] [PATCH] #include cleanliness
Date: Mon, 30 May 2011 12:06:05 +0300
User-agent: Mozilla/5.0 (X11; U; Linux x86_64; en-US; rv:1.9.2.17) Gecko/20110428 Fedora/3.1.10-1.fc14 Lightning/1.0b3pre Thunderbird/3.1.10

On 05/30/2011 01:06 AM, Anthony Liguori wrote:
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<address@hidden>
---
  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<stdbool.h>

qemu-common.h should include stdbool.

The idea behind qemu-common.h is to avoid direct includes to help with portability.

Okay.  But note qemu-common.h #includes cpu.h #includes qemu-common.h...

I think osdep.h matches the "help with portability" label better, no?

--
error compiling committee.c: too many arguments to function




reply via email to

[Prev in Thread] Current Thread [Next in Thread]