aboutsummaryrefslogtreecommitdiff
path: root/gdb/gdbserver
diff options
context:
space:
mode:
authorGary Benson <gbenson@redhat.com>2014-07-30 13:21:40 +0100
committerGary Benson <gbenson@redhat.com>2014-08-07 09:06:48 +0100
commitbb974a2493495923903631bab3de9f340526d353 (patch)
treeac2f4869042ebc445cd4f1096ae8b3a3c9387b17 /gdb/gdbserver
parent6d3d12ebef6fa7dd6bc8c34fbc5e440ac8d0a8c6 (diff)
downloadbinutils-bb974a2493495923903631bab3de9f340526d353.zip
binutils-bb974a2493495923903631bab3de9f340526d353.tar.gz
binutils-bb974a2493495923903631bab3de9f340526d353.tar.bz2
Move errno.h to common-defs.h
This commit moves the inclusion of errno.h to common-defs.h and removes all other inclusions. Note that prior to this commit server.h included errno.h protected by "#ifdef HAVE_ERRNO_H". This protection was added with the Windows CE port, which is currently broken. Since no other platform needs this, I have removed the protection and the configury to support it. gdb/ 2014-08-07 Gary Benson <gbenson@redhat.com> * common/common-defs.h: Include errno.h. * defs.h: Do not include errno.h. * ada-typeprint.c: Likewise. * c-typeprint.c: Likewise. * core-regset.c: Likewise. * corefile.c: Likewise. * corelow.c: Likewise. * event-loop.c: Likewise. * f-typeprint.c: Likewise. * gnu-nat.c: Likewise. * go32-nat.c: Likewise. * i386gnu-nat.c: Likewise. * m2-typeprint.c: Likewise. * nat/linux-btrace.c: Likewise. * p-typeprint.c: Likewise. * procfs.c: Likewise. * remote-sim.c: Likewise. * rs6000-nat.c: Likewise. * target.c: Likewise. * typeprint.c: Likewise. * ui-file.c: Likewise. * valops.c: Likewise. * valprint.c: Likewise. gdb/gdbserver/ 2014-08-07 Gary Benson <gbenson@redhat.com> * configure.ac (AC_CHECK_HEADERS): Remove errno.h. * configure: Regenerate. * config.in: Likewise. * server.h: Do not include errno.h. * event-loop.c: Likewise. * hostio-errno.c: Likewise. * linux-low.c: Likewise. * remote-utils.c: Likewise. * spu-low.c: Likewise. * utils.c: Likewise. * gdbreplay.c: Unconditionally include errno.h.
Diffstat (limited to 'gdb/gdbserver')
-rw-r--r--gdb/gdbserver/ChangeLog14
-rw-r--r--gdb/gdbserver/config.in3
-rwxr-xr-xgdb/gdbserver/configure2
-rw-r--r--gdb/gdbserver/configure.ac2
-rw-r--r--gdb/gdbserver/event-loop.c4
-rw-r--r--gdb/gdbserver/gdbreplay.c2
-rw-r--r--gdb/gdbserver/hostio-errno.c1
-rw-r--r--gdb/gdbserver/linux-low.c1
-rw-r--r--gdb/gdbserver/remote-utils.c3
-rw-r--r--gdb/gdbserver/server.h3
-rw-r--r--gdb/gdbserver/spu-low.c1
-rw-r--r--gdb/gdbserver/utils.c3
12 files changed, 16 insertions, 23 deletions
diff --git a/gdb/gdbserver/ChangeLog b/gdb/gdbserver/ChangeLog
index 34d8bf5..cea7a16 100644
--- a/gdb/gdbserver/ChangeLog
+++ b/gdb/gdbserver/ChangeLog
@@ -1,5 +1,19 @@
2014-08-07 Gary Benson <gbenson@redhat.com>
+ * configure.ac (AC_CHECK_HEADERS): Remove errno.h.
+ * configure: Regenerate.
+ * config.in: Likewise.
+ * server.h: Do not include errno.h.
+ * event-loop.c: Likewise.
+ * hostio-errno.c: Likewise.
+ * linux-low.c: Likewise.
+ * remote-utils.c: Likewise.
+ * spu-low.c: Likewise.
+ * utils.c: Likewise.
+ * gdbreplay.c: Unconditionally include errno.h.
+
+2014-08-07 Gary Benson <gbenson@redhat.com>
+
* server.h: Do not include string.h.
* event-loop.c: Likewise.
* linux-low.c: Likewise.
diff --git a/gdb/gdbserver/config.in b/gdb/gdbserver/config.in
index 6ce45a6..216c01d 100644
--- a/gdb/gdbserver/config.in
+++ b/gdb/gdbserver/config.in
@@ -54,9 +54,6 @@
/* Define if <sys/procfs.h> has elf_fpregset_t. */
#undef HAVE_ELF_FPREGSET_T
-/* Define to 1 if you have the <errno.h> header file. */
-#undef HAVE_ERRNO_H
-
/* Define to 1 if you have the <fcntl.h> header file. */
#undef HAVE_FCNTL_H
diff --git a/gdb/gdbserver/configure b/gdb/gdbserver/configure
index 5f8dcd2..9c1f9a8 100755
--- a/gdb/gdbserver/configure
+++ b/gdb/gdbserver/configure
@@ -4904,7 +4904,7 @@ $as_echo "$as_me: running $SHELL $ac_sub_configure $ac_sub_configure_args --cach
cd "$ac_popdir"
-for ac_header in sgtty.h termio.h termios.h sys/reg.h string.h proc_service.h sys/procfs.h linux/elf.h errno.h fcntl.h signal.h sys/file.h malloc.h sys/ioctl.h netinet/in.h sys/socket.h netdb.h netinet/tcp.h arpa/inet.h
+for ac_header in sgtty.h termio.h termios.h sys/reg.h string.h proc_service.h sys/procfs.h linux/elf.h fcntl.h signal.h sys/file.h malloc.h sys/ioctl.h netinet/in.h sys/socket.h netdb.h netinet/tcp.h arpa/inet.h
do :
as_ac_Header=`$as_echo "ac_cv_header_$ac_header" | $as_tr_sh`
ac_fn_c_check_header_mongrel "$LINENO" "$ac_header" "$as_ac_Header" "$ac_includes_default"
diff --git a/gdb/gdbserver/configure.ac b/gdb/gdbserver/configure.ac
index 67866f8..8e5d74f 100644
--- a/gdb/gdbserver/configure.ac
+++ b/gdb/gdbserver/configure.ac
@@ -82,7 +82,7 @@ ACX_CONFIGURE_DIR(["../../libiberty"], ["build-libiberty-gdbserver"])
AC_CHECK_HEADERS(sgtty.h termio.h termios.h sys/reg.h string.h dnl
proc_service.h sys/procfs.h linux/elf.h dnl
- errno.h fcntl.h signal.h sys/file.h malloc.h dnl
+ fcntl.h signal.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)
AC_CHECK_FUNCS(pread pwrite pread64 readlink)
diff --git a/gdb/gdbserver/event-loop.c b/gdb/gdbserver/event-loop.c
index 1513b59..92c8db0 100644
--- a/gdb/gdbserver/event-loop.c
+++ b/gdb/gdbserver/event-loop.c
@@ -29,10 +29,6 @@
#include <io.h>
#endif
-#ifdef HAVE_ERRNO_H
-#include <errno.h>
-#endif
-
#include <unistd.h>
typedef struct gdb_event gdb_event;
diff --git a/gdb/gdbserver/gdbreplay.c b/gdb/gdbserver/gdbreplay.c
index 706fda64..c70abef 100644
--- a/gdb/gdbserver/gdbreplay.c
+++ b/gdb/gdbserver/gdbreplay.c
@@ -32,9 +32,7 @@
#if HAVE_FCNTL_H
#include <fcntl.h>
#endif
-#if HAVE_ERRNO_H
#include <errno.h>
-#endif
#include <stdlib.h>
#include <string.h>
#include <unistd.h>
diff --git a/gdb/gdbserver/hostio-errno.c b/gdb/gdbserver/hostio-errno.c
index 8817096..f24b51f 100644
--- a/gdb/gdbserver/hostio-errno.c
+++ b/gdb/gdbserver/hostio-errno.c
@@ -22,7 +22,6 @@
on top of errno. */
#include "server.h"
-#include <errno.h>
#include "gdb/fileio.h"
static int
diff --git a/gdb/gdbserver/linux-low.c b/gdb/gdbserver/linux-low.c
index 9188db1..543987a 100644
--- a/gdb/gdbserver/linux-low.c
+++ b/gdb/gdbserver/linux-low.c
@@ -31,7 +31,6 @@
#include <sys/ioctl.h>
#include <fcntl.h>
#include <unistd.h>
-#include <errno.h>
#include <sys/syscall.h>
#include <sched.h>
#include <ctype.h>
diff --git a/gdb/gdbserver/remote-utils.c b/gdb/gdbserver/remote-utils.c
index f3ae393..327677a 100644
--- a/gdb/gdbserver/remote-utils.c
+++ b/gdb/gdbserver/remote-utils.c
@@ -56,9 +56,6 @@
#include <arpa/inet.h>
#endif
#include <sys/stat.h>
-#if HAVE_ERRNO_H
-#include <errno.h>
-#endif
#if USE_WIN32API
#include <winsock2.h>
diff --git a/gdb/gdbserver/server.h b/gdb/gdbserver/server.h
index 1e2c3a1..db6ddde 100644
--- a/gdb/gdbserver/server.h
+++ b/gdb/gdbserver/server.h
@@ -27,9 +27,6 @@
#include "version.h"
-#ifdef HAVE_ERRNO_H
-#include <errno.h>
-#endif
#include <setjmp.h>
#ifdef HAVE_ALLOCA_H
diff --git a/gdb/gdbserver/spu-low.c b/gdb/gdbserver/spu-low.c
index cb1ac0d..867f97b 100644
--- a/gdb/gdbserver/spu-low.c
+++ b/gdb/gdbserver/spu-low.c
@@ -24,7 +24,6 @@
#include <sys/ptrace.h>
#include <fcntl.h>
#include <unistd.h>
-#include <errno.h>
#include <sys/syscall.h>
#include "filestuff.h"
#include "hostio.h"
diff --git a/gdb/gdbserver/utils.c b/gdb/gdbserver/utils.c
index ec37a9b..b011637 100644
--- a/gdb/gdbserver/utils.c
+++ b/gdb/gdbserver/utils.c
@@ -17,9 +17,6 @@
along with this program. If not, see <http://www.gnu.org/licenses/>. */
#include "server.h"
-#if HAVE_ERRNO_H
-#include <errno.h>
-#endif
#ifdef IN_PROCESS_AGENT
# define PREFIX "ipa: "