aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--sim/aarch64/ChangeLog7
-rw-r--r--sim/aarch64/cpustate.c3
-rw-r--r--sim/aarch64/cpustate.h1
-rw-r--r--sim/aarch64/interp.c4
-rw-r--r--sim/aarch64/memory.c4
-rw-r--r--sim/aarch64/simulator.c4
-rw-r--r--sim/aarch64/simulator.h1
-rw-r--r--sim/arm/ChangeLog7
-rw-r--r--sim/arm/armcopro.c3
-rw-r--r--sim/arm/armdefs.h1
-rw-r--r--sim/arm/armemu.c3
-rw-r--r--sim/arm/arminit.c3
-rw-r--r--sim/arm/armos.c4
-rw-r--r--sim/arm/armsupp.c3
-rw-r--r--sim/arm/armvirt.c3
-rw-r--r--sim/arm/iwmmxt.c3
-rw-r--r--sim/arm/maverick.c3
-rw-r--r--sim/arm/thumbemu.c3
-rw-r--r--sim/arm/wrapper.c4
-rw-r--r--sim/avr/ChangeLog4
-rw-r--r--sim/avr/interp.c3
-rw-r--r--sim/bfin/ChangeLog13
-rw-r--r--sim/bfin/bfin-sim.c3
-rw-r--r--sim/bfin/devices.c3
-rw-r--r--sim/bfin/dv-bfin_cec.c3
-rw-r--r--sim/bfin/dv-bfin_ctimer.c3
-rw-r--r--sim/bfin/dv-bfin_dma.c3
-rw-r--r--sim/bfin/dv-bfin_dmac.c3
-rw-r--r--sim/bfin/dv-bfin_ebiu_amc.c3
-rw-r--r--sim/bfin/dv-bfin_ebiu_ddrc.c3
-rw-r--r--sim/bfin/dv-bfin_ebiu_sdc.c3
-rw-r--r--sim/bfin/dv-bfin_emac.c3
-rw-r--r--sim/bfin/dv-bfin_eppi.c3
-rw-r--r--sim/bfin/dv-bfin_evt.c3
-rw-r--r--sim/bfin/dv-bfin_gpio.c3
-rw-r--r--sim/bfin/dv-bfin_gpio2.c3
-rw-r--r--sim/bfin/dv-bfin_gptimer.c3
-rw-r--r--sim/bfin/dv-bfin_jtag.c3
-rw-r--r--sim/bfin/dv-bfin_mmu.c3
-rw-r--r--sim/bfin/dv-bfin_nfc.c3
-rw-r--r--sim/bfin/dv-bfin_otp.c3
-rw-r--r--sim/bfin/dv-bfin_pfmon.c3
-rw-r--r--sim/bfin/dv-bfin_pint.c3
-rw-r--r--sim/bfin/dv-bfin_pll.c3
-rw-r--r--sim/bfin/dv-bfin_ppi.c3
-rw-r--r--sim/bfin/dv-bfin_rtc.c3
-rw-r--r--sim/bfin/dv-bfin_sic.c3
-rw-r--r--sim/bfin/dv-bfin_spi.c3
-rw-r--r--sim/bfin/dv-bfin_trace.c3
-rw-r--r--sim/bfin/dv-bfin_twi.c3
-rw-r--r--sim/bfin/dv-bfin_uart.c3
-rw-r--r--sim/bfin/dv-bfin_uart2.c3
-rw-r--r--sim/bfin/dv-bfin_wdog.c3
-rw-r--r--sim/bfin/dv-bfin_wp.c3
-rw-r--r--sim/bfin/dv-eth_phy.c3
-rw-r--r--sim/bfin/gui.c3
-rw-r--r--sim/bfin/interp.c3
-rw-r--r--sim/bfin/machs.c3
-rw-r--r--sim/bpf/ChangeLog4
-rw-r--r--sim/bpf/bpf-helpers.c3
-rw-r--r--sim/bpf/bpf.c3
-rw-r--r--sim/bpf/sim-if.c3
-rw-r--r--sim/bpf/traps.c3
-rw-r--r--sim/common/ChangeLog21
-rw-r--r--sim/common/callback.c6
-rw-r--r--sim/common/cgen-accfp.c3
-rw-r--r--sim/common/cgen-fpu.c3
-rw-r--r--sim/common/cgen-par.c3
-rw-r--r--sim/common/cgen-run.c3
-rw-r--r--sim/common/cgen-scache.c3
-rw-r--r--sim/common/cgen-trace.c4
-rw-r--r--sim/common/cgen-utils.c4
-rw-r--r--sim/common/defs.h30
-rw-r--r--sim/common/dv-cfi.c3
-rw-r--r--sim/common/dv-core.c2
-rw-r--r--sim/common/dv-glue.c2
-rw-r--r--sim/common/dv-pal.c4
-rw-r--r--sim/common/dv-sockser.c4
-rwxr-xr-xsim/common/genmloop.sh3
-rw-r--r--sim/common/gentmap.c2
-rw-r--r--sim/common/hw-alloc.c2
-rw-r--r--sim/common/hw-base.c2
-rw-r--r--sim/common/hw-device.c2
-rw-r--r--sim/common/hw-events.c2
-rw-r--r--sim/common/hw-handles.c2
-rw-r--r--sim/common/hw-instances.c2
-rw-r--r--sim/common/hw-ports.c2
-rw-r--r--sim/common/hw-properties.c3
-rw-r--r--sim/common/hw-tree.c2
-rw-r--r--sim/common/nrun.c4
-rw-r--r--sim/common/sim-abort.c3
-rw-r--r--sim/common/sim-arange.c3
-rw-r--r--sim/common/sim-basics.h4
-rw-r--r--sim/common/sim-bits.c3
-rw-r--r--sim/common/sim-close.c3
-rw-r--r--sim/common/sim-command.c3
-rw-r--r--sim/common/sim-config.c2
-rw-r--r--sim/common/sim-core.c3
-rw-r--r--sim/common/sim-cpu.c3
-rw-r--r--sim/common/sim-endian.c3
-rw-r--r--sim/common/sim-engine.c3
-rw-r--r--sim/common/sim-events.c3
-rw-r--r--sim/common/sim-fpu.c3
-rw-r--r--sim/common/sim-hload.c3
-rw-r--r--sim/common/sim-hrw.c3
-rw-r--r--sim/common/sim-hw.c3
-rw-r--r--sim/common/sim-info.c3
-rw-r--r--sim/common/sim-inline.c3
-rw-r--r--sim/common/sim-io.c4
-rw-r--r--sim/common/sim-load.c6
-rw-r--r--sim/common/sim-memopt.c3
-rw-r--r--sim/common/sim-model.c3
-rw-r--r--sim/common/sim-module.c4
-rw-r--r--sim/common/sim-options.c4
-rw-r--r--sim/common/sim-profile.c3
-rw-r--r--sim/common/sim-reason.c3
-rw-r--r--sim/common/sim-reg.c3
-rw-r--r--sim/common/sim-resume.c3
-rw-r--r--sim/common/sim-run.c3
-rw-r--r--sim/common/sim-signal.c3
-rw-r--r--sim/common/sim-stop.c3
-rw-r--r--sim/common/sim-syscall.c3
-rw-r--r--sim/common/sim-trace.c3
-rw-r--r--sim/common/sim-utils.c3
-rw-r--r--sim/common/sim-watch.c4
-rw-r--r--sim/common/syscall.c6
-rw-r--r--sim/cr16/ChangeLog9
-rw-r--r--sim/cr16/cr16_sim.h1
-rw-r--r--sim/cr16/gencode.c5
-rw-r--r--sim/cr16/interp.c4
-rw-r--r--sim/cr16/simops.c4
-rw-r--r--sim/cris/ChangeLog6
-rw-r--r--sim/cris/cris-tmpl.c3
-rw-r--r--sim/cris/crisv10f.c3
-rw-r--r--sim/cris/crisv32f.c3
-rw-r--r--sim/cris/dv-cris.c3
-rw-r--r--sim/cris/dv-cris_900000xx.c3
-rw-r--r--sim/cris/dv-rv.c2
-rw-r--r--sim/cris/rvdummy.c5
-rw-r--r--sim/cris/sim-if.c4
-rw-r--r--sim/cris/traps.c3
-rw-r--r--sim/d10v/ChangeLog6
-rw-r--r--sim/d10v/d10v_sim.h1
-rw-r--r--sim/d10v/endian.c3
-rw-r--r--sim/d10v/gencode.c1
-rw-r--r--sim/d10v/interp.c4
-rw-r--r--sim/d10v/simops.c3
-rw-r--r--sim/erc32/ChangeLog6
-rw-r--r--sim/erc32/erc32.c4
-rw-r--r--sim/erc32/exec.c4
-rw-r--r--sim/erc32/float.c4
-rw-r--r--sim/erc32/func.c4
-rw-r--r--sim/erc32/help.c4
-rw-r--r--sim/erc32/interf.c4
-rw-r--r--sim/erc32/sis.c4
-rw-r--r--sim/erc32/sis.h1
-rw-r--r--sim/example-synacor/ChangeLog4
-rw-r--r--sim/example-synacor/interp.c3
-rw-r--r--sim/example-synacor/sim-main.c3
-rw-r--r--sim/frv/ChangeLog7
-rw-r--r--sim/frv/cache.c3
-rw-r--r--sim/frv/frv.c3
-rw-r--r--sim/frv/interrupts.c3
-rw-r--r--sim/frv/memory.c3
-rw-r--r--sim/frv/options.c3
-rw-r--r--sim/frv/pipeline.c3
-rw-r--r--sim/frv/profile-fr400.c6
-rw-r--r--sim/frv/profile-fr450.c6
-rw-r--r--sim/frv/profile-fr500.c6
-rw-r--r--sim/frv/profile-fr550.c6
-rw-r--r--sim/frv/profile.c6
-rw-r--r--sim/frv/registers.c3
-rw-r--r--sim/frv/reset.c3
-rw-r--r--sim/frv/sim-if.c3
-rw-r--r--sim/frv/sim-main.h4
-rw-r--r--sim/frv/traps.c3
-rw-r--r--sim/ft32/ChangeLog4
-rw-r--r--sim/ft32/interp.c4
-rw-r--r--sim/h8300/ChangeLog5
-rw-r--r--sim/h8300/compile.c4
-rw-r--r--sim/h8300/sim-main.h1
-rw-r--r--sim/iq2000/ChangeLog5
-rw-r--r--sim/iq2000/iq2000.c3
-rw-r--r--sim/iq2000/sim-if.c3
-rw-r--r--sim/iq2000/sim-main.h4
-rw-r--r--sim/lm32/ChangeLog5
-rw-r--r--sim/lm32/dv-lm32cpu.c3
-rw-r--r--sim/lm32/dv-lm32timer.c3
-rw-r--r--sim/lm32/dv-lm32uart.c3
-rw-r--r--sim/lm32/lm32.c3
-rw-r--r--sim/lm32/sim-if.c3
-rw-r--r--sim/lm32/traps.c3
-rw-r--r--sim/lm32/user.c3
-rw-r--r--sim/m32c/ChangeLog6
-rw-r--r--sim/m32c/gdb-if.c4
-rw-r--r--sim/m32c/int.c2
-rw-r--r--sim/m32c/load.c4
-rw-r--r--sim/m32c/main.c3
-rw-r--r--sim/m32c/mem.c3
-rw-r--r--sim/m32c/misc.c2
-rw-r--r--sim/m32c/opc2c.c2
-rw-r--r--sim/m32c/reg.c2
-rw-r--r--sim/m32c/srcdest.c2
-rw-r--r--sim/m32c/syscalls.c4
-rw-r--r--sim/m32c/trace.c4
-rw-r--r--sim/m32r/ChangeLog7
-rw-r--r--sim/m32r/dv-m32r_cache.c3
-rw-r--r--sim/m32r/dv-m32r_uart.c3
-rw-r--r--sim/m32r/m32r.c3
-rw-r--r--sim/m32r/m32r2.c3
-rw-r--r--sim/m32r/m32rx.c3
-rw-r--r--sim/m32r/sim-if.c3
-rw-r--r--sim/m32r/traps-linux.c3
-rw-r--r--sim/m32r/traps.c3
-rw-r--r--sim/m68hc11/ChangeLog6
-rw-r--r--sim/m68hc11/dv-m68hc11.c2
-rw-r--r--sim/m68hc11/dv-m68hc11eepr.c2
-rw-r--r--sim/m68hc11/dv-m68hc11sio.c2
-rw-r--r--sim/m68hc11/dv-m68hc11spi.c2
-rw-r--r--sim/m68hc11/dv-m68hc11tim.c2
-rw-r--r--sim/m68hc11/dv-nvram.c2
-rw-r--r--sim/m68hc11/emulos.c3
-rw-r--r--sim/m68hc11/gencode.c3
-rw-r--r--sim/m68hc11/interp.c3
-rw-r--r--sim/m68hc11/interrupts.c3
-rw-r--r--sim/m68hc11/m68hc11_sim.c3
-rw-r--r--sim/mcore/ChangeLog4
-rw-r--r--sim/mcore/interp.c4
-rw-r--r--sim/microblaze/ChangeLog4
-rw-r--r--sim/microblaze/interp.c4
-rw-r--r--sim/mips/ChangeLog7
-rw-r--r--sim/mips/cp1.c3
-rw-r--r--sim/mips/dsp.c3
-rw-r--r--sim/mips/dv-tx3904cpu.c2
-rw-r--r--sim/mips/dv-tx3904irc.c2
-rw-r--r--sim/mips/dv-tx3904sio.c2
-rw-r--r--sim/mips/dv-tx3904tmr.c2
-rw-r--r--sim/mips/interp.c7
-rw-r--r--sim/mips/m16run.c3
-rw-r--r--sim/mips/mdmx.c3
-rw-r--r--sim/mips/micromipsrun.c3
-rw-r--r--sim/mips/sim-main.c3
-rw-r--r--sim/mn10300/ChangeLog6
-rw-r--r--sim/mn10300/dv-mn103cpu.c2
-rw-r--r--sim/mn10300/dv-mn103int.c2
-rw-r--r--sim/mn10300/dv-mn103iop.c3
-rw-r--r--sim/mn10300/dv-mn103ser.c3
-rw-r--r--sim/mn10300/dv-mn103tim.c3
-rw-r--r--sim/mn10300/interp.c4
-rw-r--r--sim/mn10300/op_utils.c3
-rw-r--r--sim/moxie/ChangeLog4
-rw-r--r--sim/moxie/interp.c4
-rw-r--r--sim/msp430/ChangeLog4
-rw-r--r--sim/msp430/msp430-sim.c4
-rw-r--r--sim/or1k/ChangeLog5
-rw-r--r--sim/or1k/or1k.c3
-rw-r--r--sim/or1k/sim-if.c3
-rw-r--r--sim/or1k/sim-main.h2
-rw-r--r--sim/or1k/traps.c3
-rw-r--r--sim/ppc/ChangeLog7
-rw-r--r--sim/ppc/Makefile.in2
-rw-r--r--sim/ppc/basics.h3
-rw-r--r--sim/ppc/debug.c4
-rw-r--r--sim/ppc/defs.h26
-rw-r--r--sim/ppc/filter_filename.c4
-rw-r--r--sim/ppc/inline.c4
-rw-r--r--sim/ppc/sim-endian.c4
-rw-r--r--sim/ppc/words.h5
-rw-r--r--sim/pru/ChangeLog5
-rw-r--r--sim/pru/interp.c4
-rw-r--r--sim/pru/pru.h1
-rw-r--r--sim/pru/sim-main.h2
-rw-r--r--sim/riscv/ChangeLog4
-rw-r--r--sim/riscv/interp.c3
-rw-r--r--sim/riscv/machs.c3
-rw-r--r--sim/riscv/sim-main.c3
-rw-r--r--sim/rl78/ChangeLog5
-rw-r--r--sim/rl78/cpu.c4
-rw-r--r--sim/rl78/gdb-if.c4
-rw-r--r--sim/rl78/load.c3
-rw-r--r--sim/rl78/main.c3
-rw-r--r--sim/rl78/mem.c4
-rw-r--r--sim/rl78/rl78.c4
-rw-r--r--sim/rl78/trace.c3
-rw-r--r--sim/rx/ChangeLog6
-rw-r--r--sim/rx/err.c3
-rw-r--r--sim/rx/fpu.c4
-rw-r--r--sim/rx/gdb-if.c4
-rw-r--r--sim/rx/load.c3
-rw-r--r--sim/rx/main.c3
-rw-r--r--sim/rx/mem.c4
-rw-r--r--sim/rx/misc.c3
-rw-r--r--sim/rx/reg.c3
-rw-r--r--sim/rx/rx.c4
-rw-r--r--sim/rx/syscalls.c3
-rw-r--r--sim/rx/trace.c3
-rw-r--r--sim/sh/ChangeLog4
-rw-r--r--sim/sh/interp.c3
-rw-r--r--sim/v850/ChangeLog5
-rw-r--r--sim/v850/interp.c3
-rw-r--r--sim/v850/sim-main.h1
-rw-r--r--sim/v850/simops.c3
302 files changed, 923 insertions, 169 deletions
diff --git a/sim/aarch64/ChangeLog b/sim/aarch64/ChangeLog
index dc3eee2..b5ef612 100644
--- a/sim/aarch64/ChangeLog
+++ b/sim/aarch64/ChangeLog
@@ -1,5 +1,12 @@
2021-05-16 Mike Frysinger <vapier@gentoo.org>
+ * cpustate.c: Include defs.h.
+ * interp.c: Replace config.h include with defs.h.
+ * memory.c, simulator.c: Likewise.
+ * cpustate.h, simulator.h: Delete config.h include.
+
+2021-05-16 Mike Frysinger <vapier@gentoo.org>
+
* config.in, configure: Regenerate.
2021-05-14 Mike Frysinger <vapier@gentoo.org>
diff --git a/sim/aarch64/cpustate.c b/sim/aarch64/cpustate.c
index f6b93fb..6007d74 100644
--- a/sim/aarch64/cpustate.c
+++ b/sim/aarch64/cpustate.c
@@ -19,6 +19,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/>. */
+/* This must come before any other includes. */
+#include "defs.h"
+
#include <stdio.h>
#include <math.h>
diff --git a/sim/aarch64/cpustate.h b/sim/aarch64/cpustate.h
index c3f2637..b9e1f92 100644
--- a/sim/aarch64/cpustate.h
+++ b/sim/aarch64/cpustate.h
@@ -22,7 +22,6 @@
#ifndef _CPU_STATE_H
#define _CPU_STATE_H
-#include "config.h"
#include <sys/types.h>
#include <stdint.h>
#include <inttypes.h>
diff --git a/sim/aarch64/interp.c b/sim/aarch64/interp.c
index cc3cf6a..fd35f4fa 100644
--- a/sim/aarch64/interp.c
+++ b/sim/aarch64/interp.c
@@ -19,7 +19,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 "config.h"
+/* This must come before any other includes. */
+#include "defs.h"
+
#include <stdio.h>
#include <assert.h>
#include <signal.h>
diff --git a/sim/aarch64/memory.c b/sim/aarch64/memory.c
index aa2f2e5..22caf61 100644
--- a/sim/aarch64/memory.c
+++ b/sim/aarch64/memory.c
@@ -19,7 +19,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 "config.h"
+/* This must come before any other includes. */
+#include "defs.h"
+
#include <sys/types.h>
#include <stdio.h>
#include <stdlib.h>
diff --git a/sim/aarch64/simulator.c b/sim/aarch64/simulator.c
index a839121..be1c298 100644
--- a/sim/aarch64/simulator.c
+++ b/sim/aarch64/simulator.c
@@ -19,7 +19,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 "config.h"
+/* This must come before any other includes. */
+#include "defs.h"
+
#include <stdlib.h>
#include <stdio.h>
#include <string.h>
diff --git a/sim/aarch64/simulator.h b/sim/aarch64/simulator.h
index f80e1f2..5875c84 100644
--- a/sim/aarch64/simulator.h
+++ b/sim/aarch64/simulator.h
@@ -22,7 +22,6 @@
#ifndef _SIMULATOR_H
#define _SIMULATOR_H
-#include "config.h"
#include <sys/types.h>
#include <setjmp.h>
diff --git a/sim/arm/ChangeLog b/sim/arm/ChangeLog
index c85e705..aabdae2 100644
--- a/sim/arm/ChangeLog
+++ b/sim/arm/ChangeLog
@@ -1,5 +1,12 @@
2021-05-16 Mike Frysinger <vapier@gentoo.org>
+ * armcopro.c, armemu.c, arminit.c, armsupp.c, armvirt.c, iwmmxt.c,
+ maverick.c, thumbemu.c: Include defs.h.
+ * armos.c, wrapper.c: Replace config.h include with defs.h.
+ * armdefs.h: Delete config.h include.
+
+2021-05-16 Mike Frysinger <vapier@gentoo.org>
+
* config.in, configure: Regenerate.
2021-05-14 Mike Frysinger <vapier@gentoo.org>
diff --git a/sim/arm/armcopro.c b/sim/arm/armcopro.c
index 9227fc0..5cd33fb 100644
--- a/sim/arm/armcopro.c
+++ b/sim/arm/armcopro.c
@@ -14,6 +14,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/>. */
+/* This must come before any other includes. */
+#include "defs.h"
+
#include "armdefs.h"
#include "armos.h"
#include "armemu.h"
diff --git a/sim/arm/armdefs.h b/sim/arm/armdefs.h
index 68cf199..7df5d022 100644
--- a/sim/arm/armdefs.h
+++ b/sim/arm/armdefs.h
@@ -14,7 +14,6 @@
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 "config.h"
#include <stdio.h>
#include <stdlib.h>
#include <stdint.h>
diff --git a/sim/arm/armemu.c b/sim/arm/armemu.c
index f93ad0c..ab74546 100644
--- a/sim/arm/armemu.c
+++ b/sim/arm/armemu.c
@@ -15,6 +15,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/>. */
+/* This must come before any other includes. */
+#include "defs.h"
+
#include "armdefs.h"
#include "armemu.h"
#include "armos.h"
diff --git a/sim/arm/arminit.c b/sim/arm/arminit.c
index 3a626c8..bc5456f 100644
--- a/sim/arm/arminit.c
+++ b/sim/arm/arminit.c
@@ -14,6 +14,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/>. */
+/* This must come before any other includes. */
+#include "defs.h"
+
#include <string.h>
#include "armdefs.h"
diff --git a/sim/arm/armos.c b/sim/arm/armos.c
index 72bdf59..a3713a5 100644
--- a/sim/arm/armos.c
+++ b/sim/arm/armos.c
@@ -21,7 +21,9 @@
fun, and definign VAILDATE will define SWI 1 to enter SVC mode, and SWI
0x11 to halt the emulator. */
-#include "config.h"
+/* This must come before any other includes. */
+#include "defs.h"
+
#include "ansidecl.h"
#include "libiberty.h"
diff --git a/sim/arm/armsupp.c b/sim/arm/armsupp.c
index 11bb53c..1a5eeaf 100644
--- a/sim/arm/armsupp.c
+++ b/sim/arm/armsupp.c
@@ -14,6 +14,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/>. */
+/* This must come before any other includes. */
+#include "defs.h"
+
#include "armdefs.h"
#include "armemu.h"
#include "ansidecl.h"
diff --git a/sim/arm/armvirt.c b/sim/arm/armvirt.c
index 4f95ed8..ba01a65 100644
--- a/sim/arm/armvirt.c
+++ b/sim/arm/armvirt.c
@@ -22,6 +22,9 @@
freed as they might be needed again. A single area of memory may be
defined to generate aborts. */
+/* This must come before any other includes. */
+#include "defs.h"
+
#include "armos.h"
#include "armdefs.h"
#include "ansidecl.h"
diff --git a/sim/arm/iwmmxt.c b/sim/arm/iwmmxt.c
index 8e81824..c71d06f 100644
--- a/sim/arm/iwmmxt.c
+++ b/sim/arm/iwmmxt.c
@@ -15,6 +15,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/>. */
+/* This must come before any other includes. */
+#include "defs.h"
+
#include <stdlib.h>
#include <string.h>
diff --git a/sim/arm/maverick.c b/sim/arm/maverick.c
index 15041b6..fb62ccd 100644
--- a/sim/arm/maverick.c
+++ b/sim/arm/maverick.c
@@ -15,6 +15,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/>. */
+/* This must come before any other includes. */
+#include "defs.h"
+
#include <assert.h>
#include "armdefs.h"
#include "ansidecl.h"
diff --git a/sim/arm/thumbemu.c b/sim/arm/thumbemu.c
index fa70d5b..6915d23 100644
--- a/sim/arm/thumbemu.c
+++ b/sim/arm/thumbemu.c
@@ -18,6 +18,9 @@
instruction into its corresponding ARM instruction, and using the
existing ARM simulator. */
+/* This must come before any other includes. */
+#include "defs.h"
+
#ifndef MODET /* required for the Thumb instruction support */
#if 1
#error "MODET needs to be defined for the Thumb world to work"
diff --git a/sim/arm/wrapper.c b/sim/arm/wrapper.c
index d25184a..a1147e4 100644
--- a/sim/arm/wrapper.c
+++ b/sim/arm/wrapper.c
@@ -20,7 +20,9 @@
run.c and gdb (when the simulator is linked with gdb).
All simulator interaction should go through this file. */
-#include "config.h"
+/* This must come before any other includes. */
+#include "defs.h"
+
#include <stdio.h>
#include <stdarg.h>
#include <stdlib.h>
diff --git a/sim/avr/ChangeLog b/sim/avr/ChangeLog
index ce09783..2a979aa 100644
--- a/sim/avr/ChangeLog
+++ b/sim/avr/ChangeLog
@@ -1,5 +1,9 @@
2021-05-16 Mike Frysinger <vapier@gentoo.org>
+ * interp.c: Replace config.h include with defs.h.
+
+2021-05-16 Mike Frysinger <vapier@gentoo.org>
+
* config.in, configure: Regenerate.
2021-05-14 Mike Frysinger <vapier@gentoo.org>
diff --git a/sim/avr/interp.c b/sim/avr/interp.c
index df1f6e5..75a10ef 100644
--- a/sim/avr/interp.c
+++ b/sim/avr/interp.c
@@ -17,7 +17,8 @@
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 "config.h"
+/* This must come before any other includes. */
+#include "defs.h"
#include <string.h>
diff --git a/sim/bfin/ChangeLog b/sim/bfin/ChangeLog
index 84e1dd3..c9b64b1 100644
--- a/sim/bfin/ChangeLog
+++ b/sim/bfin/ChangeLog
@@ -1,5 +1,18 @@
2021-05-16 Mike Frysinger <vapier@gentoo.org>
+ * bfin-sim.c, devices.c, dv-bfin_cec.c, dv-bfin_ctimer.c,
+ dv-bfin_dma.c, dv-bfin_dmac.c, dv-bfin_ebiu_amc.c,
+ dv-bfin_ebiu_ddrc.c, dv-bfin_ebiu_sdc.c, dv-bfin_emac.c,
+ dv-bfin_eppi.c, dv-bfin_evt.c, dv-bfin_gpio.c, dv-bfin_gpio2.c,
+ dv-bfin_gptimer.c, dv-bfin_jtag.c, dv-bfin_mmu.c, dv-bfin_nfc.c,
+ dv-bfin_otp.c, dv-bfin_pfmon.c, dv-bfin_pint.c, dv-bfin_pll.c,
+ dv-bfin_ppi.c, dv-bfin_rtc.c, dv-bfin_sic.c, dv-bfin_spi.c,
+ dv-bfin_trace.c, dv-bfin_twi.c, dv-bfin_uart.c, dv-bfin_uart2.c,
+ dv-bfin_wdog.c, dv-bfin_wp.c, dv-eth_phy.c, gui.c, interp.c,
+ machs.c: Replace config.h include with defs.h.
+
+2021-05-16 Mike Frysinger <vapier@gentoo.org>
+
* config.in, configure: Regenerate.
2021-05-14 Mike Frysinger <vapier@gentoo.org>
diff --git a/sim/bfin/bfin-sim.c b/sim/bfin/bfin-sim.c
index 33bbc6e..486fe47 100644
--- a/sim/bfin/bfin-sim.c
+++ b/sim/bfin/bfin-sim.c
@@ -18,7 +18,8 @@
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 "config.h"
+/* This must come before any other includes. */
+#include "defs.h"
#include <stdio.h>
#include <stdlib.h>
diff --git a/sim/bfin/devices.c b/sim/bfin/devices.c
index aadb9bc..97873f6 100644
--- a/sim/bfin/devices.c
+++ b/sim/bfin/devices.c
@@ -18,7 +18,8 @@
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 "config.h"
+/* This must come before any other includes. */
+#include "defs.h"
#include "sim-main.h"
#include "sim-hw.h"
diff --git a/sim/bfin/dv-bfin_cec.c b/sim/bfin/dv-bfin_cec.c
index 2236830..6179b16 100644
--- a/sim/bfin/dv-bfin_cec.c
+++ b/sim/bfin/dv-bfin_cec.c
@@ -18,7 +18,8 @@
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 "config.h"
+/* This must come before any other includes. */
+#include "defs.h"
#include "sim-main.h"
#include "devices.h"
diff --git a/sim/bfin/dv-bfin_ctimer.c b/sim/bfin/dv-bfin_ctimer.c
index beb4a0e..df62d94 100644
--- a/sim/bfin/dv-bfin_ctimer.c
+++ b/sim/bfin/dv-bfin_ctimer.c
@@ -18,7 +18,8 @@
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 "config.h"
+/* This must come before any other includes. */
+#include "defs.h"
#include "sim-main.h"
#include "devices.h"
diff --git a/sim/bfin/dv-bfin_dma.c b/sim/bfin/dv-bfin_dma.c
index e3834d7..d7dc541 100644
--- a/sim/bfin/dv-bfin_dma.c
+++ b/sim/bfin/dv-bfin_dma.c
@@ -18,7 +18,8 @@
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 "config.h"
+/* This must come before any other includes. */
+#include "defs.h"
#include <stdlib.h>
diff --git a/sim/bfin/dv-bfin_dmac.c b/sim/bfin/dv-bfin_dmac.c
index ae720cb..d5c608f 100644
--- a/sim/bfin/dv-bfin_dmac.c
+++ b/sim/bfin/dv-bfin_dmac.c
@@ -18,7 +18,8 @@
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 "config.h"
+/* This must come before any other includes. */
+#include "defs.h"
#include "sim-main.h"
#include "sim-hw.h"
diff --git a/sim/bfin/dv-bfin_ebiu_amc.c b/sim/bfin/dv-bfin_ebiu_amc.c
index 67f557d..29c4c4a 100644
--- a/sim/bfin/dv-bfin_ebiu_amc.c
+++ b/sim/bfin/dv-bfin_ebiu_amc.c
@@ -19,7 +19,8 @@
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 "config.h"
+/* This must come before any other includes. */
+#include "defs.h"
#include "sim-main.h"
#include "devices.h"
diff --git a/sim/bfin/dv-bfin_ebiu_ddrc.c b/sim/bfin/dv-bfin_ebiu_ddrc.c
index 4206c25..4160cb2 100644
--- a/sim/bfin/dv-bfin_ebiu_ddrc.c
+++ b/sim/bfin/dv-bfin_ebiu_ddrc.c
@@ -18,7 +18,8 @@
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 "config.h"
+/* This must come before any other includes. */
+#include "defs.h"
#include "sim-main.h"
#include "devices.h"
diff --git a/sim/bfin/dv-bfin_ebiu_sdc.c b/sim/bfin/dv-bfin_ebiu_sdc.c
index d542f02..4af04dc 100644
--- a/sim/bfin/dv-bfin_ebiu_sdc.c
+++ b/sim/bfin/dv-bfin_ebiu_sdc.c
@@ -18,7 +18,8 @@
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 "config.h"
+/* This must come before any other includes. */
+#include "defs.h"
#include "sim-main.h"
#include "devices.h"
diff --git a/sim/bfin/dv-bfin_emac.c b/sim/bfin/dv-bfin_emac.c
index 249aef6..e5ceedb 100644
--- a/sim/bfin/dv-bfin_emac.c
+++ b/sim/bfin/dv-bfin_emac.c
@@ -18,7 +18,8 @@
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 "config.h"
+/* This must come before any other includes. */
+#include "defs.h"
#include <errno.h>
#include <fcntl.h>
diff --git a/sim/bfin/dv-bfin_eppi.c b/sim/bfin/dv-bfin_eppi.c
index ad36a94..169895d 100644
--- a/sim/bfin/dv-bfin_eppi.c
+++ b/sim/bfin/dv-bfin_eppi.c
@@ -19,7 +19,8 @@
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 "config.h"
+/* This must come before any other includes. */
+#include "defs.h"
#include "sim-main.h"
#include "devices.h"
diff --git a/sim/bfin/dv-bfin_evt.c b/sim/bfin/dv-bfin_evt.c
index c4cf691..e49f480 100644
--- a/sim/bfin/dv-bfin_evt.c
+++ b/sim/bfin/dv-bfin_evt.c
@@ -18,7 +18,8 @@
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 "config.h"
+/* This must come before any other includes. */
+#include "defs.h"
#include "sim-main.h"
#include "devices.h"
diff --git a/sim/bfin/dv-bfin_gpio.c b/sim/bfin/dv-bfin_gpio.c
index 2830aa3..bbcc54f 100644
--- a/sim/bfin/dv-bfin_gpio.c
+++ b/sim/bfin/dv-bfin_gpio.c
@@ -18,7 +18,8 @@
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 "config.h"
+/* This must come before any other includes. */
+#include "defs.h"
#include "sim-main.h"
#include "devices.h"
diff --git a/sim/bfin/dv-bfin_gpio2.c b/sim/bfin/dv-bfin_gpio2.c
index 2933ad1..61c9980 100644
--- a/sim/bfin/dv-bfin_gpio2.c
+++ b/sim/bfin/dv-bfin_gpio2.c
@@ -19,7 +19,8 @@
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 "config.h"
+/* This must come before any other includes. */
+#include "defs.h"
#include "sim-main.h"
#include "devices.h"
diff --git a/sim/bfin/dv-bfin_gptimer.c b/sim/bfin/dv-bfin_gptimer.c
index 8f2b476..3dfa2b5 100644
--- a/sim/bfin/dv-bfin_gptimer.c
+++ b/sim/bfin/dv-bfin_gptimer.c
@@ -18,7 +18,8 @@
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 "config.h"
+/* This must come before any other includes. */
+#include "defs.h"
#include "sim-main.h"
#include "devices.h"
diff --git a/sim/bfin/dv-bfin_jtag.c b/sim/bfin/dv-bfin_jtag.c
index d97b9ea..1262997 100644
--- a/sim/bfin/dv-bfin_jtag.c
+++ b/sim/bfin/dv-bfin_jtag.c
@@ -18,7 +18,8 @@
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 "config.h"
+/* This must come before any other includes. */
+#include "defs.h"
#include "sim-main.h"
#include "devices.h"
diff --git a/sim/bfin/dv-bfin_mmu.c b/sim/bfin/dv-bfin_mmu.c
index cbaaaa2..cadc9df 100644
--- a/sim/bfin/dv-bfin_mmu.c
+++ b/sim/bfin/dv-bfin_mmu.c
@@ -18,7 +18,8 @@
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 "config.h"
+/* This must come before any other includes. */
+#include "defs.h"
#include "sim-main.h"
#include "sim-options.h"
diff --git a/sim/bfin/dv-bfin_nfc.c b/sim/bfin/dv-bfin_nfc.c
index a26cb13..80fe49d 100644
--- a/sim/bfin/dv-bfin_nfc.c
+++ b/sim/bfin/dv-bfin_nfc.c
@@ -18,7 +18,8 @@
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 "config.h"
+/* This must come before any other includes. */
+#include "defs.h"
#include "sim-main.h"
#include "devices.h"
diff --git a/sim/bfin/dv-bfin_otp.c b/sim/bfin/dv-bfin_otp.c
index e11e04e..6cf1c81 100644
--- a/sim/bfin/dv-bfin_otp.c
+++ b/sim/bfin/dv-bfin_otp.c
@@ -18,7 +18,8 @@
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 "config.h"
+/* This must come before any other includes. */
+#include "defs.h"
#include "sim-main.h"
#include "devices.h"
diff --git a/sim/bfin/dv-bfin_pfmon.c b/sim/bfin/dv-bfin_pfmon.c
index 2216c06..bffe67b 100644
--- a/sim/bfin/dv-bfin_pfmon.c
+++ b/sim/bfin/dv-bfin_pfmon.c
@@ -18,7 +18,8 @@
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 "config.h"
+/* This must come before any other includes. */
+#include "defs.h"
#include "sim-main.h"
#include "devices.h"
diff --git a/sim/bfin/dv-bfin_pint.c b/sim/bfin/dv-bfin_pint.c
index 90b3190..b4f4f40 100644
--- a/sim/bfin/dv-bfin_pint.c
+++ b/sim/bfin/dv-bfin_pint.c
@@ -18,7 +18,8 @@
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 "config.h"
+/* This must come before any other includes. */
+#include "defs.h"
#include "sim-main.h"
#include "devices.h"
diff --git a/sim/bfin/dv-bfin_pll.c b/sim/bfin/dv-bfin_pll.c
index 5ba1a6a..e2a5f5c 100644
--- a/sim/bfin/dv-bfin_pll.c
+++ b/sim/bfin/dv-bfin_pll.c
@@ -18,7 +18,8 @@
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 "config.h"
+/* This must come before any other includes. */
+#include "defs.h"
#include "sim-main.h"
#include "machs.h"
diff --git a/sim/bfin/dv-bfin_ppi.c b/sim/bfin/dv-bfin_ppi.c
index e319df9..a67dc5e 100644
--- a/sim/bfin/dv-bfin_ppi.c
+++ b/sim/bfin/dv-bfin_ppi.c
@@ -19,7 +19,8 @@
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 "config.h"
+/* This must come before any other includes. */
+#include "defs.h"
#include "sim-main.h"
#include "devices.h"
diff --git a/sim/bfin/dv-bfin_rtc.c b/sim/bfin/dv-bfin_rtc.c
index 5486ac8..06ae424 100644
--- a/sim/bfin/dv-bfin_rtc.c
+++ b/sim/bfin/dv-bfin_rtc.c
@@ -18,7 +18,8 @@
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 "config.h"
+/* This must come before any other includes. */
+#include "defs.h"
#include <time.h>
#include "sim-main.h"
diff --git a/sim/bfin/dv-bfin_sic.c b/sim/bfin/dv-bfin_sic.c
index 94e55f2..cc90a4c 100644
--- a/sim/bfin/dv-bfin_sic.c
+++ b/sim/bfin/dv-bfin_sic.c
@@ -18,7 +18,8 @@
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 "config.h"
+/* This must come before any other includes. */
+#include "defs.h"
#include "sim-main.h"
#include "devices.h"
diff --git a/sim/bfin/dv-bfin_spi.c b/sim/bfin/dv-bfin_spi.c
index 8fdd9db..c0869fc 100644
--- a/sim/bfin/dv-bfin_spi.c
+++ b/sim/bfin/dv-bfin_spi.c
@@ -18,7 +18,8 @@
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 "config.h"
+/* This must come before any other includes. */
+#include "defs.h"
#include "sim-main.h"
#include "devices.h"
diff --git a/sim/bfin/dv-bfin_trace.c b/sim/bfin/dv-bfin_trace.c
index ab8220f..56fad63 100644
--- a/sim/bfin/dv-bfin_trace.c
+++ b/sim/bfin/dv-bfin_trace.c
@@ -18,7 +18,8 @@
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 "config.h"
+/* This must come before any other includes. */
+#include "defs.h"
#include "sim-main.h"
#include "devices.h"
diff --git a/sim/bfin/dv-bfin_twi.c b/sim/bfin/dv-bfin_twi.c
index 87794f5..00b080f 100644
--- a/sim/bfin/dv-bfin_twi.c
+++ b/sim/bfin/dv-bfin_twi.c
@@ -18,7 +18,8 @@
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 "config.h"
+/* This must come before any other includes. */
+#include "defs.h"
#include "sim-main.h"
#include "devices.h"
diff --git a/sim/bfin/dv-bfin_uart.c b/sim/bfin/dv-bfin_uart.c
index d013621..7aa8430 100644
--- a/sim/bfin/dv-bfin_uart.c
+++ b/sim/bfin/dv-bfin_uart.c
@@ -19,7 +19,8 @@
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 "config.h"
+/* This must come before any other includes. */
+#include "defs.h"
#include "sim-main.h"
#include "dv-sockser.h"
diff --git a/sim/bfin/dv-bfin_uart2.c b/sim/bfin/dv-bfin_uart2.c
index 2fd5401..a798588 100644
--- a/sim/bfin/dv-bfin_uart2.c
+++ b/sim/bfin/dv-bfin_uart2.c
@@ -19,7 +19,8 @@
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 "config.h"
+/* This must come before any other includes. */
+#include "defs.h"
#include "sim-main.h"
#include "devices.h"
diff --git a/sim/bfin/dv-bfin_wdog.c b/sim/bfin/dv-bfin_wdog.c
index 4be19aa..850ae06 100644
--- a/sim/bfin/dv-bfin_wdog.c
+++ b/sim/bfin/dv-bfin_wdog.c
@@ -18,7 +18,8 @@
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 "config.h"
+/* This must come before any other includes. */
+#include "defs.h"
#include "sim-main.h"
#include "dv-sockser.h"
diff --git a/sim/bfin/dv-bfin_wp.c b/sim/bfin/dv-bfin_wp.c
index 28626a5..189c121 100644
--- a/sim/bfin/dv-bfin_wp.c
+++ b/sim/bfin/dv-bfin_wp.c
@@ -18,7 +18,8 @@
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 "config.h"
+/* This must come before any other includes. */
+#include "defs.h"
#include "sim-main.h"
#include "devices.h"
diff --git a/sim/bfin/dv-eth_phy.c b/sim/bfin/dv-eth_phy.c
index 14aafee..4860542 100644
--- a/sim/bfin/dv-eth_phy.c
+++ b/sim/bfin/dv-eth_phy.c
@@ -18,7 +18,8 @@
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 "config.h"
+/* This must come before any other includes. */
+#include "defs.h"
#include "sim-main.h"
#include "devices.h"
diff --git a/sim/bfin/gui.c b/sim/bfin/gui.c
index 029a22e..8e84d2d 100644
--- a/sim/bfin/gui.c
+++ b/sim/bfin/gui.c
@@ -18,7 +18,8 @@
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 "config.h"
+/* This must come before any other includes. */
+#include "defs.h"
#ifdef HAVE_SDL
# include <SDL.h>
diff --git a/sim/bfin/interp.c b/sim/bfin/interp.c
index aa5c245..8e3a121 100644
--- a/sim/bfin/interp.c
+++ b/sim/bfin/interp.c
@@ -18,7 +18,8 @@
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 "config.h"
+/* This must come before any other includes. */
+#include "defs.h"
#include <stdio.h>
#include <stdlib.h>
diff --git a/sim/bfin/machs.c b/sim/bfin/machs.c
index a2060e8..e94af5d 100644
--- a/sim/bfin/machs.c
+++ b/sim/bfin/machs.c
@@ -18,7 +18,8 @@
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 "config.h"
+/* This must come before any other includes. */
+#include "defs.h"
#include <stdlib.h>
diff --git a/sim/bpf/ChangeLog b/sim/bpf/ChangeLog
index 689c76b..69156e6 100644
--- a/sim/bpf/ChangeLog
+++ b/sim/bpf/ChangeLog
@@ -1,5 +1,9 @@
2021-05-16 Mike Frysinger <vapier@gentoo.org>
+ * bpf-helpers.c, bpf.c, sim-if.c, traps.c: Include defs.h.
+
+2021-05-16 Mike Frysinger <vapier@gentoo.org>
+
* config.in, configure: Regenerate.
2021-05-04 Mike Frysinger <vapier@gentoo.org>
diff --git a/sim/bpf/bpf-helpers.c b/sim/bpf/bpf-helpers.c
index d7760d5..c308812 100644
--- a/sim/bpf/bpf-helpers.c
+++ b/sim/bpf/bpf-helpers.c
@@ -21,6 +21,9 @@
implementation of the helpers, which can be customized by the
user. */
+/* This must come before any other includes. */
+#include "defs.h"
+
#define WANT_CPU_BPFBF
#define WANT_CPU bpfbf
diff --git a/sim/bpf/bpf.c b/sim/bpf/bpf.c
index a0cc803..c626781 100644
--- a/sim/bpf/bpf.c
+++ b/sim/bpf/bpf.c
@@ -16,6 +16,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/>. */
+/* This must come before any other includes. */
+#include "defs.h"
+
#define WANT_CPU_BPFBF
#define WANT_CPU bpfbf
diff --git a/sim/bpf/sim-if.c b/sim/bpf/sim-if.c
index c2c01fc..185e96d 100644
--- a/sim/bpf/sim-if.c
+++ b/sim/bpf/sim-if.c
@@ -16,6 +16,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/>. */
+/* This must come before any other includes. */
+#include "defs.h"
+
#include <stdlib.h>
#include "sim-main.h"
diff --git a/sim/bpf/traps.c b/sim/bpf/traps.c
index b58d17f..85da1cb 100644
--- a/sim/bpf/traps.c
+++ b/sim/bpf/traps.c
@@ -16,6 +16,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/>. */
+/* This must come before any other includes. */
+#include "defs.h"
+
#define WANT_CPU bpfbf
#define WANT_CPU_BPFBF
diff --git a/sim/common/ChangeLog b/sim/common/ChangeLog
index b221166..1d875bb 100644
--- a/sim/common/ChangeLog
+++ b/sim/common/ChangeLog
@@ -1,3 +1,24 @@
+2021-05-16 Mike Frysinger <vapier@gentoo.org>
+
+ * callback.c: Replace config.h include with defs.h.
+ * cgen-accfp.c, cgen-fpu.c, cgen-par.c, cgen-run.c, cgen-scache.c,
+ dv-core.c, dv-glue.c, genmloop.sh, hw-alloc.c, hw-base.c, hw-device.c,
+ hw-events.c, hw-handles.c, hw-instances.c, hw-ports.c,
+ hw-properties.c, hw-tree.c, sim-abort.c, sim-arange.c, sim-bits.c,
+ sim-close.c, sim-command.c, sim-config.c, sim-core.c, sim-cpu.c,
+ sim-endian.c, sim-engine.c, sim-events.c, sim-fpu.c, sim-hload.c,
+ sim-hrw.c, sim-hw.c, sim-info.c, sim-inline.c, sim-model.c,
+ sim-profile.c, sim-reason.c, sim-reg.c, sim-resume.c, sim-run.c,
+ sim-signal.c, sim-stop.c, sim-trace.c, sim-utils.c: Include defs.h.
+ * cgen-trace.c, cgen-utils.c, dv-cfi.c, dv-pal.c, dv-sockser.c,
+ nrun.c, sim-basics.h, sim-load.c, sim-memopt.c, sim-module.c,
+ sim-options.c, sim-syscall.c, sim-watch.c, syscall.c: Replace
+ config.h include with defs.h.
+ * gentmap.c (gen_targ_map_c): Replace config.h with defs.h.
+ * sim-io.c: Include defs.h.
+ (open): Undefine.
+ * defs.h: New file.
+
2021-05-15 Mike Frysinger <vapier@gentoo.org>
* nrun.c: Include environ.h.
diff --git a/sim/common/callback.c b/sim/common/callback.c
index 24ea470..f2587a4 100644
--- a/sim/common/callback.c
+++ b/sim/common/callback.c
@@ -20,9 +20,9 @@
/* This file provides a standard way for targets to talk to the host OS
level. */
-#ifdef HAVE_CONFIG_H
-#include "config.h"
-#endif
+/* This must come before any other includes. */
+#include "defs.h"
+
#include "ansidecl.h"
#include <stdarg.h>
#include <stdio.h>
diff --git a/sim/common/cgen-accfp.c b/sim/common/cgen-accfp.c
index d6cd751..345cfe8 100644
--- a/sim/common/cgen-accfp.c
+++ b/sim/common/cgen-accfp.c
@@ -11,6 +11,9 @@
- proper rounding
*/
+/* This must come before any other includes. */
+#include "defs.h"
+
#include "sim-main.h"
#include "sim-fpu.h"
diff --git a/sim/common/cgen-fpu.c b/sim/common/cgen-fpu.c
index 3a8d519..1b035ea 100644
--- a/sim/common/cgen-fpu.c
+++ b/sim/common/cgen-fpu.c
@@ -1,6 +1,9 @@
/* CGEN fpu support
Copyright (C) 1999 Cygnus Solutions. */
+/* This must come before any other includes. */
+#include "defs.h"
+
#include "sim-main.h"
#include "sim-fpu.h"
diff --git a/sim/common/cgen-par.c b/sim/common/cgen-par.c
index 4cf0388..b535edf 100644
--- a/sim/common/cgen-par.c
+++ b/sim/common/cgen-par.c
@@ -17,6 +17,9 @@ GNU General Public License for more details.
You should have received a copy of the GNU General Public License
along with this program. If not, see <http://www.gnu.org/licenses/>. */
+/* This must come before any other includes. */
+#include "defs.h"
+
#include "sim-main.h"
#include <stdlib.h>
#include "cgen-mem.h"
diff --git a/sim/common/cgen-run.c b/sim/common/cgen-run.c
index 1458c4e..443b62a 100644
--- a/sim/common/cgen-run.c
+++ b/sim/common/cgen-run.c
@@ -33,6 +33,9 @@ along with this program. If not, see <http://www.gnu.org/licenses/>. */
When the framework is more modular, this can be.
*/
+/* This must come before any other includes. */
+#include "defs.h"
+
#include "sim-main.h"
#include "sim-assert.h"
diff --git a/sim/common/cgen-scache.c b/sim/common/cgen-scache.c
index 56df075f..f1c7571 100644
--- a/sim/common/cgen-scache.c
+++ b/sim/common/cgen-scache.c
@@ -17,6 +17,9 @@ GNU General Public License for more details.
You should have received a copy of the GNU General Public License
along with this program. If not, see <http://www.gnu.org/licenses/>. */
+/* This must come before any other includes. */
+#include "defs.h"
+
#define SCACHE_DEFINE_INLINE
#include "sim-main.h"
diff --git a/sim/common/cgen-trace.c b/sim/common/cgen-trace.c
index ea0399f..66250c0 100644
--- a/sim/common/cgen-trace.c
+++ b/sim/common/cgen-trace.c
@@ -17,7 +17,9 @@ GNU General Public License for more details.
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 "config.h"
+/* This must come before any other includes. */
+#include "defs.h"
+
#include <errno.h>
#include <stdlib.h>
#include "dis-asm.h"
diff --git a/sim/common/cgen-utils.c b/sim/common/cgen-utils.c
index 602abcb..890ed02 100644
--- a/sim/common/cgen-utils.c
+++ b/sim/common/cgen-utils.c
@@ -17,7 +17,9 @@ GNU General Public License for more details.
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 "config.h"
+/* This must come before any other includes. */
+#include "defs.h"
+
#include "bfd.h"
#include "sim-main.h"
#include "dis-asm.h"
diff --git a/sim/common/defs.h b/sim/common/defs.h
new file mode 100644
index 0000000..3a0737c
--- /dev/null
+++ b/sim/common/defs.h
@@ -0,0 +1,30 @@
+/* The configure generated header settings.
+
+ Copyright 2002-2021 Free Software Foundation, Inc.
+
+ This program is free software; you can redistribute it and/or modify
+ it under the terms of the GNU General Public License as published by
+ the Free Software Foundation; either version 3 of the License, or
+ (at your option) any later version.
+
+ This program is distributed in the hope that it will be useful,
+ but WITHOUT ANY WARRANTY; without even the implied warranty of
+ MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+ GNU General Public License for more details.
+
+ You should have received a copy of the GNU General Public License
+ along with this program. If not, see <http://www.gnu.org/licenses/>. */
+
+/* This file should be included by every .c file before any other header. */
+
+#ifndef DEFS_H
+#define DEFS_H
+
+#ifdef HAVE_CONFIG_H
+
+/* Include sim's various configure tests. */
+#include "config.h"
+
+#endif
+
+#endif
diff --git a/sim/common/dv-cfi.c b/sim/common/dv-cfi.c
index b865227..02a2ced 100644
--- a/sim/common/dv-cfi.c
+++ b/sim/common/dv-cfi.c
@@ -22,7 +22,8 @@
/* TODO: support vendor query tables. */
-#include "config.h"
+/* This must come before any other includes. */
+#include "defs.h"
#include <math.h>
#include <errno.h>
diff --git a/sim/common/dv-core.c b/sim/common/dv-core.c
index be56aa4..c596da4 100644
--- a/sim/common/dv-core.c
+++ b/sim/common/dv-core.c
@@ -19,6 +19,8 @@
You should have received a copy of the GNU General Public License
along with this program. If not, see <http://www.gnu.org/licenses/>. */
+/* This must come before any other includes. */
+#include "defs.h"
#include "sim-main.h"
#include "hw-main.h"
diff --git a/sim/common/dv-glue.c b/sim/common/dv-glue.c
index 8bda326..7c8e1f8 100644
--- a/sim/common/dv-glue.c
+++ b/sim/common/dv-glue.c
@@ -19,6 +19,8 @@
You should have received a copy of the GNU General Public License
along with this program. If not, see <http://www.gnu.org/licenses/>. */
+/* This must come before any other includes. */
+#include "defs.h"
#include "hw-main.h"
diff --git a/sim/common/dv-pal.c b/sim/common/dv-pal.c
index dd4ab4f..c60f524 100644
--- a/sim/common/dv-pal.c
+++ b/sim/common/dv-pal.c
@@ -19,7 +19,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 "config.h"
+/* This must come before any other includes. */
+#include "defs.h"
+
#include "sim-main.h"
#include "hw-main.h"
#include "sim-io.h"
diff --git a/sim/common/dv-sockser.c b/sim/common/dv-sockser.c
index 73c473b..ef652f6 100644
--- a/sim/common/dv-sockser.c
+++ b/sim/common/dv-sockser.c
@@ -18,7 +18,9 @@ along with this program. If not, see <http://www.gnu.org/licenses/>. */
/* FIXME: will obviously need to evolve.
- connectionless sockets might be more appropriate. */
-#include "config.h"
+/* This must come before any other includes. */
+#include "defs.h"
+
#include "sim-main.h"
#include <string.h>
diff --git a/sim/common/genmloop.sh b/sim/common/genmloop.sh
index 460a26c..fa4e7b9 100755
--- a/sim/common/genmloop.sh
+++ b/sim/common/genmloop.sh
@@ -301,6 +301,9 @@ exec 1>tmp-mloop-$$.cin
cat << EOF
/* This file is generated by the genmloop script. DO NOT EDIT! */
+/* This must come before any other includes. */
+#include "defs.h"
+
/* Enable switch() support in cgen headers. */
#define SEM_IN_SWITCH
diff --git a/sim/common/gentmap.c b/sim/common/gentmap.c
index 8085c35..254ec3f 100644
--- a/sim/common/gentmap.c
+++ b/sim/common/gentmap.c
@@ -67,7 +67,7 @@ gen_targ_map_c (void)
printf ("/* Target value mapping utilities needed by the simulator and gdb. */\n");
printf ("/* This file is machine generated by gentmap.c. */\n\n");
- printf ("#include \"config.h\"\n");
+ printf ("#include \"defs.h\"\n");
printf ("#include <errno.h>\n");
printf ("#include <fcntl.h>\n");
printf ("#include \"ansidecl.h\"\n");
diff --git a/sim/common/hw-alloc.c b/sim/common/hw-alloc.c
index 141dc21..a16666b 100644
--- a/sim/common/hw-alloc.c
+++ b/sim/common/hw-alloc.c
@@ -17,6 +17,8 @@ GNU General Public License for more details.
You should have received a copy of the GNU General Public License
along with this program. If not, see <http://www.gnu.org/licenses/>. */
+/* This must come before any other includes. */
+#include "defs.h"
#include "hw-main.h"
#include "hw-base.h"
diff --git a/sim/common/hw-base.c b/sim/common/hw-base.c
index af8b181..af4cc50 100644
--- a/sim/common/hw-base.c
+++ b/sim/common/hw-base.c
@@ -19,6 +19,8 @@
You should have received a copy of the GNU General Public License
along with this program. If not, see <http://www.gnu.org/licenses/>. */
+/* This must come before any other includes. */
+#include "defs.h"
#include "hw-main.h"
#include "hw-base.h"
diff --git a/sim/common/hw-device.c b/sim/common/hw-device.c
index bc91264..9b743ea 100644
--- a/sim/common/hw-device.c
+++ b/sim/common/hw-device.c
@@ -19,6 +19,8 @@
You should have received a copy of the GNU General Public License
along with this program. If not, see <http://www.gnu.org/licenses/>. */
+/* This must come before any other includes. */
+#include "defs.h"
#include "hw-main.h"
#include "hw-base.h"
diff --git a/sim/common/hw-events.c b/sim/common/hw-events.c
index 81628f0..620b47d 100644
--- a/sim/common/hw-events.c
+++ b/sim/common/hw-events.c
@@ -17,6 +17,8 @@ GNU General Public License for more details.
You should have received a copy of the GNU General Public License
along with this program. If not, see <http://www.gnu.org/licenses/>. */
+/* This must come before any other includes. */
+#include "defs.h"
#include "hw-main.h"
#include "hw-base.h"
diff --git a/sim/common/hw-handles.c b/sim/common/hw-handles.c
index bbd08f6..fb878e4 100644
--- a/sim/common/hw-handles.c
+++ b/sim/common/hw-handles.c
@@ -19,6 +19,8 @@
You should have received a copy of the GNU General Public License
along with this program. If not, see <http://www.gnu.org/licenses/>. */
+/* This must come before any other includes. */
+#include "defs.h"
#include "hw-main.h"
#include "hw-base.h"
diff --git a/sim/common/hw-instances.c b/sim/common/hw-instances.c
index 6227c0a..9d78619 100644
--- a/sim/common/hw-instances.c
+++ b/sim/common/hw-instances.c
@@ -19,6 +19,8 @@
You should have received a copy of the GNU General Public License
along with this program. If not, see <http://www.gnu.org/licenses/>. */
+/* This must come before any other includes. */
+#include "defs.h"
#include "hw-main.h"
#include "hw-base.h"
diff --git a/sim/common/hw-ports.c b/sim/common/hw-ports.c
index 50e2cbc..fbc7278 100644
--- a/sim/common/hw-ports.c
+++ b/sim/common/hw-ports.c
@@ -17,6 +17,8 @@ GNU General Public License for more details.
You should have received a copy of the GNU General Public License
along with this program. If not, see <http://www.gnu.org/licenses/>. */
+/* This must come before any other includes. */
+#include "defs.h"
#include "hw-main.h"
#include "hw-base.h"
diff --git a/sim/common/hw-properties.c b/sim/common/hw-properties.c
index 11a371c..3836aa7 100644
--- a/sim/common/hw-properties.c
+++ b/sim/common/hw-properties.c
@@ -19,6 +19,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/>. */
+/* This must come before any other includes. */
+#include "defs.h"
+
#include "hw-main.h"
#include "hw-base.h"
diff --git a/sim/common/hw-tree.c b/sim/common/hw-tree.c
index 4d50ec6..1bf4eda 100644
--- a/sim/common/hw-tree.c
+++ b/sim/common/hw-tree.c
@@ -19,6 +19,8 @@
You should have received a copy of the GNU General Public License
along with this program. If not, see <http://www.gnu.org/licenses/>. */
+/* This must come before any other includes. */
+#include "defs.h"
#include "hw-main.h"
#include "hw-base.h"
diff --git a/sim/common/nrun.c b/sim/common/nrun.c
index 8a1b3c1..2cccff6 100644
--- a/sim/common/nrun.c
+++ b/sim/common/nrun.c
@@ -15,9 +15,7 @@ You should have received a copy of the GNU General Public License
along with this program. If not, see <http://www.gnu.org/licenses/>. */
/* Need to be before general includes, to pick up e.g. _GNU_SOURCE. */
-#ifdef HAVE_CONFIG_H
-#include "config.h"
-#endif
+#include "defs.h"
#include <signal.h>
#include <stdlib.h>
diff --git a/sim/common/sim-abort.c b/sim/common/sim-abort.c
index bf05504..06df127 100644
--- a/sim/common/sim-abort.c
+++ b/sim/common/sim-abort.c
@@ -17,6 +17,9 @@ GNU General Public License for more details.
You should have received a copy of the GNU General Public License
along with this program. If not, see <http://www.gnu.org/licenses/>. */
+/* This must come before any other includes. */
+#include "defs.h"
+
#include <stdio.h>
#include <stdlib.h>
diff --git a/sim/common/sim-arange.c b/sim/common/sim-arange.c
index a40dabb..5a28a2c 100644
--- a/sim/common/sim-arange.c
+++ b/sim/common/sim-arange.c
@@ -20,6 +20,9 @@ along with this program. If not, see <http://www.gnu.org/licenses/>. */
#ifndef _SIM_ARANGE_C_
#define _SIM_ARANGE_C_
+/* This must come before any other includes. */
+#include "defs.h"
+
#include "libiberty.h"
#include "sim-basics.h"
#include "sim-arange.h"
diff --git a/sim/common/sim-basics.h b/sim/common/sim-basics.h
index 7d9c831..25c1193 100644
--- a/sim/common/sim-basics.h
+++ b/sim/common/sim-basics.h
@@ -26,9 +26,7 @@
/* Basic configuration */
-#ifdef HAVE_CONFIG_H
-#include "config.h"
-#endif
+#include "defs.h"
/* Basic host dependant mess - hopefully <stdio.h> + <stdarg.h> will
bring potential conflicts out in the open */
diff --git a/sim/common/sim-bits.c b/sim/common/sim-bits.c
index 9e9063c..4be0752 100644
--- a/sim/common/sim-bits.c
+++ b/sim/common/sim-bits.c
@@ -23,6 +23,9 @@
#ifndef _SIM_BITS_C_
#define _SIM_BITS_C_
+/* This must come before any other includes. */
+#include "defs.h"
+
#include "sim-basics.h"
#include "sim-assert.h"
#include "sim-io.h"
diff --git a/sim/common/sim-close.c b/sim/common/sim-close.c
index e64d59e..c774d45 100644
--- a/sim/common/sim-close.c
+++ b/sim/common/sim-close.c
@@ -18,6 +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/>. */
+/* This must come before any other includes. */
+#include "defs.h"
+
#include "sim-main.h"
#include "sim-module.h"
#include "sim/sim.h"
diff --git a/sim/common/sim-command.c b/sim/common/sim-command.c
index d49ac8a..b5ba2c0 100644
--- a/sim/common/sim-command.c
+++ b/sim/common/sim-command.c
@@ -18,6 +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/>. */
+/* This must come before any other includes. */
+#include "defs.h"
+
#include "sim-main.h"
#include "sim-options.h"
#include "sim-utils.h"
diff --git a/sim/common/sim-config.c b/sim/common/sim-config.c
index 2acd1e4..df99d6a 100644
--- a/sim/common/sim-config.c
+++ b/sim/common/sim-config.c
@@ -19,6 +19,8 @@
You should have received a copy of the GNU General Public License
along with this program. If not, see <http://www.gnu.org/licenses/>. */
+/* This must come before any other includes. */
+#include "defs.h"
#include "sim-main.h"
#include "sim-assert.h"
diff --git a/sim/common/sim-core.c b/sim/common/sim-core.c
index 222f9fd..6604f31 100644
--- a/sim/common/sim-core.c
+++ b/sim/common/sim-core.c
@@ -23,6 +23,9 @@
#ifndef SIM_CORE_C
#define SIM_CORE_C
+/* This must come before any other includes. */
+#include "defs.h"
+
#include "sim-main.h"
#include "sim-assert.h"
#include "libiberty.h"
diff --git a/sim/common/sim-cpu.c b/sim/common/sim-cpu.c
index 552e48c..587a3e8 100644
--- a/sim/common/sim-cpu.c
+++ b/sim/common/sim-cpu.c
@@ -17,6 +17,9 @@ GNU General Public License for more details.
You should have received a copy of the GNU General Public License
along with this program. If not, see <http://www.gnu.org/licenses/>. */
+/* This must come before any other includes. */
+#include "defs.h"
+
#include <stdlib.h>
#include "sim-main.h"
diff --git a/sim/common/sim-endian.c b/sim/common/sim-endian.c
index 395b487..5f0e46a 100644
--- a/sim/common/sim-endian.c
+++ b/sim/common/sim-endian.c
@@ -23,6 +23,9 @@
#ifndef _SIM_ENDIAN_C_
#define _SIM_ENDIAN_C_
+/* This must come before any other includes. */
+#include "defs.h"
+
#include "sim-basics.h"
#include "sim-assert.h"
diff --git a/sim/common/sim-engine.c b/sim/common/sim-engine.c
index fcdf284..a5f84af 100644
--- a/sim/common/sim-engine.c
+++ b/sim/common/sim-engine.c
@@ -17,6 +17,9 @@ GNU General Public License for more details.
You should have received a copy of the GNU General Public License
along with this program. If not, see <http://www.gnu.org/licenses/>. */
+/* This must come before any other includes. */
+#include "defs.h"
+
#include "sim-main.h"
#include "sim-assert.h"
diff --git a/sim/common/sim-events.c b/sim/common/sim-events.c
index 60e4c55..5a5798d 100644
--- a/sim/common/sim-events.c
+++ b/sim/common/sim-events.c
@@ -23,6 +23,9 @@
#ifndef _SIM_EVENTS_C_
#define _SIM_EVENTS_C_
+/* This must come before any other includes. */
+#include "defs.h"
+
#include "sim-main.h"
#include "sim-assert.h"
#include "sim-cpu.h"
diff --git a/sim/common/sim-fpu.c b/sim/common/sim-fpu.c
index bff5b08..fe8ecf8 100644
--- a/sim/common/sim-fpu.c
+++ b/sim/common/sim-fpu.c
@@ -35,6 +35,9 @@ along with this program. If not, see <http://www.gnu.org/licenses/>. */
#ifndef SIM_FPU_C
#define SIM_FPU_C
+/* This must come before any other includes. */
+#include "defs.h"
+
#include "sim-basics.h"
#include "sim-fpu.h"
diff --git a/sim/common/sim-hload.c b/sim/common/sim-hload.c
index 243437d..f33dcf6 100644
--- a/sim/common/sim-hload.c
+++ b/sim/common/sim-hload.c
@@ -17,6 +17,9 @@ GNU General Public License for more details.
You should have received a copy of the GNU General Public License
along with this program. If not, see <http://www.gnu.org/licenses/>. */
+/* This must come before any other includes. */
+#include "defs.h"
+
#include "sim-main.h"
#include "bfd.h"
#include "sim-utils.h"
diff --git a/sim/common/sim-hrw.c b/sim/common/sim-hrw.c
index 920cc16..3df91d2 100644
--- a/sim/common/sim-hrw.c
+++ b/sim/common/sim-hrw.c
@@ -17,6 +17,9 @@ GNU General Public License for more details.
You should have received a copy of the GNU General Public License
along with this program. If not, see <http://www.gnu.org/licenses/>. */
+/* This must come before any other includes. */
+#include "defs.h"
+
#include "sim-main.h"
#include "sim-assert.h"
diff --git a/sim/common/sim-hw.c b/sim/common/sim-hw.c
index 984817f..95d9504 100644
--- a/sim/common/sim-hw.c
+++ b/sim/common/sim-hw.c
@@ -17,6 +17,9 @@ GNU General Public License for more details.
You should have received a copy of the GNU General Public License
along with this program. If not, see <http://www.gnu.org/licenses/>. */
+/* This must come before any other includes. */
+#include "defs.h"
+
#include "sim-main.h"
#include "sim-assert.h"
#include "sim-options.h"
diff --git a/sim/common/sim-info.c b/sim/common/sim-info.c
index 7dcb656..3c92c87 100644
--- a/sim/common/sim-info.c
+++ b/sim/common/sim-info.c
@@ -17,6 +17,9 @@ GNU General Public License for more details.
You should have received a copy of the GNU General Public License
along with this program. If not, see <http://www.gnu.org/licenses/>. */
+/* This must come before any other includes. */
+#include "defs.h"
+
#include "sim-main.h"
#include "sim-assert.h"
diff --git a/sim/common/sim-inline.c b/sim/common/sim-inline.c
index 93ea6f0..7c3edd0 100644
--- a/sim/common/sim-inline.c
+++ b/sim/common/sim-inline.c
@@ -26,6 +26,9 @@
#undef SIM_INLINE_P
#define SIM_INLINE_P 1
+/* This must come before any other includes. */
+#include "defs.h"
+
#include "sim-inline.h"
#include "sim-main.h"
diff --git a/sim/common/sim-io.c b/sim/common/sim-io.c
index edef26e..b5e874b 100644
--- a/sim/common/sim-io.c
+++ b/sim/common/sim-io.c
@@ -19,6 +19,8 @@
You should have received a copy of the GNU General Public License
along with this program. If not, see <http://www.gnu.org/licenses/>. */
+/* This must come before any other includes. */
+#include "defs.h"
#include "sim-main.h"
#include "sim-io.h"
@@ -35,6 +37,8 @@
#include <stdlib.h>
+#undef open
+
/* Define the rate at which the simulator should poll the host
for a quit. */
#ifndef POLL_QUIT_INTERVAL
diff --git a/sim/common/sim-load.c b/sim/common/sim-load.c
index b9d85ca..3ea50e7 100644
--- a/sim/common/sim-load.c
+++ b/sim/common/sim-load.c
@@ -18,9 +18,9 @@ along with this program. If not, see <http://www.gnu.org/licenses/>. */
as it is used by simulators that don't use it [though that doesn't mean
to suggest that they shouldn't :-)]. */
-#ifdef HAVE_CONFIG_H
-#include "config.h"
-#endif
+/* This must come before any other includes. */
+#include "defs.h"
+
#include "ansidecl.h"
#include <stdio.h> /* for NULL */
#include <stdarg.h>
diff --git a/sim/common/sim-memopt.c b/sim/common/sim-memopt.c
index a102d74..636f6a9 100644
--- a/sim/common/sim-memopt.c
+++ b/sim/common/sim-memopt.c
@@ -17,7 +17,8 @@ GNU General Public License for more details.
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 "config.h"
+/* This must come before any other includes. */
+#include "defs.h"
#include "sim-main.h"
#include "sim-assert.h"
diff --git a/sim/common/sim-model.c b/sim/common/sim-model.c
index 5596656..e1af9d4 100644
--- a/sim/common/sim-model.c
+++ b/sim/common/sim-model.c
@@ -17,6 +17,9 @@ GNU General Public License for more details.
You should have received a copy of the GNU General Public License
along with this program. If not, see <http://www.gnu.org/licenses/>. */
+/* This must come before any other includes. */
+#include "defs.h"
+
#include "sim-main.h"
#include "sim-model.h"
#include "libiberty.h"
diff --git a/sim/common/sim-module.c b/sim/common/sim-module.c
index 3bb7db0..97d619c 100644
--- a/sim/common/sim-module.c
+++ b/sim/common/sim-module.c
@@ -19,7 +19,9 @@ GNU General Public License for more details.
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 "config.h"
+/* This must come before any other includes. */
+#include "defs.h"
+
#include "sim-main.h"
#include "sim-io.h"
#include "sim-options.h"
diff --git a/sim/common/sim-options.c b/sim/common/sim-options.c
index ff325e6..06bd582 100644
--- a/sim/common/sim-options.c
+++ b/sim/common/sim-options.c
@@ -17,7 +17,9 @@ GNU General Public License for more details.
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 "config.h"
+/* This must come before any other includes. */
+#include "defs.h"
+
#include "sim-main.h"
#include <string.h>
#include <stdlib.h>
diff --git a/sim/common/sim-profile.c b/sim/common/sim-profile.c
index 455e1a2..f2d65e0 100644
--- a/sim/common/sim-profile.c
+++ b/sim/common/sim-profile.c
@@ -17,6 +17,9 @@ GNU General Public License for more details.
You should have received a copy of the GNU General Public License
along with this program. If not, see <http://www.gnu.org/licenses/>. */
+/* This must come before any other includes. */
+#include "defs.h"
+
#include "sim-main.h"
#include "sim-io.h"
#include "sim-options.h"
diff --git a/sim/common/sim-reason.c b/sim/common/sim-reason.c
index 0f128c2..73a5765 100644
--- a/sim/common/sim-reason.c
+++ b/sim/common/sim-reason.c
@@ -17,6 +17,9 @@ GNU General Public License for more details.
You should have received a copy of the GNU General Public License
along with this program. If not, see <http://www.gnu.org/licenses/>. */
+/* This must come before any other includes. */
+#include "defs.h"
+
#include "sim-main.h"
#include "sim-assert.h"
diff --git a/sim/common/sim-reg.c b/sim/common/sim-reg.c
index 457ac22..ee34088 100644
--- a/sim/common/sim-reg.c
+++ b/sim/common/sim-reg.c
@@ -17,6 +17,9 @@ GNU General Public License for more details.
You should have received a copy of the GNU General Public License
along with this program. If not, see <http://www.gnu.org/licenses/>. */
+/* This must come before any other includes. */
+#include "defs.h"
+
#include "sim-main.h"
#include "sim-assert.h"
diff --git a/sim/common/sim-resume.c b/sim/common/sim-resume.c
index 6fe9a42..8f854da 100644
--- a/sim/common/sim-resume.c
+++ b/sim/common/sim-resume.c
@@ -17,6 +17,9 @@ GNU General Public License for more details.
You should have received a copy of the GNU General Public License
along with this program. If not, see <http://www.gnu.org/licenses/>. */
+/* This must come before any other includes. */
+#include "defs.h"
+
#include "sim-main.h"
#include "sim-assert.h"
diff --git a/sim/common/sim-run.c b/sim/common/sim-run.c
index 54f6286..f2e477e 100644
--- a/sim/common/sim-run.c
+++ b/sim/common/sim-run.c
@@ -17,6 +17,9 @@ GNU General Public License for more details.
You should have received a copy of the GNU General Public License
along with this program. If not, see <http://www.gnu.org/licenses/>. */
+/* This must come before any other includes. */
+#include "defs.h"
+
#include "sim-main.h"
#include "sim-assert.h"
diff --git a/sim/common/sim-signal.c b/sim/common/sim-signal.c
index 9596847..f9fef4c 100644
--- a/sim/common/sim-signal.c
+++ b/sim/common/sim-signal.c
@@ -17,6 +17,9 @@ GNU General Public License for more details.
You should have received a copy of the GNU General Public License
along with this program. If not, see <http://www.gnu.org/licenses/>. */
+/* This must come before any other includes. */
+#include "defs.h"
+
#include <signal.h>
#include "sim-main.h"
diff --git a/sim/common/sim-stop.c b/sim/common/sim-stop.c
index 305c455..aa48fc3 100644
--- a/sim/common/sim-stop.c
+++ b/sim/common/sim-stop.c
@@ -17,6 +17,9 @@ GNU General Public License for more details.
You should have received a copy of the GNU General Public License
along with this program. If not, see <http://www.gnu.org/licenses/>. */
+/* This must come before any other includes. */
+#include "defs.h"
+
#include "sim-main.h"
#include "sim-assert.h"
diff --git a/sim/common/sim-syscall.c b/sim/common/sim-syscall.c
index 9dbc71a..0f7601c 100644
--- a/sim/common/sim-syscall.c
+++ b/sim/common/sim-syscall.c
@@ -17,7 +17,8 @@
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 "config.h"
+/* This must come before any other includes. */
+#include "defs.h"
#include <errno.h>
diff --git a/sim/common/sim-trace.c b/sim/common/sim-trace.c
index 26d9556..b8224e0 100644
--- a/sim/common/sim-trace.c
+++ b/sim/common/sim-trace.c
@@ -17,6 +17,9 @@ GNU General Public License for more details.
You should have received a copy of the GNU General Public License
along with this program. If not, see <http://www.gnu.org/licenses/>. */
+/* This must come before any other includes. */
+#include "defs.h"
+
#include "sim-main.h"
#include "sim-io.h"
#include "sim-options.h"
diff --git a/sim/common/sim-utils.c b/sim/common/sim-utils.c
index 86ab059..abb87f8 100644
--- a/sim/common/sim-utils.c
+++ b/sim/common/sim-utils.c
@@ -17,6 +17,9 @@ GNU General Public License for more details.
You should have received a copy of the GNU General Public License
along with this program. If not, see <http://www.gnu.org/licenses/>. */
+/* This must come before any other includes. */
+#include "defs.h"
+
#include "sim-main.h"
#include "sim-assert.h"
diff --git a/sim/common/sim-watch.c b/sim/common/sim-watch.c
index 8630b06..fa035b3 100644
--- a/sim/common/sim-watch.c
+++ b/sim/common/sim-watch.c
@@ -17,7 +17,9 @@ GNU General Public License for more details.
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 "config.h"
+/* This must come before any other includes. */
+#include "defs.h"
+
#include "sim-main.h"
#include "sim-options.h"
#include "libiberty.h"
diff --git a/sim/common/syscall.c b/sim/common/syscall.c
index 0a1d3f4..4e76d20 100644
--- a/sim/common/syscall.c
+++ b/sim/common/syscall.c
@@ -23,9 +23,9 @@
tree, nor should it live in the gdb source tree. K&R C must be
supported. */
-#ifdef HAVE_CONFIG_H
-#include "config.h"
-#endif
+/* This must come before any other includes. */
+#include "defs.h"
+
#include "ansidecl.h"
#include "libiberty.h"
#include <stdarg.h>
diff --git a/sim/cr16/ChangeLog b/sim/cr16/ChangeLog
index d311b2d..1a7341d 100644
--- a/sim/cr16/ChangeLog
+++ b/sim/cr16/ChangeLog
@@ -1,5 +1,14 @@
2021-05-16 Mike Frysinger <vapier@gentoo.org>
+ * cr16_sim.h: Delete config.h include.
+ * gencode.c: Replace config.h include with defs.h.
+ (write_template): Output defs.h include.
+ (write_opcodes): Likewise.
+ * interp.c: Replace config.h include with defs.h.
+ * simops.c: Include defs.h.
+
+2021-05-16 Mike Frysinger <vapier@gentoo.org>
+
* config.in, configure: Regenerate.
2021-05-14 Mike Frysinger <vapier@gentoo.org>
diff --git a/sim/cr16/cr16_sim.h b/sim/cr16/cr16_sim.h
index c3d590d..a865d09 100644
--- a/sim/cr16/cr16_sim.h
+++ b/sim/cr16/cr16_sim.h
@@ -18,7 +18,6 @@
along with this program. If not, see <http://www.gnu.org/licenses/>. */
-#include "config.h"
#include <stdio.h>
#include <ctype.h>
#include <limits.h>
diff --git a/sim/cr16/gencode.c b/sim/cr16/gencode.c
index 335ab26..30fda93 100644
--- a/sim/cr16/gencode.c
+++ b/sim/cr16/gencode.c
@@ -17,8 +17,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/>. */
+/* This must come before any other includes. */
+#include "defs.h"
-#include "config.h"
#include <stdio.h>
#include <ctype.h>
#include <limits.h>
@@ -67,6 +68,7 @@ write_template (void)
{
int i = 0,j, k, flags;
+ printf ("#include \"defs.h\"\n");
printf ("#include \"sim-main.h\"\n");
printf ("#include \"simops.h\"\n\n");
@@ -131,6 +133,7 @@ write_opcodes (void)
int i = 0, j = 0, k;
/* write out opcode table. */
+ printf ("#include \"defs.h\"\n");
printf ("#include \"sim-main.h\"\n");
printf ("#include \"simops.h\"\n\n");
printf ("struct simops Simops[] = {\n");
diff --git a/sim/cr16/interp.c b/sim/cr16/interp.c
index 7db7f56..7f6b07f 100644
--- a/sim/cr16/interp.c
+++ b/sim/cr16/interp.c
@@ -17,7 +17,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 "config.h"
+/* This must come before any other includes. */
+#include "defs.h"
+
#include <inttypes.h>
#include <signal.h>
#include <stdlib.h>
diff --git a/sim/cr16/simops.c b/sim/cr16/simops.c
index ca96dd0..b383dfa 100644
--- a/sim/cr16/simops.c
+++ b/sim/cr16/simops.c
@@ -17,8 +17,8 @@
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 "config.h"
+/* This must come before any other includes. */
+#include "defs.h"
#include <signal.h>
#include <errno.h>
diff --git a/sim/cris/ChangeLog b/sim/cris/ChangeLog
index 01645b5..80b0d7c 100644
--- a/sim/cris/ChangeLog
+++ b/sim/cris/ChangeLog
@@ -1,5 +1,11 @@
2021-05-16 Mike Frysinger <vapier@gentoo.org>
+ * cris-tmpl.c, crisv10f.c, crisv32f.c, dv-cris.c, dv-cris_900000xx.c,
+ dv-rv.c, traps.c: Include defs.h.
+ * rvdummy.c, sim-if.c: Replace config.h include with defs.h.
+
+2021-05-16 Mike Frysinger <vapier@gentoo.org>
+
* config.in, configure: Regenerate.
2021-05-15 Mike Frysinger <vapier@gentoo.org>
diff --git a/sim/cris/cris-tmpl.c b/sim/cris/cris-tmpl.c
index 95579db..c115305 100644
--- a/sim/cris/cris-tmpl.c
+++ b/sim/cris/cris-tmpl.c
@@ -19,6 +19,9 @@ along with this program. If not, see <http://www.gnu.org/licenses/>. */
/* The infrastructure is based on that of i960.c. */
+/* This must come before any other includes. */
+#include "defs.h"
+
#define WANT_CPU
#include "sim-main.h"
diff --git a/sim/cris/crisv10f.c b/sim/cris/crisv10f.c
index 69bfbc8..c649eff 100644
--- a/sim/cris/crisv10f.c
+++ b/sim/cris/crisv10f.c
@@ -19,6 +19,9 @@ along with this program. If not, see <http://www.gnu.org/licenses/>. */
/* The infrastructure is based on that of i960.c. */
+/* This must come before any other includes. */
+#include "defs.h"
+
#define WANT_CPU_CRISV10F
#define BASENUM 10
diff --git a/sim/cris/crisv32f.c b/sim/cris/crisv32f.c
index 1e4a4fa..656be73 100644
--- a/sim/cris/crisv32f.c
+++ b/sim/cris/crisv32f.c
@@ -19,6 +19,9 @@ along with this program. If not, see <http://www.gnu.org/licenses/>. */
/* The infrastructure is based on that of i960.c. */
+/* This must come before any other includes. */
+#include "defs.h"
+
#define WANT_CPU_CRISV32F
#define SPECIFIC_U_EXEC_FN
diff --git a/sim/cris/dv-cris.c b/sim/cris/dv-cris.c
index 1bb89e4..b4251d0 100644
--- a/sim/cris/dv-cris.c
+++ b/sim/cris/dv-cris.c
@@ -17,6 +17,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/>. */
+/* This must come before any other includes. */
+#include "defs.h"
+
#include "sim-main.h"
#include "hw-main.h"
diff --git a/sim/cris/dv-cris_900000xx.c b/sim/cris/dv-cris_900000xx.c
index c6afe02..5cecdc7 100644
--- a/sim/cris/dv-cris_900000xx.c
+++ b/sim/cris/dv-cris_900000xx.c
@@ -18,6 +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/>. */
+/* This must come before any other includes. */
+#include "defs.h"
+
#include "sim-main.h"
#include "hw-main.h"
diff --git a/sim/cris/dv-rv.c b/sim/cris/dv-rv.c
index cef164b..310155c 100644
--- a/sim/cris/dv-rv.c
+++ b/sim/cris/dv-rv.c
@@ -18,6 +18,8 @@
You should have received a copy of the GNU General Public License
along with this program. If not, see <http://www.gnu.org/licenses/>. */
+/* This must come before any other includes. */
+#include "defs.h"
#include "sim-main.h"
#include "hw-main.h"
diff --git a/sim/cris/rvdummy.c b/sim/cris/rvdummy.c
index 788f8ed..b53e823 100644
--- a/sim/cris/rvdummy.c
+++ b/sim/cris/rvdummy.c
@@ -29,9 +29,8 @@ main (int argc, char *argv[])
}
#else
-#ifdef HAVE_CONFIG_H
-#include "config.h"
-#endif
+/* This must come before any other includes. */
+#include "defs.h"
#include "getopt.h"
#include "libiberty.h"
diff --git a/sim/cris/sim-if.c b/sim/cris/sim-if.c
index 388d1ef..15a4018 100644
--- a/sim/cris/sim-if.c
+++ b/sim/cris/sim-if.c
@@ -20,7 +20,9 @@ along with this program. If not, see <http://www.gnu.org/licenses/>. */
/* Based on the fr30 file, mixing in bits from the i960 and pruning of
dead code. */
-#include "config.h"
+/* This must come before any other includes. */
+#include "defs.h"
+
#include "libiberty.h"
#include "bfd.h"
#include "elf-bfd.h"
diff --git a/sim/cris/traps.c b/sim/cris/traps.c
index 483747f..99344a2 100644
--- a/sim/cris/traps.c
+++ b/sim/cris/traps.c
@@ -17,6 +17,9 @@ GNU General Public License for more details.
You should have received a copy of the GNU General Public License
along with this program. If not, see <http://www.gnu.org/licenses/>. */
+/* This must come before any other includes. */
+#include "defs.h"
+
#include "sim-main.h"
#include "sim-syscall.h"
#include "sim-options.h"
diff --git a/sim/d10v/ChangeLog b/sim/d10v/ChangeLog
index 622a911..bce1617 100644
--- a/sim/d10v/ChangeLog
+++ b/sim/d10v/ChangeLog
@@ -1,5 +1,11 @@
2021-05-16 Mike Frysinger <vapier@gentoo.org>
+ * d10v_sim.h, gencode.c: Delete config.h include.
+ * endian.c: Include defs.h.
+ * interp.c, simops.c: Replace config.h include with defs.h.
+
+2021-05-16 Mike Frysinger <vapier@gentoo.org>
+
* config.in, configure: Regenerate.
2021-05-14 Mike Frysinger <vapier@gentoo.org>
diff --git a/sim/d10v/d10v_sim.h b/sim/d10v/d10v_sim.h
index 972402c..1e1e84c 100644
--- a/sim/d10v/d10v_sim.h
+++ b/sim/d10v/d10v_sim.h
@@ -1,4 +1,3 @@
-#include "config.h"
#include <stdio.h>
#include <ctype.h>
#include <limits.h>
diff --git a/sim/d10v/endian.c b/sim/d10v/endian.c
index dbc3db2..70f63d8 100644
--- a/sim/d10v/endian.c
+++ b/sim/d10v/endian.c
@@ -1,6 +1,9 @@
/* If we're being compiled as a .c file, rather than being included in
d10v_sim.h, then ENDIAN_INLINE won't be defined yet. */
+/* This must come before any other includes. */
+#include "defs.h"
+
#ifndef ENDIAN_INLINE
#define NO_ENDIAN_INLINE
#include "sim-main.h"
diff --git a/sim/d10v/gencode.c b/sim/d10v/gencode.c
index 9f8a41c..6e006d0 100644
--- a/sim/d10v/gencode.c
+++ b/sim/d10v/gencode.c
@@ -1,4 +1,3 @@
-#include "config.h"
#include <stdio.h>
#include <ctype.h>
#include <limits.h>
diff --git a/sim/d10v/interp.c b/sim/d10v/interp.c
index a0dc2f5..b56b204 100644
--- a/sim/d10v/interp.c
+++ b/sim/d10v/interp.c
@@ -1,4 +1,6 @@
-#include "config.h"
+/* This must come before any other includes. */
+#include "defs.h"
+
#include <inttypes.h>
#include <signal.h>
#include "bfd.h"
diff --git a/sim/d10v/simops.c b/sim/d10v/simops.c
index ed0c8a3..af725ad 100644
--- a/sim/d10v/simops.c
+++ b/sim/d10v/simops.c
@@ -1,4 +1,5 @@
-#include "config.h"
+/* This must come before any other includes. */
+#include "defs.h"
#include <signal.h>
#include <errno.h>
diff --git a/sim/erc32/ChangeLog b/sim/erc32/ChangeLog
index 40dd931..355880e 100644
--- a/sim/erc32/ChangeLog
+++ b/sim/erc32/ChangeLog
@@ -1,5 +1,11 @@
2021-05-16 Mike Frysinger <vapier@gentoo.org>
+ * erc32.c, exec.c, float.c, func.c, help.c, interf.c, sis.c: Replace
+ config.h include with defs.h.
+ * sis.h: Delete config.h include.
+
+2021-05-16 Mike Frysinger <vapier@gentoo.org>
+
* config.in, configure: Regenerate.
2021-05-14 Mike Frysinger <vapier@gentoo.org>
diff --git a/sim/erc32/erc32.c b/sim/erc32/erc32.c
index a93b62b..747ac78 100644
--- a/sim/erc32/erc32.c
+++ b/sim/erc32/erc32.c
@@ -18,7 +18,9 @@
/* The control space devices */
-#include "config.h"
+/* This must come before any other includes. */
+#include "defs.h"
+
#include <sys/types.h>
#include <stdio.h>
#include <string.h>
diff --git a/sim/erc32/exec.c b/sim/erc32/exec.c
index 8daf759..d8a8c6c 100644
--- a/sim/erc32/exec.c
+++ b/sim/erc32/exec.c
@@ -16,7 +16,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 "config.h"
+/* This must come before any other includes. */
+#include "defs.h"
+
#include "sis.h"
#include <math.h>
#include <stdio.h>
diff --git a/sim/erc32/float.c b/sim/erc32/float.c
index 6d3d2bd..d2ae397 100644
--- a/sim/erc32/float.c
+++ b/sim/erc32/float.c
@@ -26,7 +26,9 @@
4. Clear host exception bits.
*/
-#include "config.h"
+/* This must come before any other includes. */
+#include "defs.h"
+
#include "sis.h"
#include <fenv.h>
diff --git a/sim/erc32/func.c b/sim/erc32/func.c
index 52428e4..ff53f3b 100644
--- a/sim/erc32/func.c
+++ b/sim/erc32/func.c
@@ -16,7 +16,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 "config.h"
+/* This must come before any other includes. */
+#include "defs.h"
+
#include <signal.h>
#include <string.h>
#include <stdio.h>
diff --git a/sim/erc32/help.c b/sim/erc32/help.c
index 419ab0d..211de52 100644
--- a/sim/erc32/help.c
+++ b/sim/erc32/help.c
@@ -16,7 +16,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 "config.h"
+/* This must come before any other includes. */
+#include "defs.h"
+
#include <stdio.h>
#include "sis.h"
diff --git a/sim/erc32/interf.c b/sim/erc32/interf.c
index c199dab..28c981b 100644
--- a/sim/erc32/interf.c
+++ b/sim/erc32/interf.c
@@ -16,7 +16,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 "config.h"
+/* This must come before any other includes. */
+#include "defs.h"
+
#include <signal.h>
#include <string.h>
#include <stdio.h>
diff --git a/sim/erc32/sis.c b/sim/erc32/sis.c
index 05044c3..749d256 100644
--- a/sim/erc32/sis.c
+++ b/sim/erc32/sis.c
@@ -16,7 +16,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 "config.h"
+/* This must come before any other includes. */
+#include "defs.h"
+
#include <signal.h>
#include <string.h>
#include <stdlib.h>
diff --git a/sim/erc32/sis.h b/sim/erc32/sis.h
index 10c500f..7f787cf 100644
--- a/sim/erc32/sis.h
+++ b/sim/erc32/sis.h
@@ -13,7 +13,6 @@
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 "config.h"
#include "ansidecl.h"
#include "sim/callback.h"
#include "sim/sim.h"
diff --git a/sim/example-synacor/ChangeLog b/sim/example-synacor/ChangeLog
index 0f91ff2..ddd56b2 100644
--- a/sim/example-synacor/ChangeLog
+++ b/sim/example-synacor/ChangeLog
@@ -1,5 +1,9 @@
2021-05-16 Mike Frysinger <vapier@gentoo.org>
+ * interp.c, sim-main.c: Replace config.h include with defs.h.
+
+2021-05-16 Mike Frysinger <vapier@gentoo.org>
+
* config.in, configure: Regenerate.
2021-05-14 Mike Frysinger <vapier@gentoo.org>
diff --git a/sim/example-synacor/interp.c b/sim/example-synacor/interp.c
index e613e16..eaf8f1f 100644
--- a/sim/example-synacor/interp.c
+++ b/sim/example-synacor/interp.c
@@ -25,7 +25,8 @@
For more specific details on these functions, see the sim/sim.h header
file. */
-#include "config.h"
+/* This must come before any other includes. */
+#include "defs.h"
#include "sim-main.h"
#include "sim-options.h"
diff --git a/sim/example-synacor/sim-main.c b/sim/example-synacor/sim-main.c
index a7d748f..d7a68b3 100644
--- a/sim/example-synacor/sim-main.c
+++ b/sim/example-synacor/sim-main.c
@@ -21,7 +21,8 @@
/* This file contains the main simulator decoding logic. i.e. everything that
is architecture specific. */
-#include "config.h"
+/* This must come before any other includes. */
+#include "defs.h"
#include "sim-main.h"
diff --git a/sim/frv/ChangeLog b/sim/frv/ChangeLog
index 6b93dd8..e9e9463 100644
--- a/sim/frv/ChangeLog
+++ b/sim/frv/ChangeLog
@@ -1,5 +1,12 @@
2021-05-16 Mike Frysinger <vapier@gentoo.org>
+ * cache.c, frv.c, interrupts.c, memory.c, options.c, pipeline.c,
+ profile-fr400.c, profile-fr450.c, profile-fr500.c, profile-fr550.c,
+ profile.c, registers.c, reset.c, sim-if.c, traps.c: Include defs.h.
+ * sim-main.h: Delete config.h include.
+
+2021-05-16 Mike Frysinger <vapier@gentoo.org>
+
* config.in, configure: Regenerate.
2021-05-04 Mike Frysinger <vapier@gentoo.org>
diff --git a/sim/frv/cache.c b/sim/frv/cache.c
index c10d463..e569d52 100644
--- a/sim/frv/cache.c
+++ b/sim/frv/cache.c
@@ -17,6 +17,9 @@ GNU General Public License for more details.
You should have received a copy of the GNU General Public License
along with this program. If not, see <http://www.gnu.org/licenses/>. */
+/* This must come before any other includes. */
+#include "defs.h"
+
#define WANT_CPU frvbf
#define WANT_CPU_FRVBF
diff --git a/sim/frv/frv.c b/sim/frv/frv.c
index fee59c2..aff9dc1 100644
--- a/sim/frv/frv.c
+++ b/sim/frv/frv.c
@@ -17,6 +17,9 @@ GNU General Public License for more details.
You should have received a copy of the GNU General Public License
along with this program. If not, see <http://www.gnu.org/licenses/>. */
+/* This must come before any other includes. */
+#include "defs.h"
+
#define WANT_CPU
#define WANT_CPU_FRVBF
diff --git a/sim/frv/interrupts.c b/sim/frv/interrupts.c
index 0b8ed76..a657c68 100644
--- a/sim/frv/interrupts.c
+++ b/sim/frv/interrupts.c
@@ -17,6 +17,9 @@ GNU General Public License for more details.
You should have received a copy of the GNU General Public License
along with this program. If not, see <http://www.gnu.org/licenses/>. */
+/* This must come before any other includes. */
+#include "defs.h"
+
#define WANT_CPU frvbf
#define WANT_CPU_FRVBF
diff --git a/sim/frv/memory.c b/sim/frv/memory.c
index 5978d15..681fea4 100644
--- a/sim/frv/memory.c
+++ b/sim/frv/memory.c
@@ -17,6 +17,9 @@ GNU General Public License for more details.
You should have received a copy of the GNU General Public License
along with this program. If not, see <http://www.gnu.org/licenses/>. */
+/* This must come before any other includes. */
+#include "defs.h"
+
#define WANT_CPU frvbf
#define WANT_CPU_FRVBF
diff --git a/sim/frv/options.c b/sim/frv/options.c
index b5cc8de..3528c35 100644
--- a/sim/frv/options.c
+++ b/sim/frv/options.c
@@ -17,6 +17,9 @@ GNU General Public License for more details.
You should have received a copy of the GNU General Public License
along with this program. If not, see <http://www.gnu.org/licenses/>. */
+/* This must come before any other includes. */
+#include "defs.h"
+
#define WANT_CPU frvbf
#define WANT_CPU_FRVBF
diff --git a/sim/frv/pipeline.c b/sim/frv/pipeline.c
index 564a33b..f8a5ba4 100644
--- a/sim/frv/pipeline.c
+++ b/sim/frv/pipeline.c
@@ -17,6 +17,9 @@ GNU General Public License for more details.
You should have received a copy of the GNU General Public License
along with this program. If not, see <http://www.gnu.org/licenses/>. */
+/* This must come before any other includes. */
+#include "defs.h"
+
#define WANT_CPU frvbf
#define WANT_CPU_FRVBF
diff --git a/sim/frv/profile-fr400.c b/sim/frv/profile-fr400.c
index 06cf431..f6752d8 100644
--- a/sim/frv/profile-fr400.c
+++ b/sim/frv/profile-fr400.c
@@ -16,9 +16,11 @@ MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
GNU General Public License for more details.
You should have received a copy of the GNU General Public License
-along with this program. If not, see <http://www.gnu.org/licenses/>.
+along with this program. If not, see <http://www.gnu.org/licenses/>. */
+
+/* This must come before any other includes. */
+#include "defs.h"
-*/
#define WANT_CPU
#define WANT_CPU_FRVBF
diff --git a/sim/frv/profile-fr450.c b/sim/frv/profile-fr450.c
index 0e8b01b..8e4f06b 100644
--- a/sim/frv/profile-fr450.c
+++ b/sim/frv/profile-fr450.c
@@ -16,9 +16,11 @@ MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
GNU General Public License for more details.
You should have received a copy of the GNU General Public License
-along with this program. If not, see <http://www.gnu.org/licenses/>.
+along with this program. If not, see <http://www.gnu.org/licenses/>. */
+
+/* This must come before any other includes. */
+#include "defs.h"
-*/
#define WANT_CPU
#define WANT_CPU_FRVBF
diff --git a/sim/frv/profile-fr500.c b/sim/frv/profile-fr500.c
index 32d7f85..41ee067 100644
--- a/sim/frv/profile-fr500.c
+++ b/sim/frv/profile-fr500.c
@@ -16,9 +16,11 @@ MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
GNU General Public License for more details.
You should have received a copy of the GNU General Public License
-along with this program. If not, see <http://www.gnu.org/licenses/>.
+along with this program. If not, see <http://www.gnu.org/licenses/>. */
+
+/* This must come before any other includes. */
+#include "defs.h"
-*/
#define WANT_CPU
#define WANT_CPU_FRVBF
diff --git a/sim/frv/profile-fr550.c b/sim/frv/profile-fr550.c
index 94837a7..af42d37 100644
--- a/sim/frv/profile-fr550.c
+++ b/sim/frv/profile-fr550.c
@@ -16,9 +16,11 @@ MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
GNU General Public License for more details.
You should have received a copy of the GNU General Public License
-along with this program. If not, see <http://www.gnu.org/licenses/>.
+along with this program. If not, see <http://www.gnu.org/licenses/>. */
+
+/* This must come before any other includes. */
+#include "defs.h"
-*/
#define WANT_CPU
#define WANT_CPU_FRVBF
diff --git a/sim/frv/profile.c b/sim/frv/profile.c
index 441590e..0d2b6f4 100644
--- a/sim/frv/profile.c
+++ b/sim/frv/profile.c
@@ -16,9 +16,11 @@ MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
GNU General Public License for more details.
You should have received a copy of the GNU General Public License
-along with this program. If not, see <http://www.gnu.org/licenses/>.
+along with this program. If not, see <http://www.gnu.org/licenses/>. */
+
+/* This must come before any other includes. */
+#include "defs.h"
-*/
#define WANT_CPU
#define WANT_CPU_FRVBF
diff --git a/sim/frv/registers.c b/sim/frv/registers.c
index 764a675..8a92038 100644
--- a/sim/frv/registers.c
+++ b/sim/frv/registers.c
@@ -17,6 +17,9 @@ GNU General Public License for more details.
You should have received a copy of the GNU General Public License
along with this program. If not, see <http://www.gnu.org/licenses/>. */
+/* This must come before any other includes. */
+#include "defs.h"
+
#define WANT_CPU
#define WANT_CPU_FRVBF
diff --git a/sim/frv/reset.c b/sim/frv/reset.c
index 4cae799..c87b99f 100644
--- a/sim/frv/reset.c
+++ b/sim/frv/reset.c
@@ -17,6 +17,9 @@ GNU General Public License for more details.
You should have received a copy of the GNU General Public License
along with this program. If not, see <http://www.gnu.org/licenses/>. */
+/* This must come before any other includes. */
+#include "defs.h"
+
#define WANT_CPU
#define WANT_CPU_FRVBF
diff --git a/sim/frv/sim-if.c b/sim/frv/sim-if.c
index 65e2937..c5fd93f 100644
--- a/sim/frv/sim-if.c
+++ b/sim/frv/sim-if.c
@@ -17,6 +17,9 @@ GNU General Public License for more details.
You should have received a copy of the GNU General Public License
along with this program. If not, see <http://www.gnu.org/licenses/>. */
+/* This must come before any other includes. */
+#include "defs.h"
+
#define WANT_CPU
#define WANT_CPU_FRVBF
#include "sim-main.h"
diff --git a/sim/frv/sim-main.h b/sim/frv/sim-main.h
index 25a0e56..1515c32 100644
--- a/sim/frv/sim-main.h
+++ b/sim/frv/sim-main.h
@@ -19,10 +19,6 @@ along with this program. If not, see <http://www.gnu.org/licenses/>. */
/* Main header for the frv. */
-/* sim-basics.h includes config.h but cgen-types.h must be included before
- sim-basics.h and cgen-types.h needs config.h. */
-#include "config.h"
-
/* This is a global setting. Different cpu families can't mix-n-match -scache
and -pbb. However some cpu families may use -simple while others use
one of -scache/-pbb. ???? */
diff --git a/sim/frv/traps.c b/sim/frv/traps.c
index 5e6a4d0..25b4e3e 100644
--- a/sim/frv/traps.c
+++ b/sim/frv/traps.c
@@ -17,6 +17,9 @@ GNU General Public License for more details.
You should have received a copy of the GNU General Public License
along with this program. If not, see <http://www.gnu.org/licenses/>. */
+/* This must come before any other includes. */
+#include "defs.h"
+
#define WANT_CPU frvbf
#define WANT_CPU_FRVBF
diff --git a/sim/ft32/ChangeLog b/sim/ft32/ChangeLog
index 08a5b9b..819625e 100644
--- a/sim/ft32/ChangeLog
+++ b/sim/ft32/ChangeLog
@@ -1,5 +1,9 @@
2021-05-16 Mike Frysinger <vapier@gentoo.org>
+ * interp.c: Replace config.h include with defs.h.
+
+2021-05-16 Mike Frysinger <vapier@gentoo.org>
+
* config.in, configure: Regenerate.
2021-05-14 Mike Frysinger <vapier@gentoo.org>
diff --git a/sim/ft32/interp.c b/sim/ft32/interp.c
index 6120df1..5fc9ea2 100644
--- a/sim/ft32/interp.c
+++ b/sim/ft32/interp.c
@@ -18,7 +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 "config.h"
+/* This must come before any other includes. */
+#include "defs.h"
+
#include <fcntl.h>
#include <signal.h>
#include <stdlib.h>
diff --git a/sim/h8300/ChangeLog b/sim/h8300/ChangeLog
index b53309a..dfbaecb 100644
--- a/sim/h8300/ChangeLog
+++ b/sim/h8300/ChangeLog
@@ -1,5 +1,10 @@
2021-05-16 Mike Frysinger <vapier@gentoo.org>
+ * compile.c: Replace config.h include with defs.h.
+ * sim-main.h: Delete config.h include.
+
+2021-05-16 Mike Frysinger <vapier@gentoo.org>
+
* config.in, configure: Regenerate.
2021-05-08 Mike Frysinger <vapier@gentoo.org>
diff --git a/sim/h8300/compile.c b/sim/h8300/compile.c
index 365f866..2ac6dd0 100644
--- a/sim/h8300/compile.c
+++ b/sim/h8300/compile.c
@@ -17,7 +17,9 @@
* AND FITNESS FOR A PARTICULAR PURPOSE.
*/
-#include "config.h"
+/* This must come before any other includes. */
+#include "defs.h"
+
#include <signal.h>
#include <time.h>
#include <stdlib.h>
diff --git a/sim/h8300/sim-main.h b/sim/h8300/sim-main.h
index b6169b3..68e44ae 100644
--- a/sim/h8300/sim-main.h
+++ b/sim/h8300/sim-main.h
@@ -1,6 +1,5 @@
/* Main header for the Hitachi h8/300 architecture. */
-#include "config.h"
#include "bfd.h"
#ifndef SIM_MAIN_H
diff --git a/sim/iq2000/ChangeLog b/sim/iq2000/ChangeLog
index 1f90b57..b21e075 100644
--- a/sim/iq2000/ChangeLog
+++ b/sim/iq2000/ChangeLog
@@ -1,5 +1,10 @@
2021-05-16 Mike Frysinger <vapier@gentoo.org>
+ * iq2000.c, sim-if.c: Include defs.h.
+ * sim-main.h: Delete config.h include.
+
+2021-05-16 Mike Frysinger <vapier@gentoo.org>
+
* config.in, configure: Regenerate.
2021-05-04 Tom Tromey <tromey@adacore.com>
diff --git a/sim/iq2000/iq2000.c b/sim/iq2000/iq2000.c
index 66d7b47..018c6a6 100644
--- a/sim/iq2000/iq2000.c
+++ b/sim/iq2000/iq2000.c
@@ -17,6 +17,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/>. */
+/* This must come before any other includes. */
+#include "defs.h"
+
#define WANT_CPU
#define WANT_CPU_IQ2000BF
diff --git a/sim/iq2000/sim-if.c b/sim/iq2000/sim-if.c
index 4db2e4d..b363eb0 100644
--- a/sim/iq2000/sim-if.c
+++ b/sim/iq2000/sim-if.c
@@ -17,6 +17,9 @@ GNU General Public License for more details.
You should have received a copy of the GNU General Public License
along with this program. If not, see <http://www.gnu.org/licenses/>. */
+/* This must come before any other includes. */
+#include "defs.h"
+
#include "sim-main.h"
#include <stdlib.h>
diff --git a/sim/iq2000/sim-main.h b/sim/iq2000/sim-main.h
index 829f9bb..d0ae1cf 100644
--- a/sim/iq2000/sim-main.h
+++ b/sim/iq2000/sim-main.h
@@ -4,10 +4,6 @@
#ifndef SIM_MAIN_H
#define SIM_MAIN_H
-/* sim-basics.h includes config.h but cgen-types.h must be included before
- sim-basics.h and cgen-types.h needs config.h. */
-#include "config.h"
-
/* This is a global setting. Different cpu families can't mix-n-match -scache
and -pbb. However some cpu families may use -simple while others use
one of -scache/-pbb. ???? */
diff --git a/sim/lm32/ChangeLog b/sim/lm32/ChangeLog
index 9061341..db0e8f0 100644
--- a/sim/lm32/ChangeLog
+++ b/sim/lm32/ChangeLog
@@ -1,5 +1,10 @@
2021-05-16 Mike Frysinger <vapier@gentoo.org>
+ * dv-lm32cpu.c, dv-lm32timer.c, dv-lm32uart.c, lm32.c, sim-if.c,
+ traps.c, user.c: Include defs.h.
+
+2021-05-16 Mike Frysinger <vapier@gentoo.org>
+
* config.in, configure: Regenerate.
2021-05-04 Tom Tromey <tromey@adacore.com>
diff --git a/sim/lm32/dv-lm32cpu.c b/sim/lm32/dv-lm32cpu.c
index 2ef32c7..2f702bd 100644
--- a/sim/lm32/dv-lm32cpu.c
+++ b/sim/lm32/dv-lm32cpu.c
@@ -18,6 +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/>. */
+/* This must come before any other includes. */
+#include "defs.h"
+
#include "hw-main.h"
#include "sim-main.h"
diff --git a/sim/lm32/dv-lm32timer.c b/sim/lm32/dv-lm32timer.c
index 801d27d..a04afc1 100644
--- a/sim/lm32/dv-lm32timer.c
+++ b/sim/lm32/dv-lm32timer.c
@@ -18,6 +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/>. */
+/* This must come before any other includes. */
+#include "defs.h"
+
#include "sim-main.h"
#include "hw-main.h"
#include "sim-assert.h"
diff --git a/sim/lm32/dv-lm32uart.c b/sim/lm32/dv-lm32uart.c
index c840b17..1f8ba1d 100644
--- a/sim/lm32/dv-lm32uart.c
+++ b/sim/lm32/dv-lm32uart.c
@@ -18,6 +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/>. */
+/* This must come before any other includes. */
+#include "defs.h"
+
#include "sim-main.h"
#include "hw-main.h"
#include "sim-assert.h"
diff --git a/sim/lm32/lm32.c b/sim/lm32/lm32.c
index 3c68eaf..2ffe48d 100644
--- a/sim/lm32/lm32.c
+++ b/sim/lm32/lm32.c
@@ -18,6 +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/>. */
+/* This must come before any other includes. */
+#include "defs.h"
+
#define WANT_CPU lm32bf
#define WANT_CPU_LM32BF
diff --git a/sim/lm32/sim-if.c b/sim/lm32/sim-if.c
index c97a451..1cccf62 100644
--- a/sim/lm32/sim-if.c
+++ b/sim/lm32/sim-if.c
@@ -18,6 +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/>. */
+/* This must come before any other includes. */
+#include "defs.h"
+
#include "sim-main.h"
#include "sim-options.h"
#include "libiberty.h"
diff --git a/sim/lm32/traps.c b/sim/lm32/traps.c
index 75b8ee7..5b010f9 100644
--- a/sim/lm32/traps.c
+++ b/sim/lm32/traps.c
@@ -18,6 +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/>. */
+/* This must come before any other includes. */
+#include "defs.h"
+
#define WANT_CPU lm32bf
#define WANT_CPU_LM32BF
diff --git a/sim/lm32/user.c b/sim/lm32/user.c
index d84075a..1e7bb71 100644
--- a/sim/lm32/user.c
+++ b/sim/lm32/user.c
@@ -18,6 +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/>. */
+/* This must come before any other includes. */
+#include "defs.h"
+
#include "sim-main.h"
/* Handle user defined instructions. */
diff --git a/sim/m32c/ChangeLog b/sim/m32c/ChangeLog
index af71d21..591d8b9 100644
--- a/sim/m32c/ChangeLog
+++ b/sim/m32c/ChangeLog
@@ -1,5 +1,11 @@
2021-05-16 Mike Frysinger <vapier@gentoo.org>
+ * int.c, misc.c, opc2c.c, reg.c, srcdest.c: Include defs.h.
+ * gdb-if.c, load.c, main.c, mem.c, syscalls.c, trace.c: Replace
+ config.h include with defs.h.
+
+2021-05-16 Mike Frysinger <vapier@gentoo.org>
+
* config.in, configure: Regenerate.
2021-05-14 Mike Frysinger <vapier@gentoo.org>
diff --git a/sim/m32c/gdb-if.c b/sim/m32c/gdb-if.c
index 3698648..b00d878 100644
--- a/sim/m32c/gdb-if.c
+++ b/sim/m32c/gdb-if.c
@@ -18,7 +18,9 @@ GNU General Public License for more details.
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 "config.h"
+/* This must come before any other includes. */
+#include "defs.h"
+
#include <stdio.h>
#include <assert.h>
#include <signal.h>
diff --git a/sim/m32c/int.c b/sim/m32c/int.c
index ffc96ae..4275399 100644
--- a/sim/m32c/int.c
+++ b/sim/m32c/int.c
@@ -18,6 +18,8 @@ GNU General Public License for more details.
You should have received a copy of the GNU General Public License
along with this program. If not, see <http://www.gnu.org/licenses/>. */
+/* This must come before any other includes. */
+#include "defs.h"
#include "int.h"
#include "cpu.h"
diff --git a/sim/m32c/load.c b/sim/m32c/load.c
index 86e774e..277fc14 100644
--- a/sim/m32c/load.c
+++ b/sim/m32c/load.c
@@ -18,7 +18,9 @@ GNU General Public License for more details.
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 "config.h"
+/* This must come before any other includes. */
+#include "defs.h"
+
#include <stdlib.h>
#include <stdio.h>
#include <string.h>
diff --git a/sim/m32c/main.c b/sim/m32c/main.c
index ac36bc5..4c2c255 100644
--- a/sim/m32c/main.c
+++ b/sim/m32c/main.c
@@ -18,8 +18,9 @@ GNU General Public License for more details.
You should have received a copy of the GNU General Public License
along with this program. If not, see <http://www.gnu.org/licenses/>. */
+/* This must come before any other includes. */
+#include "defs.h"
-#include "config.h"
#include <stdio.h>
#include <string.h>
#include <stdlib.h>
diff --git a/sim/m32c/mem.c b/sim/m32c/mem.c
index 4baf71f..243b7c4 100644
--- a/sim/m32c/mem.c
+++ b/sim/m32c/mem.c
@@ -18,8 +18,9 @@ GNU General Public License for more details.
You should have received a copy of the GNU General Public License
along with this program. If not, see <http://www.gnu.org/licenses/>. */
+/* This must come before any other includes. */
+#include "defs.h"
-#include "config.h"
#include <errno.h>
#include <stdio.h>
#include <stdlib.h>
diff --git a/sim/m32c/misc.c b/sim/m32c/misc.c
index 50692e5..5e09885 100644
--- a/sim/m32c/misc.c
+++ b/sim/m32c/misc.c
@@ -18,6 +18,8 @@ GNU General Public License for more details.
You should have received a copy of the GNU General Public License
along with this program. If not, see <http://www.gnu.org/licenses/>. */
+/* This must come before any other includes. */
+#include "defs.h"
#include <stdio.h>
diff --git a/sim/m32c/opc2c.c b/sim/m32c/opc2c.c
index 4c97644..3d1713d 100644
--- a/sim/m32c/opc2c.c
+++ b/sim/m32c/opc2c.c
@@ -18,6 +18,8 @@ GNU General Public License for more details.
You should have received a copy of the GNU General Public License
along with this program. If not, see <http://www.gnu.org/licenses/>. */
+/* This must come before any other includes. */
+#include "defs.h"
#include <stdio.h>
#include <string.h>
diff --git a/sim/m32c/reg.c b/sim/m32c/reg.c
index 1b3c774..a57b6a1 100644
--- a/sim/m32c/reg.c
+++ b/sim/m32c/reg.c
@@ -18,6 +18,8 @@ GNU General Public License for more details.
You should have received a copy of the GNU General Public License
along with this program. If not, see <http://www.gnu.org/licenses/>. */
+/* This must come before any other includes. */
+#include "defs.h"
#include <stdio.h>
#include <stdlib.h>
diff --git a/sim/m32c/srcdest.c b/sim/m32c/srcdest.c
index d5feb17..f3040c5 100644
--- a/sim/m32c/srcdest.c
+++ b/sim/m32c/srcdest.c
@@ -18,6 +18,8 @@ GNU General Public License for more details.
You should have received a copy of the GNU General Public License
along with this program. If not, see <http://www.gnu.org/licenses/>. */
+/* This must come before any other includes. */
+#include "defs.h"
#include <stdio.h>
#include <stdlib.h>
diff --git a/sim/m32c/syscalls.c b/sim/m32c/syscalls.c
index e940084..e8d9d2e 100644
--- a/sim/m32c/syscalls.c
+++ b/sim/m32c/syscalls.c
@@ -18,7 +18,9 @@ GNU General Public License for more details.
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 "config.h"
+/* This must come before any other includes. */
+#include "defs.h"
+
#include <stdio.h>
#include <stdlib.h>
#include <fcntl.h>
diff --git a/sim/m32c/trace.c b/sim/m32c/trace.c
index f871c01..d16be4c 100644
--- a/sim/m32c/trace.c
+++ b/sim/m32c/trace.c
@@ -18,7 +18,9 @@ GNU General Public License for more details.
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 "config.h"
+/* This must come before any other includes. */
+#include "defs.h"
+
#include <stdio.h>
#include <stdarg.h>
#include <string.h>
diff --git a/sim/m32r/ChangeLog b/sim/m32r/ChangeLog
index 04031e7..2e099a0 100644
--- a/sim/m32r/ChangeLog
+++ b/sim/m32r/ChangeLog
@@ -1,5 +1,12 @@
2021-05-16 Mike Frysinger <vapier@gentoo.org>
+ * dv-m32r_cache.c, dv-m32r_uart.c: Replace config.h include with
+ defs.h.
+ * m32r.c, m32r2.c, m32rx.c, sim-if.c, traps-linux.c,
+ traps.c: Include defs.h.
+
+2021-05-16 Mike Frysinger <vapier@gentoo.org>
+
* config.in, configure: Regenerate.
2021-05-04 Tom Tromey <tromey@adacore.com>
diff --git a/sim/m32r/dv-m32r_cache.c b/sim/m32r/dv-m32r_cache.c
index 44e2537..bb63b3d 100644
--- a/sim/m32r/dv-m32r_cache.c
+++ b/sim/m32r/dv-m32r_cache.c
@@ -18,7 +18,8 @@
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 "config.h"
+/* This must come before any other includes. */
+#include "defs.h"
#include "sim-main.h"
#include "hw-main.h"
diff --git a/sim/m32r/dv-m32r_uart.c b/sim/m32r/dv-m32r_uart.c
index e4b0912..c6b529d 100644
--- a/sim/m32r/dv-m32r_uart.c
+++ b/sim/m32r/dv-m32r_uart.c
@@ -18,7 +18,8 @@
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 "config.h"
+/* This must come before any other includes. */
+#include "defs.h"
#include "sim-main.h"
#include "hw-main.h"
diff --git a/sim/m32r/m32r.c b/sim/m32r/m32r.c
index 1d0a735..3f8305e 100644
--- a/sim/m32r/m32r.c
+++ b/sim/m32r/m32r.c
@@ -17,6 +17,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/>. */
+/* This must come before any other includes. */
+#include "defs.h"
+
#define WANT_CPU m32rbf
#define WANT_CPU_M32RBF
diff --git a/sim/m32r/m32r2.c b/sim/m32r/m32r2.c
index b4346cf..852c108 100644
--- a/sim/m32r/m32r2.c
+++ b/sim/m32r/m32r2.c
@@ -17,6 +17,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/>. */
+/* This must come before any other includes. */
+#include "defs.h"
+
#define WANT_CPU m32r2f
#define WANT_CPU_M32R2F
diff --git a/sim/m32r/m32rx.c b/sim/m32r/m32rx.c
index 31bcee1..0e774ba 100644
--- a/sim/m32r/m32rx.c
+++ b/sim/m32r/m32rx.c
@@ -17,6 +17,9 @@ GNU General Public License for more details.
You should have received a copy of the GNU General Public License
along with this program. If not, see <http://www.gnu.org/licenses/>. */
+/* This must come before any other includes. */
+#include "defs.h"
+
#define WANT_CPU m32rxf
#define WANT_CPU_M32RXF
diff --git a/sim/m32r/sim-if.c b/sim/m32r/sim-if.c
index 8d9f432..a6d8c48 100644
--- a/sim/m32r/sim-if.c
+++ b/sim/m32r/sim-if.c
@@ -17,6 +17,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/>. */
+/* This must come before any other includes. */
+#include "defs.h"
+
#include "sim-main.h"
#include "sim-options.h"
#include "libiberty.h"
diff --git a/sim/m32r/traps-linux.c b/sim/m32r/traps-linux.c
index 1ee1781..63ed137 100644
--- a/sim/m32r/traps-linux.c
+++ b/sim/m32r/traps-linux.c
@@ -17,6 +17,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/>. */
+/* This must come before any other includes. */
+#include "defs.h"
+
#include "sim-main.h"
#include "sim-syscall.h"
#include "syscall.h"
diff --git a/sim/m32r/traps.c b/sim/m32r/traps.c
index 9fca2b1..ffa09f1 100644
--- a/sim/m32r/traps.c
+++ b/sim/m32r/traps.c
@@ -17,6 +17,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/>. */
+/* This must come before any other includes. */
+#include "defs.h"
+
#include "sim-main.h"
#include "sim-syscall.h"
#include "targ-vals.h"
diff --git a/sim/m68hc11/ChangeLog b/sim/m68hc11/ChangeLog
index 410660c..a070cdd 100644
--- a/sim/m68hc11/ChangeLog
+++ b/sim/m68hc11/ChangeLog
@@ -1,5 +1,11 @@
2021-05-16 Mike Frysinger <vapier@gentoo.org>
+ * dv-m68hc11.c, dv-m68hc11eepr.c, dv-m68hc11sio.c, dv-m68hc11spi.c,
+ dv-m68hc11tim.c, dv-nvram.c, emulos.c, gencode.c, interp.c,
+ interrupts.c, m68hc11_sim.c: Include defs.h.
+
+2021-05-16 Mike Frysinger <vapier@gentoo.org>
+
* config.in, configure: Regenerate.
2021-05-14 Mike Frysinger <vapier@gentoo.org>
diff --git a/sim/m68hc11/dv-m68hc11.c b/sim/m68hc11/dv-m68hc11.c
index f481588..5b2d1ba 100644
--- a/sim/m68hc11/dv-m68hc11.c
+++ b/sim/m68hc11/dv-m68hc11.c
@@ -18,6 +18,8 @@
*/
+/* This must come before any other includes. */
+#include "defs.h"
#include "sim-main.h"
#include "sim-hw.h"
diff --git a/sim/m68hc11/dv-m68hc11eepr.c b/sim/m68hc11/dv-m68hc11eepr.c
index 88bd121..1e4cb5e 100644
--- a/sim/m68hc11/dv-m68hc11eepr.c
+++ b/sim/m68hc11/dv-m68hc11eepr.c
@@ -18,6 +18,8 @@
*/
+/* This must come before any other includes. */
+#include "defs.h"
#include "sim-main.h"
#include "hw-main.h"
diff --git a/sim/m68hc11/dv-m68hc11sio.c b/sim/m68hc11/dv-m68hc11sio.c
index b6eacb4..cf51d17 100644
--- a/sim/m68hc11/dv-m68hc11sio.c
+++ b/sim/m68hc11/dv-m68hc11sio.c
@@ -20,6 +20,8 @@
*/
+/* This must come before any other includes. */
+#include "defs.h"
#include "sim-main.h"
#include "hw-main.h"
diff --git a/sim/m68hc11/dv-m68hc11spi.c b/sim/m68hc11/dv-m68hc11spi.c
index 1e9d56c..6fe759d 100644
--- a/sim/m68hc11/dv-m68hc11spi.c
+++ b/sim/m68hc11/dv-m68hc11spi.c
@@ -20,6 +20,8 @@
*/
+/* This must come before any other includes. */
+#include "defs.h"
#include "sim-main.h"
#include "hw-main.h"
diff --git a/sim/m68hc11/dv-m68hc11tim.c b/sim/m68hc11/dv-m68hc11tim.c
index d7bcac3..2c2e523 100644
--- a/sim/m68hc11/dv-m68hc11tim.c
+++ b/sim/m68hc11/dv-m68hc11tim.c
@@ -20,6 +20,8 @@
*/
+/* This must come before any other includes. */
+#include "defs.h"
#include "sim-main.h"
#include "hw-main.h"
diff --git a/sim/m68hc11/dv-nvram.c b/sim/m68hc11/dv-nvram.c
index 586ee2f..88fab2f 100644
--- a/sim/m68hc11/dv-nvram.c
+++ b/sim/m68hc11/dv-nvram.c
@@ -18,6 +18,8 @@
*/
+/* This must come before any other includes. */
+#include "defs.h"
#include "sim-main.h"
#include "hw-main.h"
diff --git a/sim/m68hc11/emulos.c b/sim/m68hc11/emulos.c
index 247e668..d7436f7 100644
--- a/sim/m68hc11/emulos.c
+++ b/sim/m68hc11/emulos.c
@@ -17,6 +17,9 @@ GNU General Public License for more details.
You should have received a copy of the GNU General Public License
along with this program. If not, see <http://www.gnu.org/licenses/>. */
+/* This must come before any other includes. */
+#include "defs.h"
+
#include "sim-main.h"
#ifdef HAVE_UNISTD_H
#include <unistd.h>
diff --git a/sim/m68hc11/gencode.c b/sim/m68hc11/gencode.c
index 2a2210d..4681760 100644
--- a/sim/m68hc11/gencode.c
+++ b/sim/m68hc11/gencode.c
@@ -17,6 +17,9 @@ GNU General Public License for more details.
You should have received a copy of the GNU General Public License
along with this program. If not, see <http://www.gnu.org/licenses/>. */
+/* This must come before any other includes. */
+#include "defs.h"
+
#include <stdio.h>
#include <stdlib.h>
#include <string.h>
diff --git a/sim/m68hc11/interp.c b/sim/m68hc11/interp.c
index 07e4a88..d4b2531 100644
--- a/sim/m68hc11/interp.c
+++ b/sim/m68hc11/interp.c
@@ -17,6 +17,9 @@ GNU General Public License for more details.
You should have received a copy of the GNU General Public License
along with this program. If not, see <http://www.gnu.org/licenses/>. */
+/* This must come before any other includes. */
+#include "defs.h"
+
#include "sim-main.h"
#include "sim-assert.h"
#include "sim-hw.h"
diff --git a/sim/m68hc11/interrupts.c b/sim/m68hc11/interrupts.c
index 03c78ac..1adce50 100644
--- a/sim/m68hc11/interrupts.c
+++ b/sim/m68hc11/interrupts.c
@@ -17,6 +17,9 @@ GNU General Public License for more details.
You should have received a copy of the GNU General Public License
along with this program. If not, see <http://www.gnu.org/licenses/>. */
+/* This must come before any other includes. */
+#include "defs.h"
+
#include "sim-main.h"
#include "sim-options.h"
diff --git a/sim/m68hc11/m68hc11_sim.c b/sim/m68hc11/m68hc11_sim.c
index 0d78601..3c619c1 100644
--- a/sim/m68hc11/m68hc11_sim.c
+++ b/sim/m68hc11/m68hc11_sim.c
@@ -17,6 +17,9 @@ GNU General Public License for more details.
You should have received a copy of the GNU General Public License
along with this program. If not, see <http://www.gnu.org/licenses/>. */
+/* This must come before any other includes. */
+#include "defs.h"
+
#include "sim-main.h"
#include "sim-assert.h"
#include "sim-module.h"
diff --git a/sim/mcore/ChangeLog b/sim/mcore/ChangeLog
index 3a14634..7e70804 100644
--- a/sim/mcore/ChangeLog
+++ b/sim/mcore/ChangeLog
@@ -1,5 +1,9 @@
2021-05-16 Mike Frysinger <vapier@gentoo.org>
+ * interp.c: Replace config.h include with defs.h.
+
+2021-05-16 Mike Frysinger <vapier@gentoo.org>
+
* config.in, configure: Regenerate.
2021-05-14 Mike Frysinger <vapier@gentoo.org>
diff --git a/sim/mcore/interp.c b/sim/mcore/interp.c
index 5e8ad3b..3517068 100644
--- a/sim/mcore/interp.c
+++ b/sim/mcore/interp.c
@@ -17,7 +17,9 @@ GNU General Public License for more details.
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 "config.h"
+/* This must come before any other includes. */
+#include "defs.h"
+
#include <signal.h>
#include <stdlib.h>
#include <string.h>
diff --git a/sim/microblaze/ChangeLog b/sim/microblaze/ChangeLog
index dce1721..7b205ac 100644
--- a/sim/microblaze/ChangeLog
+++ b/sim/microblaze/ChangeLog
@@ -1,5 +1,9 @@
2021-05-16 Mike Frysinger <vapier@gentoo.org>
+ * interp.c: Replace config.h include with defs.h.
+
+2021-05-16 Mike Frysinger <vapier@gentoo.org>
+
* config.in, configure: Regenerate.
2021-05-14 Mike Frysinger <vapier@gentoo.org>
diff --git a/sim/microblaze/interp.c b/sim/microblaze/interp.c
index 1b89bb4..e451f2d 100644
--- a/sim/microblaze/interp.c
+++ b/sim/microblaze/interp.c
@@ -16,7 +16,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 "config.h"
+/* This must come before any other includes. */
+#include "defs.h"
+
#include <signal.h>
#include <stdlib.h>
#include <string.h>
diff --git a/sim/mips/ChangeLog b/sim/mips/ChangeLog
index 76134b7..68c2503 100644
--- a/sim/mips/ChangeLog
+++ b/sim/mips/ChangeLog
@@ -1,5 +1,12 @@
2021-05-16 Mike Frysinger <vapier@gentoo.org>
+ * interp.c: Replace config.h include with defs.h.
+ * cp1.c, dsp.c, dv-tx3904cpu.c, dv-tx3904irc.c, dv-tx3904sio.c,
+ dv-tx3904tmr.c, m16run.c, mdmx.c, micromipsrun.c, sim-main.c:
+ Include defs.h.
+
+2021-05-16 Mike Frysinger <vapier@gentoo.org>
+
* config.in, configure: Regenerate.
2021-05-14 Mike Frysinger <vapier@gentoo.org>
diff --git a/sim/mips/cp1.c b/sim/mips/cp1.c
index f5d3d1d..03ed0c0 100644
--- a/sim/mips/cp1.c
+++ b/sim/mips/cp1.c
@@ -40,6 +40,9 @@ along with this program. If not, see <http://www.gnu.org/licenses/>. */
(Originally, this code was in interp.c)
*/
+/* This must come before any other includes. */
+#include "defs.h"
+
#include "sim-main.h"
#include <stdlib.h>
diff --git a/sim/mips/dsp.c b/sim/mips/dsp.c
index b82ff68..fb25caa 100644
--- a/sim/mips/dsp.c
+++ b/sim/mips/dsp.c
@@ -17,6 +17,9 @@ GNU General Public License for more details.
You should have received a copy of the GNU General Public License
along with this program. If not, see <http://www.gnu.org/licenses/>. */
+/* This must come before any other includes. */
+#include "defs.h"
+
#include "sim-main.h"
int DSPLO_REGNUM[4] =
diff --git a/sim/mips/dv-tx3904cpu.c b/sim/mips/dv-tx3904cpu.c
index bf23a06..43f38d2 100644
--- a/sim/mips/dv-tx3904cpu.c
+++ b/sim/mips/dv-tx3904cpu.c
@@ -18,6 +18,8 @@
*/
+/* This must come before any other includes. */
+#include "defs.h"
#include "sim-main.h"
#include "hw-main.h"
diff --git a/sim/mips/dv-tx3904irc.c b/sim/mips/dv-tx3904irc.c
index d9a9197..0896b0f 100644
--- a/sim/mips/dv-tx3904irc.c
+++ b/sim/mips/dv-tx3904irc.c
@@ -18,6 +18,8 @@
*/
+/* This must come before any other includes. */
+#include "defs.h"
#include "sim-main.h"
#include "hw-main.h"
diff --git a/sim/mips/dv-tx3904sio.c b/sim/mips/dv-tx3904sio.c
index 9676344..c81b2dd 100644
--- a/sim/mips/dv-tx3904sio.c
+++ b/sim/mips/dv-tx3904sio.c
@@ -18,6 +18,8 @@
*/
+/* This must come before any other includes. */
+#include "defs.h"
#include "sim-main.h"
#include "hw-main.h"
diff --git a/sim/mips/dv-tx3904tmr.c b/sim/mips/dv-tx3904tmr.c
index 48b169f..5b5d8ac 100644
--- a/sim/mips/dv-tx3904tmr.c
+++ b/sim/mips/dv-tx3904tmr.c
@@ -18,6 +18,8 @@
*/
+/* This must come before any other includes. */
+#include "defs.h"
#include "sim-main.h"
#include "hw-main.h"
diff --git a/sim/mips/interp.c b/sim/mips/interp.c
index 49b79f9..25eb497 100644
--- a/sim/mips/interp.c
+++ b/sim/mips/interp.c
@@ -22,7 +22,9 @@ code on the hardware.
*/
-#include "config.h"
+/* This must come before any other includes. */
+#include "defs.h"
+
#include "bfd.h"
#include "sim-main.h"
#include "sim-utils.h"
@@ -32,9 +34,6 @@ code on the hardware.
#include "itable.h"
-
-#include "config.h"
-
#include <stdio.h>
#include <stdarg.h>
#include <ansidecl.h>
diff --git a/sim/mips/m16run.c b/sim/mips/m16run.c
index 44fb9e4..a04e3ee 100644
--- a/sim/mips/m16run.c
+++ b/sim/mips/m16run.c
@@ -17,6 +17,9 @@
*/
+/* This must come before any other includes. */
+#include "defs.h"
+
#include "sim-main.h"
#include "m16_idecode.h"
#include "m32_idecode.h"
diff --git a/sim/mips/mdmx.c b/sim/mips/mdmx.c
index 948bb0d..6978251 100644
--- a/sim/mips/mdmx.c
+++ b/sim/mips/mdmx.c
@@ -18,6 +18,9 @@ GNU General Public License for more details.
You should have received a copy of the GNU General Public License
along with this program. If not, see <http://www.gnu.org/licenses/>. */
+/* This must come before any other includes. */
+#include "defs.h"
+
#include <stdio.h>
#include "sim-main.h"
diff --git a/sim/mips/micromipsrun.c b/sim/mips/micromipsrun.c
index 3950dc2..53a5c08 100644
--- a/sim/mips/micromipsrun.c
+++ b/sim/mips/micromipsrun.c
@@ -19,6 +19,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/>. */
+/* This must come before any other includes. */
+#include "defs.h"
+
#include "sim-main.h"
#include "micromips16_idecode.h"
#include "micromips32_idecode.h"
diff --git a/sim/mips/sim-main.c b/sim/mips/sim-main.c
index 620f4b2..24e1602 100644
--- a/sim/mips/sim-main.c
+++ b/sim/mips/sim-main.c
@@ -19,6 +19,9 @@
#ifndef SIM_MAIN_C
#define SIM_MAIN_C
+/* This must come before any other includes. */
+#include "defs.h"
+
#include "sim-main.h"
#include "sim-assert.h"
diff --git a/sim/mn10300/ChangeLog b/sim/mn10300/ChangeLog
index 42eed82..92dd6d1 100644
--- a/sim/mn10300/ChangeLog
+++ b/sim/mn10300/ChangeLog
@@ -1,5 +1,11 @@
2021-05-16 Mike Frysinger <vapier@gentoo.org>
+ * dv-mn103cpu.c, dv-mn103int.c, dv-mn103iop.c, dv-mn103ser.c,
+ dv-mn103tim.c, op_utils.c: Include defs.h.
+ * interp.c: Replace config.h include with defs.h.
+
+2021-05-16 Mike Frysinger <vapier@gentoo.org>
+
* config.in, configure: Regenerate.
2021-05-14 Mike Frysinger <vapier@gentoo.org>
diff --git a/sim/mn10300/dv-mn103cpu.c b/sim/mn10300/dv-mn103cpu.c
index 3c3e843..2a3591b8 100644
--- a/sim/mn10300/dv-mn103cpu.c
+++ b/sim/mn10300/dv-mn103cpu.c
@@ -18,6 +18,8 @@
*/
+/* This must come before any other includes. */
+#include "defs.h"
#include "sim-main.h"
#include "hw-main.h"
diff --git a/sim/mn10300/dv-mn103int.c b/sim/mn10300/dv-mn103int.c
index cb81bc1..2c47ca0 100644
--- a/sim/mn10300/dv-mn103int.c
+++ b/sim/mn10300/dv-mn103int.c
@@ -18,6 +18,8 @@
*/
+/* This must come before any other includes. */
+#include "defs.h"
#include "sim-main.h"
#include "hw-main.h"
diff --git a/sim/mn10300/dv-mn103iop.c b/sim/mn10300/dv-mn103iop.c
index ecce7ec..1fd8d17 100644
--- a/sim/mn10300/dv-mn103iop.c
+++ b/sim/mn10300/dv-mn103iop.c
@@ -18,6 +18,9 @@
*/
+/* This must come before any other includes. */
+#include "defs.h"
+
#include "sim-main.h"
#include "hw-main.h"
diff --git a/sim/mn10300/dv-mn103ser.c b/sim/mn10300/dv-mn103ser.c
index 8d9bf8f..3465954 100644
--- a/sim/mn10300/dv-mn103ser.c
+++ b/sim/mn10300/dv-mn103ser.c
@@ -18,6 +18,9 @@
*/
+/* This must come before any other includes. */
+#include "defs.h"
+
#include "sim-main.h"
#include "hw-main.h"
#include "dv-sockser.h"
diff --git a/sim/mn10300/dv-mn103tim.c b/sim/mn10300/dv-mn103tim.c
index 61807c9..ad9c24b 100644
--- a/sim/mn10300/dv-mn103tim.c
+++ b/sim/mn10300/dv-mn103tim.c
@@ -18,6 +18,9 @@
*/
+/* This must come before any other includes. */
+#include "defs.h"
+
#include "sim-main.h"
#include "hw-main.h"
#include "sim-assert.h"
diff --git a/sim/mn10300/interp.c b/sim/mn10300/interp.c
index 55e9e21..b6c5d5b 100644
--- a/sim/mn10300/interp.c
+++ b/sim/mn10300/interp.c
@@ -1,4 +1,6 @@
-#include "config.h"
+/* This must come before any other includes. */
+#include "defs.h"
+
#include <signal.h>
#include "sim-main.h"
diff --git a/sim/mn10300/op_utils.c b/sim/mn10300/op_utils.c
index 882ff46..cd0f1a6 100644
--- a/sim/mn10300/op_utils.c
+++ b/sim/mn10300/op_utils.c
@@ -1,3 +1,6 @@
+/* This must come before any other includes. */
+#include "defs.h"
+
#include "sim-main.h"
#include "sim-syscall.h"
#include "targ-vals.h"
diff --git a/sim/moxie/ChangeLog b/sim/moxie/ChangeLog
index be18085..39b19d3 100644
--- a/sim/moxie/ChangeLog
+++ b/sim/moxie/ChangeLog
@@ -1,5 +1,9 @@
2021-05-16 Mike Frysinger <vapier@gentoo.org>
+ * interp.c: Replace config.h include with defs.h.
+
+2021-05-16 Mike Frysinger <vapier@gentoo.org>
+
* config.in, configure: Regenerate.
2021-05-14 Mike Frysinger <vapier@gentoo.org>
diff --git a/sim/moxie/interp.c b/sim/moxie/interp.c
index 1357163..caf9e43 100644
--- a/sim/moxie/interp.c
+++ b/sim/moxie/interp.c
@@ -17,7 +17,9 @@ GNU General Public License for more details.
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 "config.h"
+/* This must come before any other includes. */
+#include "defs.h"
+
#include <fcntl.h>
#include <signal.h>
#include <stdlib.h>
diff --git a/sim/msp430/ChangeLog b/sim/msp430/ChangeLog
index c6a4c65..4664091 100644
--- a/sim/msp430/ChangeLog
+++ b/sim/msp430/ChangeLog
@@ -1,5 +1,9 @@
2021-05-16 Mike Frysinger <vapier@gentoo.org>
+ * msp430-sim.c: Replace config.h include with defs.h.
+
+2021-05-16 Mike Frysinger <vapier@gentoo.org>
+
* config.in, configure: Regenerate.
2021-05-04 Mike Frysinger <vapier@gentoo.org>
diff --git a/sim/msp430/msp430-sim.c b/sim/msp430/msp430-sim.c
index 4e213f9..58a5469 100644
--- a/sim/msp430/msp430-sim.c
+++ b/sim/msp430/msp430-sim.c
@@ -19,7 +19,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 "config.h"
+/* This must come before any other includes. */
+#include "defs.h"
+
#include <stdio.h>
#include <stdlib.h>
#include <string.h>
diff --git a/sim/or1k/ChangeLog b/sim/or1k/ChangeLog
index ddfa618..af6afc4 100644
--- a/sim/or1k/ChangeLog
+++ b/sim/or1k/ChangeLog
@@ -1,5 +1,10 @@
2021-05-16 Mike Frysinger <vapier@gentoo.org>
+ * sim-main.h: Delete config.h include.
+ * or1k.c, sim-if.c, traps.c: Include defs.h.
+
+2021-05-16 Mike Frysinger <vapier@gentoo.org>
+
* config.in, configure: Regenerate.
2021-05-12 Mike Frysinger <vapier@gentoo.org>
diff --git a/sim/or1k/or1k.c b/sim/or1k/or1k.c
index 4b44e50..650d98b 100644
--- a/sim/or1k/or1k.c
+++ b/sim/or1k/or1k.c
@@ -16,6 +16,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/>. */
+/* This must come before any other includes. */
+#include "defs.h"
+
#define WANT_CPU_OR1K32BF
#define WANT_CPU
diff --git a/sim/or1k/sim-if.c b/sim/or1k/sim-if.c
index 41dbaae..005124b 100644
--- a/sim/or1k/sim-if.c
+++ b/sim/or1k/sim-if.c
@@ -16,6 +16,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/>. */
+/* This must come before any other includes. */
+#include "defs.h"
+
#include "sim-main.h"
#include "sim-options.h"
#include "libiberty.h"
diff --git a/sim/or1k/sim-main.h b/sim/or1k/sim-main.h
index cac1abb..f91a351 100644
--- a/sim/or1k/sim-main.h
+++ b/sim/or1k/sim-main.h
@@ -21,8 +21,6 @@
#define WITH_SCACHE_PBB 1
-#include "config.h"
-
#include "ansidecl.h"
#include "or1k-desc.h"
#include "sim-basics.h"
diff --git a/sim/or1k/traps.c b/sim/or1k/traps.c
index 0a0f1aa..7f5a38f 100644
--- a/sim/or1k/traps.c
+++ b/sim/or1k/traps.c
@@ -16,6 +16,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/>. */
+/* This must come before any other includes. */
+#include "defs.h"
+
#define WANT_CPU_OR1K32BF
#define WANT_CPU
diff --git a/sim/ppc/ChangeLog b/sim/ppc/ChangeLog
index 42db5f2..0755fe2 100644
--- a/sim/ppc/ChangeLog
+++ b/sim/ppc/ChangeLog
@@ -1,3 +1,10 @@
+2021-05-16 Mike Frysinger <vapier@gentoo.org>
+
+ * Makefile.in (gentmap): Pass -DUSE_CONFIG_H.
+ * basics.h, debug.c, filter_filename.c, inline.c, sim-endian.c,
+ words.h: Replace config.h include with defs.h.
+ * defs.h: New file.
+
2021-05-15 Mike Frysinger <vapier@gentoo.org>
* Makefile.in (WERROR_CFLAGS): Define.
diff --git a/sim/ppc/Makefile.in b/sim/ppc/Makefile.in
index 9fc864e..5ce511e 100644
--- a/sim/ppc/Makefile.in
+++ b/sim/ppc/Makefile.in
@@ -629,7 +629,7 @@ mon.o: mon.c $(BASICS_H) $(CPU_H) $(MON_H)
# As a kludge, build the common stuff here for now.
gentmap: $(srcdir)/../common/gentmap.c Makefile targ-vals.def
$(LINK_FOR_BUILD) -I. -I../common -I$(srcdir)/../common \
- $(srcdir)/../common/gentmap.c
+ $(srcdir)/../common/gentmap.c -DUSE_CONFIG_H
targ-vals.def: $(srcdir)/../common/nltvals.def
rm -f targ-vals.def tmp-def
diff --git a/sim/ppc/basics.h b/sim/ppc/basics.h
index 2b923ea..057cf1a 100644
--- a/sim/ppc/basics.h
+++ b/sim/ppc/basics.h
@@ -21,6 +21,8 @@
#ifndef _BASICS_H_
#define _BASICS_H_
+/* This must come before any other includes. */
+#include "defs.h"
/* from Michael Meissner, macro's to handle concating symbols better */
@@ -85,7 +87,6 @@ typedef enum {
/* Basic configuration */
-#include "config.h"
#include "ppc-config.h"
#include "inline.h"
diff --git a/sim/ppc/debug.c b/sim/ppc/debug.c
index dba1425..53a392a 100644
--- a/sim/ppc/debug.c
+++ b/sim/ppc/debug.c
@@ -21,7 +21,9 @@
#ifndef _DEBUG_C_
#define _DEBUG_C_
-#include "config.h"
+/* This must come before any other includes. */
+#include "defs.h"
+
#include "basics.h"
#include <stdlib.h>
diff --git a/sim/ppc/defs.h b/sim/ppc/defs.h
new file mode 100644
index 0000000..66e76d2
--- /dev/null
+++ b/sim/ppc/defs.h
@@ -0,0 +1,26 @@
+/* The configure generated header settings.
+
+ Copyright 2002-2021 Free Software Foundation, Inc.
+
+ This program is free software; you can redistribute it and/or modify
+ it under the terms of the GNU General Public License as published by
+ the Free Software Foundation; either version 3 of the License, or
+ (at your option) any later version.
+
+ This program is distributed in the hope that it will be useful,
+ but WITHOUT ANY WARRANTY; without even the implied warranty of
+ MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+ GNU General Public License for more details.
+
+ You should have received a copy of the GNU General Public License
+ along with this program. If not, see <http://www.gnu.org/licenses/>. */
+
+/* This file should be included by every .c file before any other header. */
+
+#ifndef DEFS_H
+#define DEFS_H
+
+/* Include sim's various configure tests. */
+#include "config.h"
+
+#endif
diff --git a/sim/ppc/filter_filename.c b/sim/ppc/filter_filename.c
index 2457b68..b59ca21 100644
--- a/sim/ppc/filter_filename.c
+++ b/sim/ppc/filter_filename.c
@@ -17,7 +17,9 @@
*/
-#include "config.h"
+/* This must come before any other includes. */
+#include "defs.h"
+
#include "ppc-config.h"
#include "filter_filename.h"
diff --git a/sim/ppc/inline.c b/sim/ppc/inline.c
index 8813169..1db2dec 100644
--- a/sim/ppc/inline.c
+++ b/sim/ppc/inline.c
@@ -21,7 +21,9 @@
#ifndef _INLINE_C_
#define _INLINE_C_
-#include "config.h"
+/* This must come before any other includes. */
+#include "defs.h"
+
#include "ppc-config.h"
#include "inline.h"
diff --git a/sim/ppc/sim-endian.c b/sim/ppc/sim-endian.c
index 1ffa2d7..2625d80 100644
--- a/sim/ppc/sim-endian.c
+++ b/sim/ppc/sim-endian.c
@@ -21,7 +21,9 @@
#ifndef _SIM_ENDIAN_C_
#define _SIM_ENDIAN_C_
-#include "config.h"
+/* This must come before any other includes. */
+#include "defs.h"
+
#include "basics.h"
diff --git a/sim/ppc/words.h b/sim/ppc/words.h
index 7645349..641f2251 100644
--- a/sim/ppc/words.h
+++ b/sim/ppc/words.h
@@ -43,9 +43,8 @@
*/
-#ifdef HAVE_CONFIG_H
-#include "config.h"
-#endif
+/* This must come before any other includes. */
+#include "defs.h"
/* bit based */
typedef char natural8;
diff --git a/sim/pru/ChangeLog b/sim/pru/ChangeLog
index 7b6aac1..0fef8ff 100644
--- a/sim/pru/ChangeLog
+++ b/sim/pru/ChangeLog
@@ -1,5 +1,10 @@
2021-05-16 Mike Frysinger <vapier@gentoo.org>
+ * interp.c: Replace config.h include with defs.h.
+ * pru.h, sim-main.h: Delete config.h include.
+
+2021-05-16 Mike Frysinger <vapier@gentoo.org>
+
* config.in, configure: Regenerate.
2021-05-14 Mike Frysinger <vapier@gentoo.org>
diff --git a/sim/pru/interp.c b/sim/pru/interp.c
index 6398c67..58ac333 100644
--- a/sim/pru/interp.c
+++ b/sim/pru/interp.c
@@ -18,7 +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 "config.h"
+/* This must come before any other includes. */
+#include "defs.h"
+
#include <stdbool.h>
#include <stdint.h>
#include <stddef.h>
diff --git a/sim/pru/pru.h b/sim/pru/pru.h
index c2b631c..17febb2 100644
--- a/sim/pru/pru.h
+++ b/sim/pru/pru.h
@@ -19,7 +19,6 @@
#ifndef PRU_H
#define PRU_H
-#include "config.h"
#include "opcode/pru.h"
/* Needed for handling the dual PRU address space. */
diff --git a/sim/pru/sim-main.h b/sim/pru/sim-main.h
index 966cacf..8233c20 100644
--- a/sim/pru/sim-main.h
+++ b/sim/pru/sim-main.h
@@ -19,8 +19,6 @@
#ifndef PRU_SIM_MAIN
#define PRU_SIM_MAIN
-#include "config.h"
-
#include <stdint.h>
#include <stddef.h>
#include "pru.h"
diff --git a/sim/riscv/ChangeLog b/sim/riscv/ChangeLog
index 9fe89f4..53081dc 100644
--- a/sim/riscv/ChangeLog
+++ b/sim/riscv/ChangeLog
@@ -1,3 +1,7 @@
+2021-05-16 Mike Frysinger <vapier@gentoo.org>
+
+ * interp.c, machs.c, sim-main.c: Replace config.h include with defs.h.
+
2021-05-15 Mike Frysinger <vapier@gentoo.org>
* sim-main.c (mulhu): Change check to HAVE___INT128.
diff --git a/sim/riscv/interp.c b/sim/riscv/interp.c
index 6192b6d..d430d77 100644
--- a/sim/riscv/interp.c
+++ b/sim/riscv/interp.c
@@ -18,7 +18,8 @@
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 "config.h"
+/* This must come before any other includes. */
+#include "defs.h"
#include "sim-main.h"
#include "sim-options.h"
diff --git a/sim/riscv/machs.c b/sim/riscv/machs.c
index 853a3af..9ff2303 100644
--- a/sim/riscv/machs.c
+++ b/sim/riscv/machs.c
@@ -18,7 +18,8 @@
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 "config.h"
+/* This must come before any other includes. */
+#include "defs.h"
#include "sim-main.h"
diff --git a/sim/riscv/sim-main.c b/sim/riscv/sim-main.c
index bb45ffe..7f87f1b 100644
--- a/sim/riscv/sim-main.c
+++ b/sim/riscv/sim-main.c
@@ -21,7 +21,8 @@
/* This file contains the main simulator decoding logic. i.e. everything that
is architecture specific. */
-#include "config.h"
+/* This must come before any other includes. */
+#include "defs.h"
#include <inttypes.h>
#include <time.h>
diff --git a/sim/rl78/ChangeLog b/sim/rl78/ChangeLog
index 9fc92e1..ecd9ed0 100644
--- a/sim/rl78/ChangeLog
+++ b/sim/rl78/ChangeLog
@@ -1,5 +1,10 @@
2021-05-16 Mike Frysinger <vapier@gentoo.org>
+ * cpu.c, gdb-if.c, load.c, main.c, mem.c, rl78.c, trace.c: Replace
+ config.h include with defs.h.
+
+2021-05-16 Mike Frysinger <vapier@gentoo.org>
+
* config.in, configure: Regenerate.
2021-05-14 Mike Frysinger <vapier@gentoo.org>
diff --git a/sim/rl78/cpu.c b/sim/rl78/cpu.c
index fde8afe..1bd8b6e 100644
--- a/sim/rl78/cpu.c
+++ b/sim/rl78/cpu.c
@@ -19,7 +19,9 @@
along with this program. If not, see <http://www.gnu.org/licenses/>.
*/
-#include "config.h"
+/* This must come before any other includes. */
+#include "defs.h"
+
#include <stdio.h>
#include <string.h>
#include <stdlib.h>
diff --git a/sim/rl78/gdb-if.c b/sim/rl78/gdb-if.c
index 87e343c..a2414f9 100644
--- a/sim/rl78/gdb-if.c
+++ b/sim/rl78/gdb-if.c
@@ -18,7 +18,9 @@ GNU General Public License for more details.
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 "config.h"
+/* This must come before any other includes. */
+#include "defs.h"
+
#include <stdio.h>
#include <assert.h>
#include <signal.h>
diff --git a/sim/rl78/load.c b/sim/rl78/load.c
index c137ba6..a2a57b0 100644
--- a/sim/rl78/load.c
+++ b/sim/rl78/load.c
@@ -19,8 +19,9 @@
along with this program. If not, see <http://www.gnu.org/licenses/>.
*/
+/* This must come before any other includes. */
+#include "defs.h"
-#include "config.h"
#include <stdio.h>
#include <stdlib.h>
#include <string.h>
diff --git a/sim/rl78/main.c b/sim/rl78/main.c
index 8d8a79d..178fa75 100644
--- a/sim/rl78/main.c
+++ b/sim/rl78/main.c
@@ -19,8 +19,9 @@
along with this program. If not, see <http://www.gnu.org/licenses/>.
*/
+/* This must come before any other includes. */
+#include "defs.h"
-#include "config.h"
#include <stdio.h>
#include <string.h>
#include <stdlib.h>
diff --git a/sim/rl78/mem.c b/sim/rl78/mem.c
index 77e4987..0b6ab8e 100644
--- a/sim/rl78/mem.c
+++ b/sim/rl78/mem.c
@@ -19,7 +19,9 @@
along with this program. If not, see <http://www.gnu.org/licenses/>.
*/
-#include "config.h"
+/* This must come before any other includes. */
+#include "defs.h"
+
#include <stdio.h>
#include <stdlib.h>
#include <string.h>
diff --git a/sim/rl78/rl78.c b/sim/rl78/rl78.c
index 006691c..e45750a 100644
--- a/sim/rl78/rl78.c
+++ b/sim/rl78/rl78.c
@@ -19,7 +19,9 @@
along with this program. If not, see <http://www.gnu.org/licenses/>.
*/
-#include "config.h"
+/* This must come before any other includes. */
+#include "defs.h"
+
#include <stdio.h>
#include <stdlib.h>
#include <string.h>
diff --git a/sim/rl78/trace.c b/sim/rl78/trace.c
index 6f897eb..1b4b365 100644
--- a/sim/rl78/trace.c
+++ b/sim/rl78/trace.c
@@ -19,8 +19,9 @@
along with this program. If not, see <http://www.gnu.org/licenses/>.
*/
+/* This must come before any other includes. */
+#include "defs.h"
-#include "config.h"
#include <stdio.h>
#include <stdarg.h>
#include <string.h>
diff --git a/sim/rx/ChangeLog b/sim/rx/ChangeLog
index db00b6e..dc30d46 100644
--- a/sim/rx/ChangeLog
+++ b/sim/rx/ChangeLog
@@ -1,5 +1,11 @@
2021-05-16 Mike Frysinger <vapier@gentoo.org>
+ * err.c: Include defs.h.
+ * fpu.c, gdb-if.c, load.c, main.c, mem.c, misc.c, reg.c, rx.c,
+ syscalls.c, trace.c: Replace config.h include with defs.h.
+
+2021-05-16 Mike Frysinger <vapier@gentoo.org>
+
* config.in, configure: Regenerate.
2021-05-14 Mike Frysinger <vapier@gentoo.org>
diff --git a/sim/rx/err.c b/sim/rx/err.c
index e72b6d3..c9b1c3c 100644
--- a/sim/rx/err.c
+++ b/sim/rx/err.c
@@ -18,6 +18,9 @@ GNU General Public License for more details.
You should have received a copy of the GNU General Public License
along with this program. If not, see <http://www.gnu.org/licenses/>. */
+/* This must come before any other includes. */
+#include "defs.h"
+
#include <stdio.h>
#include <stdlib.h>
diff --git a/sim/rx/fpu.c b/sim/rx/fpu.c
index 6c4738c..611d912 100644
--- a/sim/rx/fpu.c
+++ b/sim/rx/fpu.c
@@ -18,7 +18,9 @@ GNU General Public License for more details.
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 "config.h"
+/* This must come before any other includes. */
+#include "defs.h"
+
#include <stdio.h>
#include <stdlib.h>
diff --git a/sim/rx/gdb-if.c b/sim/rx/gdb-if.c
index 4a0f070..7298631 100644
--- a/sim/rx/gdb-if.c
+++ b/sim/rx/gdb-if.c
@@ -18,7 +18,9 @@ GNU General Public License for more details.
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 "config.h"
+/* This must come before any other includes. */
+#include "defs.h"
+
#include <stdio.h>
#include <assert.h>
#include <signal.h>
diff --git a/sim/rx/load.c b/sim/rx/load.c
index b04826f..d144888 100644
--- a/sim/rx/load.c
+++ b/sim/rx/load.c
@@ -18,8 +18,9 @@ GNU General Public License for more details.
You should have received a copy of the GNU General Public License
along with this program. If not, see <http://www.gnu.org/licenses/>. */
+/* This must come before any other includes. */
+#include "defs.h"
-#include "config.h"
#include <stdlib.h>
#include <stdio.h>
#include <string.h>
diff --git a/sim/rx/main.c b/sim/rx/main.c
index 20a8434..5d7092b 100644
--- a/sim/rx/main.c
+++ b/sim/rx/main.c
@@ -18,8 +18,9 @@ GNU General Public License for more details.
You should have received a copy of the GNU General Public License
along with this program. If not, see <http://www.gnu.org/licenses/>. */
+/* This must come before any other includes. */
+#include "defs.h"
-#include "config.h"
#include <stdio.h>
#include <string.h>
#include <stdlib.h>
diff --git a/sim/rx/mem.c b/sim/rx/mem.c
index 7e62bfb..f9b9cc1 100644
--- a/sim/rx/mem.c
+++ b/sim/rx/mem.c
@@ -18,6 +18,9 @@ GNU General Public License for more details.
You should have received a copy of the GNU General Public License
along with this program. If not, see <http://www.gnu.org/licenses/>. */
+/* This must come before any other includes. */
+#include "defs.h"
+
/* This slows down the simulator and we get some false negatives from
gcc, like when it uses a long-sized hole to hold a byte-sized
variable, knowing that it doesn't care about the other bits. But,
@@ -25,7 +28,6 @@ along with this program. If not, see <http://www.gnu.org/licenses/>. */
1. */
#define RDCHECK 0
-#include "config.h"
#include <stdio.h>
#include <stdlib.h>
#include <string.h>
diff --git a/sim/rx/misc.c b/sim/rx/misc.c
index 2a4a253..e7447ac 100644
--- a/sim/rx/misc.c
+++ b/sim/rx/misc.c
@@ -18,8 +18,9 @@ GNU General Public License for more details.
You should have received a copy of the GNU General Public License
along with this program. If not, see <http://www.gnu.org/licenses/>. */
+/* This must come before any other includes. */
+#include "defs.h"
-#include "config.h"
#include <stdio.h>
#include "cpu.h"
diff --git a/sim/rx/reg.c b/sim/rx/reg.c
index bdf2deb..1d27c59 100644
--- a/sim/rx/reg.c
+++ b/sim/rx/reg.c
@@ -18,8 +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/>. */
+/* This must come before any other includes. */
+#include "defs.h"
-#include "config.h"
#include <stdio.h>
#include <stdlib.h>
#include <string.h>
diff --git a/sim/rx/rx.c b/sim/rx/rx.c
index e3737a5..869dd3a 100644
--- a/sim/rx/rx.c
+++ b/sim/rx/rx.c
@@ -18,7 +18,9 @@ GNU General Public License for more details.
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 "config.h"
+/* This must come before any other includes. */
+#include "defs.h"
+
#include <stdio.h>
#include <stdlib.h>
#include <string.h>
diff --git a/sim/rx/syscalls.c b/sim/rx/syscalls.c
index 73ca0f2..1981b5d 100644
--- a/sim/rx/syscalls.c
+++ b/sim/rx/syscalls.c
@@ -18,8 +18,9 @@ GNU General Public License for more details.
You should have received a copy of the GNU General Public License
along with this program. If not, see <http://www.gnu.org/licenses/>. */
+/* This must come before any other includes. */
+#include "defs.h"
-#include "config.h"
#include <stdio.h>
#include <stdlib.h>
#include <fcntl.h>
diff --git a/sim/rx/trace.c b/sim/rx/trace.c
index a005797..bb191db 100644
--- a/sim/rx/trace.c
+++ b/sim/rx/trace.c
@@ -18,8 +18,9 @@ GNU General Public License for more details.
You should have received a copy of the GNU General Public License
along with this program. If not, see <http://www.gnu.org/licenses/>. */
+/* This must come before any other includes. */
+#include "defs.h"
-#include "config.h"
#include <stdio.h>
#include <stdarg.h>
#include <string.h>
diff --git a/sim/sh/ChangeLog b/sim/sh/ChangeLog
index 4f687e8..3dc1630 100644
--- a/sim/sh/ChangeLog
+++ b/sim/sh/ChangeLog
@@ -1,5 +1,9 @@
2021-05-16 Mike Frysinger <vapier@gentoo.org>
+ * interp.c: Replace config.h include with defs.h.
+
+2021-05-16 Mike Frysinger <vapier@gentoo.org>
+
* config.in, configure: Regenerate.
2021-05-14 Mike Frysinger <vapier@gentoo.org>
diff --git a/sim/sh/interp.c b/sim/sh/interp.c
index 5fb6aff..6524503 100644
--- a/sim/sh/interp.c
+++ b/sim/sh/interp.c
@@ -18,7 +18,8 @@
*/
-#include "config.h"
+/* This must come before any other includes. */
+#include "defs.h"
#include <ctype.h>
#include <stdio.h>
diff --git a/sim/v850/ChangeLog b/sim/v850/ChangeLog
index 2170657..81120ed 100644
--- a/sim/v850/ChangeLog
+++ b/sim/v850/ChangeLog
@@ -1,5 +1,10 @@
2021-05-16 Mike Frysinger <vapier@gentoo.org>
+ * interp.c, simops.c: Include defs.h.
+ * sim-main.h: Delete config.h include.
+
+2021-05-16 Mike Frysinger <vapier@gentoo.org>
+
* config.in, configure: Regenerate.
2021-05-04 Mike Frysinger <vapier@gentoo.org>
diff --git a/sim/v850/interp.c b/sim/v850/interp.c
index ff2f6a2..79c6e0f 100644
--- a/sim/v850/interp.c
+++ b/sim/v850/interp.c
@@ -1,3 +1,6 @@
+/* This must come before any other includes. */
+#include "defs.h"
+
#include "sim-main.h"
#include "sim-options.h"
#include "v850_sim.h"
diff --git a/sim/v850/sim-main.h b/sim/v850/sim-main.h
index e7276a6..6556273 100644
--- a/sim/v850/sim-main.h
+++ b/sim/v850/sim-main.h
@@ -5,7 +5,6 @@
#define WITH_TARGET_WORD_MSB 31
-#include "config.h"
#include "sim-basics.h"
#include "sim-signal.h"
#include "sim-fpu.h"
diff --git a/sim/v850/simops.c b/sim/v850/simops.c
index bd23f92..62a2bbc 100644
--- a/sim/v850/simops.c
+++ b/sim/v850/simops.c
@@ -1,3 +1,6 @@
+/* This must come before any other includes. */
+#include "defs.h"
+
#include "sim-main.h"
#include "v850_sim.h"
#include "simops.h"