From: Gary Benson Date: Fri, 25 Jul 2014 16:35:30 +0000 (+0100) Subject: Move stdlib.h to common-defs.h X-Git-Url: https://git.libre-soc.org/?a=commitdiff_plain;h=d7096f716534f280fba72a5b2ec3712ad1aea42e;p=binutils-gdb.git Move stdlib.h to common-defs.h This commit moves the inclusion of stdlib.h to common-defs.h and removes all other inclusions. gdb/ 2014-08-07 Gary Benson * common/common-defs.h: Include stdlib.h. * defs.h: Do not include stdlib.h. * addrmap.c: Likewise. * bcache.c: Likewise. * common/buffer.c: Likewise. * common/common-utils.c: Likewise. * cp-name-parser.y: Likewise. * go32-nat.c: Likewise. * mn10300-linux-tdep.c: Likewise. * nat/linux-osdata.c: Likewise. * tui/tui.c: Likewise. * windows-nat.c: Likewise. gdb/gdbserver/ 2014-08-07 Gary Benson * server.h: Do not include stdlib.h. * inferiors.c: Likewise. * linux-low.c: Likewise. * regcache.c: Likewise. * spu-low.c: Likewise. * tracepoint.c: Likewise. * utils.c: Likewise. --- diff --git a/gdb/ChangeLog b/gdb/ChangeLog index a6a46d96a47..a9bbb7822fd 100644 --- a/gdb/ChangeLog +++ b/gdb/ChangeLog @@ -1,3 +1,18 @@ +2014-08-07 Gary Benson + + * common/common-defs.h: Include stdlib.h. + * defs.h: Do not include stdlib.h. + * addrmap.c: Likewise. + * bcache.c: Likewise. + * common/buffer.c: Likewise. + * common/common-utils.c: Likewise. + * cp-name-parser.y: Likewise. + * go32-nat.c: Likewise. + * mn10300-linux-tdep.c: Likewise. + * nat/linux-osdata.c: Likewise. + * tui/tui.c: Likewise. + * windows-nat.c: Likewise. + 2014-08-07 Gary Benson * common/common-defs.h: Include stdio.h. diff --git a/gdb/addrmap.c b/gdb/addrmap.c index c8fee389f70..c942c7bd92a 100644 --- a/gdb/addrmap.c +++ b/gdb/addrmap.c @@ -18,9 +18,6 @@ along with this program. If not, see . */ #include "defs.h" - -#include - #include "splay-tree.h" #include "gdb_obstack.h" #include "addrmap.h" diff --git a/gdb/bcache.c b/gdb/bcache.c index 99e9184ef6d..0c87e2d5e34 100644 --- a/gdb/bcache.c +++ b/gdb/bcache.c @@ -26,7 +26,6 @@ #include "gdb_assert.h" #include -#include /* The type used to hold a single bcache string. The user data is stored in d.data. Since it can be any type, it needs to have the diff --git a/gdb/common/buffer.c b/gdb/common/buffer.c index a50c8905795..c291b3290ce 100644 --- a/gdb/common/buffer.c +++ b/gdb/common/buffer.c @@ -27,7 +27,6 @@ #include "buffer.h" #include "inttypes.h" -#include #include #include diff --git a/gdb/common/common-defs.h b/gdb/common/common-defs.h index 0fc7af52965..ed95a364821 100644 --- a/gdb/common/common-defs.h +++ b/gdb/common/common-defs.h @@ -28,5 +28,6 @@ #endif #include +#include #endif /* COMMON_DEFS_H */ diff --git a/gdb/common/common-utils.c b/gdb/common/common-utils.c index 41ef2895d1f..ab05c9f3779 100644 --- a/gdb/common/common-utils.c +++ b/gdb/common/common-utils.c @@ -26,8 +26,6 @@ #include "gdb_assert.h" #include -#include - /* The xmalloc() (libiberty.h) family of memory management routines. These are like the ISO-C malloc() family except that they implement diff --git a/gdb/cp-name-parser.y b/gdb/cp-name-parser.y index 6a9d13d448a..3199aff6c6d 100644 --- a/gdb/cp-name-parser.y +++ b/gdb/cp-name-parser.y @@ -31,7 +31,6 @@ #include "defs.h" -#include #include #include diff --git a/gdb/defs.h b/gdb/defs.h index 49e45b80586..2e1e06bd6d0 100644 --- a/gdb/defs.h +++ b/gdb/defs.h @@ -597,9 +597,6 @@ enum gdb_osabi /* From other system libraries */ -#include - - #ifndef atof extern double atof (const char *); /* X3.159-1989 4.10.1.1 */ #endif diff --git a/gdb/gdbserver/ChangeLog b/gdb/gdbserver/ChangeLog index abdda147274..c5a6455e04c 100644 --- a/gdb/gdbserver/ChangeLog +++ b/gdb/gdbserver/ChangeLog @@ -1,3 +1,13 @@ +2014-08-07 Gary Benson + + * server.h: Do not include stdlib.h. + * inferiors.c: Likewise. + * linux-low.c: Likewise. + * regcache.c: Likewise. + * spu-low.c: Likewise. + * tracepoint.c: Likewise. + * utils.c: Likewise. + 2014-08-07 Gary Benson * server.h: Do not include stdio.h. diff --git a/gdb/gdbserver/inferiors.c b/gdb/gdbserver/inferiors.c index 48d7700b57f..608a99736db 100644 --- a/gdb/gdbserver/inferiors.c +++ b/gdb/gdbserver/inferiors.c @@ -19,7 +19,6 @@ along with this program. If not, see . */ #include "server.h" -#include #include "gdbthread.h" #include "dll.h" diff --git a/gdb/gdbserver/linux-low.c b/gdb/gdbserver/linux-low.c index b3092890afa..d7583309411 100644 --- a/gdb/gdbserver/linux-low.c +++ b/gdb/gdbserver/linux-low.c @@ -31,7 +31,6 @@ #include #include #include -#include #include #include #include diff --git a/gdb/gdbserver/regcache.c b/gdb/gdbserver/regcache.c index db99f8c0fa9..86af39cb15a 100644 --- a/gdb/gdbserver/regcache.c +++ b/gdb/gdbserver/regcache.c @@ -21,8 +21,6 @@ #include "gdbthread.h" #include "tdesc.h" #include "rsp-low.h" - -#include #include #ifndef IN_PROCESS_AGENT diff --git a/gdb/gdbserver/server.h b/gdb/gdbserver/server.h index 743a368de21..a15ba36122b 100644 --- a/gdb/gdbserver/server.h +++ b/gdb/gdbserver/server.h @@ -30,7 +30,6 @@ #include "version.h" #include -#include #ifdef HAVE_ERRNO_H #include #endif diff --git a/gdb/gdbserver/spu-low.c b/gdb/gdbserver/spu-low.c index 67ff1474470..ba2780bc2d4 100644 --- a/gdb/gdbserver/spu-low.c +++ b/gdb/gdbserver/spu-low.c @@ -24,7 +24,6 @@ #include #include #include -#include #include #include #include diff --git a/gdb/gdbserver/tracepoint.c b/gdb/gdbserver/tracepoint.c index 7c4b2911b00..31be953e56b 100644 --- a/gdb/gdbserver/tracepoint.c +++ b/gdb/gdbserver/tracepoint.c @@ -7110,7 +7110,6 @@ gdb_ust_init (void) #endif /* HAVE_UST */ #include -#include static void gdb_agent_remove_socket (void) diff --git a/gdb/gdbserver/utils.c b/gdb/gdbserver/utils.c index b87bcc90bac..a0febb1ce2d 100644 --- a/gdb/gdbserver/utils.c +++ b/gdb/gdbserver/utils.c @@ -18,7 +18,6 @@ #include "server.h" #include -#include #if HAVE_ERRNO_H #include #endif diff --git a/gdb/go32-nat.c b/gdb/go32-nat.c index 42133d6af46..a8c54fa1870 100644 --- a/gdb/go32-nat.c +++ b/gdb/go32-nat.c @@ -105,7 +105,6 @@ #include "cli/cli-utils.h" #include "inf-child.h" -#include #include #include #include diff --git a/gdb/mn10300-linux-tdep.c b/gdb/mn10300-linux-tdep.c index 4377463267c..1b72efaaf9b 100644 --- a/gdb/mn10300-linux-tdep.c +++ b/gdb/mn10300-linux-tdep.c @@ -33,8 +33,6 @@ #include "tramp-frame.h" #include "linux-tdep.h" -#include - /* Transliterated from ... */ #define MN10300_ELF_NGREG 28 #define MN10300_ELF_NFPREG 32 diff --git a/gdb/nat/linux-osdata.c b/gdb/nat/linux-osdata.c index dae637bd930..d9d1325ae1d 100644 --- a/gdb/nat/linux-osdata.c +++ b/gdb/nat/linux-osdata.c @@ -28,7 +28,6 @@ #include #include #include -#include #include #include #include diff --git a/gdb/tui/tui.c b/gdb/tui/tui.c index 413ec204fa7..7add8ba65b3 100644 --- a/gdb/tui/tui.c +++ b/gdb/tui/tui.c @@ -38,7 +38,6 @@ #include "symtab.h" #include "source.h" -#include #include #include #include diff --git a/gdb/windows-nat.c b/gdb/windows-nat.c index 3d101a1b9af..5dcd520fbab 100644 --- a/gdb/windows-nat.c +++ b/gdb/windows-nat.c @@ -35,7 +35,6 @@ #include #include #include -#include #include #include #include