Mirror of the gdb-patches mailing list
 help / color / mirror / Atom feed
From: Gary Benson <gbenson@redhat.com>
To: gdb-patches@sourceware.org
Subject: [PATCH 02/13] Move stdlib.h to common-defs.h
Date: Tue, 29 Jul 2014 15:11:00 -0000	[thread overview]
Message-ID: <1406644635-1011-3-git-send-email-gbenson@redhat.com> (raw)
In-Reply-To: <1406644635-1011-1-git-send-email-gbenson@redhat.com>

This commit moves the inclusion of stdlib.h to common-defs.h and
removes all other inclusions.

gdb/
2014-07-28  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-07-28  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.
---
 gdb/ChangeLog              |   15 +++++++++++++++
 gdb/addrmap.c              |    3 ---
 gdb/bcache.c               |    1 -
 gdb/common/buffer.c        |    1 -
 gdb/common/common-defs.h   |    1 +
 gdb/common/common-utils.c  |    2 --
 gdb/cp-name-parser.y       |    1 -
 gdb/defs.h                 |    3 ---
 gdb/gdbserver/ChangeLog    |   10 ++++++++++
 gdb/gdbserver/inferiors.c  |    1 -
 gdb/gdbserver/linux-low.c  |    1 -
 gdb/gdbserver/regcache.c   |    2 --
 gdb/gdbserver/server.h     |    1 -
 gdb/gdbserver/spu-low.c    |    1 -
 gdb/gdbserver/tracepoint.c |    1 -
 gdb/gdbserver/utils.c      |    1 -
 gdb/go32-nat.c             |    1 -
 gdb/mn10300-linux-tdep.c   |    2 --
 gdb/nat/linux-osdata.c     |    1 -
 gdb/tui/tui.c              |    1 -
 gdb/windows-nat.c          |    1 -
 21 files changed, 26 insertions(+), 25 deletions(-)

diff --git a/gdb/addrmap.c b/gdb/addrmap.c
index c8fee38..c942c7b 100644
--- a/gdb/addrmap.c
+++ b/gdb/addrmap.c
@@ -18,9 +18,6 @@
    along with this program.  If not, see <http://www.gnu.org/licenses/>.  */
 
 #include "defs.h"
-
-#include <stdlib.h>
-
 #include "splay-tree.h"
 #include "gdb_obstack.h"
 #include "addrmap.h"
diff --git a/gdb/bcache.c b/gdb/bcache.c
index 99e9184..0c87e2d 100644
--- a/gdb/bcache.c
+++ b/gdb/bcache.c
@@ -26,7 +26,6 @@
 #include "gdb_assert.h"
 
 #include <stddef.h>
-#include <stdlib.h>
 
 /* 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 a50c890..c291b32 100644
--- a/gdb/common/buffer.c
+++ b/gdb/common/buffer.c
@@ -27,7 +27,6 @@
 #include "buffer.h"
 #include "inttypes.h"
 
-#include <stdlib.h>
 #include <string.h>
 #include <stdint.h>
 
diff --git a/gdb/common/common-defs.h b/gdb/common/common-defs.h
index 0fc7af5..ed95a36 100644
--- a/gdb/common/common-defs.h
+++ b/gdb/common/common-defs.h
@@ -28,5 +28,6 @@
 #endif
 
 #include <stdio.h>
+#include <stdlib.h>
 
 #endif /* COMMON_DEFS_H */
diff --git a/gdb/common/common-utils.c b/gdb/common/common-utils.c
index 41ef289..ab05c9f 100644
--- a/gdb/common/common-utils.c
+++ b/gdb/common/common-utils.c
@@ -26,8 +26,6 @@
 #include "gdb_assert.h"
 #include <string.h>
 
-#include <stdlib.h>
-
 /* 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 6a9d13d..3199aff 100644
--- a/gdb/cp-name-parser.y
+++ b/gdb/cp-name-parser.y
@@ -31,7 +31,6 @@
 
 #include "defs.h"
 
-#include <stdlib.h>
 #include <unistd.h>
 #include <string.h>
 
diff --git a/gdb/defs.h b/gdb/defs.h
index 49e45b8..2e1e06b 100644
--- a/gdb/defs.h
+++ b/gdb/defs.h
@@ -597,9 +597,6 @@ enum gdb_osabi
 
 /* From other system libraries */
 
-#include <stdlib.h>
-
-
 #ifndef atof
 extern double atof (const char *);	/* X3.159-1989  4.10.1.1 */
 #endif
diff --git a/gdb/gdbserver/inferiors.c b/gdb/gdbserver/inferiors.c
index 48d7700..608a997 100644
--- a/gdb/gdbserver/inferiors.c
+++ b/gdb/gdbserver/inferiors.c
@@ -19,7 +19,6 @@
    along with this program.  If not, see <http://www.gnu.org/licenses/>.  */
 
 #include "server.h"
-#include <stdlib.h>
 #include "gdbthread.h"
 #include "dll.h"
 
diff --git a/gdb/gdbserver/linux-low.c b/gdb/gdbserver/linux-low.c
index 0b9353e..b599bef 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 <string.h>
-#include <stdlib.h>
 #include <unistd.h>
 #include <errno.h>
 #include <sys/syscall.h>
diff --git a/gdb/gdbserver/regcache.c b/gdb/gdbserver/regcache.c
index bed10b4..5c973b1 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 <stdlib.h>
 #include <string.h>
 
 #ifndef IN_PROCESS_AGENT
diff --git a/gdb/gdbserver/server.h b/gdb/gdbserver/server.h
index 743a368..a15ba36 100644
--- a/gdb/gdbserver/server.h
+++ b/gdb/gdbserver/server.h
@@ -30,7 +30,6 @@
 #include "version.h"
 
 #include <stdarg.h>
-#include <stdlib.h>
 #ifdef HAVE_ERRNO_H
 #include <errno.h>
 #endif
diff --git a/gdb/gdbserver/spu-low.c b/gdb/gdbserver/spu-low.c
index 67ff147..ba2780b 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 <string.h>
-#include <stdlib.h>
 #include <unistd.h>
 #include <errno.h>
 #include <sys/syscall.h>
diff --git a/gdb/gdbserver/tracepoint.c b/gdb/gdbserver/tracepoint.c
index 7c4b291..31be953 100644
--- a/gdb/gdbserver/tracepoint.c
+++ b/gdb/gdbserver/tracepoint.c
@@ -7110,7 +7110,6 @@ gdb_ust_init (void)
 #endif /* HAVE_UST */
 
 #include <sys/syscall.h>
-#include <stdlib.h>
 
 static void
 gdb_agent_remove_socket (void)
diff --git a/gdb/gdbserver/utils.c b/gdb/gdbserver/utils.c
index b87bcc9..a0febb1 100644
--- a/gdb/gdbserver/utils.c
+++ b/gdb/gdbserver/utils.c
@@ -18,7 +18,6 @@
 
 #include "server.h"
 #include <string.h>
-#include <stdlib.h>
 #if HAVE_ERRNO_H
 #include <errno.h>
 #endif
diff --git a/gdb/go32-nat.c b/gdb/go32-nat.c
index 42133d6..a8c54fa 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 <stdlib.h>
 #include <ctype.h>
 #include <errno.h>
 #include <unistd.h>
diff --git a/gdb/mn10300-linux-tdep.c b/gdb/mn10300-linux-tdep.c
index 4377463..1b72efa 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 <stdlib.h>
-
 /* Transliterated from <asm-mn10300/elf.h>...  */
 #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 dae637b..d9d1325 100644
--- a/gdb/nat/linux-osdata.c
+++ b/gdb/nat/linux-osdata.c
@@ -28,7 +28,6 @@
 #include <sys/types.h>
 #include <sys/sysinfo.h>
 #include <ctype.h>
-#include <stdlib.h>
 #include <string.h>
 #include <utmp.h>
 #include <time.h>
diff --git a/gdb/tui/tui.c b/gdb/tui/tui.c
index 413ec20..7add8ba 100644
--- a/gdb/tui/tui.c
+++ b/gdb/tui/tui.c
@@ -38,7 +38,6 @@
 #include "symtab.h"
 #include "source.h"
 
-#include <stdlib.h>
 #include <ctype.h>
 #include <signal.h>
 #include <fcntl.h>
diff --git a/gdb/windows-nat.c b/gdb/windows-nat.c
index 3d101a1..5dcd520 100644
--- a/gdb/windows-nat.c
+++ b/gdb/windows-nat.c
@@ -35,7 +35,6 @@
 #include <signal.h>
 #include <sys/types.h>
 #include <fcntl.h>
-#include <stdlib.h>
 #include <windows.h>
 #include <imagehlp.h>
 #include <psapi.h>
-- 
1.7.1


  parent reply	other threads:[~2014-07-29 15:11 UTC|newest]

Thread overview: 26+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2014-07-29 15:11 [PATCH 00/13] Include some headers in common-defs.h Gary Benson
2014-07-29 15:11 ` [PATCH 12/13] Include gdb_assert.h " Gary Benson
2014-07-29 15:11 ` [PATCH 03/13] Move stdarg.h to common-defs.h Gary Benson
2014-07-29 15:11 ` [PATCH 13/13] Include string.h in common-defs.h Gary Benson
2014-08-06 17:25   ` Doug Evans
2014-08-07  8:13     ` Gary Benson
2014-07-29 15:11 ` Gary Benson [this message]
2014-07-29 15:13 ` [PATCH 04/13] Move stddef.h to common-defs.h Gary Benson
2014-07-29 15:14 ` [PATCH 09/13] Move gdb_locale.h " Gary Benson
2014-07-29 15:18 ` [PATCH 05/13] Move ansidecl.h " Gary Benson
2014-07-29 15:18 ` [PATCH 11/13] Move common-utils.h " Gary Benson
2014-07-29 15:35 ` [PATCH 01/13] Move stdio.h " Gary Benson
2014-07-29 16:02 ` [PATCH 07/13] Move pathmax.h " Gary Benson
2014-07-29 16:08 ` [PATCH 06/13] Move libiberty.h " Gary Benson
2014-07-29 16:22 ` [PATCH 10/13] Move ptid.h " Gary Benson
2014-07-30  8:29   ` Gary Benson
2014-07-29 16:22 ` [PATCH 08/13] Move gdb/signals.h " Gary Benson
2014-07-30 13:35 ` [PATCH 14/13] Move errno.h " Gary Benson
2014-07-31  8:55   ` Tom Tromey
2014-07-31  9:57     ` [PATCH 14/13 v2] " Gary Benson
2014-07-31 10:19       ` Pedro Alves
2014-07-31 15:10         ` Tom Tromey
2014-07-31 10:00     ` [PATCH 14/13] " Pedro Alves
2014-07-31 14:49       ` [PATCH 14/13 v3] " Gary Benson
2014-08-06 17:26 ` [PATCH 00/13] Include some headers in common-defs.h Doug Evans
2014-08-07  8:15   ` Gary Benson

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=1406644635-1011-3-git-send-email-gbenson@redhat.com \
    --to=gbenson@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