On 05/08/2015 18:51, Liviu Ionescu wrote: > >> On 05 Aug 2015, at 14:03, Stefan Weil <s...@weilnetz.de> wrote: >> >> Fix sigsetjmp for w64 >> http://repo.or.cz/w/qemu/ar7.git/commit/8fa9c07c9a33174905e67589bea6be3e278712cb > > > I tried to apply your patch to my branch and I got: > > Running QEMU make install... > CC gnuarmeclipse-softmmu/cpu-exec.o > /Host/Work/qemu/gnuarmeclipse-qemu.git/cpu-exec.c:37:0: warning: "sigsetjmp" > redefined > #define sigsetjmp(env, savesigs) _setjmp(env, NULL) > ^ > In file included from > /Host/Work/qemu/gnuarmeclipse-qemu.git/include/qemu-common.h:47:0, > from > /Host/Work/qemu/gnuarmeclipse-qemu.git/target-arm/cpu.h:39, > from /Host/Work/qemu/gnuarmeclipse-qemu.git/cpu-exec.c:20: > /Host/Work/qemu/gnuarmeclipse-qemu.git/include/sysemu/os-win32.h:72:0: note: > this is the location of the previous definition > #define sigsetjmp(env, savemask) setjmp(env) > ^ > > > I did not check the latest version in the repository (waiting for > 2.4), but could you verify, maybe a better location for your patch > would be in os-win32.h?
os-win32.h has the following already: #if defined(_WIN64) # undef setjmp # define setjmp(env) _setjmp(env, NULL) #endif #define sigjmp_buf jmp_buf #define sigsetjmp(env, savemask) setjmp(env) And Stefan's patch has this in cpu-exec.c: #if defined(_WIN64) #define sigsetjmp(env, savesigs) _setjmp(env, NULL) #endif The above should not be necessary if the definition of sigsetjmp is already picked up from os-win32.h. Since os-win32.h is usually included through qemu-common.h, my guess was that cpu-exec.c was missing an inclusion of qemu-common.h. However, all target-*/cpu.h files include qemu-common.h, so I am not sure why things break for Stefan... Paolo