1*906afcb8SAndy Fiddaman 2*906afcb8SAndy Fiddaman/* : : generated by proto : : */ 3*906afcb8SAndy Fiddaman/* : : generated from contrib/ast/src/lib/libast/features/sig.sh by iffe version 2012-07-17 : : */ 4*906afcb8SAndy Fiddaman#ifndef _def_sig_ast 5*906afcb8SAndy Fiddaman#if !defined(__PROTO__) 6*906afcb8SAndy Fiddaman# if defined(__STDC__) || defined(__cplusplus) || defined(_proto) || defined(c_plusplus) 7*906afcb8SAndy Fiddaman# if defined(__cplusplus) 8*906afcb8SAndy Fiddaman# define __LINKAGE__ "C" 9*906afcb8SAndy Fiddaman# else 10*906afcb8SAndy Fiddaman# define __LINKAGE__ 11*906afcb8SAndy Fiddaman# endif 12*906afcb8SAndy Fiddaman# define __STDARG__ 13*906afcb8SAndy Fiddaman# define __PROTO__(x) x 14*906afcb8SAndy Fiddaman# define __OTORP__(x) 15*906afcb8SAndy Fiddaman# define __PARAM__(n,o) n 16*906afcb8SAndy Fiddaman# if !defined(__STDC__) && !defined(__cplusplus) 17*906afcb8SAndy Fiddaman# if !defined(c_plusplus) 18*906afcb8SAndy Fiddaman# define const 19*906afcb8SAndy Fiddaman# endif 20*906afcb8SAndy Fiddaman# define signed 21*906afcb8SAndy Fiddaman# define void int 22*906afcb8SAndy Fiddaman# define volatile 23*906afcb8SAndy Fiddaman# define __V_ char 24*906afcb8SAndy Fiddaman# else 25*906afcb8SAndy Fiddaman# define __V_ void 26*906afcb8SAndy Fiddaman# endif 27*906afcb8SAndy Fiddaman# else 28*906afcb8SAndy Fiddaman# define __PROTO__(x) () 29*906afcb8SAndy Fiddaman# define __OTORP__(x) x 30*906afcb8SAndy Fiddaman# define __PARAM__(n,o) o 31*906afcb8SAndy Fiddaman# define __LINKAGE__ 32*906afcb8SAndy Fiddaman# define __V_ char 33*906afcb8SAndy Fiddaman# define const 34*906afcb8SAndy Fiddaman# define signed 35*906afcb8SAndy Fiddaman# define void int 36*906afcb8SAndy Fiddaman# define volatile 37*906afcb8SAndy Fiddaman# endif 38*906afcb8SAndy Fiddaman# define __MANGLE__ __LINKAGE__ 39*906afcb8SAndy Fiddaman# if defined(__cplusplus) || defined(c_plusplus) 40*906afcb8SAndy Fiddaman# define __VARARG__ ... 41*906afcb8SAndy Fiddaman# else 42*906afcb8SAndy Fiddaman# define __VARARG__ 43*906afcb8SAndy Fiddaman# endif 44*906afcb8SAndy Fiddaman# if defined(__STDARG__) 45*906afcb8SAndy Fiddaman# define __VA_START__(p,a) va_start(p,a) 46*906afcb8SAndy Fiddaman# else 47*906afcb8SAndy Fiddaman# define __VA_START__(p,a) va_start(p) 48*906afcb8SAndy Fiddaman# endif 49*906afcb8SAndy Fiddaman# if !defined(__INLINE__) 50*906afcb8SAndy Fiddaman# if defined(__cplusplus) 51*906afcb8SAndy Fiddaman# define __INLINE__ extern __MANGLE__ inline 52*906afcb8SAndy Fiddaman# else 53*906afcb8SAndy Fiddaman# if defined(_WIN32) && !defined(__GNUC__) 54*906afcb8SAndy Fiddaman# define __INLINE__ __inline 55*906afcb8SAndy Fiddaman# endif 56*906afcb8SAndy Fiddaman# endif 57*906afcb8SAndy Fiddaman# endif 58*906afcb8SAndy Fiddaman#endif 59*906afcb8SAndy Fiddaman#if !defined(__LINKAGE__) 60*906afcb8SAndy Fiddaman#define __LINKAGE__ /* 2004-08-11 transition */ 61*906afcb8SAndy Fiddaman#endif 62*906afcb8SAndy Fiddaman 63*906afcb8SAndy Fiddaman#define _def_sig_ast 1 64*906afcb8SAndy Fiddaman#define _sys_types 1 /* #include <sys/types.h> ok */ 65*906afcb8SAndy Fiddaman 66*906afcb8SAndy Fiddaman#define sig_info _sig_info_ 67*906afcb8SAndy Fiddaman 68*906afcb8SAndy Fiddaman#if defined(__STDPP__directive) && defined(__STDPP__hide) 69*906afcb8SAndy Fiddaman__STDPP__directive pragma pp:hide kill killpg 70*906afcb8SAndy Fiddaman#else 71*906afcb8SAndy Fiddaman#define kill ______kill 72*906afcb8SAndy Fiddaman#define killpg ______killpg 73*906afcb8SAndy Fiddaman#endif 74*906afcb8SAndy Fiddaman#include <signal.h> 75*906afcb8SAndy Fiddaman#if defined(__STDPP__directive) && defined(__STDPP__hide) 76*906afcb8SAndy Fiddaman__STDPP__directive pragma pp:nohide kill killpg 77*906afcb8SAndy Fiddaman#else 78*906afcb8SAndy Fiddaman#undef kill 79*906afcb8SAndy Fiddaman#undef killpg 80*906afcb8SAndy Fiddaman#endif 81*906afcb8SAndy Fiddaman#ifndef sigmask 82*906afcb8SAndy Fiddaman#define sigmask(s) (1<<((s)-1)) 83*906afcb8SAndy Fiddaman#endif 84*906afcb8SAndy Fiddamantypedef void (*Sig_handler_t) __PROTO__((int)); 85*906afcb8SAndy Fiddaman 86*906afcb8SAndy Fiddaman 87*906afcb8SAndy Fiddaman#define Handler_t Sig_handler_t 88*906afcb8SAndy Fiddaman 89*906afcb8SAndy Fiddaman#define SIG_REG_PENDING (-1) 90*906afcb8SAndy Fiddaman#define SIG_REG_POP 0 91*906afcb8SAndy Fiddaman#define SIG_REG_EXEC 00001 92*906afcb8SAndy Fiddaman#define SIG_REG_PROC 00002 93*906afcb8SAndy Fiddaman#define SIG_REG_TERM 00004 94*906afcb8SAndy Fiddaman#define SIG_REG_ALL 00777 95*906afcb8SAndy Fiddaman#define SIG_REG_SET 01000 96*906afcb8SAndy Fiddaman 97*906afcb8SAndy Fiddamantypedef struct 98*906afcb8SAndy Fiddaman{ 99*906afcb8SAndy Fiddaman char** name; 100*906afcb8SAndy Fiddaman char** text; 101*906afcb8SAndy Fiddaman int sigmax; 102*906afcb8SAndy Fiddaman} Sig_info_t; 103*906afcb8SAndy Fiddaman 104*906afcb8SAndy Fiddamanextern __MANGLE__ int kill __PROTO__((pid_t, int)); 105*906afcb8SAndy Fiddamanextern __MANGLE__ int killpg __PROTO__((pid_t, int)); 106*906afcb8SAndy Fiddaman 107*906afcb8SAndy Fiddaman#if _BLD_ast && defined(__EXPORT__) 108*906afcb8SAndy Fiddaman#undef __MANGLE__ 109*906afcb8SAndy Fiddaman#define __MANGLE__ __LINKAGE__ __EXPORT__ 110*906afcb8SAndy Fiddaman#endif 111*906afcb8SAndy Fiddaman#if !_BLD_ast && defined(__IMPORT__) 112*906afcb8SAndy Fiddaman#undef __MANGLE__ 113*906afcb8SAndy Fiddaman#define __MANGLE__ __LINKAGE__ __IMPORT__ 114*906afcb8SAndy Fiddaman#endif 115*906afcb8SAndy Fiddaman 116*906afcb8SAndy Fiddamanextern __MANGLE__ Sig_info_t sig_info; 117*906afcb8SAndy Fiddaman 118*906afcb8SAndy Fiddaman#undef __MANGLE__ 119*906afcb8SAndy Fiddaman#define __MANGLE__ __LINKAGE__ 120*906afcb8SAndy Fiddaman 121*906afcb8SAndy Fiddaman#if _lib_sigflag && _npt_sigflag 122*906afcb8SAndy Fiddamanextern __MANGLE__ int sigflag __PROTO__((int, int, int)); 123*906afcb8SAndy Fiddaman#endif 124*906afcb8SAndy Fiddaman 125*906afcb8SAndy Fiddaman#if _BLD_ast && defined(__EXPORT__) 126*906afcb8SAndy Fiddaman#undef __MANGLE__ 127*906afcb8SAndy Fiddaman#define __MANGLE__ __LINKAGE__ __EXPORT__ 128*906afcb8SAndy Fiddaman#endif 129*906afcb8SAndy Fiddaman 130*906afcb8SAndy Fiddaman#if !_lib_sigflag 131*906afcb8SAndy Fiddamanextern __MANGLE__ int sigflag __PROTO__((int, int, int)); 132*906afcb8SAndy Fiddaman#endif 133*906afcb8SAndy Fiddamanextern __MANGLE__ int sigcritical __PROTO__((int)); 134*906afcb8SAndy Fiddamanextern __MANGLE__ int sigunblock __PROTO__((int)); 135*906afcb8SAndy Fiddaman 136*906afcb8SAndy Fiddaman#undef __MANGLE__ 137*906afcb8SAndy Fiddaman#define __MANGLE__ __LINKAGE__ 138*906afcb8SAndy Fiddaman#endif 139