From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from eggs.gnu.org ([2001:4830:134:3::10]:55954) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1aapf7-0004UM-Lq for qemu-devel@nongnu.org; Tue, 01 Mar 2016 14:08:50 -0500 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1aapf3-0001td-El for qemu-devel@nongnu.org; Tue, 01 Mar 2016 14:08:49 -0500 Received: from mail.weilnetz.de ([37.221.199.173]:58331) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1aapf3-0001tJ-93 for qemu-devel@nongnu.org; Tue, 01 Mar 2016 14:08:45 -0500 References: <1456808869-20286-1-git-send-email-sw@weilnetz.de> <56D58309.10206@weilnetz.de> <56D595F4.50804@weilnetz.de> <56D5D716.4020903@redhat.com> From: Stefan Weil Message-ID: <56D5E8B7.2020900@weilnetz.de> Date: Tue, 1 Mar 2016 20:08:39 +0100 MIME-Version: 1.0 In-Reply-To: Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: quoted-printable Subject: Re: [Qemu-devel] [PATCH] Use special code for sigsetjmp only in cpu-exec.c List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , To: Peter Maydell , Paolo Bonzini Cc: Peter Crosthwaite , QEMU Developer , Andrew Baumann , Richard Henderson Am 01.03.2016 um 18:54 schrieb Peter Maydell: > On 1 March 2016 at 17:53, Paolo Bonzini wrote: >> >> >> On 01/03/2016 18:46, Andrew Baumann wrote: >>> --- a/include/sysemu/os-win32.h >>> +++ b/include/sysemu/os-win32.h >>> @@ -60,6 +60,7 @@ >>> * If this parameter is NULL, longjump does no stack unwinding. >>> * That is what we need for QEMU. Passing the value of register rsp = (default) >>> * lets longjmp try a stack unwinding which will crash with generate= d code. */ >>> +# include >>> # undef setjmp >>> # define setjmp(env) _setjmp(env, NULL) >>> #endif >> >> I like this patch or the similar: >> >> diff --git a/include/qemu/osdep.h b/include/qemu/osdep.h >> index 4538fdc..322a7da 100644 >> --- a/include/qemu/osdep.h >> +++ b/include/qemu/osdep.h >> @@ -77,6 +77,8 @@ extern int daemon(int, int); >> #include >> #include >> #include >> +/* This is needed on Mingw-w64 where we redefine setjmp below. */ Maybe even better: "in os-win32.h" instead of "below". >> +#include >> >> #ifdef __OpenBSD__ >> #include >> >> which also includes the file on POSIX systems. >=20 > Yes, that would get my vote. (Followup cleanup -- remove the now > unneeded includes of setjmp.h elsewhere.) >=20 > thanks > -- PMM >=20 You are so convincing, so I'll have to send a new patch with this variant. :-) Thanks to all who wrote a comment Stefan