aboutsummaryrefslogtreecommitdiffstats
path: root/include/signal.h
diff options
context:
space:
mode:
authorMike Barcroft <mike@FreeBSD.org>2002-10-06 21:54:08 +0000
committerMike Barcroft <mike@FreeBSD.org>2002-10-06 21:54:08 +0000
commiteb74223b9f3e3b265b05c8d188e94f236a4e5090 (patch)
tree7278f762a244bfe73ca596857c3ee08dc2c31368 /include/signal.h
parent1d631f7ef1ecf4d90fb9e32daf67e9656547388a (diff)
downloadsrc-eb74223b9f3e3b265b05c8d188e94f236a4e5090.tar.gz
src-eb74223b9f3e3b265b05c8d188e94f236a4e5090.zip
o Use relatively new visibility primitives from <sys/cdefs.h>.
o Add typedef for pid_t. o Add comment about missing restrict type-qualifier. o Remove unneeded includes (<sys/_posix.h> and <sys/time.h>).
Notes
Notes: svn path=/head/; revision=104582
Diffstat (limited to 'include/signal.h')
-rw-r--r--include/signal.h41
1 files changed, 25 insertions, 16 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 <sys/cdefs.h>
-#include <sys/_posix.h>
#include <sys/_types.h>
#include <sys/signal.h>
-#include <sys/time.h>
-#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 *);
+#endif
-#ifdef _P1003_1B_VISIBLE
-
-__BEGIN_DECLS
-int sigqueue(__pid_t, int, const union sigval);
-int sigtimedwait(const sigset_t * __restrict, siginfo_t * __restrict,
+#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);
-__END_DECLS
-
+int sigwaitinfo(const sigset_t * __restrict, siginfo_t * __restrict);
#endif
-#ifndef _POSIX_SOURCE
+
+#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_ */