remove dependency of memmove on memcpy direction
[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 struct {
15         jmp_buf __jb;
16         unsigned long __fl;
17         unsigned long __ss[128/sizeof(long)];
18 } sigjmp_buf[1];
19 int sigsetjmp (sigjmp_buf, int);
20 void siglongjmp (sigjmp_buf, int);
21 #endif
22
23
24 #if defined(_XOPEN_SOURCE) || defined(_GNU_SOURCE) \
25  || defined(_BSD_SOURCE)
26 int _setjmp (jmp_buf);
27 void _longjmp (jmp_buf, int);
28 #endif
29
30
31 int setjmp (jmp_buf);
32 void longjmp (jmp_buf, int);
33
34 #define setjmp setjmp
35 #define longjmp longjmp
36
37 #ifdef __cplusplus
38 }
39 #endif
40
41 #endif