|
From: | Andreas Färber |
Subject: | Re: [Qemu-devel] [PATCH] Cocoa: Avoid missing prototype warnings for qemu_main |
Date: | Sat, 11 Sep 2010 16:20:25 +0200 |
Am 11.09.2010 um 15:26 schrieb Stefan Weil:
Am 11.09.2010 11:55, schrieb Andreas Färber:In vl.c main is redefined to qemu_main but no prototype is available. Move it into qemu-common.h since it is needed in ui/cocoa.m, too. Adjust the call sites to the signature used in vl.c. Signed-off-by: Andreas Färber<address@hidden>
diff --git a/qemu-common.h b/qemu-common.h index dfd3dc0..f8ce3ce 100644 --- a/qemu-common.h +++ b/qemu-common.h @@ -13,6 +13,10 @@#define QEMU_BUILD_BUG_ON(x) typedef char __build_bug_on__##__LINE__[(x)?-1:1];+#ifdef CONFIG_COCOA +int qemu_main(int argc, char** argv, char** envp); +#endif +Is this conditional compilation needed here, or could qemu_main be declared unconditionally?
There's another (identical) declaration for SDL, but SDL on Solaris does not take that code path, so I couldn't test.
The tricky thing is that when CONFIG_SDL and (main or __APPLE__) is defined, a new main() function is provided that already uses qemu_main(), likely before qemu-common.h is included.
Anyway, generalizing it should be done in a follow-on patch imo, so that the SDL part can be reverted independently.
Andreas
[Prev in Thread] | Current Thread | [Next in Thread] |