setjmp.h 768 B

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