--- mstools/posix/h/signal.h 2018/08/09 18:22:18 1.1 +++ mstools/posix/h/signal.h 2018/08/09 18:24:36 1.1.1.2 @@ -11,12 +11,6 @@ Abstract: This module contains the signal related types and data structures described in sections 3.3.1 thru 3.3.7 of IEEE P1003.1/Draft 13. -Author: - - Mark Lucovsky 10-Mar-1989 - -Revision History: - --*/ #ifndef _SIGNAL_ @@ -24,14 +18,21 @@ Revision History: #include +#ifdef __cplusplus +extern "C" { +#endif + typedef unsigned long sigset_t; +#ifndef _SIG_ATOMIC_T_DEFINED +typedef int sig_atomic_t; +#define _SIG_ATOMIC_T_DEFINED +#endif + #define SIG_DFL (void (_CRTAPI1 *)(int))0xffffffff /* default signal action */ #define SIG_ERR (void (_CRTAPI1 *)(int))0 /* signal error value */ #define SIG_IGN (void (_CRTAPI1 *)(int))1 /* ignore signal */ - - #define SIGABRT 1 #define SIGALRM 2 #define SIGFPE 3 @@ -52,8 +53,7 @@ typedef unsigned long sigset_t; #define SIGTTIN 18 #define SIGTTOU 19 - -typedef void (_CRTAPI1 * _handler)(); +typedef void (_CRTAPI1 * _handler)(int); struct sigaction { _handler sa_handler; @@ -67,7 +67,6 @@ struct sigaction { #define SIG_UNBLOCK 2 #define SIG_SETMASK 3 - int _CRTAPI1 kill(pid_t, int); int _CRTAPI1 sigemptyset(sigset_t *); int _CRTAPI1 sigfillset(sigset_t *); @@ -79,7 +78,11 @@ int _CRTAPI1 sigprocmask(int, const sigs int _CRTAPI1 sigpending(sigset_t *); int _CRTAPI1 sigsuspend(const sigset_t *); -void (_CRTAPI1 * _CRTAPI1 signal(int, void (_CRTAPI1 *)(int)))(int); +_handler _CRTAPI1 signal(int, _handler); int _CRTAPI1 raise(int); +#ifdef __cplusplus +} +#endif + #endif /* _SIGNAL_ */