Move errno.h to common-defs.h
authorGary Benson <gbenson@redhat.com>
Wed, 30 Jul 2014 12:21:40 +0000 (13:21 +0100)
committerGary Benson <gbenson@redhat.com>
Thu, 7 Aug 2014 08:06:48 +0000 (09:06 +0100)
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.

36 files changed:
gdb/ChangeLog
gdb/ada-typeprint.c
gdb/c-typeprint.c
gdb/common/common-defs.h
gdb/core-regset.c
gdb/corefile.c
gdb/corelow.c
gdb/defs.h
gdb/event-loop.c
gdb/f-typeprint.c
gdb/gdbserver/ChangeLog
gdb/gdbserver/config.in
gdb/gdbserver/configure
gdb/gdbserver/configure.ac
gdb/gdbserver/event-loop.c
gdb/gdbserver/gdbreplay.c
gdb/gdbserver/hostio-errno.c
gdb/gdbserver/linux-low.c
gdb/gdbserver/remote-utils.c
gdb/gdbserver/server.h
gdb/gdbserver/spu-low.c
gdb/gdbserver/utils.c
gdb/gnu-nat.c
gdb/go32-nat.c
gdb/i386gnu-nat.c
gdb/m2-typeprint.c
gdb/nat/linux-btrace.c
gdb/p-typeprint.c
gdb/procfs.c
gdb/remote-sim.c
gdb/rs6000-nat.c
gdb/target.c
gdb/typeprint.c
gdb/ui-file.c
gdb/valops.c
gdb/valprint.c

index 8cb54b0ad21a68e0e77d2df24da8c8fff6f47705..5261972379f6140532ec497954ba249a79e1e2f2 100644 (file)
@@ -1,3 +1,29 @@
+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.
+
 2014-08-07  Gary Benson  <gbenson@redhat.com>
 
        * common/common-defs.h: Include string.h.
index a43ced7cfb7e34ef43dcbb1ec43801b61d152d85..305e39cddde4a404d1a06a61c424aaca1d8b8c3f 100644 (file)
@@ -32,9 +32,7 @@
 #include "c-lang.h"
 #include "typeprint.h"
 #include "ada-lang.h"
-
 #include <ctype.h>
-#include <errno.h>
 
 static int print_selected_record_field_types (struct type *, struct type *,
                                              int, int,
index 5239505b202efc17ce958a11f9a46663058b0f7c..374c90e3be6a1f3bab3396b8c23a89006181b5db 100644 (file)
@@ -31,7 +31,6 @@
 #include "typeprint.h"
 #include "cp-abi.h"
 #include "jv-lang.h"
-#include <errno.h>
 #include "cp-support.h"
 
 static void c_type_print_varspec_prefix (struct type *,
index 7c678462f81985b70a8b3ff5b00dcc6389b3c795..82290dc80c3c5fd2fc251237c8bffc9d9a9f0811 100644 (file)
@@ -32,6 +32,7 @@
 #include <stdarg.h>
 #include <stddef.h>
 #include <string.h>
+#include <errno.h>
 #include "ansidecl.h"
 #include "libiberty.h"
 #include "pathmax.h"
index 6edc8c58c6742e83e5dc2ebc1d91afeba256bc41..bdcb72a65f1272f8deb55d070ef0c487ffccc9e9 100644 (file)
@@ -34,7 +34,6 @@
 #include "regcache.h"
 
 #include <fcntl.h>
-#include <errno.h>
 #include <time.h>
 #ifdef HAVE_SYS_PROCFS_H
 #include <sys/procfs.h>
index 983caa97d7fb11fe483ad44bfc2e614fb892fe47..1617392372d80cc752f590fcc6c978720a7917f2 100644 (file)
@@ -18,7 +18,6 @@
    along with this program.  If not, see <http://www.gnu.org/licenses/>.  */
 
 #include "defs.h"
-#include <errno.h>
 #include <signal.h>
 #include <fcntl.h>
 #include "inferior.h"
index ee0f655c108160fb14780e09070b19ed6ccde300..ff4d7338357d5e9a00af1869272f5b4ae9698a39 100644 (file)
@@ -19,7 +19,6 @@
 
 #include "defs.h"
 #include "arch-utils.h"
-#include <errno.h>
 #include <signal.h>
 #include <fcntl.h>
 #ifdef HAVE_SYS_FILE_H
index 710298c627de83252b8b9e8a9753f82303583e51..b7271a7566453bb35f292ad283c42bd76f83bd17 100644 (file)
@@ -28,7 +28,6 @@
 #include "common-defs.h"
 
 #include <sys/types.h>
-#include <errno.h>             /* System call error return status.  */
 #include <limits.h>
 #include <stdint.h>
 
index cc2f83795e538bb7b9c371d966e4e844a55b4d72..e40187e537367fd0b69c101027adc97b59cb629d 100644 (file)
@@ -31,7 +31,6 @@
 #endif
 
 #include <sys/types.h>
-#include <errno.h>
 #include <sys/time.h>
 #include "exceptions.h"
 #include "gdb_select.h"
index 534019a4cea8a14174d35b9ab9ef50e7e1aafc9a..74740510b9c3de671c9bca196c4fc6ea397a3ac9 100644 (file)
@@ -30,7 +30,6 @@
 #include "gdbcore.h"
 #include "target.h"
 #include "f-lang.h"
-#include <errno.h>
 
 #if 0                          /* Currently unused.  */
 static void f_type_print_args (struct type *, struct ui_file *);
index 34d8bf5f5788741d8217278c44c4b3c65f71cab3..cea7a161072a06d2ed07d4c2fd01c6f635b322a0 100644 (file)
@@ -1,3 +1,17 @@
+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.
index 6ce45a661f478895998dc3d3770bb2ee7185e345..216c01d1f0693ada52dfa482000006b183264a3b 100644 (file)
@@ -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
 
index 5f8dcd2a11ed776daccf4594834f9dffe7e7ff09..9c1f9a830ffa1f77420fd5ae182e75705dce128f 100755 (executable)
@@ -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"
index 67866f806b7a07c099e37e15dcba5ad80a92b186..8e5d74fb72b13d0fac633b20c47da28d75d7a616 100644 (file)
@@ -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)
index 1513b59f55259d9b455842e5567f1ca5ec13bd00..92c8db0e5e56bfd97675e5f4ef18485ca12c8803 100644 (file)
 #include <io.h>
 #endif
 
-#ifdef HAVE_ERRNO_H
-#include <errno.h>
-#endif
-
 #include <unistd.h>
 
 typedef struct gdb_event gdb_event;
index 706fda647f99cbb43157457c7ca2d56a8af058a1..c70abef7e9e17146178d9a5ceb6f44ad9efa52ea 100644 (file)
@@ -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>
index 8817096517d3d1a6922ebc180c177f8f8cfc7e96..f24b51f4609675961e92d093d140ded7fc6f3117 100644 (file)
@@ -22,7 +22,6 @@
    on top of errno.  */
 
 #include "server.h"
-#include <errno.h>
 #include "gdb/fileio.h"
 
 static int
index 9188db1a79d6dd3e96975a8213b21747030222e9..543987a8dc39376b86286c12ec942fbb85fbfe89 100644 (file)
@@ -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>
index f3ae3934caf7fb8431a6bde7bb4d5e6ef89be2cd..327677a0ea4a0b9fe54fa32c6bb1ba84bb35434a 100644 (file)
@@ -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>
index 1e2c3a1c77407c0ea9c4326647e79ebce4f81a49..db6ddde3411f9082a0b5ed2d5e2101b2c315921e 100644 (file)
@@ -27,9 +27,6 @@
 
 #include "version.h"
 
-#ifdef HAVE_ERRNO_H
-#include <errno.h>
-#endif
 #include <setjmp.h>
 
 #ifdef HAVE_ALLOCA_H
index cb1ac0dc70ea84304a943f5b587c46268a373105..867f97bb90aaef3958ea5992e69cedaa7b90832a 100644 (file)
@@ -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"
index ec37a9bc1c34b5294b816ff1b24a7877fcaf562f..b011637c7746d18730843fcf534bfad573329e33 100644 (file)
@@ -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: "
index d6658c7cc97fb815c4cd00ed00a464da94cc86d0..c8164d60f3037b19279300ad858e9fea1e10d87e 100644 (file)
@@ -23,7 +23,6 @@
 #include "defs.h"
 
 #include <ctype.h>
-#include <errno.h>
 #include <limits.h>
 #include <setjmp.h>
 #include <signal.h>
index 75596a2356d6a144ee369767f6af66c77baa9332..727f810aa518d37e1fbd48df176ab29dce5494d0 100644 (file)
 #include "inf-child.h"
 
 #include <ctype.h>
-#include <errno.h>
 #include <unistd.h>
 #include <sys/utsname.h>
 #include <io.h>
index 94d2a0a264009c13f95e3646eda5ed6608bb35ac..8fad87117bec84b2164d08ee67ad8f246d2913fa 100644 (file)
@@ -22,7 +22,6 @@
 #include "floatformat.h"
 #include "regcache.h"
 
-#include <errno.h>
 #include <mach.h>
 #include <mach_error.h>
 #include <mach/message.h>
index 45bc09312193ec604a028c39397ef93c8543bb2f..72c107b52bbe7a415a697f004540a7cd119e2674 100644 (file)
@@ -31,7 +31,6 @@
 #include "c-lang.h"
 #include "typeprint.h"
 #include "cp-abi.h"
-#include <errno.h>
 
 static void m2_print_bounds (struct type *type,
                             struct ui_file *stream, int show, int level,
index 19e218ea7112a14517f48bd11663a5e65ac09e12..f6fdbda5a42798ec15378c274424bb9801f05329 100644 (file)
@@ -37,7 +37,6 @@
 
 #if HAVE_LINUX_PERF_EVENT_H && defined(SYS_perf_event_open)
 
-#include <errno.h>
 #include <stdint.h>
 #include <unistd.h>
 #include <sys/mman.h>
index 6870cdf07fcd6cf89940669f53158fadf82d3dbc..b1e16f02d3d23bf59a5eba124c861e72859b3937 100644 (file)
@@ -31,7 +31,6 @@
 #include "p-lang.h"
 #include "typeprint.h"
 #include "gdb-demangle.h"
-#include <errno.h>
 #include <ctype.h>
 
 static void pascal_type_print_varspec_suffix (struct type *, struct ui_file *,
index d93843ad6d74928030aed9e0429e66df7b48d5d0..3465bc5dcf89060c01b0d4745e4f2cfda7dec6a4 100644 (file)
@@ -42,7 +42,6 @@
 #ifdef HAVE_SYS_SYSCALL_H
 #include <sys/syscall.h>
 #endif
-#include <sys/errno.h>
 #include "gdb_wait.h"
 #include <signal.h>
 #include <ctype.h>
index 51b3c30122494f8b4b8291e8043873563786f58f..890154836dbee224545607919e623eedd2d7b678 100644 (file)
@@ -28,7 +28,6 @@
 #include <fcntl.h>
 #include <signal.h>
 #include <setjmp.h>
-#include <errno.h>
 #include "terminal.h"
 #include "target.h"
 #include "gdbcore.h"
index 4ba955c5cc0acc3cf346bc92669304cffd421fdb..1b09680f5f426fa1f4f9ba0db3be57ad94610c63 100644 (file)
@@ -46,7 +46,6 @@
 #include <signal.h>
 #include <sys/ioctl.h>
 #include <fcntl.h>
-#include <errno.h>
 
 #include <a.out.h>
 #include <sys/file.h>
index 011eb4a72da3ba47528ca7f483b5bd8efe16c3a1..ba244bc8e4ec6f593542ff21124c01dd71903a8e 100644 (file)
@@ -20,7 +20,6 @@
    along with this program.  If not, see <http://www.gnu.org/licenses/>.  */
 
 #include "defs.h"
-#include <errno.h>
 #include "target.h"
 #include "target-dcache.h"
 #include "gdbcmd.h"
index e0b7c44f50859cc9519d1f75fbc11e7216ce1494..3d8620aa4d53489165a5d77db3ab3bd611d3cc09 100644 (file)
@@ -33,7 +33,6 @@
 #include "typeprint.h"
 #include "exceptions.h"
 #include "valprint.h"
-#include <errno.h>
 #include <ctype.h>
 #include "cli/cli-utils.h"
 #include "extension.h"
index 767b55b78af18f17de0b957f8279707f05f3da8e..49607dcc1b41c1fa74ca9db4629a01632829e1db 100644 (file)
@@ -25,8 +25,6 @@
 #include "gdb_select.h"
 #include "filestuff.h"
 
-#include <errno.h>
-
 static ui_file_isatty_ftype null_file_isatty;
 static ui_file_write_ftype null_file_write;
 static ui_file_write_ftype null_file_write_async_safe;
index 5ef763d8ada13f50f7a532c3ec33228fc852ddc4..d9ce2f23039d729b38e7d9139c1add5a18486b55 100644 (file)
@@ -36,7 +36,6 @@
 #include "cp-support.h"
 #include "dfp.h"
 #include "tracepoint.h"
-#include <errno.h>
 #include "observer.h"
 #include "objfiles.h"
 #include "exceptions.h"
index 0ded6b74ac63acfb12e545fba61f3e0c422c5b3d..d3ab2675fcf035dd2f18b0f8326a0f7565b1ebe7 100644 (file)
@@ -37,8 +37,6 @@
 #include "charset.h"
 #include <ctype.h>
 
-#include <errno.h>
-
 /* Maximum number of wchars returned from wchar_iterate.  */
 #define MAX_WCHARS 4
 
This page took 0.05094 seconds and 4 git commands to generate.