public inbox for gdb-patches@sourceware.org
 help / color / mirror / Atom feed
* [PATCH] sim: clean up C11 header includes
@ 2021-01-09 15:16 Mike Frysinger
  2021-01-11 11:27 ` Andrew Burgess
  0 siblings, 1 reply; 2+ messages in thread
From: Mike Frysinger @ 2021-01-09 15:16 UTC (permalink / raw)
  To: gdb-patches

Since we require C11 now, we can assume many headers exist, and
clean up all of the conditional includes.  It's not like any of
this code actually accounted for the headers not existing, just
whether we could include them.

The strings.h cleanup is a little nuanced: it isn't in C11, but
every use of it in the codebase will include strings.h only if
string.h doesn't exist.  Since we now assume the C11 string.h
exists, we'll never include strings.h, so we can delete it.
---
 sim/aarch64/ChangeLog      |  4 ++++
 sim/aarch64/config.in      |  6 ------
 sim/aarch64/configure      | 18 ++++++++----------
 sim/arm/ChangeLog          |  4 ++++
 sim/arm/config.in          |  6 ------
 sim/arm/configure          | 18 ++++++++----------
 sim/avr/ChangeLog          |  5 +++++
 sim/avr/config.in          |  6 ------
 sim/avr/configure          | 18 ++++++++----------
 sim/avr/interp.c           |  3 +--
 sim/bfin/ChangeLog         |  4 ++++
 sim/bfin/config.in         |  6 ------
 sim/bfin/configure         | 18 ++++++++----------
 sim/bpf/ChangeLog          |  4 ++++
 sim/bpf/config.in          |  6 ------
 sim/bpf/configure          | 18 ++++++++----------
 sim/common/ChangeLog       | 13 +++++++++++++
 sim/common/acinclude.m4    |  7 +++----
 sim/common/callback.c      | 10 ----------
 sim/common/cgen-scache.c   |  2 --
 sim/common/dv-glue.c       |  6 ------
 sim/common/dv-pal.c        |  9 ---------
 sim/common/dv-sockser.c    |  8 --------
 sim/common/hw-alloc.c      |  3 ---
 sim/common/hw-base.c       | 11 -----------
 sim/common/hw-device.c     |  5 -----
 sim/common/hw-events.c     |  2 --
 sim/common/hw-handles.c    |  2 --
 sim/common/hw-ports.c      | 10 ----------
 sim/common/hw-properties.c |  6 ------
 sim/common/hw-tree.c       | 10 ----------
 sim/common/nrun.c          |  7 -------
 sim/common/sim-arange.c    |  5 -----
 sim/common/sim-events.c    | 10 ----------
 sim/common/sim-fpu.c       |  2 --
 sim/common/sim-hw.c        |  9 ---------
 sim/common/sim-load.c      |  2 --
 sim/common/sim-memopt.c    | 10 ----------
 sim/common/sim-options.c   |  8 --------
 sim/common/sim-profile.c   |  9 ---------
 sim/common/sim-trace.c     |  8 --------
 sim/common/sim-utils.c     | 13 -------------
 sim/common/sim-watch.c     | 10 ----------
 sim/common/syscall.c       |  6 ------
 sim/cr16/ChangeLog         |  5 +++++
 sim/cr16/config.in         |  6 ------
 sim/cr16/configure         | 18 ++++++++----------
 sim/cr16/simops.c          |  4 ----
 sim/cris/ChangeLog         |  7 +++++++
 sim/cris/config.in         |  9 ---------
 sim/cris/configure         | 20 +++++++++-----------
 sim/cris/configure.ac      |  2 +-
 sim/cris/dv-rv.c           | 14 --------------
 sim/cris/rvdummy.c         |  7 -------
 sim/cris/sim-if.c          |  2 --
 sim/cris/traps.c           |  2 --
 sim/d10v/ChangeLog         |  6 ++++++
 sim/d10v/config.in         |  6 ------
 sim/d10v/configure         | 18 ++++++++----------
 sim/d10v/interp.c          |  9 ---------
 sim/d10v/simops.c          |  2 --
 sim/erc32/ChangeLog        |  5 +++++
 sim/erc32/config.in        |  6 ------
 sim/erc32/configure        | 18 ++++++++----------
 sim/erc32/sis.c            |  2 --
 sim/frv/ChangeLog          |  6 ++++++
 sim/frv/config.in          |  6 ------
 sim/frv/configure          | 18 ++++++++----------
 sim/frv/options.c          |  8 --------
 sim/frv/sim-if.c           |  2 --
 sim/ft32/ChangeLog         |  4 ++++
 sim/ft32/config.in         |  6 ------
 sim/ft32/configure         | 18 ++++++++----------
 sim/h8300/ChangeLog        |  5 +++++
 sim/h8300/compile.c        |  4 ----
 sim/h8300/config.in        |  6 ------
 sim/h8300/configure        | 18 ++++++++----------
 sim/igen/ChangeLog         |  5 +++++
 sim/igen/filter.c          |  6 ------
 sim/igen/lf.c              |  9 ---------
 sim/igen/misc.c            |  9 ---------
 sim/igen/misc.h            | 10 ----------
 sim/igen/table.c           |  3 ---
 sim/iq2000/ChangeLog       |  5 +++++
 sim/iq2000/config.in       |  6 ------
 sim/iq2000/configure       | 18 ++++++++----------
 sim/iq2000/sim-if.c        |  4 ++--
 sim/lm32/ChangeLog         |  5 +++++
 sim/lm32/config.in         |  6 ------
 sim/lm32/configure         | 18 ++++++++----------
 sim/lm32/sim-if.c          |  2 --
 sim/m32c/ChangeLog         |  4 ++++
 sim/m32c/config.in         |  6 ------
 sim/m32c/configure         | 18 ++++++++----------
 sim/m32r/ChangeLog         |  6 ++++++
 sim/m32r/config.in         |  6 ------
 sim/m32r/configure         | 18 ++++++++----------
 sim/m32r/sim-if.c          |  8 --------
 sim/m68hc11/ChangeLog      |  4 ++++
 sim/m68hc11/config.in      |  6 ------
 sim/m68hc11/configure      | 18 ++++++++----------
 sim/mcore/ChangeLog        |  4 ++++
 sim/mcore/config.in        |  6 ------
 sim/mcore/configure        | 18 ++++++++----------
 sim/microblaze/ChangeLog   |  4 ++++
 sim/microblaze/config.in   |  6 ------
 sim/microblaze/configure   | 18 ++++++++----------
 sim/mips/ChangeLog         |  6 ++++++
 sim/mips/config.in         |  6 ------
 sim/mips/configure         | 18 ++++++++----------
 sim/mips/interp.c          |  8 --------
 sim/mn10300/ChangeLog      |  6 ++++++
 sim/mn10300/config.in      |  6 ------
 sim/mn10300/configure      | 18 ++++++++----------
 sim/mn10300/interp.c       | 10 ----------
 sim/mn10300/op_utils.c     | 11 -----------
 sim/moxie/ChangeLog        |  4 ++++
 sim/moxie/config.in        |  6 ------
 sim/moxie/configure        | 18 ++++++++----------
 sim/msp430/ChangeLog       |  4 ++++
 sim/msp430/config.in       |  6 ------
 sim/msp430/configure       | 18 ++++++++----------
 sim/or1k/ChangeLog         |  6 ++++++
 sim/or1k/config.in         |  6 ------
 sim/or1k/configure         | 18 ++++++++----------
 sim/or1k/sim-if.c          |  8 --------
 sim/ppc/ChangeLog          | 18 ++++++++++++++++++
 sim/ppc/config.in          |  3 ---
 sim/ppc/configure          |  2 +-
 sim/ppc/configure.ac       |  2 +-
 sim/ppc/cpu.c              |  6 ------
 sim/ppc/debug.c            |  4 ----
 sim/ppc/device.c           | 10 ----------
 sim/ppc/device_table.c     |  3 ---
 sim/ppc/device_table.h     |  6 ------
 sim/ppc/dgen.c             | 10 ----------
 sim/ppc/emul_bugapi.c      | 10 ----------
 sim/ppc/emul_chirp.c       |  7 -------
 sim/ppc/emul_netbsd.c      |  9 ---------
 sim/ppc/emul_unix.c        |  9 ---------
 sim/ppc/filter.c           |  6 ------
 sim/ppc/gen-model.c        |  2 --
 sim/ppc/hw_com.c           |  9 ---------
 sim/ppc/hw_eeprom.c        |  6 ------
 sim/ppc/hw_nvram.c         | 17 -----------------
 sim/ppc/hw_opic.c          |  6 ------
 sim/ppc/hw_pal.c           |  9 ---------
 sim/ppc/hw_phb.c           |  3 ---
 sim/ppc/hw_sem.c           |  7 -------
 sim/ppc/hw_shm.c           |  7 -------
 sim/ppc/lf.c               |  9 ---------
 sim/ppc/main.c             | 11 -----------
 sim/ppc/misc.c             |  9 ---------
 sim/ppc/misc.h             | 10 ----------
 sim/ppc/mon.c              | 15 ---------------
 sim/ppc/pk_disklabel.c     |  4 ----
 sim/ppc/psim.c             | 12 ------------
 sim/ppc/registers.c        | 10 ----------
 sim/ppc/sim_calls.c        |  9 ---------
 sim/ppc/table.c            |  3 ---
 sim/ppc/tree.c             | 11 -----------
 sim/pru/ChangeLog          |  4 ++++
 sim/pru/config.in          |  6 ------
 sim/pru/configure          | 18 ++++++++----------
 sim/rl78/ChangeLog         |  4 ++++
 sim/rl78/config.in         |  6 ------
 sim/rl78/configure         | 18 ++++++++----------
 sim/rx/ChangeLog           |  5 +++++
 sim/rx/config.in           |  6 ------
 sim/rx/configure           | 18 ++++++++----------
 sim/rx/main.c              |  2 --
 sim/sh/ChangeLog           |  6 ++++++
 sim/sh/config.in           |  6 ------
 sim/sh/configure           | 18 ++++++++----------
 sim/sh/interp.c            | 12 ------------
 sim/v850/ChangeLog         |  6 ++++++
 sim/v850/config.in         |  6 ------
 sim/v850/configure         | 18 ++++++++----------
 sim/v850/interp.c          |  9 ---------
 sim/v850/simops.c          | 11 -----------
 180 files changed, 420 insertions(+), 1088 deletions(-)

diff --git a/sim/aarch64/ChangeLog b/sim/aarch64/ChangeLog
index 5708802be00d..01421d976a7e 100644
--- a/sim/aarch64/ChangeLog
+++ b/sim/aarch64/ChangeLog
@@ -1,3 +1,7 @@
+2021-01-09  Mike Frysinger  <vapier@gentoo.org>
+
+	* config.in, configure: Regenerate.
+
 2021-01-09  Mike Frysinger  <vapier@gentoo.org>
 
 	* configure: Regenerate.
diff --git a/sim/arm/ChangeLog b/sim/arm/ChangeLog
index 67060927b068..f791e76be227 100644
--- a/sim/arm/ChangeLog
+++ b/sim/arm/ChangeLog
@@ -1,3 +1,7 @@
+2021-01-09  Mike Frysinger  <vapier@gentoo.org>
+
+	* config.in, configure: Regenerate.
+
 2021-01-09  Mike Frysinger  <vapier@gentoo.org>
 
 	* configure: Regenerate.
diff --git a/sim/avr/ChangeLog b/sim/avr/ChangeLog
index c368fa4681be..4148688b281c 100644
--- a/sim/avr/ChangeLog
+++ b/sim/avr/ChangeLog
@@ -1,3 +1,8 @@
+2021-01-09  Mike Frysinger  <vapier@gentoo.org>
+
+	* config.in, configure: Regenerate.
+	* interp.c: Delete HAVE_STRING_H.
+
 2021-01-09  Mike Frysinger  <vapier@gentoo.org>
 
 	* configure: Regenerate.
diff --git a/sim/avr/interp.c b/sim/avr/interp.c
index deaf711e1040..3aff8816187e 100644
--- a/sim/avr/interp.c
+++ b/sim/avr/interp.c
@@ -19,9 +19,8 @@
 
 #include "config.h"
 
-#ifdef HAVE_STRING_H
 #include <string.h>
-#endif
+
 #include "bfd.h"
 #include "libiberty.h"
 #include "gdb/remote-sim.h"
diff --git a/sim/bfin/ChangeLog b/sim/bfin/ChangeLog
index 1ac810e8a1e4..cd9d6db982db 100644
--- a/sim/bfin/ChangeLog
+++ b/sim/bfin/ChangeLog
@@ -1,3 +1,7 @@
+2021-01-09  Mike Frysinger  <vapier@gentoo.org>
+
+	* config.in, configure: Regenerate.
+
 2021-01-09  Mike Frysinger  <vapier@gentoo.org>
 
 	* configure: Regenerate.
diff --git a/sim/bpf/ChangeLog b/sim/bpf/ChangeLog
index e1abb698fd1a..cefe16b8ac3f 100644
--- a/sim/bpf/ChangeLog
+++ b/sim/bpf/ChangeLog
@@ -1,3 +1,7 @@
+2021-01-09  Mike Frysinger  <vapier@gentoo.org>
+
+	* config.in, configure: Regenerate.
+
 2021-01-09  Mike Frysinger  <vapier@gentoo.org>
 
 	* configure: Regenerate.
diff --git a/sim/common/ChangeLog b/sim/common/ChangeLog
index e525110bf415..4e81a14802a6 100644
--- a/sim/common/ChangeLog
+++ b/sim/common/ChangeLog
@@ -1,3 +1,16 @@
+2021-01-09  Mike Frysinger  <vapier@gentoo.org>
+
+	* acinclude.m4 (SIM_AC_COMMON): Delete checks for stdlib.h, string.h,
+	strings.h, time.h, and errno.h.
+	* callback.c, cgen-scache.c, dv-glue.c, dv-pal.c, dv-sockser.c,
+	hw-alloc.c, hw-base.c, hw-device.c, hw-events.c, hw-handles.c,
+	hw-ports.c, hw-properties.c, hw-tree.c, nrun.c, sim-arange.c,
+	sim-events.c, sim-fpu.c, sim-hw.c, sim-load.c, sim-memopt.c,
+	sim-options.c, sim-profile.c, sim-trace.c, sim-utils.c,
+	sim-watch.c, syscall.c: Delete HAVE_ERRNO_H, HAVE_STDLIB_H,
+	HAVE_STRING_H, HAVE_STRINGS_H, HAVE_LIMITS_H, HAVE_TIME_H,
+	and strings.h include.
+
 2021-01-09  Mike Frysinger  <vapier@gentoo.org>
 
 	* sim-basics.h [__CYGWIN32__] (vasprintf, asprintf): Delete.
diff --git a/sim/common/acinclude.m4 b/sim/common/acinclude.m4
index b2297dfeb150..45ec134d6d76 100644
--- a/sim/common/acinclude.m4
+++ b/sim/common/acinclude.m4
@@ -98,12 +98,11 @@ ALL_LINGUAS=
 ZW_GNU_GETTEXT_SISTER_DIR(../../intl)
 
 # Check for common headers.
-# FIXME: Seems to me this can cause problems for i386-windows hosts.
-# At one point there were hardcoded AC_DEFINE's if ${host} = i386-*-windows*.
-AC_CHECK_HEADERS(stdlib.h string.h strings.h unistd.h time.h)
+# NB: You can assume C11 headers exist.
+AC_CHECK_HEADERS(unistd.h)
 AC_CHECK_HEADERS(sys/time.h sys/times.h sys/resource.h sys/mman.h)
 AC_CHECK_HEADERS(fcntl.h fpu_control.h)
-AC_CHECK_HEADERS(dlfcn.h errno.h sys/stat.h)
+AC_CHECK_HEADERS(dlfcn.h sys/stat.h)
 AC_CHECK_FUNCS(getrusage time sigaction __setfpucw)
 AC_CHECK_FUNCS(mmap munmap lstat truncate ftruncate posix_fallocate)
 AC_CHECK_MEMBERS([[struct stat.st_dev], [struct stat.st_ino],
diff --git a/sim/common/callback.c b/sim/common/callback.c
index 5172d9751df8..f9e848fd913d 100644
--- a/sim/common/callback.c
+++ b/sim/common/callback.c
@@ -26,20 +26,10 @@
 #include "ansidecl.h"
 #include <stdarg.h>
 #include <stdio.h>
-#ifdef HAVE_STDLIB_H
 #include <stdlib.h>
-#endif
-#ifdef HAVE_STRING_H
 #include <string.h>
-#else
-#ifdef HAVE_STRINGS_H
-#include <strings.h>
-#endif
-#endif
-#ifdef HAVE_LIMITS_H
 /* For PIPE_BUF.  */
 #include <limits.h>
-#endif
 #include <errno.h>
 #include <fcntl.h>
 #include <time.h>
diff --git a/sim/common/cgen-scache.c b/sim/common/cgen-scache.c
index 42068a398a7b..56df075f6804 100644
--- a/sim/common/cgen-scache.c
+++ b/sim/common/cgen-scache.c
@@ -20,9 +20,7 @@ along with this program.  If not, see <http://www.gnu.org/licenses/>.  */
 #define SCACHE_DEFINE_INLINE
 
 #include "sim-main.h"
-#ifdef HAVE_STDLIB_H
 #include <stdlib.h>
-#endif
 #include "libiberty.h"
 #include "sim-options.h"
 #include "sim-io.h"
diff --git a/sim/common/dv-glue.c b/sim/common/dv-glue.c
index 9319b198caa9..8bda32615780 100644
--- a/sim/common/dv-glue.c
+++ b/sim/common/dv-glue.c
@@ -22,13 +22,7 @@
 
 #include "hw-main.h"
 
-#ifdef HAVE_STRING_H
 #include <string.h>
-#else
-#ifdef HAVE_STRINGS_H
-#include <strings.h>
-#endif
-#endif
 
 /* DEVICE
 
diff --git a/sim/common/dv-pal.c b/sim/common/dv-pal.c
index 66a916c6657e..dd4ab4fb390f 100644
--- a/sim/common/dv-pal.c
+++ b/sim/common/dv-pal.c
@@ -28,20 +28,11 @@
    its immediate domain */
 #include "hw-tree.h"
 
-#ifdef HAVE_STRING_H
 #include <string.h>
-#else
-#ifdef HAVE_STRINGS_H
-#include <strings.h>
-#endif
-#endif
-
 #ifdef HAVE_UNISTD_H
 #include <unistd.h>
 #endif
-#ifdef HAVE_STDLIB_H
 #include <stdlib.h>
-#endif
 
 /* DEVICE
 
diff --git a/sim/common/dv-sockser.c b/sim/common/dv-sockser.c
index 1b01870050d4..fc552fa0acf0 100644
--- a/sim/common/dv-sockser.c
+++ b/sim/common/dv-sockser.c
@@ -21,17 +21,9 @@ along with this program.  If not, see <http://www.gnu.org/licenses/>.  */
 #include "config.h"
 #include "sim-main.h"
 
-#ifdef HAVE_STRING_H
 #include <string.h>
-#else
-#ifdef HAVE_STRINGS_H
-#include <strings.h>
-#endif
-#endif
 #include <signal.h>
-#ifdef HAVE_STDLIB_H
 #include <stdlib.h>
-#endif
 #ifdef HAVE_FCNTL_H
 #include <fcntl.h>
 #endif
diff --git a/sim/common/hw-alloc.c b/sim/common/hw-alloc.c
index e504236d1d6d..141dc21167f3 100644
--- a/sim/common/hw-alloc.c
+++ b/sim/common/hw-alloc.c
@@ -21,10 +21,7 @@ along with this program.  If not, see <http://www.gnu.org/licenses/>.  */
 #include "hw-main.h"
 #include "hw-base.h"
 
-
-#ifdef HAVE_STDLIB_H
 #include <stdlib.h>
-#endif
 
 struct hw_alloc_data
 {
diff --git a/sim/common/hw-base.c b/sim/common/hw-base.c
index 87ca7292e558..af8b18124896 100644
--- a/sim/common/hw-base.c
+++ b/sim/common/hw-base.c
@@ -23,19 +23,8 @@
 #include "hw-main.h"
 #include "hw-base.h"
 
-
-#ifdef HAVE_STRING_H
 #include <string.h>
-#else
-#ifdef HAVE_STRINGS_H
-#include <strings.h>
-#endif
-#endif
-
-#if HAVE_STDLIB_H
 #include <stdlib.h>
-#endif
-
 #include <ctype.h>
 
 #include "hw-config.h"
diff --git a/sim/common/hw-device.c b/sim/common/hw-device.c
index 76e41b4d3210..bc91264c0208 100644
--- a/sim/common/hw-device.c
+++ b/sim/common/hw-device.c
@@ -23,13 +23,8 @@
 #include "hw-main.h"
 #include "hw-base.h"
 
-#if HAVE_STDLIB_H
 #include <stdlib.h>
-#endif
-
-#if HAVE_STRING_H
 #include <string.h>
-#endif
 
 /* Address methods */
 
diff --git a/sim/common/hw-events.c b/sim/common/hw-events.c
index 917d7bde4e90..1c749dd8c27c 100644
--- a/sim/common/hw-events.c
+++ b/sim/common/hw-events.c
@@ -23,9 +23,7 @@ along with this program.  If not, see <http://www.gnu.org/licenses/>.  */
 
 #include "sim-events.h"
 
-#if HAVE_STRING_H
 #include <string.h>
-#endif
 
 /* The hw-events object is implemented using sim-events */
 
diff --git a/sim/common/hw-handles.c b/sim/common/hw-handles.c
index 539be3938adf..bbd08f632fdd 100644
--- a/sim/common/hw-handles.c
+++ b/sim/common/hw-handles.c
@@ -23,9 +23,7 @@
 #include "hw-main.h"
 #include "hw-base.h"
 
-#if HAVE_STDLIB_H
 #include <stdlib.h>
-#endif
 
 struct hw_handle_mapping
 {
diff --git a/sim/common/hw-ports.c b/sim/common/hw-ports.c
index 7aefb9739123..50e2cbc30e45 100644
--- a/sim/common/hw-ports.c
+++ b/sim/common/hw-ports.c
@@ -21,18 +21,8 @@ along with this program.  If not, see <http://www.gnu.org/licenses/>.  */
 #include "hw-main.h"
 #include "hw-base.h"
 
-#ifdef HAVE_STDLIB_H
 #include <stdlib.h>
-#endif
-
-#ifdef HAVE_STRING_H
 #include <string.h>
-#else
-#ifdef HAVE_STRINGS_H
-#include <strings.h>
-#endif
-#endif
-
 #include <ctype.h>
 
 
diff --git a/sim/common/hw-properties.c b/sim/common/hw-properties.c
index fe29ff41ae84..11a371cea00f 100644
--- a/sim/common/hw-properties.c
+++ b/sim/common/hw-properties.c
@@ -25,13 +25,7 @@
 #include "sim-io.h"
 #include "sim-assert.h"
 
-#ifdef HAVE_STRING_H
 #include <string.h>
-#else
-#ifdef HAVE_STRINGS_H
-#include <strings.h>
-#endif
-#endif
 
 /* property entries */
 
diff --git a/sim/common/hw-tree.c b/sim/common/hw-tree.c
index 91822337d97f..4d50ec6ed62e 100644
--- a/sim/common/hw-tree.c
+++ b/sim/common/hw-tree.c
@@ -27,18 +27,8 @@
 #include "sim-io.h"
 #include "sim-assert.h"
 
-#ifdef HAVE_STDLIB_H
 #include <stdlib.h>
-#endif
-
-#ifdef HAVE_STRING_H
 #include <string.h>
-#else
-#ifdef HAVE_STRINGS_H
-#include <strings.h>
-#endif
-#endif
-
 #include <ctype.h>
 
 /* manipulate/lookup device names */
diff --git a/sim/common/nrun.c b/sim/common/nrun.c
index 134dec8bc110..0caa82062a24 100644
--- a/sim/common/nrun.c
+++ b/sim/common/nrun.c
@@ -21,15 +21,8 @@ along with this program.  If not, see <http://www.gnu.org/licenses/>.  */
 
 #include <signal.h>
 #include <stdlib.h>
-
 /* For strsignal.  */
-#ifdef HAVE_STRING_H
 #include <string.h>
-#else
-#ifdef HAVE_STRINGS_H
-#include <strings.h>
-#endif
-#endif
 
 #include "sim-main.h"
 
diff --git a/sim/common/sim-arange.c b/sim/common/sim-arange.c
index 90203a9784b8..a40dabbeb7d7 100644
--- a/sim/common/sim-arange.c
+++ b/sim/common/sim-arange.c
@@ -24,13 +24,8 @@ along with this program.  If not, see <http://www.gnu.org/licenses/>.  */
 #include "sim-basics.h"
 #include "sim-arange.h"
 
-#ifdef HAVE_STDLIB_H
 #include <stdlib.h>
-#endif
-
-#ifdef HAVE_STRING_H
 #include <string.h>
-#endif
 
 /* Insert a range.  */
 
diff --git a/sim/common/sim-events.c b/sim/common/sim-events.c
index e17557666d7e..db05cafe13e7 100644
--- a/sim/common/sim-events.c
+++ b/sim/common/sim-events.c
@@ -27,18 +27,8 @@
 #include "sim-assert.h"
 #include "libiberty.h"
 
-#ifdef HAVE_STRING_H
 #include <string.h>
-#else
-#ifdef HAVE_STRINGS_H
-#include <strings.h>
-#endif
-#endif
-
-#ifdef HAVE_STDLIB_H
 #include <stdlib.h>
-#endif
-
 #include <signal.h> /* For SIGPROCMASK et al. */
 
 typedef enum {
diff --git a/sim/common/sim-fpu.c b/sim/common/sim-fpu.c
index 30147a81da47..bff5b08b5e59 100644
--- a/sim/common/sim-fpu.c
+++ b/sim/common/sim-fpu.c
@@ -41,9 +41,7 @@ along with this program.  If not, see <http://www.gnu.org/licenses/>.  */
 #include "sim-io.h"
 #include "sim-assert.h"
 
-#ifdef HAVE_STDLIB_H
 #include <stdlib.h>
-#endif
 
 /* Debugging support.
    If digits is -1, then print all digits.  */
diff --git a/sim/common/sim-hw.c b/sim/common/sim-hw.c
index 979a4679af6a..81b4f64f7c22 100644
--- a/sim/common/sim-hw.c
+++ b/sim/common/sim-hw.c
@@ -28,17 +28,8 @@ along with this program.  If not, see <http://www.gnu.org/licenses/>.  */
 #include "hw-main.h"
 #include "hw-base.h"
 
-
-#ifdef HAVE_STRING_H
 #include <string.h>
-#else
-#ifdef HAVE_STRINGS_H
-#include <strings.h>
-#endif
-#endif
-#ifdef HAVE_STDLIB_H
 #include <stdlib.h>
-#endif
 #include <ctype.h>
 #include <errno.h>
 
diff --git a/sim/common/sim-load.c b/sim/common/sim-load.c
index d998be844396..e0aab1e9eb49 100644
--- a/sim/common/sim-load.c
+++ b/sim/common/sim-load.c
@@ -24,9 +24,7 @@ along with this program.  If not, see <http://www.gnu.org/licenses/>.  */
 #include "ansidecl.h"
 #include <stdio.h> /* for NULL */
 #include <stdarg.h>
-#ifdef HAVE_STDLIB_H
 #include <stdlib.h>
-#endif
 #include <time.h>
 
 #include "sim-basics.h"
diff --git a/sim/common/sim-memopt.c b/sim/common/sim-memopt.c
index 77a48df5d569..a102d74ecd0b 100644
--- a/sim/common/sim-memopt.c
+++ b/sim/common/sim-memopt.c
@@ -23,19 +23,9 @@ along with this program.  If not, see <http://www.gnu.org/licenses/>.  */
 #include "sim-assert.h"
 #include "sim-options.h"
 
-#ifdef HAVE_STRING_H
 #include <string.h>
-#else
-#ifdef HAVE_STRINGS_H
-#include <strings.h>
-#endif
-#endif
-#ifdef HAVE_STDLIB_H
 #include <stdlib.h>
-#endif
-#ifdef HAVE_ERRNO_H
 #include <errno.h>
-#endif
 #ifdef HAVE_FCNTL_H
 #include <fcntl.h>
 #endif
diff --git a/sim/common/sim-options.c b/sim/common/sim-options.c
index e0de39adab76..d4434cfd7385 100644
--- a/sim/common/sim-options.c
+++ b/sim/common/sim-options.c
@@ -19,16 +19,8 @@ along with this program.  If not, see <http://www.gnu.org/licenses/>.  */
 
 #include "config.h"
 #include "sim-main.h"
-#ifdef HAVE_STRING_H
 #include <string.h>
-#else
-#ifdef HAVE_STRINGS_H
-#include <strings.h>
-#endif
-#endif
-#ifdef HAVE_STDLIB_H
 #include <stdlib.h>
-#endif
 #include <ctype.h>
 #include <stdio.h>
 #include "libiberty.h"
diff --git a/sim/common/sim-profile.c b/sim/common/sim-profile.c
index a886013edac6..f4ce89f0428e 100644
--- a/sim/common/sim-profile.c
+++ b/sim/common/sim-profile.c
@@ -22,17 +22,8 @@ along with this program.  If not, see <http://www.gnu.org/licenses/>.  */
 #include "sim-options.h"
 #include "sim-assert.h"
 
-#ifdef HAVE_STDLIB_H
 #include <stdlib.h>
-#endif
-
-#ifdef HAVE_STRING_H
 #include <string.h>
-#else
-#ifdef HAVE_STRINGS_H
-#include <strings.h>
-#endif
-#endif
 #include <ctype.h>
 
 #if !WITH_PROFILE_PC_P
diff --git a/sim/common/sim-trace.c b/sim/common/sim-trace.c
index 29b793ce79aa..5f161da630bb 100644
--- a/sim/common/sim-trace.c
+++ b/sim/common/sim-trace.c
@@ -29,16 +29,8 @@ along with this program.  If not, see <http://www.gnu.org/licenses/>.  */
 
 #include "sim-assert.h"
 
-#ifdef HAVE_STRING_H
 #include <string.h>
-#else
-#ifdef HAVE_STRINGS_H
-#include <strings.h>
-#endif
-#endif
-#ifdef HAVE_STDLIB_H
 #include <stdlib.h>
-#endif
 
 #ifndef SIZE_PHASE
 #define SIZE_PHASE 8
diff --git a/sim/common/sim-utils.c b/sim/common/sim-utils.c
index 122e7f2f617a..69949aa15201 100644
--- a/sim/common/sim-utils.c
+++ b/sim/common/sim-utils.c
@@ -20,14 +20,8 @@ along with this program.  If not, see <http://www.gnu.org/licenses/>.  */
 #include "sim-main.h"
 #include "sim-assert.h"
 
-#ifdef HAVE_STDLIB_H
 #include <stdlib.h>
-#endif
-
-#ifdef HAVE_TIME_H
 #include <time.h>
-#endif
-
 #ifdef HAVE_SYS_TIME_H
 #include <sys/time.h> /* needed by sys/resource.h */
 #endif
@@ -35,14 +29,7 @@ along with this program.  If not, see <http://www.gnu.org/licenses/>.  */
 #ifdef HAVE_SYS_RESOURCE_H
 #include <sys/resource.h>
 #endif
-
-#ifdef HAVE_STRING_H
 #include <string.h>
-#else
-#ifdef HAVE_STRINGS_H
-#include <strings.h>
-#endif
-#endif
 
 #include "libiberty.h"
 #include "bfd.h"
diff --git a/sim/common/sim-watch.c b/sim/common/sim-watch.c
index 9c929a15731b..bbd5be434bea 100644
--- a/sim/common/sim-watch.c
+++ b/sim/common/sim-watch.c
@@ -26,18 +26,8 @@ along with this program.  If not, see <http://www.gnu.org/licenses/>.  */
 
 #include <ctype.h>
 #include <stdio.h>
-
-#ifdef HAVE_STRING_H
 #include <string.h>
-#else
-#ifdef HAVE_STRINGS_H
-#include <strings.h>
-#endif
-#endif
-
-#ifdef HAVE_STDLIB_H
 #include <stdlib.h>
-#endif
 
 enum {
   OPTION_WATCH_DELETE                      = OPTION_START,
diff --git a/sim/common/syscall.c b/sim/common/syscall.c
index 8a8c81fbf6b4..fbe8021c8ef1 100644
--- a/sim/common/syscall.c
+++ b/sim/common/syscall.c
@@ -30,14 +30,8 @@
 #include "libiberty.h"
 #include <stdarg.h>
 #include <stdio.h>
-#ifdef HAVE_STDLIB_H
 #include <stdlib.h>
-#endif
-#ifdef HAVE_STRING_H
 #include <string.h>
-#elif defined (HAVE_STRINGS_H)
-#include <strings.h>
-#endif
 #ifdef HAVE_UNISTD_H
 #include <unistd.h>
 #endif
diff --git a/sim/cr16/ChangeLog b/sim/cr16/ChangeLog
index 14edee23c29c..590cfa12487b 100644
--- a/sim/cr16/ChangeLog
+++ b/sim/cr16/ChangeLog
@@ -1,3 +1,8 @@
+2021-01-09  Mike Frysinger  <vapier@gentoo.org>
+
+	* config.in, configure: Regenerate.
+	* simops.c: Delete HAVE_STRING_H & HAVE_TIME_H.
+
 2021-01-09  Mike Frysinger  <vapier@gentoo.org>
 
 	* cr16_sim.h (State): Change to an extern.
diff --git a/sim/cr16/simops.c b/sim/cr16/simops.c
index c7139eb96993..f52376237e94 100644
--- a/sim/cr16/simops.c
+++ b/sim/cr16/simops.c
@@ -27,12 +27,8 @@
 #ifdef HAVE_UNISTD_H
 #include <unistd.h>
 #endif
-#ifdef HAVE_STRING_H
 #include <string.h>
-#endif
-#ifdef HAVE_TIME_H
 #include <time.h>
-#endif
 #ifdef HAVE_SYS_TIME_H
 #include <sys/time.h>
 #endif
diff --git a/sim/cris/ChangeLog b/sim/cris/ChangeLog
index 2af85ec58da5..5794d3f71a24 100644
--- a/sim/cris/ChangeLog
+++ b/sim/cris/ChangeLog
@@ -1,3 +1,10 @@
+2021-01-09  Mike Frysinger  <vapier@gentoo.org>
+
+	* config.in, configure: Regenerate.
+	* dv-rv.c, rvdummy.c, sim-if.c, traps.c: Delete HAVE_ERRNO_H,
+	HAVE_STRING_H, HAVE_STRINGS_H, HAVE_STDLIB_H, and strings.h
+	include.
+
 2021-01-09  Mike Frysinger  <vapier@gentoo.org>
 
 	* configure: Regenerate.
diff --git a/sim/cris/configure.ac b/sim/cris/configure.ac
index 12e0023e864e..a2b08a98d409 100644
--- a/sim/cris/configure.ac
+++ b/sim/cris/configure.ac
@@ -5,7 +5,7 @@ sinclude(../common/acinclude.m4)
 SIM_AC_COMMON
 
 # For dv-rv and rvdummy.
-AC_CHECK_HEADERS(sys/socket.h sys/select.h limits.h sys/param.h)
+AC_CHECK_HEADERS(sys/socket.h sys/select.h sys/param.h)
 
 SIM_AC_OPTION_ENDIAN(LITTLE)
 SIM_AC_OPTION_ALIGNMENT(NONSTRICT_ALIGNMENT)
diff --git a/sim/cris/dv-rv.c b/sim/cris/dv-rv.c
index d22bf068caf5..612eff4e9314 100644
--- a/sim/cris/dv-rv.c
+++ b/sim/cris/dv-rv.c
@@ -25,26 +25,12 @@
 #include "hw-tree.h"
 
 #include <ctype.h>
-
-#ifdef HAVE_ERRNO_H
 #include <errno.h>
-#endif
-
-#ifdef HAVE_STRING_H
 #include <string.h>
-#else
-#ifdef HAVE_STRINGS_H
-#include <strings.h>
-#endif
-#endif
-
 #ifdef HAVE_UNISTD_H
 #include <unistd.h>
 #endif
-#ifdef HAVE_STDLIB_H
 #include <stdlib.h>
-#endif
-
 #ifdef HAVE_SYS_TYPES_H
 #include <sys/types.h>
 #endif
diff --git a/sim/cris/rvdummy.c b/sim/cris/rvdummy.c
index cb16410304d6..f147ea9e59b8 100644
--- a/sim/cris/rvdummy.c
+++ b/sim/cris/rvdummy.c
@@ -41,13 +41,8 @@ main (int argc, char *argv[])
 #ifdef HAVE_UNISTD_H
 #include <unistd.h>
 #endif
-#ifdef HAVE_STDLIB_H
 #include <stdlib.h>
-#endif
-#ifdef HAVE_STRING_H
 #include <string.h>
-#endif
-
 #ifdef HAVE_SYS_TYPES_H
 #include <sys/types.h>
 #endif
@@ -60,9 +55,7 @@ main (int argc, char *argv[])
 #include <sys/select.h>
 #endif
 
-#ifdef HAVE_ERRNO_H
 #include <errno.h>
-#endif
 
 /* Not guarded in dv-sockser.c, so why here.  */
 #include <netinet/in.h>
diff --git a/sim/cris/sim-if.c b/sim/cris/sim-if.c
index b8c7cb2a96e7..787896cae233 100644
--- a/sim/cris/sim-if.c
+++ b/sim/cris/sim-if.c
@@ -26,9 +26,7 @@ along with this program.  If not, see <http://www.gnu.org/licenses/>.  */
 #include "elf-bfd.h"
 
 #include "sim-main.h"
-#ifdef HAVE_STDLIB_H
 #include <stdlib.h>
-#endif
 #include <errno.h>
 #include "sim-options.h"
 #include "dis-asm.h"
diff --git a/sim/cris/traps.c b/sim/cris/traps.c
index 03429e12ed2c..2aaa1f43b168 100644
--- a/sim/cris/traps.c
+++ b/sim/cris/traps.c
@@ -24,9 +24,7 @@ along with this program.  If not, see <http://www.gnu.org/licenses/>.  */
 /* FIXME: get rid of targ-vals.h usage everywhere else.  */
 
 #include <stdarg.h>
-#ifdef HAVE_ERRNO_H
 #include <errno.h>
-#endif
 #ifdef HAVE_UNISTD_H
 #include <unistd.h>
 #endif
diff --git a/sim/d10v/ChangeLog b/sim/d10v/ChangeLog
index 13abbb861477..aab6c6eac4bd 100644
--- a/sim/d10v/ChangeLog
+++ b/sim/d10v/ChangeLog
@@ -1,3 +1,9 @@
+2021-01-09  Mike Frysinger  <vapier@gentoo.org>
+
+	* config.in, configure: Regenerate.
+	* interp.c, simops.c: Delete HAVE_STRING_H, HAVE_STRINGS_H,
+	HAVE_STDLIB_H, and strings.h include.
+
 2021-01-09  Mike Frysinger  <vapier@gentoo.org>
 
 	* d10v_sim.h (State): Change to an extern.
diff --git a/sim/d10v/interp.c b/sim/d10v/interp.c
index 5c70b38d9d8f..276c76beab09 100644
--- a/sim/d10v/interp.c
+++ b/sim/d10v/interp.c
@@ -11,17 +11,8 @@
 #include "gdb/sim-d10v.h"
 #include "gdb/signals.h"
 
-#ifdef HAVE_STRING_H
 #include <string.h>
-#else
-#ifdef HAVE_STRINGS_H
-#include <strings.h>
-#endif /* HAVE_STRING_H */
-#endif /* HAVE_STRINGS_H */
-
-#ifdef HAVE_STDLIB_H
 #include <stdlib.h>
-#endif
 
 enum _leftright { LEFT_FIRST, RIGHT_FIRST };
 
diff --git a/sim/d10v/simops.c b/sim/d10v/simops.c
index 92fd82710fd5..ed0c8a362591 100644
--- a/sim/d10v/simops.c
+++ b/sim/d10v/simops.c
@@ -7,9 +7,7 @@
 #ifdef HAVE_UNISTD_H
 #include <unistd.h>
 #endif
-#ifdef HAVE_STRING_H
 #include <string.h>
-#endif
 
 #include "sim-main.h"
 #include "simops.h"
diff --git a/sim/erc32/ChangeLog b/sim/erc32/ChangeLog
index d296ab311b95..bf108f5a1d61 100644
--- a/sim/erc32/ChangeLog
+++ b/sim/erc32/ChangeLog
@@ -1,3 +1,8 @@
+2021-01-09  Mike Frysinger  <vapier@gentoo.org>
+
+	* config.in, configure: Regenerate.
+	* sis.c: Delete HAVE_STDLIB_H.
+
 2021-01-09  Mike Frysinger  <vapier@gentoo.org>
 
 	* configure: Regenerate.
diff --git a/sim/erc32/sis.c b/sim/erc32/sis.c
index 26f3ed9cd6ad..858bcbb9d7be 100644
--- a/sim/erc32/sis.c
+++ b/sim/erc32/sis.c
@@ -19,9 +19,7 @@
 #include "config.h"
 #include <signal.h>
 #include <string.h>
-#ifdef HAVE_STDLIB_H
 #include <stdlib.h>
-#endif
 #include <stdio.h>
 #include <sys/fcntl.h>
 #include "sis.h"
diff --git a/sim/frv/ChangeLog b/sim/frv/ChangeLog
index c021f1c4ab8a..e13917e1c882 100644
--- a/sim/frv/ChangeLog
+++ b/sim/frv/ChangeLog
@@ -1,3 +1,9 @@
+2021-01-09  Mike Frysinger  <vapier@gentoo.org>
+
+	* config.in, configure: Regenerate.
+	* options.c, sim-if.c: Delete HAVE_STRING_H, HAVE_STRINGS_H,
+	HAVE_STDLIB_H, and strings.h include.
+
 2021-01-09  Mike Frysinger  <vapier@gentoo.org>
 
 	* configure: Regenerate.
diff --git a/sim/frv/options.c b/sim/frv/options.c
index d90984a1ee9b..b5cc8dec7989 100644
--- a/sim/frv/options.c
+++ b/sim/frv/options.c
@@ -24,16 +24,8 @@ along with this program.  If not, see <http://www.gnu.org/licenses/>.  */
 #include "sim-assert.h"
 #include "sim-options.h"
 
-#ifdef HAVE_STRING_H
 #include <string.h>
-#else
-#ifdef HAVE_STRINGS_H
-#include <strings.h>
-#endif
-#endif
-#ifdef HAVE_STDLIB_H
 #include <stdlib.h>
-#endif
 
 /* FRV specific command line options. */
 
diff --git a/sim/frv/sim-if.c b/sim/frv/sim-if.c
index 2eb6e6da5f3f..636890bd2cbc 100644
--- a/sim/frv/sim-if.c
+++ b/sim/frv/sim-if.c
@@ -20,9 +20,7 @@ along with this program.  If not, see <http://www.gnu.org/licenses/>.  */
 #define WANT_CPU
 #define WANT_CPU_FRVBF
 #include "sim-main.h"
-#ifdef HAVE_STDLIB_H
 #include <stdlib.h>
-#endif
 #include "sim-options.h"
 #include "libiberty.h"
 #include "bfd.h"
diff --git a/sim/ft32/ChangeLog b/sim/ft32/ChangeLog
index ad31e24e01f6..5bc0ce3668c9 100644
--- a/sim/ft32/ChangeLog
+++ b/sim/ft32/ChangeLog
@@ -1,3 +1,7 @@
+2021-01-09  Mike Frysinger  <vapier@gentoo.org>
+
+	* config.in, configure: Regenerate.
+
 2021-01-09  Mike Frysinger  <vapier@gentoo.org>
 
 	* configure: Regenerate.
diff --git a/sim/h8300/ChangeLog b/sim/h8300/ChangeLog
index 4bab9c52b070..8ee601e1371d 100644
--- a/sim/h8300/ChangeLog
+++ b/sim/h8300/ChangeLog
@@ -1,3 +1,8 @@
+2021-01-09  Mike Frysinger  <vapier@gentoo.org>
+
+	* config.in, configure: Regenerate.
+	* compile.c: Delete HAVE_TIME_H & HAVE_STDLIB_H.
+
 2021-01-09  Mike Frysinger  <vapier@gentoo.org>
 
 	* configure: Regenerate.
diff --git a/sim/h8300/compile.c b/sim/h8300/compile.c
index 3a3b2e7241bb..a0e8bbbf8986 100644
--- a/sim/h8300/compile.c
+++ b/sim/h8300/compile.c
@@ -19,12 +19,8 @@
 
 #include "config.h"
 #include <signal.h>
-#ifdef HAVE_TIME_H
 #include <time.h>
-#endif
-#ifdef HAVE_STDLIB_H
 #include <stdlib.h>
-#endif
 #ifdef HAVE_SYS_PARAM_H
 #include <sys/param.h>
 #endif
diff --git a/sim/igen/ChangeLog b/sim/igen/ChangeLog
index 7f9e87aa917b..b5078502f450 100644
--- a/sim/igen/ChangeLog
+++ b/sim/igen/ChangeLog
@@ -1,3 +1,8 @@
+2021-01-09  Mike Frysinger  <vapier@gentoo.org>
+
+	* filter.c, if.c, misc.c, misc.h, table.c: Delete HAVE_STRING_H,
+	HAVE_STRINGS_H, HAVE_STDLIB_H, and strings.h include.
+
 2021-01-09  Mike Frysinger  <vapier@gentoo.org>
 
 	* configure: Regenerate.
diff --git a/sim/igen/filter.c b/sim/igen/filter.c
index 8059e004e3bb..e37d680b09c8 100644
--- a/sim/igen/filter.c
+++ b/sim/igen/filter.c
@@ -24,13 +24,7 @@
 
 #include "config.h"
 
-#ifdef HAVE_STRING_H
 #include <string.h>
-#else
-#ifdef HAVE_STRINGS_H
-#include <strings.h>
-#endif
-#endif
 
 #include "misc.h"
 #include "lf.h"
diff --git a/sim/igen/lf.c b/sim/igen/lf.c
index e8bf75c88249..4a7978e7a713 100644
--- a/sim/igen/lf.c
+++ b/sim/igen/lf.c
@@ -29,17 +29,8 @@
 #include "misc.h"
 #include "lf.h"
 
-#ifdef HAVE_STDLIB_H
 #include <stdlib.h>
-#endif
-
-#ifdef HAVE_STRING_H
 #include <string.h>
-#else
-#ifdef HAVE_STRINGS_H
-#include <strings.h>
-#endif
-#endif
 
 struct _lf
 {
diff --git a/sim/igen/misc.c b/sim/igen/misc.c
index 1678bfcc672a..d74f74e12e5d 100644
--- a/sim/igen/misc.c
+++ b/sim/igen/misc.c
@@ -28,17 +28,8 @@
 #include "config.h"
 #include "misc.h"
 
-#ifdef HAVE_STDLIB_H
 #include <stdlib.h>
-#endif
-
-#ifdef HAVE_STRING_H
 #include <string.h>
-#else
-#ifdef HAVE_STRINGS_H
-#include <strings.h>
-#endif
-#endif
 
 /* NB: Because warning and error can be interchanged, neither append a
    trailing '\n' */
diff --git a/sim/igen/misc.h b/sim/igen/misc.h
index 7634816dcd29..40e9cd05d1c3 100644
--- a/sim/igen/misc.h
+++ b/sim/igen/misc.h
@@ -54,18 +54,8 @@ typedef unsigned __int64 unsigned64;
 
 #include <stdio.h>
 #include <ctype.h>
-
-#ifdef HAVE_STRING_H
 #include <string.h>
-#else
-#ifdef HAVE_STRINGS_H
-#include <strings.h>
-#endif
-#endif
-
-#ifdef HAVE_STDLIB_H
 #include <stdlib.h>
-#endif
 
 #if !defined (__attribute__) && (!defined(__GNUC__) || __GNUC__ < 2 || (__GNUC__ == 2 && __GNUC_MINOR__ < 7))
 #define __attribute__(arg)
diff --git a/sim/igen/table.c b/sim/igen/table.c
index 5b0d07e842de..d21b282dc45b 100644
--- a/sim/igen/table.c
+++ b/sim/igen/table.c
@@ -35,10 +35,7 @@
 #ifdef HAVE_UNISTD_H
 #include <unistd.h>
 #endif
-
-#ifdef HAVE_STDLIB_H
 #include <stdlib.h>
-#endif
 
 typedef struct _open_table open_table;
 struct _open_table
diff --git a/sim/iq2000/ChangeLog b/sim/iq2000/ChangeLog
index 79a1dd2d95f0..64fbd474e87b 100644
--- a/sim/iq2000/ChangeLog
+++ b/sim/iq2000/ChangeLog
@@ -1,3 +1,8 @@
+2021-01-09  Mike Frysinger  <vapier@gentoo.org>
+
+	* config.in, configure: Regenerate.
+	* sim-if.c: Delete HAVE_STDLIB_H.
+
 2021-01-09  Mike Frysinger  <vapier@gentoo.org>
 
 	* configure: Regenerate.
diff --git a/sim/iq2000/sim-if.c b/sim/iq2000/sim-if.c
index 238ec97e47db..07169402c99d 100644
--- a/sim/iq2000/sim-if.c
+++ b/sim/iq2000/sim-if.c
@@ -18,9 +18,9 @@ You should have received a copy of the GNU General Public License
 along with this program.  If not, see <http://www.gnu.org/licenses/>.  */
 
 #include "sim-main.h"
-#ifdef HAVE_STDLIB_H
+
 #include <stdlib.h>
-#endif
+
 #include "sim-options.h"
 #include "libiberty.h"
 #include "bfd.h"
diff --git a/sim/lm32/ChangeLog b/sim/lm32/ChangeLog
index f4c1a3b9cebe..f1bc6679fc9f 100644
--- a/sim/lm32/ChangeLog
+++ b/sim/lm32/ChangeLog
@@ -1,3 +1,8 @@
+2021-01-09  Mike Frysinger  <vapier@gentoo.org>
+
+	* config.in, configure: Regenerate.
+	* sim-if.c: Delete HAVE_STDLIB_H.
+
 2021-01-09  Mike Frysinger  <vapier@gentoo.org>
 
 	* configure: Regenerate.
diff --git a/sim/lm32/sim-if.c b/sim/lm32/sim-if.c
index cbe975113b3d..176456ed62d4 100644
--- a/sim/lm32/sim-if.c
+++ b/sim/lm32/sim-if.c
@@ -23,9 +23,7 @@
 #include "libiberty.h"
 #include "bfd.h"
 
-#ifdef HAVE_STDLIB_H
 #include <stdlib.h>
-#endif
 \f
 /* Cover function of sim_state_free to free the cpu buffers as well.  */
 
diff --git a/sim/m32c/ChangeLog b/sim/m32c/ChangeLog
index 8a5c8d15046b..093c300f7551 100644
--- a/sim/m32c/ChangeLog
+++ b/sim/m32c/ChangeLog
@@ -1,3 +1,7 @@
+2021-01-09  Mike Frysinger  <vapier@gentoo.org>
+
+	* config.in, configure: Regenerate.
+
 2021-01-09  Mike Frysinger  <vapier@gentoo.org>
 
 	* configure: Regenerate.
diff --git a/sim/m32r/ChangeLog b/sim/m32r/ChangeLog
index ed284eada554..dcc2f4785597 100644
--- a/sim/m32r/ChangeLog
+++ b/sim/m32r/ChangeLog
@@ -1,3 +1,9 @@
+2021-01-09  Mike Frysinger  <vapier@gentoo.org>
+
+	* config.in, configure: Regenerate.
+	* sim-if.c: Delete HAVE_STRING_H, HAVE_STRINGS_H, HAVE_STDLIB_H,
+	and strings.h include.
+
 2021-01-09  Mike Frysinger  <vapier@gentoo.org>
 
 	* configure: Regenerate.
diff --git a/sim/m32r/sim-if.c b/sim/m32r/sim-if.c
index c25d9a859c2c..08003b50fd6f 100644
--- a/sim/m32r/sim-if.c
+++ b/sim/m32r/sim-if.c
@@ -22,16 +22,8 @@
 #include "libiberty.h"
 #include "bfd.h"
 
-#ifdef HAVE_STRING_H
 #include <string.h>
-#else
-#ifdef HAVE_STRINGS_H
-#include <strings.h>
-#endif
-#endif
-#ifdef HAVE_STDLIB_H
 #include <stdlib.h>
-#endif
 
 #include "dv-m32r_uart.h"
 
diff --git a/sim/m68hc11/ChangeLog b/sim/m68hc11/ChangeLog
index 7545c768cf8f..520daa3e9aa9 100644
--- a/sim/m68hc11/ChangeLog
+++ b/sim/m68hc11/ChangeLog
@@ -1,3 +1,7 @@
+2021-01-09  Mike Frysinger  <vapier@gentoo.org>
+
+	* config.in, configure: Regenerate.
+
 2021-01-09  Mike Frysinger  <vapier@gentoo.org>
 
 	* configure: Regenerate.
diff --git a/sim/mcore/ChangeLog b/sim/mcore/ChangeLog
index de32036a37b4..c7d48ca71676 100644
--- a/sim/mcore/ChangeLog
+++ b/sim/mcore/ChangeLog
@@ -1,3 +1,7 @@
+2021-01-09  Mike Frysinger  <vapier@gentoo.org>
+
+	* config.in, configure: Regenerate.
+
 2021-01-09  Mike Frysinger  <vapier@gentoo.org>
 
 	* configure: Regenerate.
diff --git a/sim/microblaze/ChangeLog b/sim/microblaze/ChangeLog
index 523971ca99c2..63abd91d9b32 100644
--- a/sim/microblaze/ChangeLog
+++ b/sim/microblaze/ChangeLog
@@ -1,3 +1,7 @@
+2021-01-09  Mike Frysinger  <vapier@gentoo.org>
+
+	* config.in, configure: Regenerate.
+
 2021-01-09  Mike Frysinger  <vapier@gentoo.org>
 
 	* configure: Regenerate.
diff --git a/sim/mips/ChangeLog b/sim/mips/ChangeLog
index 6197dd6f3728..e80519d6b769 100644
--- a/sim/mips/ChangeLog
+++ b/sim/mips/ChangeLog
@@ -1,3 +1,9 @@
+2021-01-09  Mike Frysinger  <vapier@gentoo.org>
+
+	* config.in, configure: Regenerate.
+	* interp.c: Delete HAVE_STRING_H, HAVE_STRINGS_H, HAVE_STDLIB_H,
+	and strings.h include.
+
 2021-01-09  Mike Frysinger  <vapier@gentoo.org>
 
 	* configure: Regenerate.
diff --git a/sim/mips/interp.c b/sim/mips/interp.c
index 9dbac8c58fc7..49e5f7167574 100644
--- a/sim/mips/interp.c
+++ b/sim/mips/interp.c
@@ -41,16 +41,8 @@ code on the hardware.
 #include <ctype.h>
 #include <limits.h>
 #include <math.h>
-#ifdef HAVE_STDLIB_H
 #include <stdlib.h>
-#endif
-#ifdef HAVE_STRING_H
 #include <string.h>
-#else
-#ifdef HAVE_STRINGS_H
-#include <strings.h>
-#endif
-#endif
 
 #include "getopt.h"
 #include "libiberty.h"
diff --git a/sim/mn10300/ChangeLog b/sim/mn10300/ChangeLog
index 2f93d99837ff..13aa53acdfab 100644
--- a/sim/mn10300/ChangeLog
+++ b/sim/mn10300/ChangeLog
@@ -1,3 +1,9 @@
+2021-01-09  Mike Frysinger  <vapier@gentoo.org>
+
+	* config.in, configure: Regenerate.
+	* interp.c, op_utils.c: Delete HAVE_STRING_H, HAVE_STRINGS_H,
+	HAVE_STDLIB_H, HAVE_TIME_H, and strings.h include.
+
 2021-01-09  Mike Frysinger  <vapier@gentoo.org>
 
 	* configure: Regenerate.
diff --git a/sim/mn10300/interp.c b/sim/mn10300/interp.c
index 7f0655f3f472..418f3f00a394 100644
--- a/sim/mn10300/interp.c
+++ b/sim/mn10300/interp.c
@@ -8,18 +8,8 @@
 #include "bfd.h"
 #include "sim-assert.h"
 
-
-#ifdef HAVE_STDLIB_H
 #include <stdlib.h>
-#endif
-
-#ifdef HAVE_STRING_H
 #include <string.h>
-#else
-#ifdef HAVE_STRINGS_H
-#include <strings.h>
-#endif
-#endif
 
 #include "bfd.h"
 
diff --git a/sim/mn10300/op_utils.c b/sim/mn10300/op_utils.c
index 67bf9a34f684..a696cdbfab97 100644
--- a/sim/mn10300/op_utils.c
+++ b/sim/mn10300/op_utils.c
@@ -5,22 +5,11 @@
 #ifdef HAVE_UTIME_H
 #include <utime.h>
 #endif
-
-#ifdef HAVE_TIME_H
 #include <time.h>
-#endif
-
 #ifdef HAVE_UNISTD_H
 #include <unistd.h>
 #endif
-
-#ifdef HAVE_STRING_H
 #include <string.h>
-#else
-#ifdef HAVE_STRINGS_H
-#include <strings.h>
-#endif
-#endif
 #include <sys/stat.h>
 #include <sys/times.h>
 #include <sys/time.h>
diff --git a/sim/moxie/ChangeLog b/sim/moxie/ChangeLog
index 00ad7a730181..3ec0762a3b0e 100644
--- a/sim/moxie/ChangeLog
+++ b/sim/moxie/ChangeLog
@@ -1,3 +1,7 @@
+2021-01-09  Mike Frysinger  <vapier@gentoo.org>
+
+	* config.in, configure: Regenerate.
+
 2021-01-09  Mike Frysinger  <vapier@gentoo.org>
 
 	* configure: Regenerate.
diff --git a/sim/msp430/ChangeLog b/sim/msp430/ChangeLog
index 1f1a0c457b29..c8ed0101eac8 100644
--- a/sim/msp430/ChangeLog
+++ b/sim/msp430/ChangeLog
@@ -1,3 +1,7 @@
+2021-01-09  Mike Frysinger  <vapier@gentoo.org>
+
+	* config.in, configure: Regenerate.
+
 2021-01-09  Mike Frysinger  <vapier@gentoo.org>
 
 	* configure: Regenerate.
diff --git a/sim/or1k/ChangeLog b/sim/or1k/ChangeLog
index 83f9817a4672..7c255f0522b4 100644
--- a/sim/or1k/ChangeLog
+++ b/sim/or1k/ChangeLog
@@ -1,3 +1,9 @@
+2021-01-09  Mike Frysinger  <vapier@gentoo.org>
+
+	* config.in, configure: Regenerate.
+	* sim-if.c: Delete HAVE_STRING_H, HAVE_STRINGS_H, HAVE_STDLIB_H,
+	and strings.h include.
+
 2021-01-09  Mike Frysinger  <vapier@gentoo.org>
 
 	* configure: Regenerate.
diff --git a/sim/or1k/sim-if.c b/sim/or1k/sim-if.c
index 18f70387063f..b5258a828a5f 100644
--- a/sim/or1k/sim-if.c
+++ b/sim/or1k/sim-if.c
@@ -21,16 +21,8 @@
 #include "libiberty.h"
 #include "bfd.h"
 
-#ifdef HAVE_STRING_H
 #include <string.h>
-#else
-#ifdef HAVE_STRINGS_H
-#include <strings.h>
-#endif
-#endif
-#ifdef HAVE_STDLIB_H
 #include <stdlib.h>
-#endif
 
 static void free_state (SIM_DESC);
 \f
diff --git a/sim/ppc/ChangeLog b/sim/ppc/ChangeLog
index 625afeccd57b..e2dc80268a00 100644
--- a/sim/ppc/ChangeLog
+++ b/sim/ppc/ChangeLog
@@ -1,3 +1,21 @@
+2021-01-09  Mike Frysinger  <vapier@gentoo.org>
+
+	* configure.ac: Delete checks for stdlib.h, string.h,
+	strings.h, and time.h.
+	* config.in, configure: Regenerate.
+	* cpu.c, debug.c, device.c, device_table.c, device_table.h,
+	dgen.c, emul_bugapi.c, emul_chirp.c, emul_netbsd.c, emul_unix.c,
+	filter.c, hw_com.c, hw_eeprom.c, hw_nvram.c, hw_opic.c, hw_pal.c,
+	hw_phb.c, hw_sem.c, hw_shm.c, lf.c, main.c, misc.c, misc.h,
+	mon.c, pk_disklabel.c, psim.c, registers.c, sim_calls.c, table.c,
+	tree.c: Delete HAVE_ERRNO_H, HAVE_STDLIB_H, HAVE_STRING_H,
+	HAVE_STRINGS_H, HAVE_LIMITS_H, HAVE_TIME_H, and strings.h include.
+	* hw_nvram.c: Likewise.
+	(_hw_nvram_device): Always define host_time as time_t.
+	(hw_nvram_update_clock): Delete error fallback.
+	* gen-model.c (gen_model_c): Delete HAVE_STDLIB_H output.
+
+
 2021-01-09  Mike Frysinger  <vapier@gentoo.org>
 
 	* configure: Regenerate.
diff --git a/sim/ppc/configure.ac b/sim/ppc/configure.ac
index ee52bba81ecc..9bc10570f038 100644
--- a/sim/ppc/configure.ac
+++ b/sim/ppc/configure.ac
@@ -655,7 +655,7 @@ AC_TYPE_UID_T
 
 AC_CHECK_FUNCS(access cfgetispeed cfgetospeed cfsetispeed cfsetospeed chdir chmod chown dup dup2 fchmod fchown fcntl fstat fstatfs getdirentries getegid geteuid getgid getpid getppid getrusage gettimeofday getuid ioctl kill link lseek lstat mkdir pipe readlink rmdir setreuid setregid stat sigprocmask stat symlink tcgetattr tcsetattr tcsendbreak tcdrain tcflush tcflow tcgetpgrp tcsetpgrp time umask unlink)
 
-AC_CHECK_HEADERS(fcntl.h stdlib.h string.h strings.h sys/ioctl.h sys/mount.h sys/param.h sys/resource.h sys/stat.h sys/termio.h sys/termios.h sys/time.h sys/times.h sys/types.h time.h unistd.h sys/vfs.h sys/statfs.h)
+AC_CHECK_HEADERS(fcntl.h sys/ioctl.h sys/mount.h sys/param.h sys/resource.h sys/stat.h sys/termio.h sys/termios.h sys/time.h sys/times.h sys/types.h unistd.h sys/vfs.h sys/statfs.h)
 AC_HEADER_DIRENT
 
 dnl Figure out what type of termio/termios support there is
diff --git a/sim/ppc/cpu.c b/sim/ppc/cpu.c
index c7e8bdf0c003..3169553a5870 100644
--- a/sim/ppc/cpu.c
+++ b/sim/ppc/cpu.c
@@ -26,13 +26,7 @@
 #include "cpu.h"
 #include "idecode.h"
 
-#ifdef HAVE_STRING_H
 #include <string.h>
-#else
-#ifdef HAVE_STRINGS_H
-#include <strings.h>
-#endif
-#endif
 
 struct _cpu {
 
diff --git a/sim/ppc/debug.c b/sim/ppc/debug.c
index 1ec279bac2ae..dba14255366b 100644
--- a/sim/ppc/debug.c
+++ b/sim/ppc/debug.c
@@ -24,12 +24,8 @@
 #include "config.h"
 #include "basics.h"
 
-#ifdef HAVE_STDLIB_H
 #include <stdlib.h>
-#endif
-#ifdef HAVE_STRING_H
 #include <string.h>
-#endif
 
 int ppc_trace[nr_trace_options];
 
diff --git a/sim/ppc/device.c b/sim/ppc/device.c
index d5093bbdadb1..6a0209e5ce69 100644
--- a/sim/ppc/device.c
+++ b/sim/ppc/device.c
@@ -29,18 +29,8 @@
 #include "events.h"
 #include "psim.h"
 
-#ifdef HAVE_STDLIB_H
 #include <stdlib.h>
-#endif
-
-#ifdef HAVE_STRING_H
 #include <string.h>
-#else
-#ifdef HAVE_STRINGS_H
-#include <strings.h>
-#endif
-#endif
-
 #include <ctype.h>
 
 STATIC_INLINE_DEVICE (void) clean_device_properties(device *);
diff --git a/sim/ppc/device_table.c b/sim/ppc/device_table.c
index d2c6195e1dae..7d8fabd4dd56 100644
--- a/sim/ppc/device_table.c
+++ b/sim/ppc/device_table.c
@@ -23,10 +23,7 @@
 
 #include "device_table.h"
 
-#if HAVE_STDLIB_H
 #include <stdlib.h>
-#endif
-
 #include <ctype.h>
 
 
diff --git a/sim/ppc/device_table.h b/sim/ppc/device_table.h
index 654ecade4b01..b61f4bd06d73 100644
--- a/sim/ppc/device_table.h
+++ b/sim/ppc/device_table.h
@@ -25,13 +25,7 @@
 #include "device.h"
 #include "tree.h"
 
-#ifdef HAVE_STRING_H
 #include <string.h>
-#else
-#ifdef HAVE_STRINGS_H
-#include <strings.h>
-#endif
-#endif
 
 
 typedef struct _device_callbacks device_callbacks;
diff --git a/sim/ppc/dgen.c b/sim/ppc/dgen.c
index 8e8f5fb61bcf..9437944a9a6b 100644
--- a/sim/ppc/dgen.c
+++ b/sim/ppc/dgen.c
@@ -34,18 +34,8 @@
 #ifdef HAVE_UNISTD_H
 #include <unistd.h>
 #endif
-
-#ifdef HAVE_STDLIB_H
 #include <stdlib.h>
-#endif
-
-#ifdef HAVE_STRING_H
 #include <string.h>
-#else
-#ifdef HAVE_STRINGS_H
-#include <strings.h>
-#endif
-#endif
 
 /****************************************************************/
 
diff --git a/sim/ppc/emul_bugapi.c b/sim/ppc/emul_bugapi.c
index 8481b6fb39e6..c3c607b43f04 100644
--- a/sim/ppc/emul_bugapi.c
+++ b/sim/ppc/emul_bugapi.c
@@ -30,18 +30,8 @@
 #ifdef HAVE_UNISTD_H
 #include <unistd.h>
 #endif
-
-#ifdef HAVE_STDLIB_H
 #include <stdlib.h>
-#endif
-
-#ifdef HAVE_STRING_H
 #include <string.h>
-#else
-#ifdef HAVE_STRINGS_H
-#include <strings.h>
-#endif
-#endif
 
 
 /* EMULATION
diff --git a/sim/ppc/emul_chirp.c b/sim/ppc/emul_chirp.c
index f326410b060d..d4214f51b971 100644
--- a/sim/ppc/emul_chirp.c
+++ b/sim/ppc/emul_chirp.c
@@ -27,14 +27,7 @@
 #include "emul_generic.h"
 #include "emul_chirp.h"
 
-#ifdef HAVE_STRING_H
 #include <string.h>
-#else
-#ifdef HAVE_STRINGS_H
-#include <strings.h>
-#endif
-#endif
-
 #ifdef HAVE_UNISTD_H
 #include <unistd.h>
 #endif
diff --git a/sim/ppc/emul_netbsd.c b/sim/ppc/emul_netbsd.c
index 0bda20e164b5..0135a93298b8 100644
--- a/sim/ppc/emul_netbsd.c
+++ b/sim/ppc/emul_netbsd.c
@@ -28,14 +28,7 @@
 #include "emul_generic.h"
 #include "emul_netbsd.h"
 
-#ifdef HAVE_STRING_H
 #include <string.h>
-#else
-#ifdef HAVE_STRINGS_H
-#include <strings.h>
-#endif
-#endif
-
 #include <sys/types.h>
 #include <sys/stat.h>
 #include <stdio.h>
@@ -82,9 +75,7 @@ int getrusage();
 #include <unistd.h>
 #endif
 
-#ifdef HAVE_STDLIB_H
 #include <stdlib.h>
-#endif
 
 #define WITH_NetBSD_HOST (NetBSD >= 199306)
 #if WITH_NetBSD_HOST /* here NetBSD as that is what we're emulating */
diff --git a/sim/ppc/emul_unix.c b/sim/ppc/emul_unix.c
index 3a1c24586fa2..92c3c1ededfa 100644
--- a/sim/ppc/emul_unix.c
+++ b/sim/ppc/emul_unix.c
@@ -28,14 +28,7 @@
 #include "emul_generic.h"
 #include "emul_unix.h"
 
-#ifdef HAVE_STRING_H
 #include <string.h>
-#else
-#ifdef HAVE_STRINGS_H
-#include <strings.h>
-#endif
-#endif
-
 #ifdef HAVE_SYS_TYPES_H
 #include <sys/types.h>
 #endif
@@ -130,9 +123,7 @@ int getrusage();
 #include <unistd.h>
 #endif
 
-#ifdef HAVE_STDLIB_H
 #include <stdlib.h>
-#endif
 
 #if defined(BSD) && !defined(errno) && (BSD < 199306)	/* here BSD as just a bug */
 extern int errno;
diff --git a/sim/ppc/filter.c b/sim/ppc/filter.c
index 7aa6a556014f..a2024275290a 100644
--- a/sim/ppc/filter.c
+++ b/sim/ppc/filter.c
@@ -22,13 +22,7 @@
 
 #include "build-config.h"
 
-#ifdef HAVE_STRING_H
 #include <string.h>
-#else
-#ifdef HAVE_STRINGS_H
-#include <strings.h>
-#endif
-#endif
 
 #include "misc.h"
 #include "filter.h"
diff --git a/sim/ppc/gen-model.c b/sim/ppc/gen-model.c
index 00f2b02118e7..a591d316e2ea 100644
--- a/sim/ppc/gen-model.c
+++ b/sim/ppc/gen-model.c
@@ -244,9 +244,7 @@ gen_model_c(insn_table *table, lf *file)
   lf_printf(file, "#include \"cpu.h\"\n");
   lf_printf(file, "#include \"mon.h\"\n");
   lf_printf(file, "\n");
-  lf_printf(file, "#ifdef HAVE_STDLIB_H\n");
   lf_printf(file, "#include <stdlib.h>\n");
-  lf_printf(file, "#endif\n");
   lf_printf(file, "\n");
 
   for(insn_ptr = model_data; insn_ptr; insn_ptr = insn_ptr->next) {
diff --git a/sim/ppc/hw_com.c b/sim/ppc/hw_com.c
index 38d6d85cefc3..4ffd73203f49 100644
--- a/sim/ppc/hw_com.c
+++ b/sim/ppc/hw_com.c
@@ -27,20 +27,11 @@
 
 #include "device_table.h"
 
-#ifdef HAVE_STRING_H
 #include <string.h>
-#else
-#ifdef HAVE_STRINGS_H
-#include <strings.h>
-#endif
-#endif
-
 #ifdef HAVE_UNISTD_H
 #include <unistd.h>
 #endif
-#ifdef HAVE_STDLIB_H
 #include <stdlib.h>
-#endif
 
 /* DEVICE
    
diff --git a/sim/ppc/hw_eeprom.c b/sim/ppc/hw_eeprom.c
index 3406be93c62d..b0a3ac635b16 100644
--- a/sim/ppc/hw_eeprom.c
+++ b/sim/ppc/hw_eeprom.c
@@ -23,13 +23,7 @@
 
 #include "device_table.h"
 
-#ifdef HAVE_STRING_H
 #include <string.h>
-#else
-#ifdef HAVE_STRINGS_H
-#include <strings.h>
-#endif
-#endif
 
 
 /* DEVICE
diff --git a/sim/ppc/hw_nvram.c b/sim/ppc/hw_nvram.c
index f8caaa8edd29..0580dcc2a43d 100644
--- a/sim/ppc/hw_nvram.c
+++ b/sim/ppc/hw_nvram.c
@@ -27,17 +27,8 @@
 
 #include "device_table.h"
 
-#ifdef HAVE_TIME_H
 #include <time.h>
-#endif
-
-#ifdef HAVE_STRING_H
 #include <string.h>
-#else
-#ifdef HAVE_STRINGS_H
-#include <strings.h>
-#endif
-#endif
 
 /* DEVICE
 
@@ -73,11 +64,7 @@
 typedef struct _hw_nvram_device {
   unsigned8 *memory;
   unsigned sizeof_memory;
-#ifdef HAVE_TIME_H
   time_t host_time;
-#else
-  long host_time;
-#endif
   unsigned timezone;
   /* useful */
   unsigned addr_year;
@@ -177,7 +164,6 @@ static void
 hw_nvram_update_clock(hw_nvram_device *nvram,
 		      cpu *processor)
 {
-#ifdef HAVE_TIME_H
   if (!(nvram->memory[nvram->addr_control] & 0xc0)) {
     time_t host_time = time(NULL);
     if (nvram->host_time != host_time) {
@@ -193,9 +179,6 @@ hw_nvram_update_clock(hw_nvram_device *nvram,
       nvram->memory[nvram->addr_seconds] = hw_nvram_bcd(clock->tm_sec);
     }
   }
-#else
-  error("fixme - where do I find out GMT\n");
-#endif
 }
 
 static void
diff --git a/sim/ppc/hw_opic.c b/sim/ppc/hw_opic.c
index 69d956b1a5f8..8afe312a7efe 100644
--- a/sim/ppc/hw_opic.c
+++ b/sim/ppc/hw_opic.c
@@ -23,13 +23,7 @@
 
 #include "device_table.h"
 
-#ifdef HAVE_STRING_H
 #include <string.h>
-#else
-#ifdef HAVE_STRINGS_H
-#include <strings.h>
-#endif
-#endif
 
 
 /* DEVICE
diff --git a/sim/ppc/hw_pal.c b/sim/ppc/hw_pal.c
index 0789929cde06..8b0770993699 100644
--- a/sim/ppc/hw_pal.c
+++ b/sim/ppc/hw_pal.c
@@ -29,20 +29,11 @@
 
 #include "cpu.h"
 
-#ifdef HAVE_STRING_H
 #include <string.h>
-#else
-#ifdef HAVE_STRINGS_H
-#include <strings.h>
-#endif
-#endif
-
 #ifdef HAVE_UNISTD_H
 #include <unistd.h>
 #endif
-#ifdef HAVE_STDLIB_H
 #include <stdlib.h>
-#endif
 
 
 /* DEVICE
diff --git a/sim/ppc/hw_phb.c b/sim/ppc/hw_phb.c
index 8e3fb179501d..08defc2868ca 100644
--- a/sim/ppc/hw_phb.c
+++ b/sim/ppc/hw_phb.c
@@ -27,10 +27,7 @@
 
 #include "corefile.h"
 
-#ifdef HAVE_STDLIB_H
 #include <stdlib.h>
-#endif
-
 #include <ctype.h>
 
 
diff --git a/sim/ppc/hw_sem.c b/sim/ppc/hw_sem.c
index f1c329544435..5f3595204d2c 100644
--- a/sim/ppc/hw_sem.c
+++ b/sim/ppc/hw_sem.c
@@ -23,14 +23,7 @@
 
 #include "device_table.h"
 
-#ifdef HAVE_STRING_H
 #include <string.h>
-#else
-#ifdef HAVE_STRINGS_H
-#include <strings.h>
-#endif
-#endif
-
 #include <sys/ipc.h>
 #include <sys/sem.h>
 
diff --git a/sim/ppc/hw_shm.c b/sim/ppc/hw_shm.c
index 312887148334..f2fa144244ac 100644
--- a/sim/ppc/hw_shm.c
+++ b/sim/ppc/hw_shm.c
@@ -23,14 +23,7 @@
 
 #include "device_table.h"
 
-#ifdef HAVE_STRING_H
 #include <string.h>
-#else
-#ifdef HAVE_STRINGS_H
-#include <strings.h>
-#endif
-#endif
-
 #include <sys/ipc.h>
 #include <sys/shm.h>
 
diff --git a/sim/ppc/lf.c b/sim/ppc/lf.c
index 1794a27f3509..a3815a8788ed 100644
--- a/sim/ppc/lf.c
+++ b/sim/ppc/lf.c
@@ -26,17 +26,8 @@
 #include "misc.h"
 #include "lf.h"
 
-#ifdef HAVE_STDLIB_H
 #include <stdlib.h>
-#endif
-
-#ifdef HAVE_STRING_H
 #include <string.h>
-#else
-#ifdef HAVE_STRINGS_H
-#include <strings.h>
-#endif
-#endif
 
 struct _lf {
   FILE *stream;
diff --git a/sim/ppc/main.c b/sim/ppc/main.c
index 667c02f2d43a..1e73444ff832 100644
--- a/sim/ppc/main.c
+++ b/sim/ppc/main.c
@@ -33,22 +33,11 @@
 #include "gdb/callback.h"
 #include "gdb/remote-sim.h"
 
-#ifdef HAVE_STDLIB_H
 #include <stdlib.h>
-#endif
-
 #ifdef HAVE_UNISTD_H
 #include <unistd.h>
 #endif
-
-#ifdef HAVE_STRING_H
 #include <string.h>
-#else
-#ifdef HAVE_STRINGS_H
-#include <strings.h>
-#endif
-#endif
-
 #include <errno.h>
 
 #if !defined(O_NDELAY) || !defined(F_GETFL) || !defined(F_SETFL)
diff --git a/sim/ppc/misc.c b/sim/ppc/misc.c
index 8c21bd38b1b8..6de3cf9a95b9 100644
--- a/sim/ppc/misc.c
+++ b/sim/ppc/misc.c
@@ -25,17 +25,8 @@
 #include "build-config.h"
 #include "misc.h"
 
-#ifdef HAVE_STDLIB_H
 #include <stdlib.h>
-#endif
-
-#ifdef HAVE_STRING_H
 #include <string.h>
-#else
-#ifdef HAVE_STRINGS_H
-#include <strings.h>
-#endif
-#endif
 
 void
 error (char *msg, ...)
diff --git a/sim/ppc/misc.h b/sim/ppc/misc.h
index 232f2eaacd01..c080ae29f0b4 100644
--- a/sim/ppc/misc.h
+++ b/sim/ppc/misc.h
@@ -24,18 +24,8 @@
 
 #include <stdio.h>
 #include <ctype.h>
-
-#ifdef HAVE_STRING_H
 #include <string.h>
-#else
-#ifdef HAVE_STRINGS_H
-#include <strings.h>
-#endif
-#endif
-
-#ifdef HAVE_STDLIB_H
 #include <stdlib.h>
-#endif
 
 #if !defined (__attribute__) && (!defined(__GNUC__) || __GNUC__ < 2 || (__GNUC__ == 2 && __GNUC_MINOR__ < 7))
 #define __attribute__(arg)
diff --git a/sim/ppc/mon.c b/sim/ppc/mon.c
index 8235b66df1df..452cd19c3d96 100644
--- a/sim/ppc/mon.c
+++ b/sim/ppc/mon.c
@@ -26,30 +26,15 @@
 #include "mon.h"
 #include <stdio.h>
 
-#ifdef HAVE_STRING_H
 #include <string.h>
-#else
-#ifdef HAVE_STRINGS_H
-#include <strings.h>
-#endif
-#endif
-
 #ifdef HAVE_UNISTD_H
 #include <unistd.h>
 #endif
-
-#ifdef HAVE_STDLIB_H
 #include <stdlib.h>
-#endif
-
 #ifdef HAVE_SYS_TYPES_H
 #include <sys/types.h>
 #endif
-
-#ifdef HAVE_TIME_H
 #include <time.h>
-#endif
-
 #ifdef HAVE_SYS_TIMES_H
 #include <sys/times.h>
 #endif
diff --git a/sim/ppc/pk_disklabel.c b/sim/ppc/pk_disklabel.c
index fb820fd32dd9..d424c0480aeb 100644
--- a/sim/ppc/pk_disklabel.c
+++ b/sim/ppc/pk_disklabel.c
@@ -29,11 +29,7 @@
 
 #include "pk.h"
 
-#ifdef HAVE_STDLIB_H
 #include <stdlib.h>
-#endif
-
-
 
 /* PACKAGE
 
diff --git a/sim/ppc/psim.c b/sim/ppc/psim.c
index 3e322e3820f8..ebb9cb427377 100644
--- a/sim/ppc/psim.c
+++ b/sim/ppc/psim.c
@@ -31,21 +31,9 @@
 
 #include <stdio.h>
 #include <ctype.h>
-
-#ifdef HAVE_STDLIB_H
 #include <stdlib.h>
-#endif
-
 #include <setjmp.h>
-
-#ifdef HAVE_STRING_H
 #include <string.h>
-#else
-#ifdef HAVE_STRINGS_H
-#include <strings.h>
-#endif
-#endif
-
 
 #include "bfd.h"
 #include "libiberty.h"
diff --git a/sim/ppc/registers.c b/sim/ppc/registers.c
index b672f9907e28..2bab55a65fca 100644
--- a/sim/ppc/registers.c
+++ b/sim/ppc/registers.c
@@ -26,18 +26,8 @@
 #include "basics.h"
 #include "registers.h"
 
-#ifdef HAVE_STDLIB_H
 #include <stdlib.h>
-#endif
-
-#ifdef HAVE_STRING_H
 #include <string.h>
-#else
-#ifdef HAVE_STRINGS_H
-#include <strings.h>
-#endif
-#endif
-
 
 INLINE_REGISTERS\
 (void)
diff --git a/sim/ppc/sim_calls.c b/sim/ppc/sim_calls.c
index 0a209bf6e0d0..c8364f090046 100644
--- a/sim/ppc/sim_calls.c
+++ b/sim/ppc/sim_calls.c
@@ -27,17 +27,8 @@
 
 #undef printf_filtered /* blow away the mapping */
 
-#ifdef HAVE_STDLIB_H
 #include <stdlib.h>
-#endif
-
-#ifdef HAVE_STRING_H
 #include <string.h>
-#else
-#ifdef HAVE_STRINGS_H
-#include <strings.h>
-#endif
-#endif
 
 #include "libiberty.h"
 #include "bfd.h"
diff --git a/sim/ppc/table.c b/sim/ppc/table.c
index 43c74622377c..3c7e4464beb5 100644
--- a/sim/ppc/table.c
+++ b/sim/ppc/table.c
@@ -32,10 +32,7 @@
 #ifdef HAVE_UNISTD_H
 #include <unistd.h>
 #endif
-
-#ifdef HAVE_STDLIB_H
 #include <stdlib.h>
-#endif
 
 typedef struct _open_table open_table;
 struct _open_table {
diff --git a/sim/ppc/tree.c b/sim/ppc/tree.c
index 5d20bf4103cd..a0e0820b4d95 100644
--- a/sim/ppc/tree.c
+++ b/sim/ppc/tree.c
@@ -29,19 +29,8 @@
 #include "device.h"
 #include "tree.h"
 
-
-#ifdef HAVE_STDLIB_H
 #include <stdlib.h>
-#endif
-
-#ifdef HAVE_STRING_H
 #include <string.h>
-#else
-#ifdef HAVE_STRINGS_H
-#include <strings.h>
-#endif
-#endif
-
 #include <ctype.h>
 
 #include "libiberty.h"
diff --git a/sim/pru/ChangeLog b/sim/pru/ChangeLog
index 620b50ff3136..7e10ab1a7a62 100644
--- a/sim/pru/ChangeLog
+++ b/sim/pru/ChangeLog
@@ -1,3 +1,7 @@
+2021-01-09  Mike Frysinger  <vapier@gentoo.org>
+
+	* config.in, configure: Regenerate.
+
 2021-01-09  Mike Frysinger  <vapier@gentoo.org>
 
 	* configure.ac (AC_PREREQ): Delete.
diff --git a/sim/rl78/ChangeLog b/sim/rl78/ChangeLog
index 936e7b71f404..2d52d4b08988 100644
--- a/sim/rl78/ChangeLog
+++ b/sim/rl78/ChangeLog
@@ -1,3 +1,7 @@
+2021-01-09  Mike Frysinger  <vapier@gentoo.org>
+
+	* config.in, configure: Regenerate.
+
 2021-01-09  Mike Frysinger  <vapier@gentoo.org>
 
 	* configure: Regenerate.
diff --git a/sim/rx/ChangeLog b/sim/rx/ChangeLog
index e5896c293fbd..23d3a4afeedb 100644
--- a/sim/rx/ChangeLog
+++ b/sim/rx/ChangeLog
@@ -1,3 +1,8 @@
+2021-01-09  Mike Frysinger  <vapier@gentoo.org>
+
+	* config.in, configure: Regenerate.
+	* main.c: Delete HAVE_STDLIB_H.
+
 2021-01-09  Mike Frysinger  <vapier@gentoo.org>
 
 	* configure: Regenerate.
diff --git a/sim/rx/main.c b/sim/rx/main.c
index 1eac6037f032..4a9d3ecebea5 100644
--- a/sim/rx/main.c
+++ b/sim/rx/main.c
@@ -22,9 +22,7 @@ along with this program.  If not, see <http://www.gnu.org/licenses/>.  */
 #include "config.h"
 #include <stdio.h>
 #include <string.h>
-#ifdef HAVE_STDLIB_H
 #include <stdlib.h>
-#endif
 #ifdef HAVE_UNISTD_H
 #include <unistd.h>
 #endif
diff --git a/sim/sh/ChangeLog b/sim/sh/ChangeLog
index 214c45ec870d..941fdc9931b5 100644
--- a/sim/sh/ChangeLog
+++ b/sim/sh/ChangeLog
@@ -1,3 +1,9 @@
+2021-01-09  Mike Frysinger  <vapier@gentoo.org>
+
+	* config.in, configure: Regenerate.
+	* interp.c, simops.c: Delete HAVE_STRING_H, HAVE_STRINGS_H,
+	HAVE_STDLIB_H, HAVE_TIME_H, and strings.h include.
+
 2021-01-09  Mike Frysinger  <vapier@gentoo.org>
 
 	* configure: Regenerate.
diff --git a/sim/sh/interp.c b/sim/sh/interp.c
index c77cf3b1d3bf..872bfe288936 100644
--- a/sim/sh/interp.c
+++ b/sim/sh/interp.c
@@ -37,24 +37,12 @@
 # endif
 #endif
 
-#ifdef HAVE_STRING_H
 #include <string.h>
-#else
-#ifdef HAVE_STRINGS_H
-#include <strings.h>
-#endif
-#endif
-
-#ifdef HAVE_STDLIB_H
 #include <stdlib.h>
-#endif
-
 #ifdef HAVE_SYS_STAT_H
 #include <sys/stat.h>
 #endif
-#ifdef HAVE_TIME_H
 #include <time.h>
-#endif
 #ifdef HAVE_SYS_TIME_H
 #include <sys/time.h>
 #endif
diff --git a/sim/v850/ChangeLog b/sim/v850/ChangeLog
index 865a2883fbe6..e699eb33e5f4 100644
--- a/sim/v850/ChangeLog
+++ b/sim/v850/ChangeLog
@@ -1,3 +1,9 @@
+2021-01-09  Mike Frysinger  <vapier@gentoo.org>
+
+	* config.in, configure: Regenerate.
+	* interp.c, simops.c: Delete HAVE_STRING_H, HAVE_STRINGS_H,
+	HAVE_STDLIB_H, HAVE_TIME_H, and strings.h include.
+
 2021-01-09  Mike Frysinger  <vapier@gentoo.org>
 
 	* configure: Regenerate.
diff --git a/sim/v850/interp.c b/sim/v850/interp.c
index daf961801768..10d8a67a6fb9 100644
--- a/sim/v850/interp.c
+++ b/sim/v850/interp.c
@@ -4,17 +4,8 @@
 #include "sim-assert.h"
 #include "itable.h"
 
-#ifdef HAVE_STDLIB_H
 #include <stdlib.h>
-#endif
-
-#ifdef HAVE_STRING_H
 #include <string.h>
-#else
-#ifdef HAVE_STRINGS_H
-#include <strings.h>
-#endif
-#endif
 
 #include "bfd.h"
 
diff --git a/sim/v850/simops.c b/sim/v850/simops.c
index 40d578e5d0ac..93185b6de663 100644
--- a/sim/v850/simops.c
+++ b/sim/v850/simops.c
@@ -7,22 +7,11 @@
 #ifdef HAVE_UTIME_H
 #include <utime.h>
 #endif
-
-#ifdef HAVE_TIME_H
 #include <time.h>
-#endif
-
 #ifdef HAVE_UNISTD_H
 #include <unistd.h>
 #endif
-
-#ifdef HAVE_STRING_H
 #include <string.h>
-#else
-#ifdef HAVE_STRINGS_H
-#include <strings.h>
-#endif
-#endif
 
 #include "targ-vals.h"
 
-- 
2.28.0


^ permalink raw reply	[flat|nested] 2+ messages in thread

* Re: [PATCH] sim: clean up C11 header includes
  2021-01-09 15:16 [PATCH] sim: clean up C11 header includes Mike Frysinger
@ 2021-01-11 11:27 ` Andrew Burgess
  0 siblings, 0 replies; 2+ messages in thread
From: Andrew Burgess @ 2021-01-11 11:27 UTC (permalink / raw)
  To: Mike Frysinger; +Cc: gdb-patches

* Mike Frysinger via Gdb-patches <gdb-patches@sourceware.org> [2021-01-09 10:16:31 -0500]:

> Since we require C11 now, we can assume many headers exist, and
> clean up all of the conditional includes.  It's not like any of
> this code actually accounted for the headers not existing, just
> whether we could include them.
> 
> The strings.h cleanup is a little nuanced: it isn't in C11, but
> every use of it in the codebase will include strings.h only if
> string.h doesn't exist.  Since we now assume the C11 string.h
> exists, we'll never include strings.h, so we can delete it.

Thanks, this looks like a good clean up.

Andrew


> ---
>  sim/aarch64/ChangeLog      |  4 ++++
>  sim/aarch64/config.in      |  6 ------
>  sim/aarch64/configure      | 18 ++++++++----------
>  sim/arm/ChangeLog          |  4 ++++
>  sim/arm/config.in          |  6 ------
>  sim/arm/configure          | 18 ++++++++----------
>  sim/avr/ChangeLog          |  5 +++++
>  sim/avr/config.in          |  6 ------
>  sim/avr/configure          | 18 ++++++++----------
>  sim/avr/interp.c           |  3 +--
>  sim/bfin/ChangeLog         |  4 ++++
>  sim/bfin/config.in         |  6 ------
>  sim/bfin/configure         | 18 ++++++++----------
>  sim/bpf/ChangeLog          |  4 ++++
>  sim/bpf/config.in          |  6 ------
>  sim/bpf/configure          | 18 ++++++++----------
>  sim/common/ChangeLog       | 13 +++++++++++++
>  sim/common/acinclude.m4    |  7 +++----
>  sim/common/callback.c      | 10 ----------
>  sim/common/cgen-scache.c   |  2 --
>  sim/common/dv-glue.c       |  6 ------
>  sim/common/dv-pal.c        |  9 ---------
>  sim/common/dv-sockser.c    |  8 --------
>  sim/common/hw-alloc.c      |  3 ---
>  sim/common/hw-base.c       | 11 -----------
>  sim/common/hw-device.c     |  5 -----
>  sim/common/hw-events.c     |  2 --
>  sim/common/hw-handles.c    |  2 --
>  sim/common/hw-ports.c      | 10 ----------
>  sim/common/hw-properties.c |  6 ------
>  sim/common/hw-tree.c       | 10 ----------
>  sim/common/nrun.c          |  7 -------
>  sim/common/sim-arange.c    |  5 -----
>  sim/common/sim-events.c    | 10 ----------
>  sim/common/sim-fpu.c       |  2 --
>  sim/common/sim-hw.c        |  9 ---------
>  sim/common/sim-load.c      |  2 --
>  sim/common/sim-memopt.c    | 10 ----------
>  sim/common/sim-options.c   |  8 --------
>  sim/common/sim-profile.c   |  9 ---------
>  sim/common/sim-trace.c     |  8 --------
>  sim/common/sim-utils.c     | 13 -------------
>  sim/common/sim-watch.c     | 10 ----------
>  sim/common/syscall.c       |  6 ------
>  sim/cr16/ChangeLog         |  5 +++++
>  sim/cr16/config.in         |  6 ------
>  sim/cr16/configure         | 18 ++++++++----------
>  sim/cr16/simops.c          |  4 ----
>  sim/cris/ChangeLog         |  7 +++++++
>  sim/cris/config.in         |  9 ---------
>  sim/cris/configure         | 20 +++++++++-----------
>  sim/cris/configure.ac      |  2 +-
>  sim/cris/dv-rv.c           | 14 --------------
>  sim/cris/rvdummy.c         |  7 -------
>  sim/cris/sim-if.c          |  2 --
>  sim/cris/traps.c           |  2 --
>  sim/d10v/ChangeLog         |  6 ++++++
>  sim/d10v/config.in         |  6 ------
>  sim/d10v/configure         | 18 ++++++++----------
>  sim/d10v/interp.c          |  9 ---------
>  sim/d10v/simops.c          |  2 --
>  sim/erc32/ChangeLog        |  5 +++++
>  sim/erc32/config.in        |  6 ------
>  sim/erc32/configure        | 18 ++++++++----------
>  sim/erc32/sis.c            |  2 --
>  sim/frv/ChangeLog          |  6 ++++++
>  sim/frv/config.in          |  6 ------
>  sim/frv/configure          | 18 ++++++++----------
>  sim/frv/options.c          |  8 --------
>  sim/frv/sim-if.c           |  2 --
>  sim/ft32/ChangeLog         |  4 ++++
>  sim/ft32/config.in         |  6 ------
>  sim/ft32/configure         | 18 ++++++++----------
>  sim/h8300/ChangeLog        |  5 +++++
>  sim/h8300/compile.c        |  4 ----
>  sim/h8300/config.in        |  6 ------
>  sim/h8300/configure        | 18 ++++++++----------
>  sim/igen/ChangeLog         |  5 +++++
>  sim/igen/filter.c          |  6 ------
>  sim/igen/lf.c              |  9 ---------
>  sim/igen/misc.c            |  9 ---------
>  sim/igen/misc.h            | 10 ----------
>  sim/igen/table.c           |  3 ---
>  sim/iq2000/ChangeLog       |  5 +++++
>  sim/iq2000/config.in       |  6 ------
>  sim/iq2000/configure       | 18 ++++++++----------
>  sim/iq2000/sim-if.c        |  4 ++--
>  sim/lm32/ChangeLog         |  5 +++++
>  sim/lm32/config.in         |  6 ------
>  sim/lm32/configure         | 18 ++++++++----------
>  sim/lm32/sim-if.c          |  2 --
>  sim/m32c/ChangeLog         |  4 ++++
>  sim/m32c/config.in         |  6 ------
>  sim/m32c/configure         | 18 ++++++++----------
>  sim/m32r/ChangeLog         |  6 ++++++
>  sim/m32r/config.in         |  6 ------
>  sim/m32r/configure         | 18 ++++++++----------
>  sim/m32r/sim-if.c          |  8 --------
>  sim/m68hc11/ChangeLog      |  4 ++++
>  sim/m68hc11/config.in      |  6 ------
>  sim/m68hc11/configure      | 18 ++++++++----------
>  sim/mcore/ChangeLog        |  4 ++++
>  sim/mcore/config.in        |  6 ------
>  sim/mcore/configure        | 18 ++++++++----------
>  sim/microblaze/ChangeLog   |  4 ++++
>  sim/microblaze/config.in   |  6 ------
>  sim/microblaze/configure   | 18 ++++++++----------
>  sim/mips/ChangeLog         |  6 ++++++
>  sim/mips/config.in         |  6 ------
>  sim/mips/configure         | 18 ++++++++----------
>  sim/mips/interp.c          |  8 --------
>  sim/mn10300/ChangeLog      |  6 ++++++
>  sim/mn10300/config.in      |  6 ------
>  sim/mn10300/configure      | 18 ++++++++----------
>  sim/mn10300/interp.c       | 10 ----------
>  sim/mn10300/op_utils.c     | 11 -----------
>  sim/moxie/ChangeLog        |  4 ++++
>  sim/moxie/config.in        |  6 ------
>  sim/moxie/configure        | 18 ++++++++----------
>  sim/msp430/ChangeLog       |  4 ++++
>  sim/msp430/config.in       |  6 ------
>  sim/msp430/configure       | 18 ++++++++----------
>  sim/or1k/ChangeLog         |  6 ++++++
>  sim/or1k/config.in         |  6 ------
>  sim/or1k/configure         | 18 ++++++++----------
>  sim/or1k/sim-if.c          |  8 --------
>  sim/ppc/ChangeLog          | 18 ++++++++++++++++++
>  sim/ppc/config.in          |  3 ---
>  sim/ppc/configure          |  2 +-
>  sim/ppc/configure.ac       |  2 +-
>  sim/ppc/cpu.c              |  6 ------
>  sim/ppc/debug.c            |  4 ----
>  sim/ppc/device.c           | 10 ----------
>  sim/ppc/device_table.c     |  3 ---
>  sim/ppc/device_table.h     |  6 ------
>  sim/ppc/dgen.c             | 10 ----------
>  sim/ppc/emul_bugapi.c      | 10 ----------
>  sim/ppc/emul_chirp.c       |  7 -------
>  sim/ppc/emul_netbsd.c      |  9 ---------
>  sim/ppc/emul_unix.c        |  9 ---------
>  sim/ppc/filter.c           |  6 ------
>  sim/ppc/gen-model.c        |  2 --
>  sim/ppc/hw_com.c           |  9 ---------
>  sim/ppc/hw_eeprom.c        |  6 ------
>  sim/ppc/hw_nvram.c         | 17 -----------------
>  sim/ppc/hw_opic.c          |  6 ------
>  sim/ppc/hw_pal.c           |  9 ---------
>  sim/ppc/hw_phb.c           |  3 ---
>  sim/ppc/hw_sem.c           |  7 -------
>  sim/ppc/hw_shm.c           |  7 -------
>  sim/ppc/lf.c               |  9 ---------
>  sim/ppc/main.c             | 11 -----------
>  sim/ppc/misc.c             |  9 ---------
>  sim/ppc/misc.h             | 10 ----------
>  sim/ppc/mon.c              | 15 ---------------
>  sim/ppc/pk_disklabel.c     |  4 ----
>  sim/ppc/psim.c             | 12 ------------
>  sim/ppc/registers.c        | 10 ----------
>  sim/ppc/sim_calls.c        |  9 ---------
>  sim/ppc/table.c            |  3 ---
>  sim/ppc/tree.c             | 11 -----------
>  sim/pru/ChangeLog          |  4 ++++
>  sim/pru/config.in          |  6 ------
>  sim/pru/configure          | 18 ++++++++----------
>  sim/rl78/ChangeLog         |  4 ++++
>  sim/rl78/config.in         |  6 ------
>  sim/rl78/configure         | 18 ++++++++----------
>  sim/rx/ChangeLog           |  5 +++++
>  sim/rx/config.in           |  6 ------
>  sim/rx/configure           | 18 ++++++++----------
>  sim/rx/main.c              |  2 --
>  sim/sh/ChangeLog           |  6 ++++++
>  sim/sh/config.in           |  6 ------
>  sim/sh/configure           | 18 ++++++++----------
>  sim/sh/interp.c            | 12 ------------
>  sim/v850/ChangeLog         |  6 ++++++
>  sim/v850/config.in         |  6 ------
>  sim/v850/configure         | 18 ++++++++----------
>  sim/v850/interp.c          |  9 ---------
>  sim/v850/simops.c          | 11 -----------
>  180 files changed, 420 insertions(+), 1088 deletions(-)
> 
> diff --git a/sim/aarch64/ChangeLog b/sim/aarch64/ChangeLog
> index 5708802be00d..01421d976a7e 100644
> --- a/sim/aarch64/ChangeLog
> +++ b/sim/aarch64/ChangeLog
> @@ -1,3 +1,7 @@
> +2021-01-09  Mike Frysinger  <vapier@gentoo.org>
> +
> +	* config.in, configure: Regenerate.
> +
>  2021-01-09  Mike Frysinger  <vapier@gentoo.org>
>  
>  	* configure: Regenerate.
> diff --git a/sim/arm/ChangeLog b/sim/arm/ChangeLog
> index 67060927b068..f791e76be227 100644
> --- a/sim/arm/ChangeLog
> +++ b/sim/arm/ChangeLog
> @@ -1,3 +1,7 @@
> +2021-01-09  Mike Frysinger  <vapier@gentoo.org>
> +
> +	* config.in, configure: Regenerate.
> +
>  2021-01-09  Mike Frysinger  <vapier@gentoo.org>
>  
>  	* configure: Regenerate.
> diff --git a/sim/avr/ChangeLog b/sim/avr/ChangeLog
> index c368fa4681be..4148688b281c 100644
> --- a/sim/avr/ChangeLog
> +++ b/sim/avr/ChangeLog
> @@ -1,3 +1,8 @@
> +2021-01-09  Mike Frysinger  <vapier@gentoo.org>
> +
> +	* config.in, configure: Regenerate.
> +	* interp.c: Delete HAVE_STRING_H.
> +
>  2021-01-09  Mike Frysinger  <vapier@gentoo.org>
>  
>  	* configure: Regenerate.
> diff --git a/sim/avr/interp.c b/sim/avr/interp.c
> index deaf711e1040..3aff8816187e 100644
> --- a/sim/avr/interp.c
> +++ b/sim/avr/interp.c
> @@ -19,9 +19,8 @@
>  
>  #include "config.h"
>  
> -#ifdef HAVE_STRING_H
>  #include <string.h>
> -#endif
> +
>  #include "bfd.h"
>  #include "libiberty.h"
>  #include "gdb/remote-sim.h"
> diff --git a/sim/bfin/ChangeLog b/sim/bfin/ChangeLog
> index 1ac810e8a1e4..cd9d6db982db 100644
> --- a/sim/bfin/ChangeLog
> +++ b/sim/bfin/ChangeLog
> @@ -1,3 +1,7 @@
> +2021-01-09  Mike Frysinger  <vapier@gentoo.org>
> +
> +	* config.in, configure: Regenerate.
> +
>  2021-01-09  Mike Frysinger  <vapier@gentoo.org>
>  
>  	* configure: Regenerate.
> diff --git a/sim/bpf/ChangeLog b/sim/bpf/ChangeLog
> index e1abb698fd1a..cefe16b8ac3f 100644
> --- a/sim/bpf/ChangeLog
> +++ b/sim/bpf/ChangeLog
> @@ -1,3 +1,7 @@
> +2021-01-09  Mike Frysinger  <vapier@gentoo.org>
> +
> +	* config.in, configure: Regenerate.
> +
>  2021-01-09  Mike Frysinger  <vapier@gentoo.org>
>  
>  	* configure: Regenerate.
> diff --git a/sim/common/ChangeLog b/sim/common/ChangeLog
> index e525110bf415..4e81a14802a6 100644
> --- a/sim/common/ChangeLog
> +++ b/sim/common/ChangeLog
> @@ -1,3 +1,16 @@
> +2021-01-09  Mike Frysinger  <vapier@gentoo.org>
> +
> +	* acinclude.m4 (SIM_AC_COMMON): Delete checks for stdlib.h, string.h,
> +	strings.h, time.h, and errno.h.
> +	* callback.c, cgen-scache.c, dv-glue.c, dv-pal.c, dv-sockser.c,
> +	hw-alloc.c, hw-base.c, hw-device.c, hw-events.c, hw-handles.c,
> +	hw-ports.c, hw-properties.c, hw-tree.c, nrun.c, sim-arange.c,
> +	sim-events.c, sim-fpu.c, sim-hw.c, sim-load.c, sim-memopt.c,
> +	sim-options.c, sim-profile.c, sim-trace.c, sim-utils.c,
> +	sim-watch.c, syscall.c: Delete HAVE_ERRNO_H, HAVE_STDLIB_H,
> +	HAVE_STRING_H, HAVE_STRINGS_H, HAVE_LIMITS_H, HAVE_TIME_H,
> +	and strings.h include.
> +
>  2021-01-09  Mike Frysinger  <vapier@gentoo.org>
>  
>  	* sim-basics.h [__CYGWIN32__] (vasprintf, asprintf): Delete.
> diff --git a/sim/common/acinclude.m4 b/sim/common/acinclude.m4
> index b2297dfeb150..45ec134d6d76 100644
> --- a/sim/common/acinclude.m4
> +++ b/sim/common/acinclude.m4
> @@ -98,12 +98,11 @@ ALL_LINGUAS=
>  ZW_GNU_GETTEXT_SISTER_DIR(../../intl)
>  
>  # Check for common headers.
> -# FIXME: Seems to me this can cause problems for i386-windows hosts.
> -# At one point there were hardcoded AC_DEFINE's if ${host} = i386-*-windows*.
> -AC_CHECK_HEADERS(stdlib.h string.h strings.h unistd.h time.h)
> +# NB: You can assume C11 headers exist.
> +AC_CHECK_HEADERS(unistd.h)
>  AC_CHECK_HEADERS(sys/time.h sys/times.h sys/resource.h sys/mman.h)
>  AC_CHECK_HEADERS(fcntl.h fpu_control.h)
> -AC_CHECK_HEADERS(dlfcn.h errno.h sys/stat.h)
> +AC_CHECK_HEADERS(dlfcn.h sys/stat.h)
>  AC_CHECK_FUNCS(getrusage time sigaction __setfpucw)
>  AC_CHECK_FUNCS(mmap munmap lstat truncate ftruncate posix_fallocate)
>  AC_CHECK_MEMBERS([[struct stat.st_dev], [struct stat.st_ino],
> diff --git a/sim/common/callback.c b/sim/common/callback.c
> index 5172d9751df8..f9e848fd913d 100644
> --- a/sim/common/callback.c
> +++ b/sim/common/callback.c
> @@ -26,20 +26,10 @@
>  #include "ansidecl.h"
>  #include <stdarg.h>
>  #include <stdio.h>
> -#ifdef HAVE_STDLIB_H
>  #include <stdlib.h>
> -#endif
> -#ifdef HAVE_STRING_H
>  #include <string.h>
> -#else
> -#ifdef HAVE_STRINGS_H
> -#include <strings.h>
> -#endif
> -#endif
> -#ifdef HAVE_LIMITS_H
>  /* For PIPE_BUF.  */
>  #include <limits.h>
> -#endif
>  #include <errno.h>
>  #include <fcntl.h>
>  #include <time.h>
> diff --git a/sim/common/cgen-scache.c b/sim/common/cgen-scache.c
> index 42068a398a7b..56df075f6804 100644
> --- a/sim/common/cgen-scache.c
> +++ b/sim/common/cgen-scache.c
> @@ -20,9 +20,7 @@ along with this program.  If not, see <http://www.gnu.org/licenses/>.  */
>  #define SCACHE_DEFINE_INLINE
>  
>  #include "sim-main.h"
> -#ifdef HAVE_STDLIB_H
>  #include <stdlib.h>
> -#endif
>  #include "libiberty.h"
>  #include "sim-options.h"
>  #include "sim-io.h"
> diff --git a/sim/common/dv-glue.c b/sim/common/dv-glue.c
> index 9319b198caa9..8bda32615780 100644
> --- a/sim/common/dv-glue.c
> +++ b/sim/common/dv-glue.c
> @@ -22,13 +22,7 @@
>  
>  #include "hw-main.h"
>  
> -#ifdef HAVE_STRING_H
>  #include <string.h>
> -#else
> -#ifdef HAVE_STRINGS_H
> -#include <strings.h>
> -#endif
> -#endif
>  
>  /* DEVICE
>  
> diff --git a/sim/common/dv-pal.c b/sim/common/dv-pal.c
> index 66a916c6657e..dd4ab4fb390f 100644
> --- a/sim/common/dv-pal.c
> +++ b/sim/common/dv-pal.c
> @@ -28,20 +28,11 @@
>     its immediate domain */
>  #include "hw-tree.h"
>  
> -#ifdef HAVE_STRING_H
>  #include <string.h>
> -#else
> -#ifdef HAVE_STRINGS_H
> -#include <strings.h>
> -#endif
> -#endif
> -
>  #ifdef HAVE_UNISTD_H
>  #include <unistd.h>
>  #endif
> -#ifdef HAVE_STDLIB_H
>  #include <stdlib.h>
> -#endif
>  
>  /* DEVICE
>  
> diff --git a/sim/common/dv-sockser.c b/sim/common/dv-sockser.c
> index 1b01870050d4..fc552fa0acf0 100644
> --- a/sim/common/dv-sockser.c
> +++ b/sim/common/dv-sockser.c
> @@ -21,17 +21,9 @@ along with this program.  If not, see <http://www.gnu.org/licenses/>.  */
>  #include "config.h"
>  #include "sim-main.h"
>  
> -#ifdef HAVE_STRING_H
>  #include <string.h>
> -#else
> -#ifdef HAVE_STRINGS_H
> -#include <strings.h>
> -#endif
> -#endif
>  #include <signal.h>
> -#ifdef HAVE_STDLIB_H
>  #include <stdlib.h>
> -#endif
>  #ifdef HAVE_FCNTL_H
>  #include <fcntl.h>
>  #endif
> diff --git a/sim/common/hw-alloc.c b/sim/common/hw-alloc.c
> index e504236d1d6d..141dc21167f3 100644
> --- a/sim/common/hw-alloc.c
> +++ b/sim/common/hw-alloc.c
> @@ -21,10 +21,7 @@ along with this program.  If not, see <http://www.gnu.org/licenses/>.  */
>  #include "hw-main.h"
>  #include "hw-base.h"
>  
> -
> -#ifdef HAVE_STDLIB_H
>  #include <stdlib.h>
> -#endif
>  
>  struct hw_alloc_data
>  {
> diff --git a/sim/common/hw-base.c b/sim/common/hw-base.c
> index 87ca7292e558..af8b18124896 100644
> --- a/sim/common/hw-base.c
> +++ b/sim/common/hw-base.c
> @@ -23,19 +23,8 @@
>  #include "hw-main.h"
>  #include "hw-base.h"
>  
> -
> -#ifdef HAVE_STRING_H
>  #include <string.h>
> -#else
> -#ifdef HAVE_STRINGS_H
> -#include <strings.h>
> -#endif
> -#endif
> -
> -#if HAVE_STDLIB_H
>  #include <stdlib.h>
> -#endif
> -
>  #include <ctype.h>
>  
>  #include "hw-config.h"
> diff --git a/sim/common/hw-device.c b/sim/common/hw-device.c
> index 76e41b4d3210..bc91264c0208 100644
> --- a/sim/common/hw-device.c
> +++ b/sim/common/hw-device.c
> @@ -23,13 +23,8 @@
>  #include "hw-main.h"
>  #include "hw-base.h"
>  
> -#if HAVE_STDLIB_H
>  #include <stdlib.h>
> -#endif
> -
> -#if HAVE_STRING_H
>  #include <string.h>
> -#endif
>  
>  /* Address methods */
>  
> diff --git a/sim/common/hw-events.c b/sim/common/hw-events.c
> index 917d7bde4e90..1c749dd8c27c 100644
> --- a/sim/common/hw-events.c
> +++ b/sim/common/hw-events.c
> @@ -23,9 +23,7 @@ along with this program.  If not, see <http://www.gnu.org/licenses/>.  */
>  
>  #include "sim-events.h"
>  
> -#if HAVE_STRING_H
>  #include <string.h>
> -#endif
>  
>  /* The hw-events object is implemented using sim-events */
>  
> diff --git a/sim/common/hw-handles.c b/sim/common/hw-handles.c
> index 539be3938adf..bbd08f632fdd 100644
> --- a/sim/common/hw-handles.c
> +++ b/sim/common/hw-handles.c
> @@ -23,9 +23,7 @@
>  #include "hw-main.h"
>  #include "hw-base.h"
>  
> -#if HAVE_STDLIB_H
>  #include <stdlib.h>
> -#endif
>  
>  struct hw_handle_mapping
>  {
> diff --git a/sim/common/hw-ports.c b/sim/common/hw-ports.c
> index 7aefb9739123..50e2cbc30e45 100644
> --- a/sim/common/hw-ports.c
> +++ b/sim/common/hw-ports.c
> @@ -21,18 +21,8 @@ along with this program.  If not, see <http://www.gnu.org/licenses/>.  */
>  #include "hw-main.h"
>  #include "hw-base.h"
>  
> -#ifdef HAVE_STDLIB_H
>  #include <stdlib.h>
> -#endif
> -
> -#ifdef HAVE_STRING_H
>  #include <string.h>
> -#else
> -#ifdef HAVE_STRINGS_H
> -#include <strings.h>
> -#endif
> -#endif
> -
>  #include <ctype.h>
>  
>  
> diff --git a/sim/common/hw-properties.c b/sim/common/hw-properties.c
> index fe29ff41ae84..11a371cea00f 100644
> --- a/sim/common/hw-properties.c
> +++ b/sim/common/hw-properties.c
> @@ -25,13 +25,7 @@
>  #include "sim-io.h"
>  #include "sim-assert.h"
>  
> -#ifdef HAVE_STRING_H
>  #include <string.h>
> -#else
> -#ifdef HAVE_STRINGS_H
> -#include <strings.h>
> -#endif
> -#endif
>  
>  /* property entries */
>  
> diff --git a/sim/common/hw-tree.c b/sim/common/hw-tree.c
> index 91822337d97f..4d50ec6ed62e 100644
> --- a/sim/common/hw-tree.c
> +++ b/sim/common/hw-tree.c
> @@ -27,18 +27,8 @@
>  #include "sim-io.h"
>  #include "sim-assert.h"
>  
> -#ifdef HAVE_STDLIB_H
>  #include <stdlib.h>
> -#endif
> -
> -#ifdef HAVE_STRING_H
>  #include <string.h>
> -#else
> -#ifdef HAVE_STRINGS_H
> -#include <strings.h>
> -#endif
> -#endif
> -
>  #include <ctype.h>
>  
>  /* manipulate/lookup device names */
> diff --git a/sim/common/nrun.c b/sim/common/nrun.c
> index 134dec8bc110..0caa82062a24 100644
> --- a/sim/common/nrun.c
> +++ b/sim/common/nrun.c
> @@ -21,15 +21,8 @@ along with this program.  If not, see <http://www.gnu.org/licenses/>.  */
>  
>  #include <signal.h>
>  #include <stdlib.h>
> -
>  /* For strsignal.  */
> -#ifdef HAVE_STRING_H
>  #include <string.h>
> -#else
> -#ifdef HAVE_STRINGS_H
> -#include <strings.h>
> -#endif
> -#endif
>  
>  #include "sim-main.h"
>  
> diff --git a/sim/common/sim-arange.c b/sim/common/sim-arange.c
> index 90203a9784b8..a40dabbeb7d7 100644
> --- a/sim/common/sim-arange.c
> +++ b/sim/common/sim-arange.c
> @@ -24,13 +24,8 @@ along with this program.  If not, see <http://www.gnu.org/licenses/>.  */
>  #include "sim-basics.h"
>  #include "sim-arange.h"
>  
> -#ifdef HAVE_STDLIB_H
>  #include <stdlib.h>
> -#endif
> -
> -#ifdef HAVE_STRING_H
>  #include <string.h>
> -#endif
>  
>  /* Insert a range.  */
>  
> diff --git a/sim/common/sim-events.c b/sim/common/sim-events.c
> index e17557666d7e..db05cafe13e7 100644
> --- a/sim/common/sim-events.c
> +++ b/sim/common/sim-events.c
> @@ -27,18 +27,8 @@
>  #include "sim-assert.h"
>  #include "libiberty.h"
>  
> -#ifdef HAVE_STRING_H
>  #include <string.h>
> -#else
> -#ifdef HAVE_STRINGS_H
> -#include <strings.h>
> -#endif
> -#endif
> -
> -#ifdef HAVE_STDLIB_H
>  #include <stdlib.h>
> -#endif
> -
>  #include <signal.h> /* For SIGPROCMASK et al. */
>  
>  typedef enum {
> diff --git a/sim/common/sim-fpu.c b/sim/common/sim-fpu.c
> index 30147a81da47..bff5b08b5e59 100644
> --- a/sim/common/sim-fpu.c
> +++ b/sim/common/sim-fpu.c
> @@ -41,9 +41,7 @@ along with this program.  If not, see <http://www.gnu.org/licenses/>.  */
>  #include "sim-io.h"
>  #include "sim-assert.h"
>  
> -#ifdef HAVE_STDLIB_H
>  #include <stdlib.h>
> -#endif
>  
>  /* Debugging support.
>     If digits is -1, then print all digits.  */
> diff --git a/sim/common/sim-hw.c b/sim/common/sim-hw.c
> index 979a4679af6a..81b4f64f7c22 100644
> --- a/sim/common/sim-hw.c
> +++ b/sim/common/sim-hw.c
> @@ -28,17 +28,8 @@ along with this program.  If not, see <http://www.gnu.org/licenses/>.  */
>  #include "hw-main.h"
>  #include "hw-base.h"
>  
> -
> -#ifdef HAVE_STRING_H
>  #include <string.h>
> -#else
> -#ifdef HAVE_STRINGS_H
> -#include <strings.h>
> -#endif
> -#endif
> -#ifdef HAVE_STDLIB_H
>  #include <stdlib.h>
> -#endif
>  #include <ctype.h>
>  #include <errno.h>
>  
> diff --git a/sim/common/sim-load.c b/sim/common/sim-load.c
> index d998be844396..e0aab1e9eb49 100644
> --- a/sim/common/sim-load.c
> +++ b/sim/common/sim-load.c
> @@ -24,9 +24,7 @@ along with this program.  If not, see <http://www.gnu.org/licenses/>.  */
>  #include "ansidecl.h"
>  #include <stdio.h> /* for NULL */
>  #include <stdarg.h>
> -#ifdef HAVE_STDLIB_H
>  #include <stdlib.h>
> -#endif
>  #include <time.h>
>  
>  #include "sim-basics.h"
> diff --git a/sim/common/sim-memopt.c b/sim/common/sim-memopt.c
> index 77a48df5d569..a102d74ecd0b 100644
> --- a/sim/common/sim-memopt.c
> +++ b/sim/common/sim-memopt.c
> @@ -23,19 +23,9 @@ along with this program.  If not, see <http://www.gnu.org/licenses/>.  */
>  #include "sim-assert.h"
>  #include "sim-options.h"
>  
> -#ifdef HAVE_STRING_H
>  #include <string.h>
> -#else
> -#ifdef HAVE_STRINGS_H
> -#include <strings.h>
> -#endif
> -#endif
> -#ifdef HAVE_STDLIB_H
>  #include <stdlib.h>
> -#endif
> -#ifdef HAVE_ERRNO_H
>  #include <errno.h>
> -#endif
>  #ifdef HAVE_FCNTL_H
>  #include <fcntl.h>
>  #endif
> diff --git a/sim/common/sim-options.c b/sim/common/sim-options.c
> index e0de39adab76..d4434cfd7385 100644
> --- a/sim/common/sim-options.c
> +++ b/sim/common/sim-options.c
> @@ -19,16 +19,8 @@ along with this program.  If not, see <http://www.gnu.org/licenses/>.  */
>  
>  #include "config.h"
>  #include "sim-main.h"
> -#ifdef HAVE_STRING_H
>  #include <string.h>
> -#else
> -#ifdef HAVE_STRINGS_H
> -#include <strings.h>
> -#endif
> -#endif
> -#ifdef HAVE_STDLIB_H
>  #include <stdlib.h>
> -#endif
>  #include <ctype.h>
>  #include <stdio.h>
>  #include "libiberty.h"
> diff --git a/sim/common/sim-profile.c b/sim/common/sim-profile.c
> index a886013edac6..f4ce89f0428e 100644
> --- a/sim/common/sim-profile.c
> +++ b/sim/common/sim-profile.c
> @@ -22,17 +22,8 @@ along with this program.  If not, see <http://www.gnu.org/licenses/>.  */
>  #include "sim-options.h"
>  #include "sim-assert.h"
>  
> -#ifdef HAVE_STDLIB_H
>  #include <stdlib.h>
> -#endif
> -
> -#ifdef HAVE_STRING_H
>  #include <string.h>
> -#else
> -#ifdef HAVE_STRINGS_H
> -#include <strings.h>
> -#endif
> -#endif
>  #include <ctype.h>
>  
>  #if !WITH_PROFILE_PC_P
> diff --git a/sim/common/sim-trace.c b/sim/common/sim-trace.c
> index 29b793ce79aa..5f161da630bb 100644
> --- a/sim/common/sim-trace.c
> +++ b/sim/common/sim-trace.c
> @@ -29,16 +29,8 @@ along with this program.  If not, see <http://www.gnu.org/licenses/>.  */
>  
>  #include "sim-assert.h"
>  
> -#ifdef HAVE_STRING_H
>  #include <string.h>
> -#else
> -#ifdef HAVE_STRINGS_H
> -#include <strings.h>
> -#endif
> -#endif
> -#ifdef HAVE_STDLIB_H
>  #include <stdlib.h>
> -#endif
>  
>  #ifndef SIZE_PHASE
>  #define SIZE_PHASE 8
> diff --git a/sim/common/sim-utils.c b/sim/common/sim-utils.c
> index 122e7f2f617a..69949aa15201 100644
> --- a/sim/common/sim-utils.c
> +++ b/sim/common/sim-utils.c
> @@ -20,14 +20,8 @@ along with this program.  If not, see <http://www.gnu.org/licenses/>.  */
>  #include "sim-main.h"
>  #include "sim-assert.h"
>  
> -#ifdef HAVE_STDLIB_H
>  #include <stdlib.h>
> -#endif
> -
> -#ifdef HAVE_TIME_H
>  #include <time.h>
> -#endif
> -
>  #ifdef HAVE_SYS_TIME_H
>  #include <sys/time.h> /* needed by sys/resource.h */
>  #endif
> @@ -35,14 +29,7 @@ along with this program.  If not, see <http://www.gnu.org/licenses/>.  */
>  #ifdef HAVE_SYS_RESOURCE_H
>  #include <sys/resource.h>
>  #endif
> -
> -#ifdef HAVE_STRING_H
>  #include <string.h>
> -#else
> -#ifdef HAVE_STRINGS_H
> -#include <strings.h>
> -#endif
> -#endif
>  
>  #include "libiberty.h"
>  #include "bfd.h"
> diff --git a/sim/common/sim-watch.c b/sim/common/sim-watch.c
> index 9c929a15731b..bbd5be434bea 100644
> --- a/sim/common/sim-watch.c
> +++ b/sim/common/sim-watch.c
> @@ -26,18 +26,8 @@ along with this program.  If not, see <http://www.gnu.org/licenses/>.  */
>  
>  #include <ctype.h>
>  #include <stdio.h>
> -
> -#ifdef HAVE_STRING_H
>  #include <string.h>
> -#else
> -#ifdef HAVE_STRINGS_H
> -#include <strings.h>
> -#endif
> -#endif
> -
> -#ifdef HAVE_STDLIB_H
>  #include <stdlib.h>
> -#endif
>  
>  enum {
>    OPTION_WATCH_DELETE                      = OPTION_START,
> diff --git a/sim/common/syscall.c b/sim/common/syscall.c
> index 8a8c81fbf6b4..fbe8021c8ef1 100644
> --- a/sim/common/syscall.c
> +++ b/sim/common/syscall.c
> @@ -30,14 +30,8 @@
>  #include "libiberty.h"
>  #include <stdarg.h>
>  #include <stdio.h>
> -#ifdef HAVE_STDLIB_H
>  #include <stdlib.h>
> -#endif
> -#ifdef HAVE_STRING_H
>  #include <string.h>
> -#elif defined (HAVE_STRINGS_H)
> -#include <strings.h>
> -#endif
>  #ifdef HAVE_UNISTD_H
>  #include <unistd.h>
>  #endif
> diff --git a/sim/cr16/ChangeLog b/sim/cr16/ChangeLog
> index 14edee23c29c..590cfa12487b 100644
> --- a/sim/cr16/ChangeLog
> +++ b/sim/cr16/ChangeLog
> @@ -1,3 +1,8 @@
> +2021-01-09  Mike Frysinger  <vapier@gentoo.org>
> +
> +	* config.in, configure: Regenerate.
> +	* simops.c: Delete HAVE_STRING_H & HAVE_TIME_H.
> +
>  2021-01-09  Mike Frysinger  <vapier@gentoo.org>
>  
>  	* cr16_sim.h (State): Change to an extern.
> diff --git a/sim/cr16/simops.c b/sim/cr16/simops.c
> index c7139eb96993..f52376237e94 100644
> --- a/sim/cr16/simops.c
> +++ b/sim/cr16/simops.c
> @@ -27,12 +27,8 @@
>  #ifdef HAVE_UNISTD_H
>  #include <unistd.h>
>  #endif
> -#ifdef HAVE_STRING_H
>  #include <string.h>
> -#endif
> -#ifdef HAVE_TIME_H
>  #include <time.h>
> -#endif
>  #ifdef HAVE_SYS_TIME_H
>  #include <sys/time.h>
>  #endif
> diff --git a/sim/cris/ChangeLog b/sim/cris/ChangeLog
> index 2af85ec58da5..5794d3f71a24 100644
> --- a/sim/cris/ChangeLog
> +++ b/sim/cris/ChangeLog
> @@ -1,3 +1,10 @@
> +2021-01-09  Mike Frysinger  <vapier@gentoo.org>
> +
> +	* config.in, configure: Regenerate.
> +	* dv-rv.c, rvdummy.c, sim-if.c, traps.c: Delete HAVE_ERRNO_H,
> +	HAVE_STRING_H, HAVE_STRINGS_H, HAVE_STDLIB_H, and strings.h
> +	include.
> +
>  2021-01-09  Mike Frysinger  <vapier@gentoo.org>
>  
>  	* configure: Regenerate.
> diff --git a/sim/cris/configure.ac b/sim/cris/configure.ac
> index 12e0023e864e..a2b08a98d409 100644
> --- a/sim/cris/configure.ac
> +++ b/sim/cris/configure.ac
> @@ -5,7 +5,7 @@ sinclude(../common/acinclude.m4)
>  SIM_AC_COMMON
>  
>  # For dv-rv and rvdummy.
> -AC_CHECK_HEADERS(sys/socket.h sys/select.h limits.h sys/param.h)
> +AC_CHECK_HEADERS(sys/socket.h sys/select.h sys/param.h)
>  
>  SIM_AC_OPTION_ENDIAN(LITTLE)
>  SIM_AC_OPTION_ALIGNMENT(NONSTRICT_ALIGNMENT)
> diff --git a/sim/cris/dv-rv.c b/sim/cris/dv-rv.c
> index d22bf068caf5..612eff4e9314 100644
> --- a/sim/cris/dv-rv.c
> +++ b/sim/cris/dv-rv.c
> @@ -25,26 +25,12 @@
>  #include "hw-tree.h"
>  
>  #include <ctype.h>
> -
> -#ifdef HAVE_ERRNO_H
>  #include <errno.h>
> -#endif
> -
> -#ifdef HAVE_STRING_H
>  #include <string.h>
> -#else
> -#ifdef HAVE_STRINGS_H
> -#include <strings.h>
> -#endif
> -#endif
> -
>  #ifdef HAVE_UNISTD_H
>  #include <unistd.h>
>  #endif
> -#ifdef HAVE_STDLIB_H
>  #include <stdlib.h>
> -#endif
> -
>  #ifdef HAVE_SYS_TYPES_H
>  #include <sys/types.h>
>  #endif
> diff --git a/sim/cris/rvdummy.c b/sim/cris/rvdummy.c
> index cb16410304d6..f147ea9e59b8 100644
> --- a/sim/cris/rvdummy.c
> +++ b/sim/cris/rvdummy.c
> @@ -41,13 +41,8 @@ main (int argc, char *argv[])
>  #ifdef HAVE_UNISTD_H
>  #include <unistd.h>
>  #endif
> -#ifdef HAVE_STDLIB_H
>  #include <stdlib.h>
> -#endif
> -#ifdef HAVE_STRING_H
>  #include <string.h>
> -#endif
> -
>  #ifdef HAVE_SYS_TYPES_H
>  #include <sys/types.h>
>  #endif
> @@ -60,9 +55,7 @@ main (int argc, char *argv[])
>  #include <sys/select.h>
>  #endif
>  
> -#ifdef HAVE_ERRNO_H
>  #include <errno.h>
> -#endif
>  
>  /* Not guarded in dv-sockser.c, so why here.  */
>  #include <netinet/in.h>
> diff --git a/sim/cris/sim-if.c b/sim/cris/sim-if.c
> index b8c7cb2a96e7..787896cae233 100644
> --- a/sim/cris/sim-if.c
> +++ b/sim/cris/sim-if.c
> @@ -26,9 +26,7 @@ along with this program.  If not, see <http://www.gnu.org/licenses/>.  */
>  #include "elf-bfd.h"
>  
>  #include "sim-main.h"
> -#ifdef HAVE_STDLIB_H
>  #include <stdlib.h>
> -#endif
>  #include <errno.h>
>  #include "sim-options.h"
>  #include "dis-asm.h"
> diff --git a/sim/cris/traps.c b/sim/cris/traps.c
> index 03429e12ed2c..2aaa1f43b168 100644
> --- a/sim/cris/traps.c
> +++ b/sim/cris/traps.c
> @@ -24,9 +24,7 @@ along with this program.  If not, see <http://www.gnu.org/licenses/>.  */
>  /* FIXME: get rid of targ-vals.h usage everywhere else.  */
>  
>  #include <stdarg.h>
> -#ifdef HAVE_ERRNO_H
>  #include <errno.h>
> -#endif
>  #ifdef HAVE_UNISTD_H
>  #include <unistd.h>
>  #endif
> diff --git a/sim/d10v/ChangeLog b/sim/d10v/ChangeLog
> index 13abbb861477..aab6c6eac4bd 100644
> --- a/sim/d10v/ChangeLog
> +++ b/sim/d10v/ChangeLog
> @@ -1,3 +1,9 @@
> +2021-01-09  Mike Frysinger  <vapier@gentoo.org>
> +
> +	* config.in, configure: Regenerate.
> +	* interp.c, simops.c: Delete HAVE_STRING_H, HAVE_STRINGS_H,
> +	HAVE_STDLIB_H, and strings.h include.
> +
>  2021-01-09  Mike Frysinger  <vapier@gentoo.org>
>  
>  	* d10v_sim.h (State): Change to an extern.
> diff --git a/sim/d10v/interp.c b/sim/d10v/interp.c
> index 5c70b38d9d8f..276c76beab09 100644
> --- a/sim/d10v/interp.c
> +++ b/sim/d10v/interp.c
> @@ -11,17 +11,8 @@
>  #include "gdb/sim-d10v.h"
>  #include "gdb/signals.h"
>  
> -#ifdef HAVE_STRING_H
>  #include <string.h>
> -#else
> -#ifdef HAVE_STRINGS_H
> -#include <strings.h>
> -#endif /* HAVE_STRING_H */
> -#endif /* HAVE_STRINGS_H */
> -
> -#ifdef HAVE_STDLIB_H
>  #include <stdlib.h>
> -#endif
>  
>  enum _leftright { LEFT_FIRST, RIGHT_FIRST };
>  
> diff --git a/sim/d10v/simops.c b/sim/d10v/simops.c
> index 92fd82710fd5..ed0c8a362591 100644
> --- a/sim/d10v/simops.c
> +++ b/sim/d10v/simops.c
> @@ -7,9 +7,7 @@
>  #ifdef HAVE_UNISTD_H
>  #include <unistd.h>
>  #endif
> -#ifdef HAVE_STRING_H
>  #include <string.h>
> -#endif
>  
>  #include "sim-main.h"
>  #include "simops.h"
> diff --git a/sim/erc32/ChangeLog b/sim/erc32/ChangeLog
> index d296ab311b95..bf108f5a1d61 100644
> --- a/sim/erc32/ChangeLog
> +++ b/sim/erc32/ChangeLog
> @@ -1,3 +1,8 @@
> +2021-01-09  Mike Frysinger  <vapier@gentoo.org>
> +
> +	* config.in, configure: Regenerate.
> +	* sis.c: Delete HAVE_STDLIB_H.
> +
>  2021-01-09  Mike Frysinger  <vapier@gentoo.org>
>  
>  	* configure: Regenerate.
> diff --git a/sim/erc32/sis.c b/sim/erc32/sis.c
> index 26f3ed9cd6ad..858bcbb9d7be 100644
> --- a/sim/erc32/sis.c
> +++ b/sim/erc32/sis.c
> @@ -19,9 +19,7 @@
>  #include "config.h"
>  #include <signal.h>
>  #include <string.h>
> -#ifdef HAVE_STDLIB_H
>  #include <stdlib.h>
> -#endif
>  #include <stdio.h>
>  #include <sys/fcntl.h>
>  #include "sis.h"
> diff --git a/sim/frv/ChangeLog b/sim/frv/ChangeLog
> index c021f1c4ab8a..e13917e1c882 100644
> --- a/sim/frv/ChangeLog
> +++ b/sim/frv/ChangeLog
> @@ -1,3 +1,9 @@
> +2021-01-09  Mike Frysinger  <vapier@gentoo.org>
> +
> +	* config.in, configure: Regenerate.
> +	* options.c, sim-if.c: Delete HAVE_STRING_H, HAVE_STRINGS_H,
> +	HAVE_STDLIB_H, and strings.h include.
> +
>  2021-01-09  Mike Frysinger  <vapier@gentoo.org>
>  
>  	* configure: Regenerate.
> diff --git a/sim/frv/options.c b/sim/frv/options.c
> index d90984a1ee9b..b5cc8dec7989 100644
> --- a/sim/frv/options.c
> +++ b/sim/frv/options.c
> @@ -24,16 +24,8 @@ along with this program.  If not, see <http://www.gnu.org/licenses/>.  */
>  #include "sim-assert.h"
>  #include "sim-options.h"
>  
> -#ifdef HAVE_STRING_H
>  #include <string.h>
> -#else
> -#ifdef HAVE_STRINGS_H
> -#include <strings.h>
> -#endif
> -#endif
> -#ifdef HAVE_STDLIB_H
>  #include <stdlib.h>
> -#endif
>  
>  /* FRV specific command line options. */
>  
> diff --git a/sim/frv/sim-if.c b/sim/frv/sim-if.c
> index 2eb6e6da5f3f..636890bd2cbc 100644
> --- a/sim/frv/sim-if.c
> +++ b/sim/frv/sim-if.c
> @@ -20,9 +20,7 @@ along with this program.  If not, see <http://www.gnu.org/licenses/>.  */
>  #define WANT_CPU
>  #define WANT_CPU_FRVBF
>  #include "sim-main.h"
> -#ifdef HAVE_STDLIB_H
>  #include <stdlib.h>
> -#endif
>  #include "sim-options.h"
>  #include "libiberty.h"
>  #include "bfd.h"
> diff --git a/sim/ft32/ChangeLog b/sim/ft32/ChangeLog
> index ad31e24e01f6..5bc0ce3668c9 100644
> --- a/sim/ft32/ChangeLog
> +++ b/sim/ft32/ChangeLog
> @@ -1,3 +1,7 @@
> +2021-01-09  Mike Frysinger  <vapier@gentoo.org>
> +
> +	* config.in, configure: Regenerate.
> +
>  2021-01-09  Mike Frysinger  <vapier@gentoo.org>
>  
>  	* configure: Regenerate.
> diff --git a/sim/h8300/ChangeLog b/sim/h8300/ChangeLog
> index 4bab9c52b070..8ee601e1371d 100644
> --- a/sim/h8300/ChangeLog
> +++ b/sim/h8300/ChangeLog
> @@ -1,3 +1,8 @@
> +2021-01-09  Mike Frysinger  <vapier@gentoo.org>
> +
> +	* config.in, configure: Regenerate.
> +	* compile.c: Delete HAVE_TIME_H & HAVE_STDLIB_H.
> +
>  2021-01-09  Mike Frysinger  <vapier@gentoo.org>
>  
>  	* configure: Regenerate.
> diff --git a/sim/h8300/compile.c b/sim/h8300/compile.c
> index 3a3b2e7241bb..a0e8bbbf8986 100644
> --- a/sim/h8300/compile.c
> +++ b/sim/h8300/compile.c
> @@ -19,12 +19,8 @@
>  
>  #include "config.h"
>  #include <signal.h>
> -#ifdef HAVE_TIME_H
>  #include <time.h>
> -#endif
> -#ifdef HAVE_STDLIB_H
>  #include <stdlib.h>
> -#endif
>  #ifdef HAVE_SYS_PARAM_H
>  #include <sys/param.h>
>  #endif
> diff --git a/sim/igen/ChangeLog b/sim/igen/ChangeLog
> index 7f9e87aa917b..b5078502f450 100644
> --- a/sim/igen/ChangeLog
> +++ b/sim/igen/ChangeLog
> @@ -1,3 +1,8 @@
> +2021-01-09  Mike Frysinger  <vapier@gentoo.org>
> +
> +	* filter.c, if.c, misc.c, misc.h, table.c: Delete HAVE_STRING_H,
> +	HAVE_STRINGS_H, HAVE_STDLIB_H, and strings.h include.
> +
>  2021-01-09  Mike Frysinger  <vapier@gentoo.org>
>  
>  	* configure: Regenerate.
> diff --git a/sim/igen/filter.c b/sim/igen/filter.c
> index 8059e004e3bb..e37d680b09c8 100644
> --- a/sim/igen/filter.c
> +++ b/sim/igen/filter.c
> @@ -24,13 +24,7 @@
>  
>  #include "config.h"
>  
> -#ifdef HAVE_STRING_H
>  #include <string.h>
> -#else
> -#ifdef HAVE_STRINGS_H
> -#include <strings.h>
> -#endif
> -#endif
>  
>  #include "misc.h"
>  #include "lf.h"
> diff --git a/sim/igen/lf.c b/sim/igen/lf.c
> index e8bf75c88249..4a7978e7a713 100644
> --- a/sim/igen/lf.c
> +++ b/sim/igen/lf.c
> @@ -29,17 +29,8 @@
>  #include "misc.h"
>  #include "lf.h"
>  
> -#ifdef HAVE_STDLIB_H
>  #include <stdlib.h>
> -#endif
> -
> -#ifdef HAVE_STRING_H
>  #include <string.h>
> -#else
> -#ifdef HAVE_STRINGS_H
> -#include <strings.h>
> -#endif
> -#endif
>  
>  struct _lf
>  {
> diff --git a/sim/igen/misc.c b/sim/igen/misc.c
> index 1678bfcc672a..d74f74e12e5d 100644
> --- a/sim/igen/misc.c
> +++ b/sim/igen/misc.c
> @@ -28,17 +28,8 @@
>  #include "config.h"
>  #include "misc.h"
>  
> -#ifdef HAVE_STDLIB_H
>  #include <stdlib.h>
> -#endif
> -
> -#ifdef HAVE_STRING_H
>  #include <string.h>
> -#else
> -#ifdef HAVE_STRINGS_H
> -#include <strings.h>
> -#endif
> -#endif
>  
>  /* NB: Because warning and error can be interchanged, neither append a
>     trailing '\n' */
> diff --git a/sim/igen/misc.h b/sim/igen/misc.h
> index 7634816dcd29..40e9cd05d1c3 100644
> --- a/sim/igen/misc.h
> +++ b/sim/igen/misc.h
> @@ -54,18 +54,8 @@ typedef unsigned __int64 unsigned64;
>  
>  #include <stdio.h>
>  #include <ctype.h>
> -
> -#ifdef HAVE_STRING_H
>  #include <string.h>
> -#else
> -#ifdef HAVE_STRINGS_H
> -#include <strings.h>
> -#endif
> -#endif
> -
> -#ifdef HAVE_STDLIB_H
>  #include <stdlib.h>
> -#endif
>  
>  #if !defined (__attribute__) && (!defined(__GNUC__) || __GNUC__ < 2 || (__GNUC__ == 2 && __GNUC_MINOR__ < 7))
>  #define __attribute__(arg)
> diff --git a/sim/igen/table.c b/sim/igen/table.c
> index 5b0d07e842de..d21b282dc45b 100644
> --- a/sim/igen/table.c
> +++ b/sim/igen/table.c
> @@ -35,10 +35,7 @@
>  #ifdef HAVE_UNISTD_H
>  #include <unistd.h>
>  #endif
> -
> -#ifdef HAVE_STDLIB_H
>  #include <stdlib.h>
> -#endif
>  
>  typedef struct _open_table open_table;
>  struct _open_table
> diff --git a/sim/iq2000/ChangeLog b/sim/iq2000/ChangeLog
> index 79a1dd2d95f0..64fbd474e87b 100644
> --- a/sim/iq2000/ChangeLog
> +++ b/sim/iq2000/ChangeLog
> @@ -1,3 +1,8 @@
> +2021-01-09  Mike Frysinger  <vapier@gentoo.org>
> +
> +	* config.in, configure: Regenerate.
> +	* sim-if.c: Delete HAVE_STDLIB_H.
> +
>  2021-01-09  Mike Frysinger  <vapier@gentoo.org>
>  
>  	* configure: Regenerate.
> diff --git a/sim/iq2000/sim-if.c b/sim/iq2000/sim-if.c
> index 238ec97e47db..07169402c99d 100644
> --- a/sim/iq2000/sim-if.c
> +++ b/sim/iq2000/sim-if.c
> @@ -18,9 +18,9 @@ You should have received a copy of the GNU General Public License
>  along with this program.  If not, see <http://www.gnu.org/licenses/>.  */
>  
>  #include "sim-main.h"
> -#ifdef HAVE_STDLIB_H
> +
>  #include <stdlib.h>
> -#endif
> +
>  #include "sim-options.h"
>  #include "libiberty.h"
>  #include "bfd.h"
> diff --git a/sim/lm32/ChangeLog b/sim/lm32/ChangeLog
> index f4c1a3b9cebe..f1bc6679fc9f 100644
> --- a/sim/lm32/ChangeLog
> +++ b/sim/lm32/ChangeLog
> @@ -1,3 +1,8 @@
> +2021-01-09  Mike Frysinger  <vapier@gentoo.org>
> +
> +	* config.in, configure: Regenerate.
> +	* sim-if.c: Delete HAVE_STDLIB_H.
> +
>  2021-01-09  Mike Frysinger  <vapier@gentoo.org>
>  
>  	* configure: Regenerate.
> diff --git a/sim/lm32/sim-if.c b/sim/lm32/sim-if.c
> index cbe975113b3d..176456ed62d4 100644
> --- a/sim/lm32/sim-if.c
> +++ b/sim/lm32/sim-if.c
> @@ -23,9 +23,7 @@
>  #include "libiberty.h"
>  #include "bfd.h"
>  
> -#ifdef HAVE_STDLIB_H
>  #include <stdlib.h>
> -#endif
>  \f
>  /* Cover function of sim_state_free to free the cpu buffers as well.  */
>  
> diff --git a/sim/m32c/ChangeLog b/sim/m32c/ChangeLog
> index 8a5c8d15046b..093c300f7551 100644
> --- a/sim/m32c/ChangeLog
> +++ b/sim/m32c/ChangeLog
> @@ -1,3 +1,7 @@
> +2021-01-09  Mike Frysinger  <vapier@gentoo.org>
> +
> +	* config.in, configure: Regenerate.
> +
>  2021-01-09  Mike Frysinger  <vapier@gentoo.org>
>  
>  	* configure: Regenerate.
> diff --git a/sim/m32r/ChangeLog b/sim/m32r/ChangeLog
> index ed284eada554..dcc2f4785597 100644
> --- a/sim/m32r/ChangeLog
> +++ b/sim/m32r/ChangeLog
> @@ -1,3 +1,9 @@
> +2021-01-09  Mike Frysinger  <vapier@gentoo.org>
> +
> +	* config.in, configure: Regenerate.
> +	* sim-if.c: Delete HAVE_STRING_H, HAVE_STRINGS_H, HAVE_STDLIB_H,
> +	and strings.h include.
> +
>  2021-01-09  Mike Frysinger  <vapier@gentoo.org>
>  
>  	* configure: Regenerate.
> diff --git a/sim/m32r/sim-if.c b/sim/m32r/sim-if.c
> index c25d9a859c2c..08003b50fd6f 100644
> --- a/sim/m32r/sim-if.c
> +++ b/sim/m32r/sim-if.c
> @@ -22,16 +22,8 @@
>  #include "libiberty.h"
>  #include "bfd.h"
>  
> -#ifdef HAVE_STRING_H
>  #include <string.h>
> -#else
> -#ifdef HAVE_STRINGS_H
> -#include <strings.h>
> -#endif
> -#endif
> -#ifdef HAVE_STDLIB_H
>  #include <stdlib.h>
> -#endif
>  
>  #include "dv-m32r_uart.h"
>  
> diff --git a/sim/m68hc11/ChangeLog b/sim/m68hc11/ChangeLog
> index 7545c768cf8f..520daa3e9aa9 100644
> --- a/sim/m68hc11/ChangeLog
> +++ b/sim/m68hc11/ChangeLog
> @@ -1,3 +1,7 @@
> +2021-01-09  Mike Frysinger  <vapier@gentoo.org>
> +
> +	* config.in, configure: Regenerate.
> +
>  2021-01-09  Mike Frysinger  <vapier@gentoo.org>
>  
>  	* configure: Regenerate.
> diff --git a/sim/mcore/ChangeLog b/sim/mcore/ChangeLog
> index de32036a37b4..c7d48ca71676 100644
> --- a/sim/mcore/ChangeLog
> +++ b/sim/mcore/ChangeLog
> @@ -1,3 +1,7 @@
> +2021-01-09  Mike Frysinger  <vapier@gentoo.org>
> +
> +	* config.in, configure: Regenerate.
> +
>  2021-01-09  Mike Frysinger  <vapier@gentoo.org>
>  
>  	* configure: Regenerate.
> diff --git a/sim/microblaze/ChangeLog b/sim/microblaze/ChangeLog
> index 523971ca99c2..63abd91d9b32 100644
> --- a/sim/microblaze/ChangeLog
> +++ b/sim/microblaze/ChangeLog
> @@ -1,3 +1,7 @@
> +2021-01-09  Mike Frysinger  <vapier@gentoo.org>
> +
> +	* config.in, configure: Regenerate.
> +
>  2021-01-09  Mike Frysinger  <vapier@gentoo.org>
>  
>  	* configure: Regenerate.
> diff --git a/sim/mips/ChangeLog b/sim/mips/ChangeLog
> index 6197dd6f3728..e80519d6b769 100644
> --- a/sim/mips/ChangeLog
> +++ b/sim/mips/ChangeLog
> @@ -1,3 +1,9 @@
> +2021-01-09  Mike Frysinger  <vapier@gentoo.org>
> +
> +	* config.in, configure: Regenerate.
> +	* interp.c: Delete HAVE_STRING_H, HAVE_STRINGS_H, HAVE_STDLIB_H,
> +	and strings.h include.
> +
>  2021-01-09  Mike Frysinger  <vapier@gentoo.org>
>  
>  	* configure: Regenerate.
> diff --git a/sim/mips/interp.c b/sim/mips/interp.c
> index 9dbac8c58fc7..49e5f7167574 100644
> --- a/sim/mips/interp.c
> +++ b/sim/mips/interp.c
> @@ -41,16 +41,8 @@ code on the hardware.
>  #include <ctype.h>
>  #include <limits.h>
>  #include <math.h>
> -#ifdef HAVE_STDLIB_H
>  #include <stdlib.h>
> -#endif
> -#ifdef HAVE_STRING_H
>  #include <string.h>
> -#else
> -#ifdef HAVE_STRINGS_H
> -#include <strings.h>
> -#endif
> -#endif
>  
>  #include "getopt.h"
>  #include "libiberty.h"
> diff --git a/sim/mn10300/ChangeLog b/sim/mn10300/ChangeLog
> index 2f93d99837ff..13aa53acdfab 100644
> --- a/sim/mn10300/ChangeLog
> +++ b/sim/mn10300/ChangeLog
> @@ -1,3 +1,9 @@
> +2021-01-09  Mike Frysinger  <vapier@gentoo.org>
> +
> +	* config.in, configure: Regenerate.
> +	* interp.c, op_utils.c: Delete HAVE_STRING_H, HAVE_STRINGS_H,
> +	HAVE_STDLIB_H, HAVE_TIME_H, and strings.h include.
> +
>  2021-01-09  Mike Frysinger  <vapier@gentoo.org>
>  
>  	* configure: Regenerate.
> diff --git a/sim/mn10300/interp.c b/sim/mn10300/interp.c
> index 7f0655f3f472..418f3f00a394 100644
> --- a/sim/mn10300/interp.c
> +++ b/sim/mn10300/interp.c
> @@ -8,18 +8,8 @@
>  #include "bfd.h"
>  #include "sim-assert.h"
>  
> -
> -#ifdef HAVE_STDLIB_H
>  #include <stdlib.h>
> -#endif
> -
> -#ifdef HAVE_STRING_H
>  #include <string.h>
> -#else
> -#ifdef HAVE_STRINGS_H
> -#include <strings.h>
> -#endif
> -#endif
>  
>  #include "bfd.h"
>  
> diff --git a/sim/mn10300/op_utils.c b/sim/mn10300/op_utils.c
> index 67bf9a34f684..a696cdbfab97 100644
> --- a/sim/mn10300/op_utils.c
> +++ b/sim/mn10300/op_utils.c
> @@ -5,22 +5,11 @@
>  #ifdef HAVE_UTIME_H
>  #include <utime.h>
>  #endif
> -
> -#ifdef HAVE_TIME_H
>  #include <time.h>
> -#endif
> -
>  #ifdef HAVE_UNISTD_H
>  #include <unistd.h>
>  #endif
> -
> -#ifdef HAVE_STRING_H
>  #include <string.h>
> -#else
> -#ifdef HAVE_STRINGS_H
> -#include <strings.h>
> -#endif
> -#endif
>  #include <sys/stat.h>
>  #include <sys/times.h>
>  #include <sys/time.h>
> diff --git a/sim/moxie/ChangeLog b/sim/moxie/ChangeLog
> index 00ad7a730181..3ec0762a3b0e 100644
> --- a/sim/moxie/ChangeLog
> +++ b/sim/moxie/ChangeLog
> @@ -1,3 +1,7 @@
> +2021-01-09  Mike Frysinger  <vapier@gentoo.org>
> +
> +	* config.in, configure: Regenerate.
> +
>  2021-01-09  Mike Frysinger  <vapier@gentoo.org>
>  
>  	* configure: Regenerate.
> diff --git a/sim/msp430/ChangeLog b/sim/msp430/ChangeLog
> index 1f1a0c457b29..c8ed0101eac8 100644
> --- a/sim/msp430/ChangeLog
> +++ b/sim/msp430/ChangeLog
> @@ -1,3 +1,7 @@
> +2021-01-09  Mike Frysinger  <vapier@gentoo.org>
> +
> +	* config.in, configure: Regenerate.
> +
>  2021-01-09  Mike Frysinger  <vapier@gentoo.org>
>  
>  	* configure: Regenerate.
> diff --git a/sim/or1k/ChangeLog b/sim/or1k/ChangeLog
> index 83f9817a4672..7c255f0522b4 100644
> --- a/sim/or1k/ChangeLog
> +++ b/sim/or1k/ChangeLog
> @@ -1,3 +1,9 @@
> +2021-01-09  Mike Frysinger  <vapier@gentoo.org>
> +
> +	* config.in, configure: Regenerate.
> +	* sim-if.c: Delete HAVE_STRING_H, HAVE_STRINGS_H, HAVE_STDLIB_H,
> +	and strings.h include.
> +
>  2021-01-09  Mike Frysinger  <vapier@gentoo.org>
>  
>  	* configure: Regenerate.
> diff --git a/sim/or1k/sim-if.c b/sim/or1k/sim-if.c
> index 18f70387063f..b5258a828a5f 100644
> --- a/sim/or1k/sim-if.c
> +++ b/sim/or1k/sim-if.c
> @@ -21,16 +21,8 @@
>  #include "libiberty.h"
>  #include "bfd.h"
>  
> -#ifdef HAVE_STRING_H
>  #include <string.h>
> -#else
> -#ifdef HAVE_STRINGS_H
> -#include <strings.h>
> -#endif
> -#endif
> -#ifdef HAVE_STDLIB_H
>  #include <stdlib.h>
> -#endif
>  
>  static void free_state (SIM_DESC);
>  \f
> diff --git a/sim/ppc/ChangeLog b/sim/ppc/ChangeLog
> index 625afeccd57b..e2dc80268a00 100644
> --- a/sim/ppc/ChangeLog
> +++ b/sim/ppc/ChangeLog
> @@ -1,3 +1,21 @@
> +2021-01-09  Mike Frysinger  <vapier@gentoo.org>
> +
> +	* configure.ac: Delete checks for stdlib.h, string.h,
> +	strings.h, and time.h.
> +	* config.in, configure: Regenerate.
> +	* cpu.c, debug.c, device.c, device_table.c, device_table.h,
> +	dgen.c, emul_bugapi.c, emul_chirp.c, emul_netbsd.c, emul_unix.c,
> +	filter.c, hw_com.c, hw_eeprom.c, hw_nvram.c, hw_opic.c, hw_pal.c,
> +	hw_phb.c, hw_sem.c, hw_shm.c, lf.c, main.c, misc.c, misc.h,
> +	mon.c, pk_disklabel.c, psim.c, registers.c, sim_calls.c, table.c,
> +	tree.c: Delete HAVE_ERRNO_H, HAVE_STDLIB_H, HAVE_STRING_H,
> +	HAVE_STRINGS_H, HAVE_LIMITS_H, HAVE_TIME_H, and strings.h include.
> +	* hw_nvram.c: Likewise.
> +	(_hw_nvram_device): Always define host_time as time_t.
> +	(hw_nvram_update_clock): Delete error fallback.
> +	* gen-model.c (gen_model_c): Delete HAVE_STDLIB_H output.
> +
> +
>  2021-01-09  Mike Frysinger  <vapier@gentoo.org>
>  
>  	* configure: Regenerate.
> diff --git a/sim/ppc/configure.ac b/sim/ppc/configure.ac
> index ee52bba81ecc..9bc10570f038 100644
> --- a/sim/ppc/configure.ac
> +++ b/sim/ppc/configure.ac
> @@ -655,7 +655,7 @@ AC_TYPE_UID_T
>  
>  AC_CHECK_FUNCS(access cfgetispeed cfgetospeed cfsetispeed cfsetospeed chdir chmod chown dup dup2 fchmod fchown fcntl fstat fstatfs getdirentries getegid geteuid getgid getpid getppid getrusage gettimeofday getuid ioctl kill link lseek lstat mkdir pipe readlink rmdir setreuid setregid stat sigprocmask stat symlink tcgetattr tcsetattr tcsendbreak tcdrain tcflush tcflow tcgetpgrp tcsetpgrp time umask unlink)
>  
> -AC_CHECK_HEADERS(fcntl.h stdlib.h string.h strings.h sys/ioctl.h sys/mount.h sys/param.h sys/resource.h sys/stat.h sys/termio.h sys/termios.h sys/time.h sys/times.h sys/types.h time.h unistd.h sys/vfs.h sys/statfs.h)
> +AC_CHECK_HEADERS(fcntl.h sys/ioctl.h sys/mount.h sys/param.h sys/resource.h sys/stat.h sys/termio.h sys/termios.h sys/time.h sys/times.h sys/types.h unistd.h sys/vfs.h sys/statfs.h)
>  AC_HEADER_DIRENT
>  
>  dnl Figure out what type of termio/termios support there is
> diff --git a/sim/ppc/cpu.c b/sim/ppc/cpu.c
> index c7e8bdf0c003..3169553a5870 100644
> --- a/sim/ppc/cpu.c
> +++ b/sim/ppc/cpu.c
> @@ -26,13 +26,7 @@
>  #include "cpu.h"
>  #include "idecode.h"
>  
> -#ifdef HAVE_STRING_H
>  #include <string.h>
> -#else
> -#ifdef HAVE_STRINGS_H
> -#include <strings.h>
> -#endif
> -#endif
>  
>  struct _cpu {
>  
> diff --git a/sim/ppc/debug.c b/sim/ppc/debug.c
> index 1ec279bac2ae..dba14255366b 100644
> --- a/sim/ppc/debug.c
> +++ b/sim/ppc/debug.c
> @@ -24,12 +24,8 @@
>  #include "config.h"
>  #include "basics.h"
>  
> -#ifdef HAVE_STDLIB_H
>  #include <stdlib.h>
> -#endif
> -#ifdef HAVE_STRING_H
>  #include <string.h>
> -#endif
>  
>  int ppc_trace[nr_trace_options];
>  
> diff --git a/sim/ppc/device.c b/sim/ppc/device.c
> index d5093bbdadb1..6a0209e5ce69 100644
> --- a/sim/ppc/device.c
> +++ b/sim/ppc/device.c
> @@ -29,18 +29,8 @@
>  #include "events.h"
>  #include "psim.h"
>  
> -#ifdef HAVE_STDLIB_H
>  #include <stdlib.h>
> -#endif
> -
> -#ifdef HAVE_STRING_H
>  #include <string.h>
> -#else
> -#ifdef HAVE_STRINGS_H
> -#include <strings.h>
> -#endif
> -#endif
> -
>  #include <ctype.h>
>  
>  STATIC_INLINE_DEVICE (void) clean_device_properties(device *);
> diff --git a/sim/ppc/device_table.c b/sim/ppc/device_table.c
> index d2c6195e1dae..7d8fabd4dd56 100644
> --- a/sim/ppc/device_table.c
> +++ b/sim/ppc/device_table.c
> @@ -23,10 +23,7 @@
>  
>  #include "device_table.h"
>  
> -#if HAVE_STDLIB_H
>  #include <stdlib.h>
> -#endif
> -
>  #include <ctype.h>
>  
>  
> diff --git a/sim/ppc/device_table.h b/sim/ppc/device_table.h
> index 654ecade4b01..b61f4bd06d73 100644
> --- a/sim/ppc/device_table.h
> +++ b/sim/ppc/device_table.h
> @@ -25,13 +25,7 @@
>  #include "device.h"
>  #include "tree.h"
>  
> -#ifdef HAVE_STRING_H
>  #include <string.h>
> -#else
> -#ifdef HAVE_STRINGS_H
> -#include <strings.h>
> -#endif
> -#endif
>  
>  
>  typedef struct _device_callbacks device_callbacks;
> diff --git a/sim/ppc/dgen.c b/sim/ppc/dgen.c
> index 8e8f5fb61bcf..9437944a9a6b 100644
> --- a/sim/ppc/dgen.c
> +++ b/sim/ppc/dgen.c
> @@ -34,18 +34,8 @@
>  #ifdef HAVE_UNISTD_H
>  #include <unistd.h>
>  #endif
> -
> -#ifdef HAVE_STDLIB_H
>  #include <stdlib.h>
> -#endif
> -
> -#ifdef HAVE_STRING_H
>  #include <string.h>
> -#else
> -#ifdef HAVE_STRINGS_H
> -#include <strings.h>
> -#endif
> -#endif
>  
>  /****************************************************************/
>  
> diff --git a/sim/ppc/emul_bugapi.c b/sim/ppc/emul_bugapi.c
> index 8481b6fb39e6..c3c607b43f04 100644
> --- a/sim/ppc/emul_bugapi.c
> +++ b/sim/ppc/emul_bugapi.c
> @@ -30,18 +30,8 @@
>  #ifdef HAVE_UNISTD_H
>  #include <unistd.h>
>  #endif
> -
> -#ifdef HAVE_STDLIB_H
>  #include <stdlib.h>
> -#endif
> -
> -#ifdef HAVE_STRING_H
>  #include <string.h>
> -#else
> -#ifdef HAVE_STRINGS_H
> -#include <strings.h>
> -#endif
> -#endif
>  
>  
>  /* EMULATION
> diff --git a/sim/ppc/emul_chirp.c b/sim/ppc/emul_chirp.c
> index f326410b060d..d4214f51b971 100644
> --- a/sim/ppc/emul_chirp.c
> +++ b/sim/ppc/emul_chirp.c
> @@ -27,14 +27,7 @@
>  #include "emul_generic.h"
>  #include "emul_chirp.h"
>  
> -#ifdef HAVE_STRING_H
>  #include <string.h>
> -#else
> -#ifdef HAVE_STRINGS_H
> -#include <strings.h>
> -#endif
> -#endif
> -
>  #ifdef HAVE_UNISTD_H
>  #include <unistd.h>
>  #endif
> diff --git a/sim/ppc/emul_netbsd.c b/sim/ppc/emul_netbsd.c
> index 0bda20e164b5..0135a93298b8 100644
> --- a/sim/ppc/emul_netbsd.c
> +++ b/sim/ppc/emul_netbsd.c
> @@ -28,14 +28,7 @@
>  #include "emul_generic.h"
>  #include "emul_netbsd.h"
>  
> -#ifdef HAVE_STRING_H
>  #include <string.h>
> -#else
> -#ifdef HAVE_STRINGS_H
> -#include <strings.h>
> -#endif
> -#endif
> -
>  #include <sys/types.h>
>  #include <sys/stat.h>
>  #include <stdio.h>
> @@ -82,9 +75,7 @@ int getrusage();
>  #include <unistd.h>
>  #endif
>  
> -#ifdef HAVE_STDLIB_H
>  #include <stdlib.h>
> -#endif
>  
>  #define WITH_NetBSD_HOST (NetBSD >= 199306)
>  #if WITH_NetBSD_HOST /* here NetBSD as that is what we're emulating */
> diff --git a/sim/ppc/emul_unix.c b/sim/ppc/emul_unix.c
> index 3a1c24586fa2..92c3c1ededfa 100644
> --- a/sim/ppc/emul_unix.c
> +++ b/sim/ppc/emul_unix.c
> @@ -28,14 +28,7 @@
>  #include "emul_generic.h"
>  #include "emul_unix.h"
>  
> -#ifdef HAVE_STRING_H
>  #include <string.h>
> -#else
> -#ifdef HAVE_STRINGS_H
> -#include <strings.h>
> -#endif
> -#endif
> -
>  #ifdef HAVE_SYS_TYPES_H
>  #include <sys/types.h>
>  #endif
> @@ -130,9 +123,7 @@ int getrusage();
>  #include <unistd.h>
>  #endif
>  
> -#ifdef HAVE_STDLIB_H
>  #include <stdlib.h>
> -#endif
>  
>  #if defined(BSD) && !defined(errno) && (BSD < 199306)	/* here BSD as just a bug */
>  extern int errno;
> diff --git a/sim/ppc/filter.c b/sim/ppc/filter.c
> index 7aa6a556014f..a2024275290a 100644
> --- a/sim/ppc/filter.c
> +++ b/sim/ppc/filter.c
> @@ -22,13 +22,7 @@
>  
>  #include "build-config.h"
>  
> -#ifdef HAVE_STRING_H
>  #include <string.h>
> -#else
> -#ifdef HAVE_STRINGS_H
> -#include <strings.h>
> -#endif
> -#endif
>  
>  #include "misc.h"
>  #include "filter.h"
> diff --git a/sim/ppc/gen-model.c b/sim/ppc/gen-model.c
> index 00f2b02118e7..a591d316e2ea 100644
> --- a/sim/ppc/gen-model.c
> +++ b/sim/ppc/gen-model.c
> @@ -244,9 +244,7 @@ gen_model_c(insn_table *table, lf *file)
>    lf_printf(file, "#include \"cpu.h\"\n");
>    lf_printf(file, "#include \"mon.h\"\n");
>    lf_printf(file, "\n");
> -  lf_printf(file, "#ifdef HAVE_STDLIB_H\n");
>    lf_printf(file, "#include <stdlib.h>\n");
> -  lf_printf(file, "#endif\n");
>    lf_printf(file, "\n");
>  
>    for(insn_ptr = model_data; insn_ptr; insn_ptr = insn_ptr->next) {
> diff --git a/sim/ppc/hw_com.c b/sim/ppc/hw_com.c
> index 38d6d85cefc3..4ffd73203f49 100644
> --- a/sim/ppc/hw_com.c
> +++ b/sim/ppc/hw_com.c
> @@ -27,20 +27,11 @@
>  
>  #include "device_table.h"
>  
> -#ifdef HAVE_STRING_H
>  #include <string.h>
> -#else
> -#ifdef HAVE_STRINGS_H
> -#include <strings.h>
> -#endif
> -#endif
> -
>  #ifdef HAVE_UNISTD_H
>  #include <unistd.h>
>  #endif
> -#ifdef HAVE_STDLIB_H
>  #include <stdlib.h>
> -#endif
>  
>  /* DEVICE
>     
> diff --git a/sim/ppc/hw_eeprom.c b/sim/ppc/hw_eeprom.c
> index 3406be93c62d..b0a3ac635b16 100644
> --- a/sim/ppc/hw_eeprom.c
> +++ b/sim/ppc/hw_eeprom.c
> @@ -23,13 +23,7 @@
>  
>  #include "device_table.h"
>  
> -#ifdef HAVE_STRING_H
>  #include <string.h>
> -#else
> -#ifdef HAVE_STRINGS_H
> -#include <strings.h>
> -#endif
> -#endif
>  
>  
>  /* DEVICE
> diff --git a/sim/ppc/hw_nvram.c b/sim/ppc/hw_nvram.c
> index f8caaa8edd29..0580dcc2a43d 100644
> --- a/sim/ppc/hw_nvram.c
> +++ b/sim/ppc/hw_nvram.c
> @@ -27,17 +27,8 @@
>  
>  #include "device_table.h"
>  
> -#ifdef HAVE_TIME_H
>  #include <time.h>
> -#endif
> -
> -#ifdef HAVE_STRING_H
>  #include <string.h>
> -#else
> -#ifdef HAVE_STRINGS_H
> -#include <strings.h>
> -#endif
> -#endif
>  
>  /* DEVICE
>  
> @@ -73,11 +64,7 @@
>  typedef struct _hw_nvram_device {
>    unsigned8 *memory;
>    unsigned sizeof_memory;
> -#ifdef HAVE_TIME_H
>    time_t host_time;
> -#else
> -  long host_time;
> -#endif
>    unsigned timezone;
>    /* useful */
>    unsigned addr_year;
> @@ -177,7 +164,6 @@ static void
>  hw_nvram_update_clock(hw_nvram_device *nvram,
>  		      cpu *processor)
>  {
> -#ifdef HAVE_TIME_H
>    if (!(nvram->memory[nvram->addr_control] & 0xc0)) {
>      time_t host_time = time(NULL);
>      if (nvram->host_time != host_time) {
> @@ -193,9 +179,6 @@ hw_nvram_update_clock(hw_nvram_device *nvram,
>        nvram->memory[nvram->addr_seconds] = hw_nvram_bcd(clock->tm_sec);
>      }
>    }
> -#else
> -  error("fixme - where do I find out GMT\n");
> -#endif
>  }
>  
>  static void
> diff --git a/sim/ppc/hw_opic.c b/sim/ppc/hw_opic.c
> index 69d956b1a5f8..8afe312a7efe 100644
> --- a/sim/ppc/hw_opic.c
> +++ b/sim/ppc/hw_opic.c
> @@ -23,13 +23,7 @@
>  
>  #include "device_table.h"
>  
> -#ifdef HAVE_STRING_H
>  #include <string.h>
> -#else
> -#ifdef HAVE_STRINGS_H
> -#include <strings.h>
> -#endif
> -#endif
>  
>  
>  /* DEVICE
> diff --git a/sim/ppc/hw_pal.c b/sim/ppc/hw_pal.c
> index 0789929cde06..8b0770993699 100644
> --- a/sim/ppc/hw_pal.c
> +++ b/sim/ppc/hw_pal.c
> @@ -29,20 +29,11 @@
>  
>  #include "cpu.h"
>  
> -#ifdef HAVE_STRING_H
>  #include <string.h>
> -#else
> -#ifdef HAVE_STRINGS_H
> -#include <strings.h>
> -#endif
> -#endif
> -
>  #ifdef HAVE_UNISTD_H
>  #include <unistd.h>
>  #endif
> -#ifdef HAVE_STDLIB_H
>  #include <stdlib.h>
> -#endif
>  
>  
>  /* DEVICE
> diff --git a/sim/ppc/hw_phb.c b/sim/ppc/hw_phb.c
> index 8e3fb179501d..08defc2868ca 100644
> --- a/sim/ppc/hw_phb.c
> +++ b/sim/ppc/hw_phb.c
> @@ -27,10 +27,7 @@
>  
>  #include "corefile.h"
>  
> -#ifdef HAVE_STDLIB_H
>  #include <stdlib.h>
> -#endif
> -
>  #include <ctype.h>
>  
>  
> diff --git a/sim/ppc/hw_sem.c b/sim/ppc/hw_sem.c
> index f1c329544435..5f3595204d2c 100644
> --- a/sim/ppc/hw_sem.c
> +++ b/sim/ppc/hw_sem.c
> @@ -23,14 +23,7 @@
>  
>  #include "device_table.h"
>  
> -#ifdef HAVE_STRING_H
>  #include <string.h>
> -#else
> -#ifdef HAVE_STRINGS_H
> -#include <strings.h>
> -#endif
> -#endif
> -
>  #include <sys/ipc.h>
>  #include <sys/sem.h>
>  
> diff --git a/sim/ppc/hw_shm.c b/sim/ppc/hw_shm.c
> index 312887148334..f2fa144244ac 100644
> --- a/sim/ppc/hw_shm.c
> +++ b/sim/ppc/hw_shm.c
> @@ -23,14 +23,7 @@
>  
>  #include "device_table.h"
>  
> -#ifdef HAVE_STRING_H
>  #include <string.h>
> -#else
> -#ifdef HAVE_STRINGS_H
> -#include <strings.h>
> -#endif
> -#endif
> -
>  #include <sys/ipc.h>
>  #include <sys/shm.h>
>  
> diff --git a/sim/ppc/lf.c b/sim/ppc/lf.c
> index 1794a27f3509..a3815a8788ed 100644
> --- a/sim/ppc/lf.c
> +++ b/sim/ppc/lf.c
> @@ -26,17 +26,8 @@
>  #include "misc.h"
>  #include "lf.h"
>  
> -#ifdef HAVE_STDLIB_H
>  #include <stdlib.h>
> -#endif
> -
> -#ifdef HAVE_STRING_H
>  #include <string.h>
> -#else
> -#ifdef HAVE_STRINGS_H
> -#include <strings.h>
> -#endif
> -#endif
>  
>  struct _lf {
>    FILE *stream;
> diff --git a/sim/ppc/main.c b/sim/ppc/main.c
> index 667c02f2d43a..1e73444ff832 100644
> --- a/sim/ppc/main.c
> +++ b/sim/ppc/main.c
> @@ -33,22 +33,11 @@
>  #include "gdb/callback.h"
>  #include "gdb/remote-sim.h"
>  
> -#ifdef HAVE_STDLIB_H
>  #include <stdlib.h>
> -#endif
> -
>  #ifdef HAVE_UNISTD_H
>  #include <unistd.h>
>  #endif
> -
> -#ifdef HAVE_STRING_H
>  #include <string.h>
> -#else
> -#ifdef HAVE_STRINGS_H
> -#include <strings.h>
> -#endif
> -#endif
> -
>  #include <errno.h>
>  
>  #if !defined(O_NDELAY) || !defined(F_GETFL) || !defined(F_SETFL)
> diff --git a/sim/ppc/misc.c b/sim/ppc/misc.c
> index 8c21bd38b1b8..6de3cf9a95b9 100644
> --- a/sim/ppc/misc.c
> +++ b/sim/ppc/misc.c
> @@ -25,17 +25,8 @@
>  #include "build-config.h"
>  #include "misc.h"
>  
> -#ifdef HAVE_STDLIB_H
>  #include <stdlib.h>
> -#endif
> -
> -#ifdef HAVE_STRING_H
>  #include <string.h>
> -#else
> -#ifdef HAVE_STRINGS_H
> -#include <strings.h>
> -#endif
> -#endif
>  
>  void
>  error (char *msg, ...)
> diff --git a/sim/ppc/misc.h b/sim/ppc/misc.h
> index 232f2eaacd01..c080ae29f0b4 100644
> --- a/sim/ppc/misc.h
> +++ b/sim/ppc/misc.h
> @@ -24,18 +24,8 @@
>  
>  #include <stdio.h>
>  #include <ctype.h>
> -
> -#ifdef HAVE_STRING_H
>  #include <string.h>
> -#else
> -#ifdef HAVE_STRINGS_H
> -#include <strings.h>
> -#endif
> -#endif
> -
> -#ifdef HAVE_STDLIB_H
>  #include <stdlib.h>
> -#endif
>  
>  #if !defined (__attribute__) && (!defined(__GNUC__) || __GNUC__ < 2 || (__GNUC__ == 2 && __GNUC_MINOR__ < 7))
>  #define __attribute__(arg)
> diff --git a/sim/ppc/mon.c b/sim/ppc/mon.c
> index 8235b66df1df..452cd19c3d96 100644
> --- a/sim/ppc/mon.c
> +++ b/sim/ppc/mon.c
> @@ -26,30 +26,15 @@
>  #include "mon.h"
>  #include <stdio.h>
>  
> -#ifdef HAVE_STRING_H
>  #include <string.h>
> -#else
> -#ifdef HAVE_STRINGS_H
> -#include <strings.h>
> -#endif
> -#endif
> -
>  #ifdef HAVE_UNISTD_H
>  #include <unistd.h>
>  #endif
> -
> -#ifdef HAVE_STDLIB_H
>  #include <stdlib.h>
> -#endif
> -
>  #ifdef HAVE_SYS_TYPES_H
>  #include <sys/types.h>
>  #endif
> -
> -#ifdef HAVE_TIME_H
>  #include <time.h>
> -#endif
> -
>  #ifdef HAVE_SYS_TIMES_H
>  #include <sys/times.h>
>  #endif
> diff --git a/sim/ppc/pk_disklabel.c b/sim/ppc/pk_disklabel.c
> index fb820fd32dd9..d424c0480aeb 100644
> --- a/sim/ppc/pk_disklabel.c
> +++ b/sim/ppc/pk_disklabel.c
> @@ -29,11 +29,7 @@
>  
>  #include "pk.h"
>  
> -#ifdef HAVE_STDLIB_H
>  #include <stdlib.h>
> -#endif
> -
> -
>  
>  /* PACKAGE
>  
> diff --git a/sim/ppc/psim.c b/sim/ppc/psim.c
> index 3e322e3820f8..ebb9cb427377 100644
> --- a/sim/ppc/psim.c
> +++ b/sim/ppc/psim.c
> @@ -31,21 +31,9 @@
>  
>  #include <stdio.h>
>  #include <ctype.h>
> -
> -#ifdef HAVE_STDLIB_H
>  #include <stdlib.h>
> -#endif
> -
>  #include <setjmp.h>
> -
> -#ifdef HAVE_STRING_H
>  #include <string.h>
> -#else
> -#ifdef HAVE_STRINGS_H
> -#include <strings.h>
> -#endif
> -#endif
> -
>  
>  #include "bfd.h"
>  #include "libiberty.h"
> diff --git a/sim/ppc/registers.c b/sim/ppc/registers.c
> index b672f9907e28..2bab55a65fca 100644
> --- a/sim/ppc/registers.c
> +++ b/sim/ppc/registers.c
> @@ -26,18 +26,8 @@
>  #include "basics.h"
>  #include "registers.h"
>  
> -#ifdef HAVE_STDLIB_H
>  #include <stdlib.h>
> -#endif
> -
> -#ifdef HAVE_STRING_H
>  #include <string.h>
> -#else
> -#ifdef HAVE_STRINGS_H
> -#include <strings.h>
> -#endif
> -#endif
> -
>  
>  INLINE_REGISTERS\
>  (void)
> diff --git a/sim/ppc/sim_calls.c b/sim/ppc/sim_calls.c
> index 0a209bf6e0d0..c8364f090046 100644
> --- a/sim/ppc/sim_calls.c
> +++ b/sim/ppc/sim_calls.c
> @@ -27,17 +27,8 @@
>  
>  #undef printf_filtered /* blow away the mapping */
>  
> -#ifdef HAVE_STDLIB_H
>  #include <stdlib.h>
> -#endif
> -
> -#ifdef HAVE_STRING_H
>  #include <string.h>
> -#else
> -#ifdef HAVE_STRINGS_H
> -#include <strings.h>
> -#endif
> -#endif
>  
>  #include "libiberty.h"
>  #include "bfd.h"
> diff --git a/sim/ppc/table.c b/sim/ppc/table.c
> index 43c74622377c..3c7e4464beb5 100644
> --- a/sim/ppc/table.c
> +++ b/sim/ppc/table.c
> @@ -32,10 +32,7 @@
>  #ifdef HAVE_UNISTD_H
>  #include <unistd.h>
>  #endif
> -
> -#ifdef HAVE_STDLIB_H
>  #include <stdlib.h>
> -#endif
>  
>  typedef struct _open_table open_table;
>  struct _open_table {
> diff --git a/sim/ppc/tree.c b/sim/ppc/tree.c
> index 5d20bf4103cd..a0e0820b4d95 100644
> --- a/sim/ppc/tree.c
> +++ b/sim/ppc/tree.c
> @@ -29,19 +29,8 @@
>  #include "device.h"
>  #include "tree.h"
>  
> -
> -#ifdef HAVE_STDLIB_H
>  #include <stdlib.h>
> -#endif
> -
> -#ifdef HAVE_STRING_H
>  #include <string.h>
> -#else
> -#ifdef HAVE_STRINGS_H
> -#include <strings.h>
> -#endif
> -#endif
> -
>  #include <ctype.h>
>  
>  #include "libiberty.h"
> diff --git a/sim/pru/ChangeLog b/sim/pru/ChangeLog
> index 620b50ff3136..7e10ab1a7a62 100644
> --- a/sim/pru/ChangeLog
> +++ b/sim/pru/ChangeLog
> @@ -1,3 +1,7 @@
> +2021-01-09  Mike Frysinger  <vapier@gentoo.org>
> +
> +	* config.in, configure: Regenerate.
> +
>  2021-01-09  Mike Frysinger  <vapier@gentoo.org>
>  
>  	* configure.ac (AC_PREREQ): Delete.
> diff --git a/sim/rl78/ChangeLog b/sim/rl78/ChangeLog
> index 936e7b71f404..2d52d4b08988 100644
> --- a/sim/rl78/ChangeLog
> +++ b/sim/rl78/ChangeLog
> @@ -1,3 +1,7 @@
> +2021-01-09  Mike Frysinger  <vapier@gentoo.org>
> +
> +	* config.in, configure: Regenerate.
> +
>  2021-01-09  Mike Frysinger  <vapier@gentoo.org>
>  
>  	* configure: Regenerate.
> diff --git a/sim/rx/ChangeLog b/sim/rx/ChangeLog
> index e5896c293fbd..23d3a4afeedb 100644
> --- a/sim/rx/ChangeLog
> +++ b/sim/rx/ChangeLog
> @@ -1,3 +1,8 @@
> +2021-01-09  Mike Frysinger  <vapier@gentoo.org>
> +
> +	* config.in, configure: Regenerate.
> +	* main.c: Delete HAVE_STDLIB_H.
> +
>  2021-01-09  Mike Frysinger  <vapier@gentoo.org>
>  
>  	* configure: Regenerate.
> diff --git a/sim/rx/main.c b/sim/rx/main.c
> index 1eac6037f032..4a9d3ecebea5 100644
> --- a/sim/rx/main.c
> +++ b/sim/rx/main.c
> @@ -22,9 +22,7 @@ along with this program.  If not, see <http://www.gnu.org/licenses/>.  */
>  #include "config.h"
>  #include <stdio.h>
>  #include <string.h>
> -#ifdef HAVE_STDLIB_H
>  #include <stdlib.h>
> -#endif
>  #ifdef HAVE_UNISTD_H
>  #include <unistd.h>
>  #endif
> diff --git a/sim/sh/ChangeLog b/sim/sh/ChangeLog
> index 214c45ec870d..941fdc9931b5 100644
> --- a/sim/sh/ChangeLog
> +++ b/sim/sh/ChangeLog
> @@ -1,3 +1,9 @@
> +2021-01-09  Mike Frysinger  <vapier@gentoo.org>
> +
> +	* config.in, configure: Regenerate.
> +	* interp.c, simops.c: Delete HAVE_STRING_H, HAVE_STRINGS_H,
> +	HAVE_STDLIB_H, HAVE_TIME_H, and strings.h include.
> +
>  2021-01-09  Mike Frysinger  <vapier@gentoo.org>
>  
>  	* configure: Regenerate.
> diff --git a/sim/sh/interp.c b/sim/sh/interp.c
> index c77cf3b1d3bf..872bfe288936 100644
> --- a/sim/sh/interp.c
> +++ b/sim/sh/interp.c
> @@ -37,24 +37,12 @@
>  # endif
>  #endif
>  
> -#ifdef HAVE_STRING_H
>  #include <string.h>
> -#else
> -#ifdef HAVE_STRINGS_H
> -#include <strings.h>
> -#endif
> -#endif
> -
> -#ifdef HAVE_STDLIB_H
>  #include <stdlib.h>
> -#endif
> -
>  #ifdef HAVE_SYS_STAT_H
>  #include <sys/stat.h>
>  #endif
> -#ifdef HAVE_TIME_H
>  #include <time.h>
> -#endif
>  #ifdef HAVE_SYS_TIME_H
>  #include <sys/time.h>
>  #endif
> diff --git a/sim/v850/ChangeLog b/sim/v850/ChangeLog
> index 865a2883fbe6..e699eb33e5f4 100644
> --- a/sim/v850/ChangeLog
> +++ b/sim/v850/ChangeLog
> @@ -1,3 +1,9 @@
> +2021-01-09  Mike Frysinger  <vapier@gentoo.org>
> +
> +	* config.in, configure: Regenerate.
> +	* interp.c, simops.c: Delete HAVE_STRING_H, HAVE_STRINGS_H,
> +	HAVE_STDLIB_H, HAVE_TIME_H, and strings.h include.
> +
>  2021-01-09  Mike Frysinger  <vapier@gentoo.org>
>  
>  	* configure: Regenerate.
> diff --git a/sim/v850/interp.c b/sim/v850/interp.c
> index daf961801768..10d8a67a6fb9 100644
> --- a/sim/v850/interp.c
> +++ b/sim/v850/interp.c
> @@ -4,17 +4,8 @@
>  #include "sim-assert.h"
>  #include "itable.h"
>  
> -#ifdef HAVE_STDLIB_H
>  #include <stdlib.h>
> -#endif
> -
> -#ifdef HAVE_STRING_H
>  #include <string.h>
> -#else
> -#ifdef HAVE_STRINGS_H
> -#include <strings.h>
> -#endif
> -#endif
>  
>  #include "bfd.h"
>  
> diff --git a/sim/v850/simops.c b/sim/v850/simops.c
> index 40d578e5d0ac..93185b6de663 100644
> --- a/sim/v850/simops.c
> +++ b/sim/v850/simops.c
> @@ -7,22 +7,11 @@
>  #ifdef HAVE_UTIME_H
>  #include <utime.h>
>  #endif
> -
> -#ifdef HAVE_TIME_H
>  #include <time.h>
> -#endif
> -
>  #ifdef HAVE_UNISTD_H
>  #include <unistd.h>
>  #endif
> -
> -#ifdef HAVE_STRING_H
>  #include <string.h>
> -#else
> -#ifdef HAVE_STRINGS_H
> -#include <strings.h>
> -#endif
> -#endif
>  
>  #include "targ-vals.h"
>  
> -- 
> 2.28.0
> 

^ permalink raw reply	[flat|nested] 2+ messages in thread

end of thread, other threads:[~2021-01-11 11:27 UTC | newest]

Thread overview: 2+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2021-01-09 15:16 [PATCH] sim: clean up C11 header includes Mike Frysinger
2021-01-11 11:27 ` Andrew Burgess

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).