Bind grep-highlight-matches to nil
[emacs.git] / src / syssignal.h
blob5c14479ccad0f20e0075b3f94c3b9858664e98de
1 /* syssignal.h - System-dependent definitions for signals.
3 Copyright (C) 1993, 1999, 2001-2015 Free Software Foundation, Inc.
5 This file is part of GNU Emacs.
7 GNU Emacs is free software: you can redistribute it and/or modify
8 it under the terms of the GNU General Public License as published by
9 the Free Software Foundation, either version 3 of the License, or
10 (at your option) any later version.
12 GNU Emacs is distributed in the hope that it will be useful,
13 but WITHOUT ANY WARRANTY; without even the implied warranty of
14 MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
15 GNU General Public License for more details.
17 You should have received a copy of the GNU General Public License
18 along with GNU Emacs. If not, see <http://www.gnu.org/licenses/>. */
20 #include <signal.h>
22 extern void init_signals (bool);
23 extern void block_child_signal (sigset_t *);
24 extern void unblock_child_signal (sigset_t const *);
25 extern void block_tty_out_signal (sigset_t *);
26 extern void unblock_tty_out_signal (sigset_t const *);
28 #ifdef HAVE_PTHREAD
29 #include <pthread.h>
30 /* If defined, asynchronous signals delivered to a non-main thread are
31 forwarded to the main thread. */
32 #define FORWARD_SIGNAL_TO_MAIN_THREAD
33 #endif
35 /* On Cygwin as of 2015-06-22 SIGEV_SIGNAL is defined as an enum
36 constant but not as a macro. */
37 #if defined CYGWIN && !defined SIGEV_SIGNAL
38 #define SIGEV_SIGNAL SIGEV_SIGNAL
39 #endif
41 #if defined HAVE_TIMER_SETTIME && defined SIGEV_SIGNAL
42 # define HAVE_ITIMERSPEC
43 #endif
45 #if (defined SIGPROF && !defined PROFILING \
46 && (defined HAVE_SETITIMER || defined HAVE_ITIMERSPEC))
47 # define PROFILER_CPU_SUPPORT
48 #endif
50 extern sigset_t empty_mask;
52 typedef void (*signal_handler_t) (int);
54 extern void emacs_sigaction_init (struct sigaction *, signal_handler_t);
55 char const *safe_strsignal (int) ATTRIBUTE_CONST;
57 #if NSIG < NSIG_MINIMUM
58 # undef NSIG
59 # define NSIG NSIG_MINIMUM
60 #endif
62 #ifndef SA_SIGINFO
63 # define SA_SIGINFO 0
64 #endif
66 #ifndef emacs_raise
67 # define emacs_raise(sig) raise (sig)
68 #endif
70 #ifndef HAVE_STRSIGNAL
71 # define strsignal(sig) safe_strsignal (sig)
72 #endif
74 void deliver_process_signal (int, signal_handler_t);