summaryrefslogtreecommitdiffstats
path: root/src/LYSignal.h
blob: 627edb3f39ad3169938927c975eb54f40a78f787 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
#ifndef LYSIGNAL_H
#define LYSIGNAL_H

#include <signal.h>

#ifdef __cplusplus
extern "C" {
#endif
#ifdef VMS
    extern void VMSsignal(int sig, void (*func) ());

#ifdef signal
#undef signal
#endif				/* signal */
#define signal(a,b) VMSsignal(a,b)	/* use LYCurses.c routines for interrupts */
#endif				/* VMS */

#ifdef HAVE_SIGACTION
    typedef void LYSigHandlerFunc_t (int);

/* implementation in LYUtils.c */
    extern void LYExtSignal(int sig, LYSigHandlerFunc_t *handler);

#else
#define LYExtSignal(sig,h) signal(sig, h)
#endif

#ifdef __cplusplus
}
#endif
#endif				/* LYSIGNAL_H */