This is the mail archive of the
gdb-patches@sources.redhat.com
mailing list for the GDB project.
[PATCH, RFA] Fix handle_stop_sig lossage
- To: gdb-patches at sources dot redhat dot com
- Subject: [PATCH, RFA] Fix handle_stop_sig lossage
- From: Mark Kettenis <kettenis at wins dot uva dot nl>
- Date: Wed, 7 Feb 2001 09:00:51 +0100
- CC: ezannoni at cygnus dot com
Hi,
The attached patch makes GDB build again on Solaris 2.6 and
FreeBSD/Alpha (and probably a couple of more systems). The problem is
that the fragment that defines STOP_SIGNAL if SIGSTP is defined in
event-top.h can appear before <signal.h> is included, whereas a
similar fragment exists in top.c, where <signal.h> is explicitly
included. This leads to undefined references to handle_stop_sig. I
suspect the roblem was somehow introduced by the recent signals.h
removal patch.
OK to check in the attached fix?
Mark
Index: ChangeLog
from Mark Kettenis <kettenis@gnu.org>
* event-top.h [!STOP_SIGNAL]: #include <signal.h>.
Index: event-top.h
===================================================================
RCS file: /cvs/src/src/gdb/event-top.h,v
retrieving revision 1.1.1.3
diff -u -p -r1.1.1.3 event-top.h
--- event-top.h 1999/10/05 23:08:12 1.1.1.3
+++ event-top.h 2001/02/07 07:46:42
@@ -1,5 +1,5 @@
/* Definitions used by GDB event-top.c.
- Copyright 1999 Free Software Foundation, Inc.
+ Copyright 1999, 2001 Free Software Foundation, Inc.
Written by Elena Zannoni <ezannoni@cygnus.com> of Cygnus Solutions.
This file is part of GDB.
@@ -78,6 +78,7 @@ extern void set_async_prompt (char *args
/* Signal to catch ^Z typed while reading a command: SIGTSTP or SIGCONT. */
#ifndef STOP_SIGNAL
+#include <signal.h>
#ifdef SIGTSTP
#define STOP_SIGNAL SIGTSTP
extern void handle_stop_sig (int sig);