reenabled swaptest. quake should now load data and start on big endian architectures...
[AROS-Contrib.git] / gnu / abc-shell / sigact.h
blobeee86453506d0c876fb535ff3c9ea95c15220d6f
1 /* NAME:
2 * sigact.h - sigaction et al
4 * SYNOPSIS:
5 * #include "sigact.h"
7 * DESCRIPTION:
8 * This header is the interface to a fake sigaction(2)
9 * implementation. It provides a POSIX compliant interface
10 * to whatever signal handling mechanisms are available.
11 * It also provides a _Signal() function that is implemented
12 * in terms of sigaction().
13 * If not using signal(2) as part of the underlying
14 * implementation (USE_SIGNAL or USE_SIGMASK), and
15 * NO_SIGNAL is not defined, it also provides a signal()
16 * function that calls _Signal().
18 * SEE ALSO:
19 * sigact.c
22 * RCSid:
23 * $Id$
25 /* Changes to sigact.h for pdksh, Michael Rendell <michael@cs.mun.ca>:
26 * - changed SIG_HDLR to void for use with GNU autoconf
27 * - ifdef'd out ARGS(), volatile and const initializations
28 * - ifdef'd out sigset_t definition - let autoconf handle it
29 * - ifdef out routines not used in ksh if IS_KSH is defined
30 * (same in sigact.c).
32 #ifndef _SIGACT_H
33 #define _SIGACT_H
36 * if you want to install this header as signal.h,
37 * modify this to pick up the original signal.h
39 #ifndef SIGKILL
40 # include <signal.h>
41 #endif
43 #ifdef __amigaos4__
44 # include <signal.h>
45 #endif
47 #ifndef SIG_ERR
48 # define SIG_ERR ((handler_t) -1)
49 #endif
50 #ifndef BADSIG
51 # define BADSIG SIG_ERR
52 #endif
54 #ifndef SA_NOCLDSTOP
55 /* we assume we need the fake sigaction */
56 /* sa_flags */
57 #define SA_NOCLDSTOP 1 /* don't send SIGCHLD on child stop */
58 #define SA_RESTART 2 /* re-start I/O */
60 /* sigprocmask flags */
61 #ifdef AMIGA /* AmigaOS4 changes by Thomas Frieden */
62 #undef SIG_BLOCK
63 #undef SIG_UNBLOCK
64 #undef SIG_SETMASK
65 #endif
67 #define SIG_BLOCK 1
68 #define SIG_UNBLOCK 2
69 #define SIG_SETMASK 4
71 #if !defined(__sys_stdtypes_h) && !defined(CLIB2)
72 typedef unsigned int sigset_t;
73 #endif
76 * POSIX sa_handler should return void, but since we are
77 * implementing in terms of something else, it may
78 * be appropriate to use the normal void return type
80 struct sigaction
82 handler_t sa_handler;
83 sigset_t sa_mask;
84 int sa_flags;
87 #if !defined(__AROS__)
88 int sigaction(int, struct sigaction *, struct sigaction *);
89 #endif
90 int sigaddset(sigset_t *, int);
91 int sigemptyset(sigset_t *);
92 #ifndef CLIB2
93 #ifdef AMIGA /* AmigaOS4 changes by Thomas Frieden */
94 int sigprocmask(int, const sigset_t *, sigset_t *);
95 #else
96 int sigprocmask(int, sigset_t *, sigset_t *);
97 #endif
98 #endif
99 int sigsuspend(sigset_t *);
101 #ifndef sigmask
102 # define sigmask(s) (1<<((s)-1)) /* convert SIGnum to mask */
103 #endif
104 #if !defined(NSIG) && defined(_NSIG)
105 # define NSIG _NSIG
106 #endif
107 #endif /* ! SA_NOCLDSTOP */
108 #endif /* _SIGACT_H */