Alexandre Julliard : include/msvcrt: Use setjmpex() instead of setjmp() on 64-bit.

Alexandre Julliard julliard at winehq.org
Thu May 30 16:27:11 CDT 2019


Module: wine
Branch: master
Commit: c0a54996e23a2eceb772a2814d3b077bc113502f
URL:    https://source.winehq.org/git/wine.git/?a=commit;h=c0a54996e23a2eceb772a2814d3b077bc113502f

Author: Alexandre Julliard <julliard at winehq.org>
Date:   Thu May 30 12:48:49 2019 +0200

include/msvcrt: Use setjmpex() instead of setjmp() on 64-bit.

Signed-off-by: Alexandre Julliard <julliard at winehq.org>

---

 include/msvcrt/setjmp.h | 10 ++++++++--
 1 file changed, 8 insertions(+), 2 deletions(-)

diff --git a/include/msvcrt/setjmp.h b/include/msvcrt/setjmp.h
index 4038cbd..2a4af49 100644
--- a/include/msvcrt/setjmp.h
+++ b/include/msvcrt/setjmp.h
@@ -146,12 +146,18 @@ extern "C" {
 int __cdecl _setjmp(jmp_buf);
 void __cdecl longjmp(jmp_buf,int);
 
+#if defined(_WIN64) && defined(__GNUC__)
+int __cdecl __attribute__ ((__nothrow__,__returns_twice__)) _setjmpex(jmp_buf,void*);
+# define setjmp(buf)   _setjmpex(buf,__builtin_frame_address(0))
+# define setjmpex(buf) _setjmpex(buf,__builtin_frame_address(0))
+#else
+# define setjmp _setjmp
+#endif
+
 #ifdef __cplusplus
 }
 #endif
 
-#define setjmp _setjmp
-
 #include <poppack.h>
 
 #endif /* __WINE_SETJMP_H */




More information about the wine-cvs mailing list