Microsoft documentation for i386 _setjmp3() function and wine
implementation of that function says that this function takes variadic
count of arguments, where second argument is number of variadic count.

https://learn.microsoft.com/en-us/cpp/c-runtime-library/setjmp3
https://gitlab.winehq.org/wine/wine/-/blob/wine-10.7/dlls/msvcrt/except_i386.c#L771
---
 mingw-w64-headers/crt/setjmp.h | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)

diff --git a/mingw-w64-headers/crt/setjmp.h b/mingw-w64-headers/crt/setjmp.h
index 74e7c7ea4a37..f3b8cd1d17d6 100644
--- a/mingw-w64-headers/crt/setjmp.h
+++ b/mingw-w64-headers/crt/setjmp.h
@@ -223,7 +223,7 @@ void * __cdecl __attribute__ ((__nothrow__)) mingw_getsp 
(void);
 #endif
 #ifndef _INC_SETJMPEX
 #  if defined(_X86_) || defined(__i386__)
-#    define setjmp(BUF) _setjmp3((BUF), NULL)
+#    define setjmp(BUF) _setjmp3((BUF), 0)
 #  elif !defined(__SEH__) || defined(__USE_MINGW_SETJMP_NON_SEH)
 #    if defined(__arm__) || defined(__aarch64__)
 #      define setjmp(BUF) __mingw_setjmp((BUF))
@@ -241,7 +241,7 @@ void * __cdecl __attribute__ ((__nothrow__)) mingw_getsp 
(void);
 #    define setjmp(BUF) _setjmp((BUF), __builtin_frame_address (0))
 #  endif
   int __cdecl __attribute__ ((__nothrow__,__returns_twice__)) _setjmp(jmp_buf 
_Buf, void *_Ctx);
-  int __cdecl __attribute__ ((__nothrow__,__returns_twice__)) _setjmp3(jmp_buf 
_Buf, void *_Ctx);
+  int __cdecl __attribute__ ((__nothrow__,__returns_twice__)) _setjmp3(jmp_buf 
_Buf, int _Count, ...);
 #else
 #  undef setjmp
 #  ifdef __SEH__
-- 
2.20.1



_______________________________________________
Mingw-w64-public mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/mingw-w64-public

Reply via email to