[6/10] RFC: don't check for stdlib.h

Tom Tromey
2012-11-15T19:28:09Z

I think checking for stdlib.h is useless.
gdb includes it unconditionally already.

Tom

* configure: Rebuild.
* configure.ac: Don't check for stdlib.h.
* defs.h: Update.

* configure: Rebuild.
* configure.ac: Don't check for stdlib.h.
* gdbreplay.c: Update.
---
gdb/configure | 2 +-
gdb/configure.ac | 2 +-
gdb/defs.h | 3 +--
gdb/gdbserver/configure | 2 +-
gdb/gdbserver/configure.ac | 2 +-
gdb/gdbserver/gdbreplay.c | 2 --
6 files changed, 5 insertions(+), 8 deletions(-)

diff --git a/gdb/configure.ac b/gdb/configure.ac
index 41bed53..ccd8322 100644
--- a/gdb/configure.ac
+++ b/gdb/configure.ac
@@ -1075,7 +1075,7 @@ AC_HEADER_STDC
# elf_hp.h is for HP/UX 64-bit shared library support.
AC_CHECK_HEADERS([nlist.h machine/reg.h poll.h sys/poll.h proc_service.h \
thread_db.h \
- stdlib.h sys/fault.h \
+ sys/fault.h \
sys/file.h sys/filio.h sys/ioctl.h sys/param.h \
sys/resource.h sys/procfs.h sys/ptrace.h ptrace.h \
sys/reg.h sys/debugreg.h sys/select.h sys/syscall.h \
diff --git a/gdb/defs.h b/gdb/defs.h
index 7bb85b0..6d49d8f 100644
--- a/gdb/defs.h
+++ b/gdb/defs.h
@@ -621,9 +621,8 @@ enum gdb_osabi

/* From other system libraries */

-#ifdef HAVE_STDLIB_H
#include <stdlib.h>
-#endif
+
#ifndef min
#define min(a, b) ((a) < (b) ? (a) : (b))
#endif
diff --git a/gdb/gdbserver/configure.ac b/gdb/gdbserver/configure.ac
index ecbb921..a5d636a 100644
--- a/gdb/gdbserver/configure.ac
+++ b/gdb/gdbserver/configure.ac
@@ -51,7 +51,7 @@ ACX_CONFIGURE_DIR(["../gnulib"], ["build-gnulib-gdbserver"])

AC_CHECK_HEADERS(sgtty.h termio.h termios.h sys/reg.h dnl
proc_service.h sys/procfs.h thread_db.h linux/elf.h dnl
- stdlib.h unistd.h dnl
+ unistd.h dnl
errno.h fcntl.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 sys/wait.h wait.h sys/un.h)
diff --git a/gdb/gdbserver/gdbreplay.c b/gdb/gdbserver/gdbreplay.c
index 2a48c04..22ae9e4 100644
--- a/gdb/gdbserver/gdbreplay.c
+++ b/gdb/gdbserver/gdbreplay.c
@@ -33,9 +33,7 @@
#if HAVE_ERRNO_H
#include <errno.h>
#endif
-#ifdef HAVE_STDLIB_H
#include <stdlib.h>
-#endif
#include <string.h>
#ifdef HAVE_UNISTD_H
#include <unistd.h>
--
1.7.7.6