27 lines
727 B
Plaintext
Raw Normal View History

1999-09-18 10:51:31 +00:00
/* You may need to adjust the definition of signal1 to supply a */
/* cast to the correct argument type. This detail is system- and */
/* compiler-dependent. The #define below assumes signal.h declares */
/* type SIG_PF for the signal function's second argument. */
1999-09-19 05:59:11 +00:00
/* For some C++ compilers, "#define Sigarg_t ..." may be appropriate. */
1999-09-18 10:51:31 +00:00
#include <signal.h>
#ifndef Sigret_t
#define Sigret_t void
#endif
#ifndef Sigarg_t
#define Sigarg_t int
2003-07-11 03:42:19 +00:00
#endif /*Sigarg_t */
1999-09-18 10:51:31 +00:00
2003-07-11 03:42:19 +00:00
#ifdef USE_SIG_PF /* compile with -DUSE_SIG_PF under IRIX */
1999-09-18 10:51:31 +00:00
#define sig_pf SIG_PF
#else
2003-07-11 03:42:19 +00:00
typedef Sigret_t (*sig_pf) (Sigarg_t);
1999-09-18 10:51:31 +00:00
#endif
#define signal1(a,b) signal(a,(sig_pf)b)
2003-07-11 03:42:19 +00:00
#define Sigarg int n
1999-09-18 10:51:31 +00:00
#define Use_Sigarg n = n /* shut up compiler warning */