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  <gbenson@redhat.com>

	* 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  <gbenson@redhat.com>

	* 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.
This commit is contained in:
Gary Benson
2014-07-25 17:35:30 +01:00
parent d02f550d39
commit d7096f7165
21 changed files with 26 additions and 25 deletions

View File

@ -1,3 +1,18 @@
2014-08-07 Gary Benson <gbenson@redhat.com>
* 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 <gbenson@redhat.com> 2014-08-07 Gary Benson <gbenson@redhat.com>
* common/common-defs.h: Include stdio.h. * common/common-defs.h: Include stdio.h.

View File

@ -18,9 +18,6 @@
along with this program. If not, see <http://www.gnu.org/licenses/>. */ along with this program. If not, see <http://www.gnu.org/licenses/>. */
#include "defs.h" #include "defs.h"
#include <stdlib.h>
#include "splay-tree.h" #include "splay-tree.h"
#include "gdb_obstack.h" #include "gdb_obstack.h"
#include "addrmap.h" #include "addrmap.h"

View File

@ -26,7 +26,6 @@
#include "gdb_assert.h" #include "gdb_assert.h"
#include <stddef.h> #include <stddef.h>
#include <stdlib.h>
/* The type used to hold a single bcache string. The user data is /* 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 stored in d.data. Since it can be any type, it needs to have the

View File

@ -27,7 +27,6 @@
#include "buffer.h" #include "buffer.h"
#include "inttypes.h" #include "inttypes.h"
#include <stdlib.h>
#include <string.h> #include <string.h>
#include <stdint.h> #include <stdint.h>

View File

@ -28,5 +28,6 @@
#endif #endif
#include <stdio.h> #include <stdio.h>
#include <stdlib.h>
#endif /* COMMON_DEFS_H */ #endif /* COMMON_DEFS_H */

View File

@ -26,8 +26,6 @@
#include "gdb_assert.h" #include "gdb_assert.h"
#include <string.h> #include <string.h>
#include <stdlib.h>
/* The xmalloc() (libiberty.h) family of memory management routines. /* The xmalloc() (libiberty.h) family of memory management routines.
These are like the ISO-C malloc() family except that they implement These are like the ISO-C malloc() family except that they implement

View File

@ -31,7 +31,6 @@
#include "defs.h" #include "defs.h"
#include <stdlib.h>
#include <unistd.h> #include <unistd.h>
#include <string.h> #include <string.h>

View File

@ -597,9 +597,6 @@ enum gdb_osabi
/* From other system libraries */ /* From other system libraries */
#include <stdlib.h>
#ifndef atof #ifndef atof
extern double atof (const char *); /* X3.159-1989 4.10.1.1 */ extern double atof (const char *); /* X3.159-1989 4.10.1.1 */
#endif #endif

View File

@ -1,3 +1,13 @@
2014-08-07 Gary Benson <gbenson@redhat.com>
* 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 <gbenson@redhat.com> 2014-08-07 Gary Benson <gbenson@redhat.com>
* server.h: Do not include stdio.h. * server.h: Do not include stdio.h.

View File

@ -19,7 +19,6 @@
along with this program. If not, see <http://www.gnu.org/licenses/>. */ along with this program. If not, see <http://www.gnu.org/licenses/>. */
#include "server.h" #include "server.h"
#include <stdlib.h>
#include "gdbthread.h" #include "gdbthread.h"
#include "dll.h" #include "dll.h"

View File

@ -31,7 +31,6 @@
#include <sys/ioctl.h> #include <sys/ioctl.h>
#include <fcntl.h> #include <fcntl.h>
#include <string.h> #include <string.h>
#include <stdlib.h>
#include <unistd.h> #include <unistd.h>
#include <errno.h> #include <errno.h>
#include <sys/syscall.h> #include <sys/syscall.h>

View File

@ -21,8 +21,6 @@
#include "gdbthread.h" #include "gdbthread.h"
#include "tdesc.h" #include "tdesc.h"
#include "rsp-low.h" #include "rsp-low.h"
#include <stdlib.h>
#include <string.h> #include <string.h>
#ifndef IN_PROCESS_AGENT #ifndef IN_PROCESS_AGENT

View File

@ -30,7 +30,6 @@
#include "version.h" #include "version.h"
#include <stdarg.h> #include <stdarg.h>
#include <stdlib.h>
#ifdef HAVE_ERRNO_H #ifdef HAVE_ERRNO_H
#include <errno.h> #include <errno.h>
#endif #endif

View File

@ -24,7 +24,6 @@
#include <sys/ptrace.h> #include <sys/ptrace.h>
#include <fcntl.h> #include <fcntl.h>
#include <string.h> #include <string.h>
#include <stdlib.h>
#include <unistd.h> #include <unistd.h>
#include <errno.h> #include <errno.h>
#include <sys/syscall.h> #include <sys/syscall.h>

View File

@ -7110,7 +7110,6 @@ gdb_ust_init (void)
#endif /* HAVE_UST */ #endif /* HAVE_UST */
#include <sys/syscall.h> #include <sys/syscall.h>
#include <stdlib.h>
static void static void
gdb_agent_remove_socket (void) gdb_agent_remove_socket (void)

View File

@ -18,7 +18,6 @@
#include "server.h" #include "server.h"
#include <string.h> #include <string.h>
#include <stdlib.h>
#if HAVE_ERRNO_H #if HAVE_ERRNO_H
#include <errno.h> #include <errno.h>
#endif #endif

View File

@ -105,7 +105,6 @@
#include "cli/cli-utils.h" #include "cli/cli-utils.h"
#include "inf-child.h" #include "inf-child.h"
#include <stdlib.h>
#include <ctype.h> #include <ctype.h>
#include <errno.h> #include <errno.h>
#include <unistd.h> #include <unistd.h>

View File

@ -33,8 +33,6 @@
#include "tramp-frame.h" #include "tramp-frame.h"
#include "linux-tdep.h" #include "linux-tdep.h"
#include <stdlib.h>
/* Transliterated from <asm-mn10300/elf.h>... */ /* Transliterated from <asm-mn10300/elf.h>... */
#define MN10300_ELF_NGREG 28 #define MN10300_ELF_NGREG 28
#define MN10300_ELF_NFPREG 32 #define MN10300_ELF_NFPREG 32

View File

@ -28,7 +28,6 @@
#include <sys/types.h> #include <sys/types.h>
#include <sys/sysinfo.h> #include <sys/sysinfo.h>
#include <ctype.h> #include <ctype.h>
#include <stdlib.h>
#include <string.h> #include <string.h>
#include <utmp.h> #include <utmp.h>
#include <time.h> #include <time.h>

View File

@ -38,7 +38,6 @@
#include "symtab.h" #include "symtab.h"
#include "source.h" #include "source.h"
#include <stdlib.h>
#include <ctype.h> #include <ctype.h>
#include <signal.h> #include <signal.h>
#include <fcntl.h> #include <fcntl.h>

View File

@ -35,7 +35,6 @@
#include <signal.h> #include <signal.h>
#include <sys/types.h> #include <sys/types.h>
#include <fcntl.h> #include <fcntl.h>
#include <stdlib.h>
#include <windows.h> #include <windows.h>
#include <imagehlp.h> #include <imagehlp.h>
#include <psapi.h> #include <psapi.h>