Commit 3d72d260 authored by Alexandre Julliard's avatar Alexandre Julliard

include: Fix setjmp() support with 32-bit ucrtbase.

parent 3bf90925
...@@ -143,18 +143,30 @@ typedef _JBTYPE jmp_buf[_JBLEN]; ...@@ -143,18 +143,30 @@ typedef _JBTYPE jmp_buf[_JBLEN];
extern "C" { extern "C" {
#endif #endif
int __cdecl _setjmp(jmp_buf);
void __cdecl longjmp(jmp_buf,int); void __cdecl longjmp(jmp_buf,int);
#if defined(_WIN64) && defined(__GNUC__) #ifdef _WIN64
# ifdef _UCRT # ifdef _UCRT
# define _setjmpex __intrinsic_setjmpex # define _setjmpex __intrinsic_setjmpex
# endif # endif
# ifdef __GNUC__
int __cdecl __attribute__ ((__nothrow__,__returns_twice__)) _setjmpex(jmp_buf,void*); int __cdecl __attribute__ ((__nothrow__,__returns_twice__)) _setjmpex(jmp_buf,void*);
# define setjmp(buf) _setjmpex(buf,__builtin_frame_address(0)) # define setjmp(buf) _setjmpex(buf,__builtin_frame_address(0))
# define setjmpex(buf) _setjmpex(buf,__builtin_frame_address(0)) # define setjmpex(buf) _setjmpex(buf,__builtin_frame_address(0))
#else # endif
# define setjmp _setjmp #else /* _WIN64 */
# ifdef _UCRT
# define _setjmp __intrinsic_setjmp
# endif
# ifdef __GNUC__
int __cdecl __attribute__ ((__nothrow__,__returns_twice__)) _setjmp(jmp_buf);
# else
int __cdecl _setjmp(jmp_buf);
# endif
#endif /* _WIN64 */
#ifndef setjmp
#define setjmp _setjmp
#endif #endif
#ifdef __cplusplus #ifdef __cplusplus
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment