setjmp.h 661 B

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