comparison src/sighandlers.cc @ 2931:dd37ffb94c63

[project @ 1997-05-05 22:50:13 by jwe]
author jwe
date Mon, 05 May 1997 22:50:13 +0000
parents 66ef74ee5d9f
children 5708b8bb4f06
comparison
equal deleted inserted replaced
2930:1b219fa3c56a 2931:dd37ffb94c63
72 #endif 72 #endif
73 73
74 #if defined (MUST_REINSTALL_SIGHANDLERS) 74 #if defined (MUST_REINSTALL_SIGHANDLERS)
75 #define MAYBE_REINSTALL_SIGHANDLER(sig, handler) \ 75 #define MAYBE_REINSTALL_SIGHANDLER(sig, handler) \
76 octave_set_signal_handler (sig, handler) 76 octave_set_signal_handler (sig, handler)
77 #define REINSTALL_USES_SIG 1
77 #else 78 #else
78 #define MAYBE_REINSTALL_SIGHANDLER(sig, handler) \ 79 #define MAYBE_REINSTALL_SIGHANDLER(sig, handler) \
79 do { } while (0) 80 do { } while (0)
80 #endif 81 #endif
81 82
82 #if defined (__EMX__) 83 #if defined (__EMX__)
83 #define MAYBE_ACK_SIGNAL(sig) \ 84 #define MAYBE_ACK_SIGNAL(sig) \
84 octave_set_signal_handler (sig, SIG_ACK) 85 octave_set_signal_handler (sig, SIG_ACK)
86 #define ACK_USES_SIG 1
85 #else 87 #else
86 #define MAYBE_ACK_SIGNAL(sig) \ 88 #define MAYBE_ACK_SIGNAL(sig) \
87 do { } while (0) 89 do { } while (0)
88 #endif 90 #endif
89 91
264 // This also has to work for SIGBREAK (on systems that have it), so we 266 // This also has to work for SIGBREAK (on systems that have it), so we
265 // use the value of sig, instead of just assuming that it is called 267 // use the value of sig, instead of just assuming that it is called
266 // for SIGINT only. 268 // for SIGINT only.
267 269
268 static RETSIGTYPE 270 static RETSIGTYPE
271 #if defined (ACK_USES_SIG) || defined (REINSTALL_USES_SIG)
269 sigint_handler (int sig) 272 sigint_handler (int sig)
273 #else
274 sigint_handler (int)
275 #endif
270 { 276 {
271 MAYBE_ACK_SIGNAL (sig); 277 MAYBE_ACK_SIGNAL (sig);
272 278
273 MAYBE_REINSTALL_SIGHANDLER (sig, sigint_handler); 279 MAYBE_REINSTALL_SIGHANDLER (sig, sigint_handler);
274 280