From df3f69ffb1d6946d4505d2fa2749102bd5aec896 Mon Sep 17 00:00:00 2001 From: mike Date: Sun, 6 Oct 2002 21:54:08 +0000 Subject: [PATCH] o Use relatively new visibility primitives from . o Add typedef for pid_t. o Add comment about missing restrict type-qualifier. o Remove unneeded includes ( and ). --- include/signal.h | 45 +++++++++++++++++++++++++++------------------ 1 file changed, 27 insertions(+), 18 deletions(-) diff --git a/include/signal.h b/include/signal.h index 7abb92074f0c..d7f48877d5e0 100644 --- a/include/signal.h +++ b/include/signal.h @@ -39,20 +39,28 @@ #define _SIGNAL_H_ #include -#include #include #include -#include -#if !defined(_ANSI_SOURCE) && !defined(_POSIX_SOURCE) +#if __BSD_VISIBLE extern __const char *__const sys_signame[NSIG]; extern __const char *__const sys_siglist[NSIG]; extern __const int sys_nsig; #endif +#if __BSD_VISIBLE || __POSIX_VISIBLE >= 200112 || __XSI_VISIBLE +#ifndef _PID_T_DECLARED +typedef __pid_t pid_t; +#define _PID_T_DECLARED +#endif +#endif + __BEGIN_DECLS +struct timespec; + int raise(int); -#ifndef _ANSI_SOURCE + +#if __BSD_VISIBLE || __POSIX_VISIBLE || __XSI_VISIBLE int kill(__pid_t, int); int sigaction(int, const struct sigaction * __restrict, struct sigaction * __restrict); @@ -64,31 +72,32 @@ int sigismember(const sigset_t *, int); int sigpending(sigset_t *); int sigprocmask(int, const sigset_t * __restrict, sigset_t * __restrict); int sigsuspend(const sigset_t *); +/* XXX missing restrict qualifier. */ int sigwait(const sigset_t *, int *); - -#ifdef _P1003_1B_VISIBLE - -__BEGIN_DECLS -int sigqueue(__pid_t, int, const union sigval); -int sigtimedwait(const sigset_t * __restrict, siginfo_t * __restrict, - const struct timespec * __restrict); -int sigwaitinfo(const sigset_t * __restrict, siginfo_t * __restrict); -__END_DECLS - #endif -#ifndef _POSIX_SOURCE + +#if __BSD_VISIBLE || __POSIX_VISIBLE >= 199506 || __XSI_VISIBLE >= 600 +int sigqueue(__pid_t, int, const union sigval); +int sigtimedwait(const sigset_t * __restrict, siginfo_t * __restrict, + const struct timespec * __restrict); +int sigwaitinfo(const sigset_t * __restrict, siginfo_t * __restrict); +#endif + +#if __BSD_VISIBLE || __POSIX_VISIBLE >= 200112 || __XSI_VISIBLE int killpg(__pid_t, int); int sigaltstack(const stack_t * __restrict, stack_t * __restrict); -int sigblock(int); int siginterrupt(int, int); int sigpause(int); +#endif + +#if __BSD_VISIBLE +int sigblock(int); int sigreturn(const struct __ucontext *); int sigsetmask(int); int sigstack(const struct sigstack *, struct sigstack *); int sigvec(int, struct sigvec *, struct sigvec *); void psignal(unsigned int, const char *); -#endif /* !_POSIX_SOURCE */ -#endif /* !_ANSI_SOURCE */ +#endif __END_DECLS #endif /* !_SIGNAL_H_ */