From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from mailman by lists.gnu.org with tmda-scanned (Exim 4.33) id 1BXnQS-0006ns-6G for qemu-devel@nongnu.org; Tue, 08 Jun 2004 16:42:28 -0400 Received: from exim by lists.gnu.org with spam-scanned (Exim 4.33) id 1BXnQR-0006ng-93 for qemu-devel@nongnu.org; Tue, 08 Jun 2004 16:42:27 -0400 Received: from [199.232.76.173] (helo=monty-python.gnu.org) by lists.gnu.org with esmtp (Exim 4.33) id 1BXnQR-0006nd-4a for qemu-devel@nongnu.org; Tue, 08 Jun 2004 16:42:27 -0400 Received: from [212.65.193.9] (helo=mail.contactel.cz) by monty-python.gnu.org with esmtp (Exim 4.34) id 1BXnPd-0005qc-JF for qemu-devel@nongnu.org; Tue, 08 Jun 2004 16:41:37 -0400 Received: from [194.212.139.33] (unknown [194.212.139.33]) by mail.contactel.cz (Postfix) with ESMTP id 0D57249EFB for ; Tue, 8 Jun 2004 22:40:27 +0200 (CEST) Message-ID: <40C62438.7050108@reactos.com> Date: Tue, 08 Jun 2004 22:40:24 +0200 From: Filip Navara MIME-Version: 1.0 Subject: Re: [Qemu-devel] Mingw build fails on ppc-softmmu References: <40C5DCEF.9090706@emirates.net.ae> In-Reply-To: <40C5DCEF.9090706@emirates.net.ae> Content-Type: multipart/mixed; boundary="------------090102030900090802070907" Reply-To: qemu-devel@nongnu.org List-Id: qemu-devel.nongnu.org List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , To: qemu-devel@nongnu.org This is a multi-part message in MIME format. --------------090102030900090802070907 Content-Type: text/plain; charset=ISO-8859-1; format=flowed Content-Transfer-Encoding: 7bit Try the attached patch... I don't like it, but it solves the problems for me. - Filip Maarten Boekhold wrote: > Hi, > > I'm trying to build qemu using mingw, and the build fails at: > > make[1]: Entering directory `/e/Maarten/src/qemu/ppc-softmmu' > gcc -Wall -O2 -g -fno-strict-aliasing -fomit-frame-pointer -I. > -I/e/Maarten/src/qemu/target-ppc -I/e/Maarten/src/qemu -D_GNU_SOURCE > -c -o vl.o /e/Maarten/src/qemu/vl.c > In file included from E:/msys/1.0/mingw/include/windef.h:246, > from E:/msys/1.0/mingw/include/windows.h:48, > from e:/Maarten/src/qemu/vl.c:60: > E:/msys/1.0/mingw/include/winnt.h:97: parse error before numeric constant > > I've been trying to track how this case is different from when it > builds it from i386-softmmu (which succeeds), to no avail. Any > suggestions? > > This is a CVS checkout of the 7th... > > Maarten --------------090102030900090802070907 Content-Type: text/plain; name="qemu-ppc-mingw.diff" Content-Transfer-Encoding: 7bit Content-Disposition: inline; filename="qemu-ppc-mingw.diff" diff -u -r qemu/target-ppc/cpu.h qemu.wincopy/target-ppc/cpu.h --- qemu/target-ppc/cpu.h Wed Jun 2 20:54:28 2004 +++ qemu.wincopy/target-ppc/cpu.h Tue Jun 8 20:19:10 2004 @@ -343,7 +343,8 @@ #define THRM2 SPR_ENCODE(1021) #define THRM3 SPR_ENCODE(1022) #define SP SPR_ENCODE(1021) -#define LP SPR_ENCODE(1022) +/* Conflicts with Win32 API defininition on MinGW builds */ +/* #define LP SPR_ENCODE(1022) */ #define DABR_MASK 0xFFFFFFF8 #define FPECR SPR_ENCODE(1022) #define PIR SPR_ENCODE(1023) diff -u -r qemu/target-ppc/helper.c qemu.wincopy/target-ppc/helper.c --- qemu/target-ppc/helper.c Wed Jun 2 20:54:28 2004 +++ qemu.wincopy/target-ppc/helper.c Tue Jun 8 20:29:02 2004 @@ -27,8 +27,6 @@ //#define DEBUG_BATS //#define DEBUG_EXCEPTIONS -extern FILE *stdout, *stderr; - /*****************************************************************************/ /* PPC MMU emulation */ int cpu_ppc_handle_mmu_fault (CPUState *env, uint32_t address, int rw, diff -u -r qemu/target-ppc/op_helper.c qemu.wincopy/target-ppc/op_helper.c --- qemu/target-ppc/op_helper.c Wed Jun 2 20:54:30 2004 +++ qemu.wincopy/target-ppc/op_helper.c Tue Jun 8 20:30:06 2004 @@ -464,7 +464,14 @@ /*****************************************************************************/ /* Special helpers for debug */ +#ifndef _WIN32 extern FILE *stdout; +#else +struct FILE { int opaque; }; +extern FILE (*_imp___iob)[]; +#define _iob (*_imp___iob) +#define stdout (&_iob[1]) +#endif void dump_state (void) { --------------090102030900090802070907--