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) {