From: Tom Tromey <tromey@redhat.com>
To: gdb-patches@sourceware.org
Subject: [4/10] RFC: unconditionally include signal.h
Date: Thu, 15 Nov 2012 19:25:00 -0000 [thread overview]
Message-ID: <87mwyiy8hi.fsf@fleche.redhat.com> (raw)
In-Reply-To: <87obiyzns7.fsf@fleche.redhat.com> (Tom Tromey's message of "Thu, 15 Nov 2012 12:09:12 -0700")
I think that checking for signal.h is pointless, because gdb already
includes it unconditionally in various places -- e.g., utils.c.
This patch removes the useless check and updates the few spots that were
using HAVE_SIGNAL_H.
Tom
* configure.ac: Don't check for signal.h.
* config.in: Rebuild.
* configure: Rebuild.
* common/signals.c: Update.
* configure.ac: Don't check for signal.h.
* config.in: Rebuild.
* configure: Rebuild.
* gdbreplay.c: Update.
* remote-utils.c: Update.
* server.c: Update.
---
gdb/common/signals.c | 2 --
gdb/config.in | 3 ---
gdb/configure | 2 +-
gdb/configure.ac | 2 +-
gdb/gdbserver/config.in | 3 ---
gdb/gdbserver/configure | 2 +-
gdb/gdbserver/configure.ac | 2 +-
gdb/gdbserver/gdbreplay.c | 2 --
gdb/gdbserver/remote-utils.c | 2 --
gdb/gdbserver/server.c | 2 --
10 files changed, 4 insertions(+), 18 deletions(-)
diff --git a/gdb/common/signals.c b/gdb/common/signals.c
index 4ab863c..4541c8e 100644
--- a/gdb/common/signals.c
+++ b/gdb/common/signals.c
@@ -24,9 +24,7 @@
#include <string.h>
#endif
-#ifdef HAVE_SIGNAL_H
#include <signal.h>
-#endif
#include "gdb_signals.h"
diff --git a/gdb/configure.ac b/gdb/configure.ac
index 28291ff..58f715b 100644
--- a/gdb/configure.ac
+++ b/gdb/configure.ac
@@ -1074,7 +1074,7 @@ fi
AC_HEADER_STDC
# elf_hp.h is for HP/UX 64-bit shared library support.
AC_CHECK_HEADERS([nlist.h machine/reg.h poll.h sys/poll.h proc_service.h \
- thread_db.h signal.h stddef.h \
+ thread_db.h stddef.h \
stdlib.h sys/fault.h \
sys/file.h sys/filio.h sys/ioctl.h sys/param.h \
sys/resource.h sys/procfs.h sys/ptrace.h ptrace.h \
diff --git a/gdb/gdbserver/configure.ac b/gdb/gdbserver/configure.ac
index 9b364ff..ecbb921 100644
--- a/gdb/gdbserver/configure.ac
+++ b/gdb/gdbserver/configure.ac
@@ -52,7 +52,7 @@ ACX_CONFIGURE_DIR(["../gnulib"], ["build-gnulib-gdbserver"])
AC_CHECK_HEADERS(sgtty.h termio.h termios.h sys/reg.h dnl
proc_service.h sys/procfs.h thread_db.h linux/elf.h dnl
stdlib.h unistd.h dnl
- errno.h fcntl.h signal.h sys/file.h malloc.h dnl
+ errno.h fcntl.h sys/file.h malloc.h dnl
sys/ioctl.h netinet/in.h sys/socket.h netdb.h dnl
netinet/tcp.h arpa/inet.h sys/wait.h wait.h sys/un.h)
AC_CHECK_FUNCS(pread pwrite pread64 readlink)
diff --git a/gdb/gdbserver/gdbreplay.c b/gdb/gdbserver/gdbreplay.c
index 6034d93..2a48c04 100644
--- a/gdb/gdbserver/gdbreplay.c
+++ b/gdb/gdbserver/gdbreplay.c
@@ -25,9 +25,7 @@
#if HAVE_SYS_FILE_H
#include <sys/file.h>
#endif
-#if HAVE_SIGNAL_H
#include <signal.h>
-#endif
#include <ctype.h>
#if HAVE_FCNTL_H
#include <fcntl.h>
diff --git a/gdb/gdbserver/remote-utils.c b/gdb/gdbserver/remote-utils.c
index adc8783..6f5d7ef 100644
--- a/gdb/gdbserver/remote-utils.c
+++ b/gdb/gdbserver/remote-utils.c
@@ -43,9 +43,7 @@
#if HAVE_SYS_IOCTL_H
#include <sys/ioctl.h>
#endif
-#if HAVE_SIGNAL_H
#include <signal.h>
-#endif
#if HAVE_FCNTL_H
#include <fcntl.h>
#endif
diff --git a/gdb/gdbserver/server.c b/gdb/gdbserver/server.c
index fae9199..b08f1ba 100644
--- a/gdb/gdbserver/server.c
+++ b/gdb/gdbserver/server.c
@@ -24,9 +24,7 @@
#if HAVE_UNISTD_H
#include <unistd.h>
#endif
-#if HAVE_SIGNAL_H
#include <signal.h>
-#endif
#include "gdb_wait.h"
/* The thread set with an `Hc' packet. `Hc' is deprecated in favor of
--
1.7.7.6
next prev parent reply other threads:[~2012-11-15 19:25 UTC|newest]
Thread overview: 44+ messages / expand[flat|nested] mbox.gz Atom feed top
2012-11-15 19:09 [0/10] RFC: use gnulib more heavily + more configure fixes Tom Tromey
2012-11-15 19:11 ` Tom Tromey
2012-11-15 19:14 ` [1/10] RFC: update gnulib Tom Tromey
2012-11-15 19:19 ` Joel Brobecker
2012-11-15 19:15 ` [0/10] RFC: use gnulib more heavily + more configure fixes Eli Zaretskii
2012-11-15 19:22 ` [3/10] RFC: remove gdb_dirent.h Tom Tromey
2012-11-16 2:46 ` Joel Brobecker
2012-11-27 20:11 ` Tom Tromey
2012-11-15 19:25 ` Tom Tromey [this message]
2012-11-16 17:18 ` [4/10] RFC: unconditionally include signal.h Pedro Alves
2012-11-17 1:25 ` Joel Brobecker
2012-11-17 8:15 ` Eli Zaretskii
2012-11-19 15:05 ` Pedro Alves
2012-11-27 20:14 ` Tom Tromey
2012-11-15 19:26 ` [5/10] RFC: don't check for stddef.h Tom Tromey
2012-11-15 19:28 ` [6/10] RFC: don't check for stdlib.h Tom Tromey
2012-11-15 19:29 ` [7/10] RFC: don't check for unistd.h Tom Tromey
2012-11-15 19:31 ` [8/10] RFC: don't check for sys/types.h Tom Tromey
2012-11-15 19:33 ` [2/10] RFC: remove gdb_string.h Tom Tromey
2012-11-15 20:08 ` Eli Zaretskii
2012-11-15 20:22 ` Tom Tromey
2012-11-15 20:34 ` Eli Zaretskii
2012-11-16 2:42 ` Joel Brobecker
2012-11-15 19:33 ` [9/10] RFC: remove gdb_stat.h Tom Tromey
2012-11-15 20:32 ` [10/10] RFC: remove gdb_wait.h Tom Tromey
2012-11-15 20:54 ` Eli Zaretskii
2012-11-15 21:08 ` Joel Brobecker
2012-11-16 8:18 ` Eli Zaretskii
2012-11-16 14:45 ` Joel Brobecker
2012-11-16 15:39 ` Eli Zaretskii
2012-11-16 17:28 ` Pedro Alves
2012-11-16 17:52 ` Eli Zaretskii
2012-11-16 18:10 ` Pedro Alves
2012-11-16 18:26 ` Eli Zaretskii
2012-11-17 2:30 ` Joel Brobecker
2012-11-19 15:09 ` Pedro Alves
2012-11-16 17:55 ` [0/10] RFC: use gnulib more heavily + more configure fixes Pedro Alves
2012-11-27 21:24 ` Tom Tromey
2012-12-10 20:41 ` Tom Tromey
2012-12-11 3:11 ` Joel Brobecker
2012-12-11 10:53 ` Pedro Alves
2012-12-17 19:39 ` Tom Tromey
2013-01-03 18:25 ` Tom Tromey
2013-01-03 18:42 ` Tom Tromey
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=87mwyiy8hi.fsf@fleche.redhat.com \
--to=tromey@redhat.com \
--cc=gdb-patches@sourceware.org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox