[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: [Qemu-devel] [PATCH] cpu-defs.h: pull in qemu-common.h for HOST_LONG
Re: [Qemu-devel] [PATCH] cpu-defs.h: pull in qemu-common.h for HOST_LONG_BITS
Mon, 16 Jul 2012 08:01:46 +0200
Mozilla/5.0 (X11; Linux i686; rv:13.0) Gecko/20120615 Thunderbird/13.0.1
Am 16.07.2012 07:26, schrieb Stefan Weil:
Am 15.07.2012 23:54, schrieb Mike Frysinger:
On Sunday 15 July 2012 15:34:33 Stefan Weil wrote:
sorry, but that's fragile junk. if a header file uses defines from
Am 15.07.2012 22:25, schrieb Mike Frysinger:
This file uses the define HOST_LONG_BITS, but doesn't explicitly
qemu-common.h for it leading to build warnings for some setups:
In file included from qemu/target-bfin/cpu.h:17,
qemu/cpu-defs.h:83:5: warning: "HOST_LONG_BITS" is not defined
Signed-off-by: Mike Frysinger <address@hidden>
cpu-defs.h | 1 +
1 file changed, 1 insertion(+)
diff --git a/cpu-defs.h b/cpu-defs.h
index f49e950..0d6018d 100644
@@ -28,6 +28,7 @@
No. Of course this works, but I don't think that it is reasonable
to include qemu-common.h in every *.h file. There are already too
many of them.
target-bfin/cpu.h should start like all other cpu.h files with
these include statements:
header file, it should be including it.
There are different ways how things can be done.
Normally, I agree with you that each header file should be complete,
but that's not the QEMU style.
In your special case, it's more important to keep all */cpu.h similar.
qemu/target-bfin/cpu.h is still not part of the official QEMU code,
so it can be fixed before it is committed.
IMHO it would be also a clean solution if the */cpu.h no longer include
config.h and qemu-common.h when those files are included in cpu-def.h.
For that solution, your patch could be a starting point, but it needs
more cleanup: include statements which are part of qemu-common.h
need no duplication in cpu-def.h.