1macro-constant SIG_DFL {void(*)(int)}
2macro-constant SIG_ERR {void(*)(int)}
3#if !defined ISO && !defined ISO99 && !defined ISO11 && !defined POSIX && !defined POSIX2008
4macro-constant SIG_HOLD {void(*)(int)}
5#endif
6macro-constant SIG_IGN {void(*)(int)}
7
8type sig_atomic_t
9#if !defined ISO && !defined ISO99 && !defined ISO11
10type sigset_t
11#endif
12#if !defined ISO && !defined ISO99 && !defined ISO11 && !defined POSIX
13type pid_t
14#elif defined POSIX
15# define pid_t __pid_t
16# define uid_t __uid_t
17#endif
18#if defined XOPEN2K8 || defined POSIX2008
19type size_t
20type pthread_t
21type uid_t
22
23type mcontext_t
24
25type ucontext_t
26element ucontext_t {ucontext_t*} uc_link
27// Bug 21634: uc_sigmask has wrong type.
28xfail[ia64-linux]-element ucontext_t sigset_t uc_sigmask
29element ucontext_t stack_t uc_stack
30// Bug 21635: uc_mcontext has wrong type.
31xfail[powerpc32-linux]-element ucontext_t mcontext_t uc_mcontext
32
33type {struct timespec}
34element {struct timespec} __time_t tv_sec
35// Bug 16437: tv_nsec has wrong type.
36xfail[x86_64-x32-linux]-element {struct timespec} long tv_nsec
37#endif
38
39#if defined POSIX || defined UNIX98 || defined XOPEN2K || defined XOPEN2K8 || defined POSIX2008
40element {union sigval} int sival_int
41element {union sigval} {void*} sival_ptr
42
43type {struct sigevent}
44
45// Test the elements of the sigevent_t structure.
46element {struct sigevent} int sigev_notify
47element {struct sigevent} int sigev_signo
48element {struct sigevent} {union sigval} sigev_value
49element {struct sigevent} {void(*} sigev_notify_function )(union sigval)
50element {struct sigevent} {pthread_attr_t*} sigev_notify_attributes
51
52constant SIGEV_NONE
53constant SIGEV_SIGNAL
54constant SIGEV_THREAD
55
56type {union sigval}
57
58macro SIGRTMIN
59macro SIGRTMAX
60#endif
61
62macro-int-constant SIGABRT {int} > 0
63macro-int-constant SIGFPE {int} > 0
64macro-int-constant SIGILL {int} > 0
65macro-int-constant SIGINT {int} > 0
66macro-int-constant SIGSEGV {int} > 0
67macro-int-constant SIGTERM {int} > 0
68
69function void (*signal (int, void(*)(int)))(int)
70function int raise (int)
71
72#if !defined ISO && !defined ISO99 && !defined ISO11
73macro-int-constant SIGALRM {int} > 0
74macro-int-constant SIGHUP {int} > 0
75macro-int-constant SIGKILL {int} > 0
76macro-int-constant SIGPIPE {int} > 0
77macro-int-constant SIGQUIT {int} > 0
78macro-int-constant SIGUSR1 {int} > 0
79macro-int-constant SIGUSR2 {int} > 0
80macro-int-constant SIGCHLD {int} > 0
81macro-int-constant SIGCONT {int} > 0
82macro-int-constant SIGSTOP {int} > 0
83macro-int-constant SIGTSTP {int} > 0
84macro-int-constant SIGTTIN {int} > 0
85macro-int-constant SIGTTOU {int} > 0
86# ifndef XPG4
87macro-int-constant SIGBUS {int} > 0
88# endif
89# if !defined POSIX && !defined XPG4
90macro-int-constant SIGPOLL {int} > 0
91macro-int-constant SIGPROF {int} > 0
92macro-int-constant SIGSYS {int} > 0
93# endif
94# if !defined POSIX && !defined XPG4 && !defined POSIX2008
95macro-int-constant SIGTRAP {int} > 0
96# endif
97# if !defined POSIX && !defined XPG4
98macro-int-constant SIGURG {int} > 0
99macro-int-constant SIGVTALRM {int} > 0
100macro-int-constant SIGXCPU {int} > 0
101macro-int-constant SIGXFSZ {int} > 0
102# endif
103
104type {struct sigaction}
105
106element {struct sigaction} {void(*} sa_handler )(int)
107element {struct sigaction} sigset_t sa_mask
108element {struct sigaction} int sa_flags
109# ifndef XPG4
110element {struct sigaction} {void(*} sa_sigaction )(int, siginfo_t*, void*)
111# endif
112
113constant SA_NOCLDSTOP
114# ifndef XPG4
115// Bug 23089: hurd: missing siginfo support.
116xfail[i386-gnu]-constant SA_SIGINFO
117# endif
118constant SIG_BLOCK
119constant SIG_UNBLOCK
120constant SIG_SETMASK
121# if !defined XPG4 && !defined POSIX && !defined POSIX2008
122constant SA_ONSTACK
123# endif
124# if !defined XPG4 && !defined POSIX
125constant SA_RESETHAND
126constant SA_RESTART
127// Bug 23090: hurd: missing SA_NOCLDWAIT support.
128xfail[i386-gnu]-constant SA_NOCLDWAIT
129constant SA_NODEFER
130# endif
131# if !defined XPG4 && !defined POSIX && !defined POSIX2008
132constant SS_ONSTACK
133constant SS_DISABLE
134constant MINSIGSTKSZ
135constant SIGSTKSZ
136# endif
137
138# if !defined XPG4 && !defined POSIX
139type ucontext_t
140
141element ucontext_t {ucontext_t*} uc_link
142// Bug 21634: uc_sigmask has wrong type.
143xfail[ia64-linux]-element ucontext_t sigset_t uc_sigmask
144element ucontext_t stack_t uc_stack
145// Bug 21635: uc_mcontext has wrong type.
146xfail[powerpc32-linux]-element ucontext_t mcontext_t uc_mcontext
147
148type stack_t
149
150element stack_t {void*} ss_sp
151element stack_t size_t ss_size
152element stack_t int ss_flags
153
154#  if !defined XOPEN2K8 && !defined POSIX2008
155type {struct sigstack}
156
157element {struct sigstack} int ss_onstack
158element {struct sigstack} {void*} ss_sp
159#  endif
160# endif
161
162# ifndef XPG4
163type siginfo_t
164
165element siginfo_t int si_signo
166#  if !defined POSIX && !defined POSIX2008
167element siginfo_t int si_errno
168#  endif
169element siginfo_t int si_code
170#  ifndef POSIX
171element siginfo_t pid_t si_pid
172element siginfo_t uid_t si_uid
173element siginfo_t {void*} si_addr
174element siginfo_t int si_status
175// Bug 23821: si_band has type int on sparc64.
176xfail[sparc64-linux]-element siginfo_t long si_band
177#  endif
178#  ifndef XPG42
179element siginfo_t {union sigval} si_value
180#  endif
181# endif
182
183# if !defined POSIX && !defined XPG4
184constant ILL_ILLOPC
185constant ILL_ILLOPN
186constant ILL_ILLADR
187constant ILL_ILLTRP
188constant ILL_PRVOPC
189constant ILL_PRVREG
190constant ILL_COPROC
191constant ILL_BADSTK
192constant FPE_INTDIV
193constant FPE_INTOVF
194constant FPE_FLTDIV
195constant FPE_FLTOVF
196constant FPE_FLTUND
197constant FPE_FLTRES
198constant FPE_FLTINV
199constant FPE_FLTSUB
200constant SEGV_MAPERR
201constant SEGV_ACCERR
202constant BUS_ADRALN
203constant BUS_ADRERR
204constant BUS_OBJERR
205constant CLD_EXITED
206constant CLD_KILLED
207constant CLD_DUMPED
208constant CLD_TRAPPED
209constant CLD_STOPPED
210constant CLD_CONTINUED
211constant POLL_IN
212constant POLL_OUT
213constant POLL_MSG
214constant POLL_ERR
215constant POLL_PRI
216constant POLL_HUP
217# endif
218# if !defined POSIX && !defined XPG4 && !defined POSIX2008
219constant TRAP_BRKPT
220constant TRAP_TRACE
221# endif
222# if !defined XPG4 && !defined XPG42
223constant SI_USER
224constant SI_QUEUE
225constant SI_TIMER
226constant SI_ASYNCIO
227constant SI_MESGQ
228# endif
229
230# if !defined XPG4 && !defined XOPEN2K8 && !defined POSIX && !defined POSIX2008
231function void (*bsd_signal (int, void(*)(int)))(int)
232# endif
233function int kill (pid_t, int)
234# if !defined XPG4 && !defined POSIX && !defined POSIX2008
235function int killpg (pid_t, int)
236# endif
237# if !defined XPG4 && !defined XPG42
238function int pthread_kill (pthread_t, int)
239function int pthread_sigmask (int, const sigset_t*, sigset_t*)
240# endif
241function int sigaction (int, const struct sigaction*, struct sigaction*)
242function int sigaddset (sigset_t*, int)
243# if !defined XPG4 && !defined POSIX && !defined POSIX2008
244function int sigaltstack (const stack_t*, stack_t*)
245# endif
246function int sigdelset (sigset_t*, int)
247function int sigemptyset (sigset_t*)
248function int sigfillset (sigset_t*)
249# if !defined XPG4 && !defined POSIX && !defined POSIX2008
250function int sighold (int)
251function int sigignore (int)
252function int siginterrupt (int, int)
253# endif
254function int sigismember (const sigset_t*, int)
255#if !defined XPG4 && !defined POSIX && !defined POSIX2008
256function int sigpause (int)
257# endif
258function int sigpending (sigset_t*)
259function int sigprocmask (int, const sigset_t*, sigset_t*)
260# if !defined XPG4 && !defined XPG42
261function int sigqueue (pid_t, int, const union sigval)
262# endif
263# if !defined XPG4 && !defined POSIX && !defined POSIX2008
264function int sigrelse (int)
265function void (*sigset (int, void(*)(int)))(int)
266# endif
267# if defined XPG42 || defined UNIX98
268function int sigstack (struct sigstack*, struct sigstack*)
269# endif
270function int sigsuspend (const sigset_t*)
271# if !defined XPG4 && !defined XPG42
272function int sigtimedwait (const sigset_t*, siginfo_t*, const struct timespec*)
273# endif
274# if !defined XPG4 && !defined XPG42
275function int sigwait (const sigset_t*, int*)
276function int sigwaitinfo (const sigset_t*, siginfo_t*)
277# endif
278# if defined XOPEN2K8 || defined POSIX2008
279function void psiginfo (const siginfo_t*, const char*)
280function void psignal (int, const char*)
281# endif
282
283// The following expressions are not entirely correct but the current
284// poorfnmatch implementation doesn't grok the right form.
285allow sa_*
286allow SA_*
287# ifndef XPG4
288allow si_*
289allow SI_*
290# endif
291# if !defined XPG4 && !defined XPG42
292allow sigev_*
293allow SIGEV_*
294allow sival_*
295# endif
296# if !defined POSIX && !defined XPG4 && !defined XPG42
297allow uc_*
298# endif
299# if !defined POSIX && !defined XPG4
300allow BUS_*
301allow CLD_*
302allow FPE_*
303allow ILL_*
304allow POLL_*
305allow SEGV_*
306# endif
307# if !defined POSIX && !defined XPG4 && !defined POSIX2008
308allow SS_*
309allow SV_*
310allow TRAP_*
311allow ss_*
312allow sv_*
313# endif
314allow *_t
315
316allow-header time.h
317#endif
318
319allow SIG[ABCDEFGHIJKLMNOPQRSTUVWXYZ]*
320allow SIG_*
321