debloat jmp_buf in _GNU_SOURCE mode
[musl] / include / setjmp.h
1 #ifndef _SETJMP_H
2 #define _SETJMP_H
3
4 #ifdef __cplusplus
5 extern "C" {
6 #endif
7
8 #include <bits/setjmp.h>
9
10
11 #if defined(_POSIX_SOURCE) || defined(_POSIX_C_SOURCE) \
12  || defined(_XOPEN_SOURCE) || defined(_GNU_SOURCE) \
13  || defined(_BSD_SOURCE)
14 typedef unsigned long sigjmp_buf[(128+sizeof(jmp_buf))/sizeof(long)];
15 int sigsetjmp (sigjmp_buf, int);
16 void siglongjmp (sigjmp_buf, int);
17 #endif
18
19
20 #if defined(_XOPEN_SOURCE) || defined(_GNU_SOURCE) \
21  || defined(_BSD_SOURCE)
22 int _setjmp (jmp_buf);
23 void _longjmp (jmp_buf, int);
24 #endif
25
26
27 int setjmp (jmp_buf);
28 void longjmp (jmp_buf, int);
29
30 #define setjmp setjmp
31 #define longjmp longjmp
32
33 #ifdef __cplusplus
34 }
35 #endif
36
37 #endif