This is the mail archive of the
gdb-patches@sources.redhat.com
mailing list for the GDB project.
[RFC]: cleanup, remove "signals.h"
- To: gdb-patches at sourceware dot cygnus dot com
- Subject: [RFC]: cleanup, remove "signals.h"
- From: jtc at redback dot com (J.T. Conklin)
- Date: 02 Feb 2001 15:29:50 -0800
- Reply-To: jtc at redback dot com
Anyone see any problems with the enclosed patch?
A long time ago the local header "signals.h" was used as a wrapper for
<signal.h> except job control signals were #undefined if job control
wasn't present or didn't work. From the changelogs, it appears that
that use was stopped in 1993. From that point onwards, signals.h was
just a wrapper for <signal.h>.
This seems pretty pointless to me, and IMO it's time enough for GDB to
include <signal.h> directly (besides if we needed a <signal.h> wrapper,
we'd call it gdb_signal.h to match our established convention (granted
that convention wasn't in place way back in 1993)).
If there are no objections, I'll check this in next week.
--jtc
2001-02-02 J.T. Conklin <jtc@redback.com>
* signals.h: Removed.
* event-top.c (#include <signal.h>): Changed from signals.h.
* inflow.c: Likewise.
* mac-xdep.c: Likewise.
* ser-pipe.c: Likewise.
* ser-tcp.c: Likewise.
* standalone.c: Likewise.
* top.c: Likewise.
* utils.c: Likewise.
* Makefile.in: Removed signals.h from dependencies.
Index: Makefile.in
===================================================================
RCS file: /cvs/src/src/gdb/Makefile.in,v
retrieving revision 1.59
diff -c -r1.59 Makefile.in
*** Makefile.in 2001/02/02 19:14:32 1.59
--- Makefile.in 2001/02/02 23:23:26
***************
*** 616,622 ****
HFILES_NO_SRCDIR = bcache.h buildsym.h call-cmds.h coff-solib.h defs.h \
dst.h environ.h $(gdbcmd_h) gdbcore.h \
gdb-stabs.h hpread.h $(inferior_h) language.h minimon.h monitor.h \
! objfiles.h parser-defs.h partial-stab.h serial.h signals.h solib.h \
symfile.h stabsread.h target.h terminal.h typeprint.h xcoffsolib.h \
c-lang.h ch-lang.h f-lang.h \
jv-lang.h \
--- 616,622 ----
HFILES_NO_SRCDIR = bcache.h buildsym.h call-cmds.h coff-solib.h defs.h \
dst.h environ.h $(gdbcmd_h) gdbcore.h \
gdb-stabs.h hpread.h $(inferior_h) language.h minimon.h monitor.h \
! objfiles.h parser-defs.h partial-stab.h serial.h solib.h \
symfile.h stabsread.h target.h terminal.h typeprint.h xcoffsolib.h \
c-lang.h ch-lang.h f-lang.h \
jv-lang.h \
***************
*** 1519,1525 ****
$(inferior_h) target.h language.h symfile.h gdb_string.h
inflow.o: inflow.c $(bfd_h) $(command_h) $(defs_h) $(inferior_h) \
! signals.h target.h terminal.h gdbthread.h gdb_string.h
infptrace.o: infptrace.c $(defs_h) $(gdbcore_h) $(inferior_h) target.h \
gdb_string.h gdb_wait.h $(command_h)
--- 1519,1525 ----
$(inferior_h) target.h language.h symfile.h gdb_string.h
inflow.o: inflow.c $(bfd_h) $(command_h) $(defs_h) $(inferior_h) \
! target.h terminal.h gdbthread.h gdb_string.h
infptrace.o: infptrace.c $(defs_h) $(gdbcore_h) $(inferior_h) target.h \
gdb_string.h gdb_wait.h $(command_h)
***************
*** 1862,1874 ****
ser-go32.o: ser-go32.c $(defs_h) serial.h
! ser-mac.o: ser-mac.c $(defs_h) serial.h signals.h
! ser-ocd.o: ser-ocd.c $(defs_h) serial.h signals.h gdb_string.h
! ser-pipe.o: ser-pipe.c $(defs_h) serial.h signals.h gdb_string.h ser-unix.h
! ser-tcp.o: ser-tcp.c $(defs_h) serial.h signals.h gdb_string.h ser-unix.h
ser-unix.o: ser-unix.c $(defs_h) serial.h ser-unix.h
--- 1862,1874 ----
ser-go32.o: ser-go32.c $(defs_h) serial.h
! ser-mac.o: ser-mac.c $(defs_h) serial.h
! ser-ocd.o: ser-ocd.c $(defs_h) serial.h gdb_string.h
! ser-pipe.o: ser-pipe.c $(defs_h) serial.h gdb_string.h ser-unix.h
! ser-tcp.o: ser-tcp.c $(defs_h) serial.h gdb_string.h ser-unix.h
ser-unix.o: ser-unix.c $(defs_h) serial.h ser-unix.h
***************
*** 1962,1968 ****
$(defs_h) $(gdbcmd_h) $(expression_h) $(readline_headers)
top.o: top.c top.h $(bfd_h) $(getopt_h) $(readline_headers) call-cmds.h \
! $(defs_h) $(gdbcmd_h) $(inferior_h) language.h signals.h \
$(remote_utils_h) gdb_string.h $(event_loop_h) $(event_top_h) \
completer.h $(version_h)
--- 1962,1968 ----
$(defs_h) $(gdbcmd_h) $(expression_h) $(readline_headers)
top.o: top.c top.h $(bfd_h) $(getopt_h) $(readline_headers) call-cmds.h \
! $(defs_h) $(gdbcmd_h) $(inferior_h) language.h \
$(remote_utils_h) gdb_string.h $(event_loop_h) $(event_top_h) \
completer.h $(version_h)
***************
*** 1977,1983 ****
umax-xdep.o: umax-xdep.c $(defs_h) $(gdbcore_h) $(inferior_h)
utils.o: utils.c $(bfd_h) $(defs_h) $(expression_h) $(gdbcmd_h) \
! language.h signals.h target.h terminal.h $(readline_headers) \
gdb_string.h $(event_loop_h) $(event_top_h)
valarith.o: valarith.c $(bfd_h) $(defs_h) $(expression_h) \
--- 1977,1983 ----
umax-xdep.o: umax-xdep.c $(defs_h) $(gdbcore_h) $(inferior_h)
utils.o: utils.c $(bfd_h) $(defs_h) $(expression_h) $(gdbcmd_h) \
! language.h target.h terminal.h $(readline_headers) \
gdb_string.h $(event_loop_h) $(event_top_h)
valarith.o: valarith.c $(bfd_h) $(defs_h) $(expression_h) \
Index: event-top.c
===================================================================
RCS file: /cvs/src/src/gdb/event-top.c,v
retrieving revision 1.10
diff -c -r1.10 event-top.c
*** event-top.c 2000/12/15 01:01:46 1.10
--- event-top.c 2001/02/02 23:23:28
***************
*** 24,32 ****
#include "inferior.h"
#include "target.h"
#include "terminal.h" /* for job_control */
- #include "signals.h"
#include "event-loop.h"
#include "event-top.h"
/* For dont_repeat() */
#include "gdbcmd.h"
--- 24,32 ----
#include "inferior.h"
#include "target.h"
#include "terminal.h" /* for job_control */
#include "event-loop.h"
#include "event-top.h"
+ #include <signal.h>
/* For dont_repeat() */
#include "gdbcmd.h"
Index: inflow.c
===================================================================
RCS file: /cvs/src/src/gdb/inflow.c,v
retrieving revision 1.4
diff -c -r1.4 inflow.c
*** inflow.c 2000/12/15 01:01:47 1.4
--- inflow.c 2001/02/02 23:23:29
***************
*** 22,28 ****
#include "frame.h"
#include "inferior.h"
#include "command.h"
- #include "signals.h"
#include "serial.h"
#include "terminal.h"
#include "target.h"
--- 22,27 ----
Index: mac-xdep.c
===================================================================
RCS file: /cvs/src/src/gdb/mac-xdep.c,v
retrieving revision 1.3
diff -c -r1.3 mac-xdep.c
*** mac-xdep.c 2001/01/31 01:24:01 1.3
--- mac-xdep.c 2001/02/02 23:23:29
***************
*** 72,78 ****
#include "call-cmds.h"
#include "symtab.h"
#include "inferior.h"
! #include "signals.h"
#include "target.h"
#include "breakpoint.h"
#include "gdbtypes.h"
--- 72,78 ----
#include "call-cmds.h"
#include "symtab.h"
#include "inferior.h"
! #include <signal.h>
#include "target.h"
#include "breakpoint.h"
#include "gdbtypes.h"
Index: ser-pipe.c
===================================================================
RCS file: /cvs/src/src/gdb/ser-pipe.c,v
retrieving revision 1.7
diff -c -r1.7 ser-pipe.c
*** ser-pipe.c 2001/02/02 19:14:33 1.7
--- ser-pipe.c 2001/02/02 23:23:30
***************
*** 32,38 ****
#include <fcntl.h>
#include "gdb_string.h"
! #include "signals.h"
static int pipe_open (serial_t scb, const char *name);
static void pipe_close (serial_t scb);
--- 32,38 ----
#include <fcntl.h>
#include "gdb_string.h"
! #include <signal.h>
static int pipe_open (serial_t scb, const char *name);
static void pipe_close (serial_t scb);
Index: ser-tcp.c
===================================================================
RCS file: /cvs/src/src/gdb/ser-tcp.c,v
retrieving revision 1.1.1.9
diff -c -r1.1.1.9 ser-tcp.c
*** ser-tcp.c 1999/10/05 23:08:47 1.1.1.9
--- ser-tcp.c 2001/02/02 23:23:30
***************
*** 32,38 ****
#include <netinet/tcp.h>
#endif
! #include "signals.h"
#include "gdb_string.h"
static int tcp_open (serial_t scb, const char *name);
--- 32,38 ----
#include <netinet/tcp.h>
#endif
! #include <signal.h>
#include "gdb_string.h"
static int tcp_open (serial_t scb, const char *name);
Index: signals.h
===================================================================
RCS file: signals.h
diff -N signals.h
*** /sourceware/cvs-tmp/cvsobb3o0 Fri Feb 2 15:24:05 2001
--- /dev/null Tue May 5 13:32:27 1998
***************
*** 1,28 ****
- /* Signal handler definitions for GDB, the GNU Debugger.
- Copyright (C) 1986, 1989 Free Software Foundation, Inc.
-
- This file is part of GDB.
-
- This program is free software; you can redistribute it and/or modify
- it under the terms of the GNU General Public License as published by
- the Free Software Foundation; either version 2 of the License, or
- (at your option) any later version.
-
- This program is distributed in the hope that it will be useful,
- but WITHOUT ANY WARRANTY; without even the implied warranty of
- MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
- GNU General Public License for more details.
-
- You should have received a copy of the GNU General Public License
- along with this program; if not, write to the Free Software
- Foundation, Inc., 59 Temple Place - Suite 330,
- Boston, MA 02111-1307, USA. */
-
-
- /* This file is almost the same as including <signal.h> except that it
- eliminates certain signal names when job control is not supported,
- (or, on some systems, when job control is there but doesn't work
- the way GDB expects it to work). */
- /* This has been superceded by the job_control variable in serial.h. */
-
- #include <signal.h>
--- 0 ----
Index: standalone.c
===================================================================
RCS file: /cvs/src/src/gdb/standalone.c,v
retrieving revision 1.4
diff -c -r1.4 standalone.c
*** standalone.c 2001/01/19 08:01:46 1.4
--- standalone.c 2001/02/02 23:23:30
***************
*** 30,36 ****
#endif /* SIGTSTP and SIGIO defined (must be 4.2) */
#include "defs.h"
! #include "signals.h"
#include "symtab.h"
#include "frame.h"
#include "inferior.h"
--- 30,36 ----
#endif /* SIGTSTP and SIGIO defined (must be 4.2) */
#include "defs.h"
! #include <signal.h>
#include "symtab.h"
#include "frame.h"
#include "inferior.h"
Index: top.c
===================================================================
RCS file: /cvs/src/src/gdb/top.c,v
retrieving revision 1.27
diff -c -r1.27 top.c
*** top.c 2001/01/25 15:19:30 1.27
--- top.c 2001/02/02 23:23:50
***************
*** 23,29 ****
#include "call-cmds.h"
#include "symtab.h"
#include "inferior.h"
! #include "signals.h"
#include "target.h"
#include "breakpoint.h"
#include "gdbtypes.h"
--- 23,29 ----
#include "call-cmds.h"
#include "symtab.h"
#include "inferior.h"
! #include <signal.h>
#include "target.h"
#include "breakpoint.h"
#include "gdbtypes.h"
Index: utils.c
===================================================================
RCS file: /cvs/src/src/gdb/utils.c,v
retrieving revision 1.27
diff -c -r1.27 utils.c
*** utils.c 2001/01/31 03:46:23 1.27
--- utils.c 2001/02/02 23:24:05
***************
*** 40,46 ****
#undef reg
#endif
! #include "signals.h"
#include "gdbcmd.h"
#include "serial.h"
#include "bfd.h"
--- 40,46 ----
#undef reg
#endif
! #include <signal.h>
#include "gdbcmd.h"
#include "serial.h"
#include "bfd.h"
--
J.T. Conklin
RedBack Networks