signal1.h
Go to the documentation of this file.
00001 /* You may need to adjust the definition of signal1 to supply a */
00002 /* cast to the correct argument type.  This detail is system- and */
00003 /* compiler-dependent.   The #define below assumes signal.h declares */
00004 /* type SIG_PF for the signal function's second argument. */
00005 
00006 /* For some C++ compilers, "#define Sigarg_t ..." may be appropriate. */
00007 
00008 #include <signal.h>
00009 
00010 #ifndef Sigret_t
00011 #define Sigret_t void
00012 #endif
00013 #ifndef Sigarg_t
00014 #ifdef KR_headers
00015 #define Sigarg_t
00016 #else
00017 #define Sigarg_t int
00018 #endif
00019 #endif /*Sigarg_t*/
00020 
00021 #ifdef USE_SIG_PF       /* compile with -DUSE_SIG_PF under IRIX */
00022 #define sig_pf SIG_PF
00023 #else
00024 typedef Sigret_t (*sig_pf)(Sigarg_t);
00025 #endif
00026 
00027 #define signal1(a,b) signal(a,(sig_pf)b)
00028 
00029 #ifdef __cplusplus
00030 #define Sigarg ...
00031 #define Use_Sigarg
00032 #else
00033 #define Sigarg Int n
00034 #define Use_Sigarg n = n        /* shut up compiler warning */
00035 #endif


swiftnav
Author(s):
autogenerated on Sat Jun 8 2019 18:56:09