Merge branch 'ical'
[alpine.git] / pico / osdep / signals.h
blob2ea33cc4f2d3005bf4b29359fe3abdd257a0d338
1 /*
2 * $Id: signals.h 761 2007-10-23 22:35:18Z hubert@u.washington.edu $
4 * ========================================================================
5 * Copyright 2006 University of Washington
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
11 * http://www.apache.org/licenses/LICENSE-2.0
13 * ========================================================================
17 #ifndef PICO_OSDEP_SIGNALS_INCLUDED
18 #define PICO_OSDEP_SIGNALS_INCLUDED
22 * [Re]Define signal functions as needed...
24 #ifdef POSIX_SIGNALS
26 * Redefine signal call to our wrapper of POSIX sigaction
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
33 * Redefine signal calls to SYSV style call.
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 */
42 * Good ol' BSD signals.
44 #define our_sigunblock(SIG)
45 #endif /* !_WINDOWS */
46 #endif /* !SYSV_SIGNALS */
47 #endif /* !POSIX_SIGNALS */
51 /* exported prototypes */
52 void picosigs(void);
53 #if defined(SIGWINCH) && defined(TIOCGWINSZ)
54 RETSIGTYPE winch_handler(int);
55 #endif
57 #ifdef POSIX_SIGNALS
58 void (*posix_signal(int, RETSIGTYPE (*)()))(int);
59 int posix_sigunblock(int);
60 #endif
62 #endif /* PICO_OSDEP_SIGNALS_INCLUDED */