aboutsummaryrefslogtreecommitdiff
path: root/gdb/event-top.c
diff options
context:
space:
mode:
authorMark Mitchell <mark@codesourcery.com>2005-03-16 17:05:31 +0000
committerMark Mitchell <mark@codesourcery.com>2005-03-16 17:05:31 +0000
commit6d318c73e1caf19fd153a788590dd64402028167 (patch)
treea99e50e40edb13cb8456896650a1f64a50550d63 /gdb/event-top.c
parent1ad12f975f8a2a0ce45569ea3f550ef25705ad37 (diff)
downloadgdb-6d318c73e1caf19fd153a788590dd64402028167.zip
gdb-6d318c73e1caf19fd153a788590dd64402028167.tar.gz
gdb-6d318c73e1caf19fd153a788590dd64402028167.tar.bz2
* event-top.c (async_init_signals): Allow for systems that do not
define SIGQUIT. * ser-tcp.c (net_open): Allow for systems that do not have SIGPIPE.
Diffstat (limited to 'gdb/event-top.c')
-rw-r--r--gdb/event-top.c8
1 files changed, 8 insertions, 0 deletions
diff --git a/gdb/event-top.c b/gdb/event-top.c
index fab94f7..4614d4d 100644
--- a/gdb/event-top.c
+++ b/gdb/event-top.c
@@ -55,7 +55,9 @@ static void async_stop_sig (gdb_client_data arg);
static void async_float_handler (gdb_client_data arg);
/* Signal handlers. */
+#ifdef SIGQUIT
static void handle_sigquit (int sig);
+#endif
static void handle_sighup (int sig);
static void handle_sigfpe (int sig);
#if defined(SIGWINCH) && defined(SIGWINCH_HANDLER)
@@ -133,7 +135,9 @@ void *sigint_token;
#ifdef SIGHUP
void *sighup_token;
#endif
+#ifdef SIGQUIT
void *sigquit_token;
+#endif
void *sigfpe_token;
#if defined(SIGWINCH) && defined(SIGWINCH_HANDLER)
void *sigwinch_token;
@@ -895,6 +899,7 @@ async_init_signals (void)
signal (SIGTRAP, SIG_DFL);
#endif
+#ifdef SIGQUIT
/* If we initialize SIGQUIT to SIG_IGN, then the SIG_IGN will get
passed to the inferior, which we don't want. It would be
possible to do a "signal (SIGQUIT, SIG_DFL)" after we fork, but
@@ -906,6 +911,7 @@ async_init_signals (void)
signal (SIGQUIT, handle_sigquit);
sigquit_token =
create_async_signal_handler (async_do_nothing, NULL);
+#endif
#ifdef SIGHUP
if (signal (SIGHUP, handle_sighup) != SIG_IGN)
sighup_token =
@@ -966,6 +972,7 @@ async_request_quit (gdb_client_data arg)
quit ();
}
+#ifdef SIGQUIT
/* Tell the event loop what to do if SIGQUIT is received.
See event-signal.c. */
static void
@@ -974,6 +981,7 @@ handle_sigquit (int sig)
mark_async_signal_handler_wrapper (sigquit_token);
signal (sig, handle_sigquit);
}
+#endif
/* Called by the event loop in response to a SIGQUIT. */
static void