Debian Codegraph @

pico/osdep/signals.h

raw ◀ ▶
Source reconstructed at patch state 0 of 1 — not the installed (fully patched) source.
1 Debian patch touch this file
1 /*
2 * $Id: signals.h 761 2007-10-23 22:35:18Z [email protected] $
3 *
4 * ========================================================================
5 * Copyright 2006 University of Washington
6 *
7 * Licensed under the Apache License, Version 2.0 (the "License");
8 * you may not use this file except in compliance with the License.
9 * You may obtain a copy of the License at
10 *
11 * http://www.apache.org/licenses/LICENSE-2.0
12 *
13 * ========================================================================
14 */
15
16
17 #ifndef PICO_OSDEP_SIGNALS_INCLUDED
18 #define PICO_OSDEP_SIGNALS_INCLUDED
19
20
21 /*
22 * [Re]Define signal functions as needed...
23 */
24 #ifdef POSIX_SIGNALS
25 /*
26 * Redefine signal call to our wrapper of POSIX sigaction
27 */
28 #define signal(SIG,ACT) posix_signal(SIG,ACT)
29 #define our_sigunblock(SIG) posix_sigunblock(SIG)
30 #else /* !POSIX_SIGNALS */
31 #ifdef SYSV_SIGNALS
32 /*
33 * Redefine signal calls to SYSV style call.
34 */
35 #define signal(SIG,ACT) sigset(SIG,ACT)
36 #define our_sigunblock(SIG) sigrelse(SIG)
37 #else /* !SYSV_SIGNALS */
38 #ifdef _WINDOWS
39 #define our_sigunblock(SIG)
40 #else /* !_WINDOWS */
41 /*
42 * Good ol' BSD signals.
43 */
44 #define our_sigunblock(SIG)
45 #endif /* !_WINDOWS */
46 #endif /* !SYSV_SIGNALS */
47 #endif /* !POSIX_SIGNALS */
48
49
50
51 /* exported prototypes */
52 void picosigs(void);
53 #if defined(SIGWINCH) && defined(TIOCGWINSZ)
54 RETSIGTYPE winch_handler(int);
55 #endif
56
57 #ifdef POSIX_SIGNALS
58 void (*posix_signal(int, RETSIGTYPE (*)()))(int);
59 int posix_sigunblock(int);
60 #endif
61
62 #endif /* PICO_OSDEP_SIGNALS_INCLUDED */