signal.h 796 B

1234567891011121314151617181920212223242526272829303132
  1. #ifndef _SIGNAL_H_
  2. #define _SIGNAL_H_
  3. #include "_ansi.h"
  4. #include <sys/signal.h>
  5. _BEGIN_STD_C
  6. typedef int sig_atomic_t; /* Atomic entity type (ANSI) */
  7. #ifndef _POSIX_SOURCE
  8. typedef _sig_func_ptr sig_t; /* BSD naming */
  9. typedef _sig_func_ptr sighandler_t; /* glibc naming */
  10. #endif /* !_POSIX_SOURCE */
  11. #define SIG_DFL ((_sig_func_ptr)0) /* Default action */
  12. #define SIG_IGN ((_sig_func_ptr)1) /* Ignore action */
  13. #define SIG_ERR ((_sig_func_ptr)-1) /* Error return */
  14. struct _reent;
  15. _sig_func_ptr _EXFUN(_signal_r, (struct _reent *, int, _sig_func_ptr));
  16. int _EXFUN(_raise_r, (struct _reent *, int));
  17. #ifndef _REENT_ONLY
  18. _sig_func_ptr _EXFUN(signal, (int, _sig_func_ptr));
  19. int _EXFUN(raise, (int));
  20. void _EXFUN(psignal, (int, const char *));
  21. #endif
  22. _END_STD_C
  23. #endif /* _SIGNAL_H_ */