Commit 1d168222 authored by Alexandre Julliard's avatar Alexandre Julliard

include: Always use _setjmpex on non-i386 platforms.

parent 5c265132
......@@ -147,29 +147,35 @@ extern "C" {
_ACRTIMP void __cdecl longjmp(jmp_buf,int);
#ifdef _WIN64
# ifdef _UCRT
#ifndef __has_builtin
# define __has_builtin(x) 0
#endif
#ifdef _UCRT
# ifdef __i386__
# define _setjmp __intrinsic_setjmp
# else
# define _setjmpex __intrinsic_setjmpex
# endif
# if defined(__GNUC__) || defined(__clang__)
_ACRTIMP 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))
#endif
#ifdef __i386__
# if defined(_setjmp) || !__has_builtin(_setjmp)
_ACRTIMP int __cdecl __attribute__((__nothrow__,__returns_twice__)) _setjmp(jmp_buf);
# endif
#else /* _WIN64 */
# ifdef _UCRT
# define _setjmp __intrinsic_setjmp
# define setjmp(buf) _setjmp((buf))
#else /* __i386__ */
# if defined(_setjmpex) || !__has_builtin(_setjmpex)
_ACRTIMP int __cdecl __attribute__((__nothrow__,__returns_twice__)) _setjmpex(jmp_buf,void*);
# endif
# if defined(__GNUC__) || defined(__clang__)
_ACRTIMP int __cdecl __attribute__ ((__nothrow__,__returns_twice__)) _setjmp(jmp_buf);
# if __has_builtin(__builtin_sponentry)
# define setjmp(buf) _setjmpex((buf), __builtin_sponentry())
# elif __has_builtin(__builtin_frame_address)
# define setjmp(buf) _setjmpex((buf), __builtin_frame_address(0))
# else
_ACRTIMP int __cdecl _setjmp(jmp_buf);
# define setjmp(buf) _setjmpex((buf), NULL)
# endif
#endif /* _WIN64 */
#ifndef setjmp
#define setjmp _setjmp
#endif
#endif /* __i386__ */
#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