setjmp.h 792 B

123456789101112131415161718192021222324252627282930313233343536373839404142
  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. #define longjmp longjmp
  29. #ifdef __cplusplus
  30. }
  31. #endif
  32. #endif