]> pd.if.org Git - pdclib/blob - includes/signal.h
Put printf() / scanf() test macros in seperate header.
[pdclib] / includes / signal.h
1 /* $Id$ */
2
3 /* Signal handling <string.h>
4
5    This file is part of the Public Domain C Library (PDCLib).
6    Permission is granted to use, modify, and / or redistribute at will.
7 */
8
9 #ifndef _PDCLIB_SIGNAL_H
10 #define _PDCLIB_SIGNAL_H _PDCLIB_SIGNAL_H
11
12 #ifndef _PDCLIB_CONFIG_H
13 #define _PDCLIB_CONFIG_H _PDCLIB_CONFIG_H
14 #include <_PDCLIB_config.h>
15 #endif
16
17 typedef _PDCLIB_sig_atomic sig_atomic_t;
18
19 #define SIG_DFL _PDCLIB_SIG_DFL
20 #define SIG_ERR _PDCLIB_SIG_ERR
21 #define SIG_IGN _PDCLIB_SIG_IGN
22
23 #define SIGABRT _PDCLIB_SIGABRT
24 #define SIGFPE  _PDCLIB_SIGFPE
25 #define SIGILL  _PDCLIB_SIGILL
26 #define SIGINT  _PDCLIB_SIGINT
27 #define SIGSEGV _PDCLIB_SIGSEGV
28 #define SIGTERM _PDCLIB_SIGTERM
29
30 /* Returns the value of func for the most recent successful call to signal()
31    for the signal sig. Returns SIG_ERR and sets errno to a positive value
32    otherwise.
33 */
34 void (*signal( int sig, void (*func)( int ) ) )( int );
35
36 /* Returns zero if successful, nonzero otherwise. */
37 int raise( int sig );
38
39 #endif