sys/prctl.h: add PR_PAC_{SET,GET}_ENABLED_KEYS from linux v5.13
[musl.git] / include / setjmp.h
blob1976af231b8c4acee1a4115c20afb48d12a85d6a
1 #ifndef _SETJMP_H
2 #define _SETJMP_H
4 #ifdef __cplusplus
5 extern "C" {
6 #endif
8 #include <features.h>
10 #include <bits/setjmp.h>
12 typedef struct __jmp_buf_tag {
13 __jmp_buf __jb;
14 unsigned long __fl;
15 unsigned long __ss[128/sizeof(long)];
16 } jmp_buf[1];
18 #if __GNUC__ > 4 || (__GNUC__ == 4 && __GNUC_MINOR__ >= 1)
19 #define __setjmp_attr __attribute__((__returns_twice__))
20 #else
21 #define __setjmp_attr
22 #endif
24 #if defined(_POSIX_SOURCE) || defined(_POSIX_C_SOURCE) \
25 || defined(_XOPEN_SOURCE) || defined(_GNU_SOURCE) \
26 || defined(_BSD_SOURCE)
27 typedef jmp_buf sigjmp_buf;
28 int sigsetjmp (sigjmp_buf, int) __setjmp_attr;
29 _Noreturn void siglongjmp (sigjmp_buf, int);
30 #endif
32 #if defined(_XOPEN_SOURCE) || defined(_GNU_SOURCE) \
33 || defined(_BSD_SOURCE)
34 int _setjmp (jmp_buf) __setjmp_attr;
35 _Noreturn void _longjmp (jmp_buf, int);
36 #endif
38 int setjmp (jmp_buf) __setjmp_attr;
39 _Noreturn void longjmp (jmp_buf, int);
41 #define setjmp setjmp
43 #undef __setjmp_attr
45 #ifdef __cplusplus
47 #endif
49 #endif