* event-top.c (async_init_signals): Allow for systems that do not
authorMark Mitchell <mark@codesourcery.com>
Wed, 16 Mar 2005 17:05:31 +0000 (17:05 +0000)
committerMark Mitchell <mark@codesourcery.com>
Wed, 16 Mar 2005 17:05:31 +0000 (17:05 +0000)
define SIGQUIT.
* ser-tcp.c (net_open): Allow for systems that do not have SIGPIPE.

gdb/ChangeLog
gdb/event-top.c
gdb/ser-tcp.c

index fc9f6326e436f6d3d9343bbbd69d6cda5c07ebb4..0acce72080e16af62ff7633f59d89896910ad993 100644 (file)
@@ -1,3 +1,9 @@
+2005-03-16  Mark Mitchell  <mark@codesourcery.com>
+
+       * 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.
+
 2005-03-15  Mark Mitchell  <mark@codesourcery.com>
 
        * utils.c (internal_vproblem): Guard call to fork with 
index fab94f76f8f7ebdcc9096d3a1534565a84d36aff..4614d4d2f4c8af13589f7479821997357c85708d 100644 (file)
@@ -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
index 20091919dd1b85ddd6619cf1301e6977071f2da2..c2e4044cc926571842810d2e1f933aaa9d939d82 100644 (file)
@@ -186,9 +186,11 @@ net_open (struct serial *scb, const char *name)
                  (char *)&tmp, sizeof (tmp));
     }
 
+#ifdef SIGPIPE
   /* If we don't do this, then GDB simply exits
      when the remote side dies.  */
   signal (SIGPIPE, SIG_IGN);
+#endif
 
   return 0;
 }
This page took 0.028154 seconds and 4 git commands to generate.