|
From: | Paolo Bonzini |
Subject: | [Qemu-devel] Re: [PATCH 10/16] Introduce OS specific cmdline argument handling and move SMB arg to os-posix.c |
Date: | Fri, 04 Jun 2010 12:39:43 +0200 |
User-agent: | Mozilla/5.0 (X11; U; Linux x86_64; en-US; rv:1.9.1.9) Gecko/20100430 Fedora/3.0.4-3.fc13 Lightning/1.0b2pre Thunderbird/3.0.4 |
+/* + * Duplicate definition from vl.c to avoid messing up the entire build + */ +enum { +#define DEF(option, opt_arg, opt_enum, opt_help, arch_mask) \ + opt_enum, +#define DEFHEADING(text) +#include "qemu-options.h" +#undef DEF +#undef DEFHEADING +#undef GEN_DOCS +};I agree with Richard: this is gross.The enum creation is gross by itself. Only way to get around not duplicating it is to create a new header file to hold just that?
I don't think it's particularly gross. At least you don't have two files to keep in sync.
You could rename qemu-options.h to qemu-options.def, and make a real header file with the typedef and the enum. Then include the header from vl.c and os-*.c.
BTW from Fedora 11 and newer you can easily build QEMU with a cross compiler. (Running it is a bit harder). These packages should suffice:
mingw32-w32api mingw32-cpp mingw32-termcap mingw32-runtime mingw32-binutils mingw32-filesystem mingw32-SDL mingw32-gcc mingw32-zliband you need to configure it with "--cross-prefix=i686-pc-mingw32-" (trailing dash included!).
Paolo
[Prev in Thread] | Current Thread | [Next in Thread] |