home *** CD-ROM | disk | FTP | other *** search
/ OS/2 Shareware BBS: 22 gnu / 22-gnu.zip / readline.zip / readline-2.1 / posixjmp.h < prev    next >
C/C++ Source or Header  |  1997-01-16  |  436b  |  21 lines

  1. /* posixjmp.h -- wrapper for setjmp.h with changes for POSIX systems. */
  2.  
  3. #ifndef _POSIXJMP_H_
  4. #define _POSIXJMP_H_
  5.  
  6. #include <setjmp.h>
  7.  
  8. /* This *must* be included *after* config.h */
  9.  
  10. #if defined (HAVE_POSIX_SIGSETJMP)
  11. #  define procenv_t    sigjmp_buf
  12. #  undef setjmp
  13. #  define setjmp(x)    sigsetjmp((x), 1)
  14. #  undef longjmp
  15. #  define longjmp(x, n)    siglongjmp((x), (n))
  16. #else
  17. #  define procenv_t    jmp_buf
  18. #endif
  19.  
  20. #endif /* _POSIXJMP_H_ */
  21.