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...
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 */
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 */
39 #define our_sigunblock(SIG)
42 * Good ol' BSD signals.
44 #define our_sigunblock(SIG)
45 #endif /* !_WINDOWS */
46 #endif /* !SYSV_SIGNALS */
47 #endif /* !POSIX_SIGNALS */
51 /* exported prototypes */
53 #if defined(SIGWINCH) && defined(TIOCGWINSZ)
54 RETSIGTYPE
winch_handler(int);
58 void (*posix_signal(int, RETSIGTYPE (*)()))(int);
59 int posix_sigunblock(int);
62 #endif /* PICO_OSDEP_SIGNALS_INCLUDED */