]> git.ipfire.org Git - thirdparty/binutils-gdb.git/commitdiff
sim: switch config.h usage to defs.h
authorMike Frysinger <vapier@gentoo.org>
Sat, 1 May 2021 22:05:23 +0000 (18:05 -0400)
committerMike Frysinger <vapier@gentoo.org>
Mon, 17 May 2021 02:38:41 +0000 (22:38 -0400)
The defs.h header will take care of including the various config.h
headers.  For now, it's just config.h, but we'll add more when we
integrate gnulib in.

This header should be used instead of config.h, and should be the
first include in every .c file.  We won't rely on the old behavior
where we expected files to include the port's sim-main.h which then
includes the common sim-basics.h which then includes config.h.  We
have a ton of code that includes things before sim-main.h, and it
sometimes needs to be that way.  Creating a dedicated header avoids
the ordering mess and implicit inclusion that shows up otherwise.

302 files changed:
sim/aarch64/ChangeLog
sim/aarch64/cpustate.c
sim/aarch64/cpustate.h
sim/aarch64/interp.c
sim/aarch64/memory.c
sim/aarch64/simulator.c
sim/aarch64/simulator.h
sim/arm/ChangeLog
sim/arm/armcopro.c
sim/arm/armdefs.h
sim/arm/armemu.c
sim/arm/arminit.c
sim/arm/armos.c
sim/arm/armsupp.c
sim/arm/armvirt.c
sim/arm/iwmmxt.c
sim/arm/maverick.c
sim/arm/thumbemu.c
sim/arm/wrapper.c
sim/avr/ChangeLog
sim/avr/interp.c
sim/bfin/ChangeLog
sim/bfin/bfin-sim.c
sim/bfin/devices.c
sim/bfin/dv-bfin_cec.c
sim/bfin/dv-bfin_ctimer.c
sim/bfin/dv-bfin_dma.c
sim/bfin/dv-bfin_dmac.c
sim/bfin/dv-bfin_ebiu_amc.c
sim/bfin/dv-bfin_ebiu_ddrc.c
sim/bfin/dv-bfin_ebiu_sdc.c
sim/bfin/dv-bfin_emac.c
sim/bfin/dv-bfin_eppi.c
sim/bfin/dv-bfin_evt.c
sim/bfin/dv-bfin_gpio.c
sim/bfin/dv-bfin_gpio2.c
sim/bfin/dv-bfin_gptimer.c
sim/bfin/dv-bfin_jtag.c
sim/bfin/dv-bfin_mmu.c
sim/bfin/dv-bfin_nfc.c
sim/bfin/dv-bfin_otp.c
sim/bfin/dv-bfin_pfmon.c
sim/bfin/dv-bfin_pint.c
sim/bfin/dv-bfin_pll.c
sim/bfin/dv-bfin_ppi.c
sim/bfin/dv-bfin_rtc.c
sim/bfin/dv-bfin_sic.c
sim/bfin/dv-bfin_spi.c
sim/bfin/dv-bfin_trace.c
sim/bfin/dv-bfin_twi.c
sim/bfin/dv-bfin_uart.c
sim/bfin/dv-bfin_uart2.c
sim/bfin/dv-bfin_wdog.c
sim/bfin/dv-bfin_wp.c
sim/bfin/dv-eth_phy.c
sim/bfin/gui.c
sim/bfin/interp.c
sim/bfin/machs.c
sim/bpf/ChangeLog
sim/bpf/bpf-helpers.c
sim/bpf/bpf.c
sim/bpf/sim-if.c
sim/bpf/traps.c
sim/common/ChangeLog
sim/common/callback.c
sim/common/cgen-accfp.c
sim/common/cgen-fpu.c
sim/common/cgen-par.c
sim/common/cgen-run.c
sim/common/cgen-scache.c
sim/common/cgen-trace.c
sim/common/cgen-utils.c
sim/common/defs.h [new file with mode: 0644]
sim/common/dv-cfi.c
sim/common/dv-core.c
sim/common/dv-glue.c
sim/common/dv-pal.c
sim/common/dv-sockser.c
sim/common/genmloop.sh
sim/common/gentmap.c
sim/common/hw-alloc.c
sim/common/hw-base.c
sim/common/hw-device.c
sim/common/hw-events.c
sim/common/hw-handles.c
sim/common/hw-instances.c
sim/common/hw-ports.c
sim/common/hw-properties.c
sim/common/hw-tree.c
sim/common/nrun.c
sim/common/sim-abort.c
sim/common/sim-arange.c
sim/common/sim-basics.h
sim/common/sim-bits.c
sim/common/sim-close.c
sim/common/sim-command.c
sim/common/sim-config.c
sim/common/sim-core.c
sim/common/sim-cpu.c
sim/common/sim-endian.c
sim/common/sim-engine.c
sim/common/sim-events.c
sim/common/sim-fpu.c
sim/common/sim-hload.c
sim/common/sim-hrw.c
sim/common/sim-hw.c
sim/common/sim-info.c
sim/common/sim-inline.c
sim/common/sim-io.c
sim/common/sim-load.c
sim/common/sim-memopt.c
sim/common/sim-model.c
sim/common/sim-module.c
sim/common/sim-options.c
sim/common/sim-profile.c
sim/common/sim-reason.c
sim/common/sim-reg.c
sim/common/sim-resume.c
sim/common/sim-run.c
sim/common/sim-signal.c
sim/common/sim-stop.c
sim/common/sim-syscall.c
sim/common/sim-trace.c
sim/common/sim-utils.c
sim/common/sim-watch.c
sim/common/syscall.c
sim/cr16/ChangeLog
sim/cr16/cr16_sim.h
sim/cr16/gencode.c
sim/cr16/interp.c
sim/cr16/simops.c
sim/cris/ChangeLog
sim/cris/cris-tmpl.c
sim/cris/crisv10f.c
sim/cris/crisv32f.c
sim/cris/dv-cris.c
sim/cris/dv-cris_900000xx.c
sim/cris/dv-rv.c
sim/cris/rvdummy.c
sim/cris/sim-if.c
sim/cris/traps.c
sim/d10v/ChangeLog
sim/d10v/d10v_sim.h
sim/d10v/endian.c
sim/d10v/gencode.c
sim/d10v/interp.c
sim/d10v/simops.c
sim/erc32/ChangeLog
sim/erc32/erc32.c
sim/erc32/exec.c
sim/erc32/float.c
sim/erc32/func.c
sim/erc32/help.c
sim/erc32/interf.c
sim/erc32/sis.c
sim/erc32/sis.h
sim/example-synacor/ChangeLog
sim/example-synacor/interp.c
sim/example-synacor/sim-main.c
sim/frv/ChangeLog
sim/frv/cache.c
sim/frv/frv.c
sim/frv/interrupts.c
sim/frv/memory.c
sim/frv/options.c
sim/frv/pipeline.c
sim/frv/profile-fr400.c
sim/frv/profile-fr450.c
sim/frv/profile-fr500.c
sim/frv/profile-fr550.c
sim/frv/profile.c
sim/frv/registers.c
sim/frv/reset.c
sim/frv/sim-if.c
sim/frv/sim-main.h
sim/frv/traps.c
sim/ft32/ChangeLog
sim/ft32/interp.c
sim/h8300/ChangeLog
sim/h8300/compile.c
sim/h8300/sim-main.h
sim/iq2000/ChangeLog
sim/iq2000/iq2000.c
sim/iq2000/sim-if.c
sim/iq2000/sim-main.h
sim/lm32/ChangeLog
sim/lm32/dv-lm32cpu.c
sim/lm32/dv-lm32timer.c
sim/lm32/dv-lm32uart.c
sim/lm32/lm32.c
sim/lm32/sim-if.c
sim/lm32/traps.c
sim/lm32/user.c
sim/m32c/ChangeLog
sim/m32c/gdb-if.c
sim/m32c/int.c
sim/m32c/load.c
sim/m32c/main.c
sim/m32c/mem.c
sim/m32c/misc.c
sim/m32c/opc2c.c
sim/m32c/reg.c
sim/m32c/srcdest.c
sim/m32c/syscalls.c
sim/m32c/trace.c
sim/m32r/ChangeLog
sim/m32r/dv-m32r_cache.c
sim/m32r/dv-m32r_uart.c
sim/m32r/m32r.c
sim/m32r/m32r2.c
sim/m32r/m32rx.c
sim/m32r/sim-if.c
sim/m32r/traps-linux.c
sim/m32r/traps.c
sim/m68hc11/ChangeLog
sim/m68hc11/dv-m68hc11.c
sim/m68hc11/dv-m68hc11eepr.c
sim/m68hc11/dv-m68hc11sio.c
sim/m68hc11/dv-m68hc11spi.c
sim/m68hc11/dv-m68hc11tim.c
sim/m68hc11/dv-nvram.c
sim/m68hc11/emulos.c
sim/m68hc11/gencode.c
sim/m68hc11/interp.c
sim/m68hc11/interrupts.c
sim/m68hc11/m68hc11_sim.c
sim/mcore/ChangeLog
sim/mcore/interp.c
sim/microblaze/ChangeLog
sim/microblaze/interp.c
sim/mips/ChangeLog
sim/mips/cp1.c
sim/mips/dsp.c
sim/mips/dv-tx3904cpu.c
sim/mips/dv-tx3904irc.c
sim/mips/dv-tx3904sio.c
sim/mips/dv-tx3904tmr.c
sim/mips/interp.c
sim/mips/m16run.c
sim/mips/mdmx.c
sim/mips/micromipsrun.c
sim/mips/sim-main.c
sim/mn10300/ChangeLog
sim/mn10300/dv-mn103cpu.c
sim/mn10300/dv-mn103int.c
sim/mn10300/dv-mn103iop.c
sim/mn10300/dv-mn103ser.c
sim/mn10300/dv-mn103tim.c
sim/mn10300/interp.c
sim/mn10300/op_utils.c
sim/moxie/ChangeLog
sim/moxie/interp.c
sim/msp430/ChangeLog
sim/msp430/msp430-sim.c
sim/or1k/ChangeLog
sim/or1k/or1k.c
sim/or1k/sim-if.c
sim/or1k/sim-main.h
sim/or1k/traps.c
sim/ppc/ChangeLog
sim/ppc/Makefile.in
sim/ppc/basics.h
sim/ppc/debug.c
sim/ppc/defs.h [new file with mode: 0644]
sim/ppc/filter_filename.c
sim/ppc/inline.c
sim/ppc/sim-endian.c
sim/ppc/words.h
sim/pru/ChangeLog
sim/pru/interp.c
sim/pru/pru.h
sim/pru/sim-main.h
sim/riscv/ChangeLog
sim/riscv/interp.c
sim/riscv/machs.c
sim/riscv/sim-main.c
sim/rl78/ChangeLog
sim/rl78/cpu.c
sim/rl78/gdb-if.c
sim/rl78/load.c
sim/rl78/main.c
sim/rl78/mem.c
sim/rl78/rl78.c
sim/rl78/trace.c
sim/rx/ChangeLog
sim/rx/err.c
sim/rx/fpu.c
sim/rx/gdb-if.c
sim/rx/load.c
sim/rx/main.c
sim/rx/mem.c
sim/rx/misc.c
sim/rx/reg.c
sim/rx/rx.c
sim/rx/syscalls.c
sim/rx/trace.c
sim/sh/ChangeLog
sim/sh/interp.c
sim/v850/ChangeLog
sim/v850/interp.c
sim/v850/sim-main.h
sim/v850/simops.c

index dc3eee25dd7e0ade57622d7fd8f96eedd9b838f7..b5ef612e6f17b3c53acaba4500bb4378253de6ac 100644 (file)
@@ -1,3 +1,10 @@
+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.
index f6b93fbb1a859b0bb85ffcda52aebbb5e69a2503..6007d74872d1858c731423ca0565cac17fe40521 100644 (file)
@@ -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>
 
index c3f26376f492a411411b5267237ac40809ead172..b9e1f92d640ab36e2f388097a5f9b7c592ec79cb 100644 (file)
@@ -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>
index cc3cf6add3435ecec05703f7e4ac1e9f91af4875..fd35f4fa683da9bdcddf05e18783e2098eda6f7f 100644 (file)
@@ -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>
index aa2f2e5fc22ece9104eff8322b0bfd4e9bfd3cf3..22caf617074d7844c7f6302f041d163adf400169 100644 (file)
@@ -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>
index a8391212c0647991b7b31da1a6cd870b3d583e55..be1c2987636a1a882237ce663ecc6723341de8a9 100644 (file)
@@ -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>
index f80e1f2eba8153c9d3e88aeacf782512aa720e46..5875c843e90b860c2fb23394ec159735f4356bd7 100644 (file)
@@ -22,7 +22,6 @@
 #ifndef _SIMULATOR_H
 #define _SIMULATOR_H
 
-#include "config.h"
 #include <sys/types.h>
 #include <setjmp.h>
 
index c85e70563ae2210c27ad8ed88e0d9cf7db6cfe06..aabdae22412a2f9f95d388d89d3ab9daee04f5a0 100644 (file)
@@ -1,3 +1,10 @@
+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.
index 9227fc097acdda8b20a697914c147994d61dffe4..5cd33fb3ae53e591eb5f7c939dd38e31b196ff8a 100644 (file)
@@ -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"
index 68cf199db6b3e53c8f1df83494e4a052a5dd63f2..7df5d022942b3a4dcfbcc5865c8cc6543a38cb59 100644 (file)
@@ -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>
index f93ad0cee254bab55602fe515b1e01c94734ac35..ab7454628ba02bf807d052ae2e410480c5a1226a 100644 (file)
@@ -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"
index 3a626c84674ea71814d009ef32e242598c3771a9..bc5456f47b77ba91210438939ddf42cf509ea8f1 100644 (file)
@@ -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"
index 72bdf599718ae99f00f4b7c2e62d24ddd17195e3..a3713a5c3348d436364e9dedb0ee432d4b8f6c36 100644 (file)
@@ -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"
 
index 11bb53c5b7049130f201acc581f21db0f51d2765..1a5eeaff1d65fe80be3968d1ecb8577e8e6b3184 100644 (file)
@@ -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"
index 4f95ed838f6854a8061b60273b0f3e3145d2d8af..ba01a652ebcc125d68fff77f16303a334cf84e70 100644 (file)
@@ -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"
index 8e818248645dadb7d17fe352e7e84382bfcb0b96..c71d06f4c6bffa4b94dec93fa9e02fd9067a9696 100644 (file)
@@ -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>
 
index 15041b63cc8c8f735b52fd70733004f5dda8d3a7..fb62ccd8c8c4231e641649c0b48a3524d296ec5d 100644 (file)
@@ -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"
index fa70d5bfcfbf994f48a7953b5a979c2204df68a0..6915d23ec4cc35d0250fa8da3042b50b92c027a7 100644 (file)
@@ -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"
index d25184afa09cedc5b0ef595f265775b7df3f6d29..a1147e402cc0b18a19e7aad1ef72713941a5c88c 100644 (file)
@@ -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>
index ce0978394b7ea6a8166ecc9e905495afbfc44106..2a979aa6d9500023de599c0c4628dce8b322171c 100644 (file)
@@ -1,3 +1,7 @@
+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.
index df1f6e55401f3d3913c0e20a5aefc348278fe2dd..75a10efe90a7cea436170a4d1faf77c106793da8 100644 (file)
@@ -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>
 
index 84e1dd34a55f0fad616b792baf4f5789b4914d27..c9b64b11f4251e38f406a0ec84b90fd73dc9d325 100644 (file)
@@ -1,3 +1,16 @@
+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.
index 33bbc6e4963f7827bdb4e9a91df10dc1b80fc299..486fe4717ef5a6be256c1c694c421bdad7fbc0fa 100644 (file)
@@ -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>
index aadb9bcf1f4677b215d6f6c12003f99cb713f227..97873f6f59eef907385a6d7b87b1d2d5bef6df63 100644 (file)
@@ -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"
index 2236830d24d2151eeb86ee24001ad78f44135939..6179b16ad8a8ad18e97c154ea30ad41afe00e4fa 100644 (file)
@@ -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"
index beb4a0e76f8063c878e3e9c5a2029a15ebef9359..df62d9487e60594887d2c4ce4386bfa162728898 100644 (file)
@@ -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"
index e3834d76143350ca59bf823e65a3c850c75d62e5..d7dc541dd8ce555d5a1b2911ea7ad1a2ebd6bcab 100644 (file)
@@ -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>
 
index ae720cb8b61fdec1fab126b985cd879953c3a1f4..d5c608f4cd9dce8c9f93b3cac8c192d30b91a840 100644 (file)
@@ -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"
index 67f557d29b22ac8738797a12325e127b983de0a4..29c4c4a5a9f91f45c952e57eddb7ba980f88ef0f 100644 (file)
@@ -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"
index 4206c253778286ade45d06e238a6d2d13d2f5dc3..4160cb210e5d0d92732bbc03bb216e1a10121159 100644 (file)
@@ -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"
index d542f02c082c1bc6df3940bee64beb2ed20f15cc..4af04dcdac4dcc809c4fa29132cc5a5d8e1832cb 100644 (file)
@@ -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"
index 249aef6b9d3d4e29c691936a2cda121630a7eb79..e5ceedbef51455151d2fc5a5f9de836858b8e8ea 100644 (file)
@@ -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>
index ad36a943f208751a3c04a16093d89da0c2619c4f..169895d3dd4e0bc4824b0b08aa56126fa4239336 100644 (file)
@@ -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"
index c4cf691da92417eb302519ae787c714589514977..e49f4804fe65fc7e90bc95c75a9671de9a48caf8 100644 (file)
@@ -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"
index 2830aa3847f091340a6c580a6f1354133573f895..bbcc54f0fb5450d794dcc4f02a9bb212a56a4bf7 100644 (file)
@@ -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"
index 2933ad15b86944a8d81bb9e063279037695dded7..61c99802c13622be322226e16faf3d846e1b9908 100644 (file)
@@ -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"
index 8f2b476eeb62b8a1f0933eabc4e0ba99e9c4920c..3dfa2b58e910bd3e8cfcdd39e3dd9323213def42 100644 (file)
@@ -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"
index d97b9eac822fd9b0227acdf1508aa777a0940b5d..12629970cc882e8866685ecc015ff36eadfaddb8 100644 (file)
@@ -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"
index cbaaaa2cae151dc668f50d6f9d88e9ef97e65c52..cadc9df552e9333ad3bdc2b8ad2db34eec2f4fd4 100644 (file)
@@ -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"
index a26cb13990356b482ca937cad12c6bd42597810a..80fe49da72cec786ed093a537c07d65817e57e96 100644 (file)
@@ -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"
index e11e04e96729ec48d3162d635569fd0df5783622..6cf1c8155c623a3b6c90de3dcc3e63089911fdb2 100644 (file)
@@ -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"
index 2216c064569c1e7a9b020cdf6699a485dc875fca..bffe67b18a0616c07b2867aff96c770fd01c9f7d 100644 (file)
@@ -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"
index 90b3190c025ae06e4e112bbb1ce6f556a7f3f03e..b4f4f40ab656f8f7a8cd8adbdb427aa4f2bb9cbc 100644 (file)
@@ -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"
index 5ba1a6afafcbd1580dbe977e1899f9344e947a38..e2a5f5cd55c6bb31e13c6a17a62509bbf2d01ef0 100644 (file)
@@ -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"
index e319df91440d73ed8fe1452c2969349b6f6efc8a..a67dc5eecb0f770fd7778281552e11c1f2c89ecc 100644 (file)
@@ -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"
index 5486ac8287fea4c7063d6908b4c9beebf31c30f0..06ae4249d6e26c1cdfe11445d1bbbb7fcc4f71bb 100644 (file)
@@ -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"
index 94e55f21eea852c27a7d49932b34c2ee8d3a1eff..cc90a4cf22a27a02766e9f4c8a36699ac799dca2 100644 (file)
@@ -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"
index 8fdd9dbc51492a347593923063592d28c96d44f6..c0869fcf77ca193f91e5d661244ee2427dfc4e55 100644 (file)
@@ -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"
index ab8220f7a19da55a7b9f89ea47ed1366d6c5b9f2..56fad63cd3e7364405f7afe87e2c0aebde157aa1 100644 (file)
@@ -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"
index 87794f538528a880433750d8c2e9c8c829df5484..00b080f122c4eca5231f8126504935bf4214abe3 100644 (file)
@@ -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"
index d01362175028584533a5fb4235192b2386be7aec..7aa843065b8bae790c0418b539c765aab2c03823 100644 (file)
@@ -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"
index 2fd540164dc2fd68dd3cc4ccfe77cc482af4e14b..a7985889f87d6097a928b16d2e47cfe5a05c63f2 100644 (file)
@@ -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"
index 4be19aa64588fd1a804dba4de32015a8c7a2b8c0..850ae0618df0ba4207841746c0986baa0aa75aa7 100644 (file)
@@ -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"
index 28626a569f85744d54237edd76e71b54b6b803ec..189c121d97a19fae46ad053f33f858558ea7a3f9 100644 (file)
@@ -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"
index 14aafee9192b3b0f11e26853132c228b3f1d001c..486054277c2ffc766be4521c59a388dadfdb3d77 100644 (file)
@@ -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"
index 029a22ef3b5ccb41f92ab4acd48d1260a242ebd3..8e84d2dff9619d3ffe2de08bd8c8f39bb4eaa270 100644 (file)
@@ -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>
index aa5c245c829ed12cdba29dd4d18ee38a234e9714..8e3a1214b7861669cec0e5fefad77177957e6a20 100644 (file)
@@ -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>
index a2060e8d8986fbc9b99abded9b779838a8fdc287..e94af5d0f5b8d4666ee7f37a97040c9201a0177c 100644 (file)
@@ -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>
 
index 689c76bd45be900d512f5df07c3ea0836f194f3e..69156e6fa1d7957ca54eaeb52832811c9e4429ed 100644 (file)
@@ -1,3 +1,7 @@
+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.
index d7760d57266853f5d795a56fd39141afb6de9d00..c308812ab1cc543d98da5d8214799f603f2d2036 100644 (file)
@@ -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
 
index a0cc803da821639473feacf193b1e81d17e79937..c626781adbf8d238f09a8f1ed44732bbbae6f381 100644 (file)
@@ -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
 
index c2c01fc547a0d3c73d10b9b32025f8ff70e3d987..185e96dd7b93df27d75e5b8a62973fefbd18ae29 100644 (file)
@@ -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"
index b58d17f04013611fcff53065ef88eaffd869c3a2..85da1cba02e67a518413a761dd1d54b640eff62a 100644 (file)
@@ -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
 
index b221166212aa338534d6105801f9eecb285e7e08..1d875bb1cbd36954d7848c421afd34626574a7cc 100644 (file)
@@ -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.
index 24ea47025e1bf9e7fdf740c70a67b50c066dd618..f2587a4525403e5dcd92dc2f4d73c5cdf6780d98 100644 (file)
@@ -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>
index d6cd751e2b05f8afa577b51abe08c4cfb5135b09..345cfe81eb28a718037791ff8bceb1eaa66ffc29 100644 (file)
@@ -11,6 +11,9 @@
    - proper rounding
 */
 
+/* This must come before any other includes.  */
+#include "defs.h"
+
 #include "sim-main.h"
 #include "sim-fpu.h"
 
index 3a8d5199bea59a25acda483049b8be0b2728fb48..1b035eae34325e4e90958f413902b815f217f4b7 100644 (file)
@@ -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"
 
index 4cf0388e16f47379ae2881ded4a38425ab61fc7c..b535edfdaec099fb8e20fbdff97671069b26bf39 100644 (file)
@@ -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"
index 1458c4e5d15407ddf8e22173e1c4e96546680c3e..443b62a0bbc37007ea0ea6d44f3a52e3fb312f23 100644 (file)
@@ -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"
 
index 56df075f6804aeab93ca07f120c204d997fb59c6..f1c75714840230c85ae5679bf91573f424c1e790 100644 (file)
@@ -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"
index ea0399fdb6e281587d26142303047d38d4be8950..66250c09be751b6816d8db5337b31a833a793fe7 100644 (file)
@@ -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"
index 602abcba1820646ffab3f4a8b6faf17b025d85c1..890ed0218d1a5a0f8f99f8c566cfe00dcff7be1a 100644 (file)
@@ -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 (file)
index 0000000..3a0737c
--- /dev/null
@@ -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
index b8652271752dfd9c26e489dd947c947b73dbbe0d..02a2cedd558b8fb16b7f68ba4f81cd98cfc4d571 100644 (file)
@@ -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>
index be56aa46295951cd30063ba0dc61fc8f7e192dc2..c596da45c985c27553bdf5694445ceed78db85a1 100644 (file)
@@ -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"
index 8bda32615780e6936a6468067b14325ae7c85931..7c8e1f877af27d3c9f3da70ba62b00b619c2e12a 100644 (file)
@@ -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"
 
index dd4ab4fb390f2819e916250417e2f1a3820d1500..c60f524ea8ea4000e3d3e8d0123f8bd6ff8497c7 100644 (file)
@@ -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"
index 73c473b15c01a52b550fd101cbbe0f3fdfcd9304..ef652f62f4681ac55905a0b102dee07c1c8a1454 100644 (file)
@@ -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>
index 460a26c31e56c812ace3b31dbf9bf53ed137b69b..fa4e7b90a516ba17bfb2da9ffb8ad3d3b4f5205e 100755 (executable)
@@ -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
 
index 8085c3576ac8f63919eaa7be693373266bfbeda4..254ec3f111951167d35fddc5e1c82f12dd9a4109 100644 (file)
@@ -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");
index 141dc21167f35ea0724f8672042d49099cb013e3..a16666b931a08ae7ceba1fcb167de5cd6915c3a0 100644 (file)
@@ -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"
index af8b18124896925f97005773d597110e87b9034d..af4cc50f1a4baf52e288d98567f242aae7092f42 100644 (file)
@@ -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"
index bc91264c020832fdbe55b921af6567747628ed1c..9b743ead1f2c88e3a0033fcedc2f97fb132493a5 100644 (file)
@@ -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"
index 81628f0b642f2596dcc630ae18b2c10dac779017..620b47d5255aa8ab2a2a96b4ef51fd4fa27560c7 100644 (file)
@@ -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"
index bbd08f632fddeb3967cec332d1a745a1555f540b..fb878e4927745708afbb779e25cc4ea9f8915fd7 100644 (file)
@@ -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"
index 6227c0a2343c0d66a327bb0c8a549ce81888b417..9d786198fd5b05b1e71c846a2fae6dd1e36ff5a1 100644 (file)
@@ -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"
index 50e2cbc30e45594f3a1bd07b46e935c26c81c88d..fbc7278ddd1ff042518246a9af1bba6e04db7130 100644 (file)
@@ -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"
index 11a371cea00f8aabe6ccdd7554d08be9ed6fbae8..3836aa73527ef79d6270c868e6456493e99f7659 100644 (file)
@@ -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"
 
index 4d50ec6ed62ec6ce2f317fe65ab33b63cb3f9d55..1bf4edab746b9581f59011e76a94a5cab24df991 100644 (file)
@@ -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"
index 8a1b3c19acc1e43bf8d6659e95dbc0b3bd198aa8..2cccff6a211fabc5903f99b274f561f05d5a2c8f 100644 (file)
@@ -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>
index bf05504255fc048ae971a3d332c5e92514d1ced0..06df127c19c0f14c1f9ac5821c5da85b19fa767b 100644 (file)
@@ -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>
 
index a40dabbeb7d7c8293af3f5adc9b05174d302ca6d..5a28a2c0c495e623d20ca2679dbf40aa03920676 100644 (file)
@@ -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"
index 7d9c831da5116d59eb4cf38f252641f3af61a2ce..25c1193dca44b0553e1d7f060f8e9acfc859b3af 100644 (file)
@@ -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 */
index 9e9063cb594c7c48c40930f5ea1da9d422cf4e9d..4be07521b00f9858ee83823f3d34076f7d4385a1 100644 (file)
@@ -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"
index e64d59e6361648241082e9bfda078dc60c036a31..c774d453bfd9fe1db9e09d68b0cfd9ed93dc17d9 100644 (file)
@@ -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"
index d49ac8a262823080fe0a9be885071a1a1fba203b..b5ba2c05054d88f3a83372d1216a97bd21562a66 100644 (file)
@@ -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"
index 2acd1e4f77aff54931aaaedf4cfe6f4597be0bba..df99d6a957fd64fc24829cc011bc8457cfea4631 100644 (file)
@@ -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"
index 222f9fd8fe988ac42859875868cf38daf3826416..6604f31ea97b910c5e11626dcd58d4470042ebc4 100644 (file)
@@ -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"
index 552e48c197073f9e98276120a32115f0c8599537..587a3e8c9e1c9c2b753ab2cde03dcee8796b0674 100644 (file)
@@ -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"
index 395b487ee81df7214a048a6fdb4d7cc6fb81f7fb..5f0e46a84e5b6221c19cfad6b17ec920392ea72a 100644 (file)
@@ -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"
 
index fcdf284127f543e1be5bb564006b15625f166685..a5f84af2801b9265fa389676fe577b09a5903570 100644 (file)
@@ -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"
 
index 60e4c55a874cef4fe52a167d175d4a30f44cc9be..5a5798d102a8c1f03a97ecf8267cad674b8be338 100644 (file)
@@ -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"
index bff5b08b5e59b8a522ff1a045533f0bae456f7a2..fe8ecf8a3ce52ecb098ae1cee5a73fd115a9b334 100644 (file)
@@ -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"
 
index 243437dba1715ade120f3876c9e0bdfaef9fadd7..f33dcf6368a854f207666346343378adb1487aab 100644 (file)
@@ -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"
index 920cc16068883d5af5af5b3796d5596931ff359e..3df91d2b712d9ca780b5955c5689603da4c8fc89 100644 (file)
@@ -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"
 
index 984817f25fd0c37adbae627842f84e276b1e978d..95d95042ded4c7a3bf0274834f2261ebdd1e2ef0 100644 (file)
@@ -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"
index 7dcb656f815494fb7bdbde3fea30578a5569d11e..3c92c87faab1c9ca394999bb0f1ad4052d8a7fe8 100644 (file)
@@ -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"
 
index 93ea6f03cad5142eba743a80e59b1c85c56a44c9..7c3edd0d1cd1c68af87cfea67157a93a0bd7c35b 100644 (file)
@@ -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"
 
index edef26e8e12360b56e360dcc588b63b2121e3c09..b5e874bef794f479cf6aa919c162c2072ad91947 100644 (file)
@@ -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
index b9d85ca2fd6dee3cdf6ab811d20748d2e7909297..3ea50e7fbcdecdb512198803ed102c97d100f3a0 100644 (file)
@@ -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>
index a102d74ecd0b625395029d5b0fa7ff7508482163..636f6a9a0febb94fffc00a64079427587da214a6 100644 (file)
@@ -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"
index 5596656eff51c334e5d7b5653718ac93170b366d..e1af9d4b1e46fba2faa884b3fe7f52d3682b3e54 100644 (file)
@@ -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"
index 3bb7db0df7697b386c7c12cb4079235821f93b46..97d619c4aedd4addca8f2777b2ebbcd206125ad4 100644 (file)
@@ -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"
index ff325e6cc5fe3ac1c1976a75a98b10bd5f6de103..06bd5826ef76b404c26eaa72a4be229a7bb81282 100644 (file)
@@ -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>
index 455e1a246d93e998d2627981c57839c71e1ec27c..f2d65e09303017e7bc7666e21b054b3cbdac7f83 100644 (file)
@@ -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"
index 0f128c2a4240399a9601383980febe229d98b0eb..73a57654c246d8749780dbcf4e6ab360d240a812 100644 (file)
@@ -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"
 
index 457ac223da37fa9cb1abcd86ae8fea1e8804823b..ee340884aa3cf68a5581702daf5de3211b8aa0c0 100644 (file)
@@ -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"
 
index 6fe9a4233f6e1c08619e7d12fadfc7f3d23e35e5..8f854da84751d8fe1d2571725a9e7631e5dc20bd 100644 (file)
@@ -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"
 
index 54f6286f09e7fd653edd7846621d62cc35f7364e..f2e477e3361b45b3b67b55ce994c4f40698f394d 100644 (file)
@@ -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"
 
index 9596847af5557f70a3b756279647eab1d9ca28bc..f9fef4c24c64bf61a0ac901cf970ff6ae26bf4e9 100644 (file)
@@ -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"
 
index 305c455dc49f2c9909ea5879112cb10625941e05..aa48fc3e6f36999ad13893fbfd844d746632cb57 100644 (file)
@@ -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"
 
index 9dbc71ac9fb05b61881b844db6b3d8a6e8d1b7ea..0f7601cafd73474f129d66e2cc6d3824876a2785 100644 (file)
@@ -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>
 
index 26d9556322cf10f85969019f89ff52868900d873..b8224e0b8346b71aa3195e53b76884d3af1daf54 100644 (file)
@@ -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"
index 86ab059744ce6a6bec16bf0b761c5a7d7e965a47..abb87f8c5a0403bc212cfeeb9e8f77265232dcb9 100644 (file)
@@ -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"
 
index 8630b063bb65967144d600fe81c36b293d273f80..fa035b3805494c973b18a4b192c5110981c0fee3 100644 (file)
@@ -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"
index 0a1d3f4114da63da2b168fd8c336e1f30e5048f1..4e76d2008a30d3287a6594b51fdfdadbde0c7015 100644 (file)
@@ -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>
index d311b2db6f3e6380cc329a87c5b93287562b3fdf..1a7341d2e8eb064afc2cc5d93756edd67f0b0c7a 100644 (file)
@@ -1,3 +1,12 @@
+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.
index c3d590d537b92fb4cc629a93346f0026e0faa99c..a865d0936488944721a5eba256dd6e61dfdc9348 100644 (file)
@@ -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>
index 335ab2607fcaee799c3234c26e17c1978833f951..30fda931c8c02796ce744bb54133023dca68cc7f 100644 (file)
@@ -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");
index 7db7f56e21ba45904e7f7c2dd6434e148ef2eb8f..7f6b07fe286acd6c0b820170c192dbf3d742bcfe 100644 (file)
@@ -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>
index ca96dd075883c31dc6ada979bad351042145f940..b383dfa1f926bd2d72a8961e8d118f3e31062e38 100644 (file)
@@ -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>
index 01645b57f93331a62e9a0a389fbe0ec3d2bb3cda..80b0d7cb7361c2a0579d188df3e132563faaf9ff 100644 (file)
@@ -1,3 +1,9 @@
+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.
index 95579dbffa9b6b2b3090f77bb3c35a1c7f3e01f6..c1153058cfb84b9b252e8c072200cde93c83fe8a 100644 (file)
@@ -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"
index 69bfbc851e95ade9aa6ed3eddf30355ec6a43e54..c649eff691ed8549935afbcf3bf208ef4b8b5d20 100644 (file)
@@ -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
index 1e4a4fa48e5cd1219f524e4489d154b837c5a472..656be733b4e0f04409e0db657191dfa9b538152a 100644 (file)
@@ -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
index 1bb89e48f7052ab7a7b2e837d291cf4b4e411824..b4251d0b5e415aad59ec07cbb59bb279de031d39 100644 (file)
@@ -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"
 
index c6afe020c861e53e5d09b3b931bc10a1c4e4c4e6..5cecdc7b0a55a3447076f379fae82cb59033a826 100644 (file)
@@ -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"
 
index cef164b0983be9b6567f50b2a2c9ecc8a3546a78..310155c8442036ae07eb1fba367a342b2030b68a 100644 (file)
@@ -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"
index 788f8edb504e0f44ae90dbcf5ced4e2323a4741d..b53e823f8f7a0bf11fd4b0e5d980104c5fc3c35b 100644 (file)
@@ -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"
index 388d1ef89627b3cce60773adaacb26029958b21d..15a4018b5b702af0ca43fa8b51ac9f79f6fc8c16 100644 (file)
@@ -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"
index 483747fb4e097676934a36d2046d9eb209caced4..99344a283df98020352ada80fc1ca5a8c72d38a3 100644 (file)
@@ -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"
index 622a9111ec0f33f15101551c75ace99a563aaad8..bce1617d90e7f040706bf42e6df9cf7e5cde313a 100644 (file)
@@ -1,3 +1,9 @@
+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.
index 972402cc4d0561c622aec808e205e3f7cf9bae0b..1e1e84c76a828844ff4786b7550cef4e02ea5660 100644 (file)
@@ -1,4 +1,3 @@
-#include "config.h"
 #include <stdio.h>
 #include <ctype.h>
 #include <limits.h>
index dbc3db2003405fd5b31aef0a29e605f23fcff771..70f63d8e5440f5349921dc5e01b9d274e61fa14a 100644 (file)
@@ -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"
index 9f8a41c93694f1376c006fd6668be572d1d039c0..6e006d089a679bfc1e58617b30386bc55602c25f 100644 (file)
@@ -1,4 +1,3 @@
-#include "config.h"
 #include <stdio.h>
 #include <ctype.h>
 #include <limits.h>
index a0dc2f596857c0cff16a21c508c4b4ae1143a881..b56b204c72d8b5acd68a28ebc618e39866bc7a91 100644 (file)
@@ -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"
index ed0c8a3625910f4add10121e1ce61eb8e64e94c9..af725ad9bb99f0815ce882700b0d8c3ed60ef7f0 100644 (file)
@@ -1,4 +1,5 @@
-#include "config.h"
+/* This must come before any other includes.  */
+#include "defs.h"
 
 #include <signal.h>
 #include <errno.h>
index 40dd9310793efd3d4955650220a9880eed1604ce..355880e22afdbeb480576c9d4a029a90c6623cf9 100644 (file)
@@ -1,3 +1,9 @@
+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.
index a93b62b798c4fc3754487cd1d31a2b590f79028a..747ac780b898a835a468255cef64e6d3daa5c321 100644 (file)
@@ -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>
index 8daf759514ecd04b1b58315e24583fe19f6354de..d8a8c6c662b9fb075eaa019bfa411b83a1f1a0cc 100644 (file)
@@ -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>
index 6d3d2bd73d264dace4f7896a10d3ec8901990ceb..d2ae39785a329a6dc423bd6753052269d14d7e29 100644 (file)
@@ -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>
 
index 52428e48350fc5d8ef7865d7bb609e09cc65628a..ff53f3bca511c3d1a027a2d4767067c8daa534c3 100644 (file)
@@ -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>
index 419ab0d33ef0050b3c6238d67d5a3093255b5ee6..211de52f53623ac8718fff81ea96c8d872082a02 100644 (file)
@@ -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"
 
index c199dabea37a7d05d2b7def95287aa1f7abcb615..28c981bbb924b3919d1ea2fa9b623e8ef3b445e0 100644 (file)
@@ -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>
index 05044c3ad8fff3ecedba9c4573ffe01285a77cc1..749d25620b441828829a6d454ae83a675bf3843b 100644 (file)
@@ -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>
index 10c500f820afb5c5047a2ee6348d8efe130197df..7f787cf14337a3dac7c64553c4cc8ea5089bdfff 100644 (file)
@@ -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"
index 0f91ff2727fb9db32c6b012df75085e3a3c5e573..ddd56b2ea8f424589e42508df7800d0d06adc617 100644 (file)
@@ -1,3 +1,7 @@
+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.
index e613e167828a35e864f4740f1f59c3ae61adafc5..eaf8f1fdf975880036a2ba236308e7a49e0aea26 100644 (file)
@@ -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"
index a7d748f3022c9eccdc7adff1a7417d382a3073fa..d7a68b38bf46c3ec8b6a3bd3e5ed1ac8296fbff6 100644 (file)
@@ -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"
 \f
index 6b93dd8c68fdf46ed4d64b51eff7bb6a60cf8686..e9e94631afd46539aa2a8dde2647ff5072aa8c77 100644 (file)
@@ -1,3 +1,10 @@
+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.
index c10d46373f51bef7c54e939a6b740bb428a0f42f..e569d5239dec6b23ca4b2535e23554204add6d4b 100644 (file)
@@ -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
 
index fee59c2aae77a3fb6ef4f87fb7058497d3d225c4..aff9dc1a49ef9180bd149daccad80f066d4854f2 100644 (file)
@@ -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
 
index 0b8ed763987ac5e97879d42f3dd23d72a7d17c94..a657c68e241722d8d320a332792e25a6394cbfa6 100644 (file)
@@ -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
 
index 5978d151627b013858f9fe3c66571ce5d3ef40ef..681fea49c84772995f40eb1a455c3db332880793 100644 (file)
@@ -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
 
index b5cc8dec7989e4a51f260a97388e27a37d0ae759..3528c357c68035ce804151da7ef92d5f4ece769c 100644 (file)
@@ -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
 
index 564a33b9fc2b3a7c5f1e2055429903eac545c569..f8a5ba44268eb212672b26a1459c781f41c7559f 100644 (file)
@@ -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
 
index 06cf4316afd2808d31d433346606dfad5e789cce..f6752d88c10b423d40ae47652b216326b74e4cc0 100644 (file)
@@ -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
 
index 0e8b01bc59c4c5245f282d0903c095275e22626a..8e4f06ba3e5db1d3cbdc481f80fc053b316cd6d3 100644 (file)
@@ -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
 
index 32d7f85faf8267e27d6013dd97d7f697f60e777a..41ee067c97a2d5a4d716b65b9f58de322cf96025 100644 (file)
@@ -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
 
index 94837a753b85107b26d259964b2c2f6cfd6c46e5..af42d37a1710881e5f954f7e11c44c8c5edfa479 100644 (file)
@@ -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
 
index 441590eb581d66d4b31c337fb38a334c326cf675..0d2b6f40c424c75d016c897714ba5a04f95a17e6 100644 (file)
@@ -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
 
index 764a6755b3f9f9f56cd3783e963e81b2a20a3d18..8a92038fd5818f6172e336b9185c6000904129c6 100644 (file)
@@ -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
 
index 4cae7997e3fc22dc6a9c7db82857925294575a90..c87b99f2a9582dd1a01100e96ed25fbc524397b7 100644 (file)
@@ -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
 
index 65e293753691988e4b1641adbb13e3ae569e7895..c5fd93f0b310ef7a269ace030ef25c6a1b843858 100644 (file)
@@ -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"
index 25a0e566dca6dab2a5cbbf9d01be93eba6e72a1a..1515c325e737bdf5677e1dac6308fb4a1edf62f5 100644 (file)
@@ -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. ???? */
index 5e6a4d06ef479f836d6ea517909b6afdbf487b18..25b4e3eea25ec2c614efd61815679313f22e2118 100644 (file)
@@ -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
 
index 08a5b9bb339a350cf91ea99d12acef263b09f790..819625ef0e82ce92d1e9fffce6a9c1163beb4a7c 100644 (file)
@@ -1,3 +1,7 @@
+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.
index 6120df179b541daabe62a3f5bac9c96dd2412b9e..5fc9ea246583ac790ffc1abcc5a48d8795d31441 100644 (file)
@@ -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>
index b53309a0279f38c0f8178044db117c35a9c3df50..dfbaecb5daa36b5094ae3ee15397094bae79feb5 100644 (file)
@@ -1,3 +1,8 @@
+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.
index 365f8667c6a573795d2a78a3e56afa63ca83c345..2ac6dd0bf74f13ef356e49caf1aaf8398d57c34e 100644 (file)
@@ -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>
index b6169b3bc126715efa85387b32047a95a2fc0040..68e44ae9333da4944fdbd641f4e2c83b78dab7b6 100644 (file)
@@ -1,6 +1,5 @@
 /* Main header for the Hitachi h8/300 architecture.  */
 
-#include "config.h"
 #include "bfd.h"
 
 #ifndef SIM_MAIN_H
index 1f90b573cf16aa5990fe5e8a3506553ed4ee49a9..b21e075d71d6de44c4c16c1d2afe0e12d670d601 100644 (file)
@@ -1,3 +1,8 @@
+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.
index 66d7b47dfb4fc5aa9511cd0746740b65f7989703..018c6a63a3f31a8e4245b51eb38bcddeb0faf1aa 100644 (file)
@@ -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
 
index 4db2e4d9b06033349ab85c1b8843402ca651039d..b363eb04a21888018666c67a10cd6520be6d7a76 100644 (file)
@@ -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>
index 829f9bb56ba101c377da46187e9d416cacdd3cb4..d0ae1cfef7b14c3571c569c472511bfccd430c50 100644 (file)
@@ -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. ???? */
index 90613411a5750eb0e10c6f80f38db180e3ba0f9c..db0e8f0c8af80058fe9745a039878327a56afb0e 100644 (file)
@@ -1,3 +1,8 @@
+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.
index 2ef32c7e6e17edaf5cbf3a1398def68ba13d630f..2f702bd72295383332dc0de22fd2031555d24d4f 100644 (file)
@@ -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"
 
index 801d27d42f955d7b77b63be38f7957a96c08f5ef..a04afc1d34b3aac466d30a5b7322e606ee6cd888 100644 (file)
@@ -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"
index c840b1796bd6fa9b8d3ea5752387a02fcc5307b1..1f8ba1d92eeed0eb9aaa9483f0b0749bfaadd978 100644 (file)
@@ -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"
index 3c68eafb052d7f03c4aec16b15f572654e10edfc..2ffe48de1bdd97dc6783fddbaeac0bc966df7522 100644 (file)
@@ -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
 
index c97a45129dc8ee0ea16109f59452861721567a0e..1cccf626b67031978428b627d9fe9845bca115d3 100644 (file)
@@ -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"
index 75b8ee7251f7bf19a91fcdfd020c23bb0dc5fb50..5b010f9d3fedb434439457635bbc5c8402622c0b 100644 (file)
@@ -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
 
index d84075a03f2f373783306e8be06b2b8ca5f3ea9d..1e7bb71515bc00c2f21a62766d0c4f49f6b35bff 100644 (file)
@@ -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.  */
index af71d21bbfd82f4ec9bddfe5535081129e735a69..591d8b9ddd1e11a7a3d8a1714e9d830fdc33168e 100644 (file)
@@ -1,3 +1,9 @@
+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.
index 369864876732683ac63463a757968885032e3bdd..b00d878f0bea2e34e0e812b504ba10100540b608 100644 (file)
@@ -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>
index ffc96ae5dde2acfd3de3514ce2bd7c0366c4ed7c..4275399683debe9a56ac8718b8853d73e0bd5347 100644 (file)
@@ -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"
index 86e774e3abe9dc4caa635b2d7b75595aad9fca3a..277fc141495d7b502d7fe4a6214b4b437a27512e 100644 (file)
@@ -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>
index ac36bc57071425d916dc2274274936a6f9ebc044..4c2c255ecd5b1c55434937139fb2d8aec194ef0d 100644 (file)
@@ -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>
index 4baf71fa6728f47df7c749039aa10cd4d234f3c7..243b7c4e072ce49fdff18b734ca429246c92f58f 100644 (file)
@@ -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>
index 50692e5ac723cf70a4bd04de711ee50e677ed5a1..5e09885be6446e6d6b239c234c3ca0fe73d63d8a 100644 (file)
@@ -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>
 
index 4c976449433b014e83c5a0e2f8518a3455e7c1e1..3d1713d20345ea2be4716a933698f289d726d164 100644 (file)
@@ -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>
index 1b3c774cf8172dc505473883fda39f53397b83d9..a57b6a11c6854ba46d6b3de26cb0a61452671eb9 100644 (file)
@@ -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>
index d5feb1716fb9eee66da4c29d4ccd3639c7f02dd1..f3040c571e84893210f0475e331facd9585eb808 100644 (file)
@@ -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>
index e9400840be93890200d43452adb79c1a1e6cbfd7..e8d9d2e6cc7b12be8e20d3cb4587750126f7f087 100644 (file)
@@ -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>
index f871c01d82b21386c3408c5b31eeee57a9176acd..d16be4c8d9a37e9752a377c93fd076f3c6211130 100644 (file)
@@ -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>
index 04031e7f90c70d38322aea6469407b2674963fd7..2e099a07fe9ba5b8903eca5fdb8aa4979507c362 100644 (file)
@@ -1,3 +1,10 @@
+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.
index 44e2537dc6dd0745c0c6483361d18feafecbbcf7..bb63b3d6b23b8c27d4de0dc5d899ea9af2fff2d4 100644 (file)
@@ -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"
index e4b091203ed4fd7c4384fcec9e8df333294bb477..c6b529d9352d72ede910370ea792712a9fa885ff 100644 (file)
@@ -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"
index 1d0a7356bb0ff5738c63c3710215835a01d58100..3f8305ecd5e9b9f9998d6e879bd08433a00fa264 100644 (file)
@@ -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
 
index b4346cf6cbfac2bf07be255945daad58bded6af9..852c10814c58a2d7558996ea34ecd01b54382e5a 100644 (file)
@@ -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
 
index 31bcee108896d2ea0239f463d86a984f6199c6b5..0e774bace74493c4660083e083da680094b3ab4f 100644 (file)
@@ -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
 
index 8d9f4324c9cd85a3d6b7352647afa4b5d0d4b14a..a6d8c486168c1f41a42574a349314b486158a9a5 100644 (file)
@@ -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"
index 1ee1781f0eb56435b6baa2be36c07330a77cbb59..63ed13788a51a3519bd9c773019276f522044bab 100644 (file)
@@ -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"
index 9fca2b1ec1d1189cf8ab06aaafa4455d139a0a07..ffa09f1527f021bb35a33308451f6d9e9b6c1492 100644 (file)
@@ -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"
index 410660c55c42cb97bbfedb3d8fc570374572f1a7..a070cdd5286275f84c18942a5c3cf958376a9c2b 100644 (file)
@@ -1,3 +1,9 @@
+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.
index f4815883a3390ab47fca8307afb2e147ff3fd642..5b2d1ba0b52328334d11e45276cd30e10e76ae42 100644 (file)
@@ -18,6 +18,8 @@
     
     */
 
+/* This must come before any other includes.  */
+#include "defs.h"
 
 #include "sim-main.h"
 #include "sim-hw.h"
index 88bd121980d8ee1a4c3f4fdfe1d92263cfe671da..1e4cb5eab0540761e2bdf3e1235b6327ac8de42a 100644 (file)
@@ -18,6 +18,8 @@
     
     */
 
+/* This must come before any other includes.  */
+#include "defs.h"
 
 #include "sim-main.h"
 #include "hw-main.h"
index b6eacb4883e74a572ca1270e16251e3876e43c7b..cf51d17f9ff9eb549e9205d5fca49047c87623e4 100644 (file)
@@ -20,6 +20,8 @@
     
     */
 
+/* This must come before any other includes.  */
+#include "defs.h"
 
 #include "sim-main.h"
 #include "hw-main.h"
index 1e9d56c849d074a7c88dc913669c7afea73f3f89..6fe759d34490446274ccc8e65e097527d87f5e69 100644 (file)
@@ -20,6 +20,8 @@
     
     */
 
+/* This must come before any other includes.  */
+#include "defs.h"
 
 #include "sim-main.h"
 #include "hw-main.h"
index d7bcac3fecadeaabdf2804ae1b0e617bb3af42f2..2c2e523da11ff59370c8bd1f77b1e9a2109c0e21 100644 (file)
@@ -20,6 +20,8 @@
     
     */
 
+/* This must come before any other includes.  */
+#include "defs.h"
 
 #include "sim-main.h"
 #include "hw-main.h"
index 586ee2ff5fc355c1261fd41aaccd06e40d85d3ba..88fab2f4461280cd06fca3df9f7e57e02cc45f44 100644 (file)
@@ -18,6 +18,8 @@
     
     */
 
+/* This must come before any other includes.  */
+#include "defs.h"
 
 #include "sim-main.h"
 #include "hw-main.h"
index 247e66871cfb8adea809c7ff403a66c21ea3eb40..d7436f79b3648ef14e16f0284ac23fbd1a80b6de 100644 (file)
@@ -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>
index 2a2210d7ac66af35dfd908a93218d6041308ab3a..46817606797d82a56c095429ec5eda930864adb4 100644 (file)
@@ -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>
index 07e4a8858a74ea399db8dc90f69ddc22f60f99aa..d4b2531abea0f6a8d3880aa014ee36d5c68cfb69 100644 (file)
@@ -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"
index 03c78ac218165c29e8e7aef6f33fdd7b6fd2b68a..1adce5082190b71b43cf55df79bdbfd99f9f3586 100644 (file)
@@ -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"
 
index 0d7860170bc75e5a3f661dfd83c4cbd162817d0a..3c619c14ab0bc1a35e6a1e741fe566d6f1cc023e 100644 (file)
@@ -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"
index 3a14634057d74d0b097609a902d3d14c73751807..7e70804621319093c98e6b04a896a62509de203d 100644 (file)
@@ -1,3 +1,7 @@
+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.
index 5e8ad3b8a2f8475f82c664a56e5a31c5182ca3b5..3517068abf5b4c127796a2cd2887bffda059e9f1 100644 (file)
@@ -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>
index dce172193b81a66287723359e0704889a806bb31..7b205acf0946e1c3d11ea9b571556418e8613847 100644 (file)
@@ -1,3 +1,7 @@
+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.
index 1b89bb49408492104dc13cc11cc24bab24e9e5f5..e451f2d68d1454c6a8ae3dc3b4c7ecc8285cb471 100644 (file)
@@ -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>
index 76134b78619507161be0d68b265a2257c1431ea2..68c2503ec600983dd7a34c2452e17d004efa90d6 100644 (file)
@@ -1,3 +1,10 @@
+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.
index f5d3d1dd5fbe8b958e5809462ca6e19a7eb173d3..03ed0c0558ff633e64b88b9ea2740ffe021e215a 100644 (file)
@@ -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>
index b82ff6880d26406bfa0714c1ca4ccefe29f0618f..fb25caa83560736c6063d082f4d99d6a3bae3188 100644 (file)
@@ -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] =
index bf23a066857c9778fa027ba0b90517c9ceb34075..43f38d2a7aeb8687526edbd33500b18ec352387a 100644 (file)
@@ -18,6 +18,8 @@
     
     */
 
+/* This must come before any other includes.  */
+#include "defs.h"
 
 #include "sim-main.h"
 #include "hw-main.h"
index d9a919752e3dee63dce534eba4c9c58bbd5a6ff4..0896b0fabb0b0c91fb92ec6de5d3ee2a37d8979b 100644 (file)
@@ -18,6 +18,8 @@
     
     */
 
+/* This must come before any other includes.  */
+#include "defs.h"
 
 #include "sim-main.h"
 #include "hw-main.h"
index 9676344bc33cce937a57b97c9dbc427a3abe709a..c81b2dd3a5e79b1711c5de407a5354e0a7ca27e3 100644 (file)
@@ -18,6 +18,8 @@
     
     */
 
+/* This must come before any other includes.  */
+#include "defs.h"
 
 #include "sim-main.h"
 #include "hw-main.h"
index 48b169fd9b8c0cc5c76a32deace4ea90b49fdbc7..5b5d8ac97f797382cffca6360fa7f07c5e24ce1f 100644 (file)
@@ -18,6 +18,8 @@
     
     */
 
+/* This must come before any other includes.  */
+#include "defs.h"
 
 #include "sim-main.h"
 #include "hw-main.h"
index 49b79f91dbc450cadbda00e5e658180c68091dbe..25eb4975652e425d3d3846bd8147bcaa3c5405b8 100644 (file)
@@ -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>
index 44fb9e4538cacaf72f1697ce6ec955ee277c2dad..a04e3eed3bf3868b4a24d8feec66020d9c611d53 100644 (file)
@@ -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"
index 948bb0d2ebe53bb388629ff128573becc8583d75..6978251a241ba18ebe968e0ceef7a980a5399943 100644 (file)
@@ -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"
index 3950dc2fafd87cee05fab138f28fc10b47015549..53a5c08118771f7afd4abddcd6dc194d7fff4e7b 100644 (file)
@@ -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"
index 620f4b2990bef0c3952dffd586ab2678ebbc6abc..24e16029d22e6ab8a143e32f81013603d1ba2134 100644 (file)
@@ -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"
 
index 42eed824296bbee8177c6611681cb9c809baea10..92dd6d1c34780ab0d0d7c249509499f35a4b3584 100644 (file)
@@ -1,3 +1,9 @@
+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.
index 3c3e843fa647392da425450e1bff3273d6640789..2a3591b8a37a19d9a5c8c4a15d48d38fead7e13f 100644 (file)
@@ -18,6 +18,8 @@
     
     */
 
+/* This must come before any other includes.  */
+#include "defs.h"
 
 #include "sim-main.h"
 #include "hw-main.h"
index cb81bc11527e4b15d365b343d1989f5fee24479d..2c47ca0e055878b70a30f591e77b44e25f472451 100644 (file)
@@ -18,6 +18,8 @@
     
     */
 
+/* This must come before any other includes.  */
+#include "defs.h"
 
 #include "sim-main.h"
 #include "hw-main.h"
index ecce7ec1fd50740786acbee4e233e244d383f7f0..1fd8d178ba5b11ed2933cc8730e25a8ac9df9610 100644 (file)
@@ -18,6 +18,9 @@
     
     */
 
+/* This must come before any other includes.  */
+#include "defs.h"
+
 #include "sim-main.h"
 #include "hw-main.h"
 
index 8d9bf8fa4fbc8582ef252995a4dd3a0cf60ae5be..3465954f75f7d4b2fc3ecebc1cd4ec9c863dfb22 100644 (file)
@@ -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"
index 61807c993222d6d0a33754c513aa87a7a6f936a6..ad9c24bbc6e8cfb2b36aa9dc7b45fa61f2b0d35a 100644 (file)
@@ -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"
index 55e9e212fe7a68f711c36c03f59f45cedf49ab2c..b6c5d5b087ef4c1537036611a8c5664e42e560b7 100644 (file)
@@ -1,4 +1,6 @@
-#include "config.h"
+/* This must come before any other includes.  */
+#include "defs.h"
+
 #include <signal.h>
 
 #include "sim-main.h"
index 882ff4624099696b1521015017bf4bc06f4c7b5c..cd0f1a667e494c07055421bfebc47c3c1ef2bc90 100644 (file)
@@ -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"
index be18085cda6379bf424579ee7887eb679f0351be..39b19d32186cd367c838fa62b97164275a27053b 100644 (file)
@@ -1,3 +1,7 @@
+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.
index 135716386f73296d9ea799f83ff69b0e14947e20..caf9e43deda5b83649d4233801821ba279260e23 100644 (file)
@@ -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>
index c6a4c65326098474e6c810909e35d0f1c58ad35b..4664091de00975a72b4aa7795374664b4a5af5c8 100644 (file)
@@ -1,3 +1,7 @@
+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.
index 4e213f978c6b28375a21a2624b074fd963833d4e..58a54698993f988bacd5cae794743c68d214a7dd 100644 (file)
@@ -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>
index ddfa61811355a3933d78bc6b7e0c17fc77e3f953..af6afc4609dbc3653cee52997eb7c03e1988ba1d 100644 (file)
@@ -1,3 +1,8 @@
+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.
index 4b44e508b7107e283a75ea3a5474597b8b3aa05e..650d98b5230fcad9c79a666f32d58b1b9e9763b5 100644 (file)
@@ -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
 
index 41dbaaebf1ddaa57a80acaaf44d9e5ecba63c792..005124b9ad7f645cd1f4f097d14dfe9d2fe956bf 100644 (file)
@@ -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"
index cac1abb2b8fbafb913947613315535b1ec9d31fd..f91a351a2db1b0df8eeddd6ade39a2388f621f3e 100644 (file)
@@ -21,8 +21,6 @@
 
 #define WITH_SCACHE_PBB 1
 
-#include "config.h"
-
 #include "ansidecl.h"
 #include "or1k-desc.h"
 #include "sim-basics.h"
index 0a0f1aa07114e2e4217d50e2fc0db77b5a2c8c8f..7f5a38f68befcf10269e8d064111edc6e2f08f40 100644 (file)
@@ -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
 
index 42db5f26857ee95731ed1593d3887aea1d7ff0f5..0755fe288b76ad1a3d604e82bc3d850f4bac79d2 100644 (file)
@@ -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.
index 9fc864e677af9ad8aa260f19d20f02632ba7aa18..5ce511e96b3fb4a3c3ba1cdfd616c3f67e9d36b9 100644 (file)
@@ -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
index 2b923ea3cc3eb71f4e08d9ee93e4fbd18f2952f1..057cf1ab0e454055fb7e3aa5537ee8118e3e6545 100644 (file)
@@ -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"
 
index dba14255366b31793e53eef850e6fbd270d550fb..53a392a303ef3d866e46f1c6e430d1f8443a89fd 100644 (file)
@@ -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 (file)
index 0000000..66e76d2
--- /dev/null
@@ -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
index 2457b687907ef790113fa52bca340435ab4a8922..b59ca21ca559a74f2c8af62496c51d8acc609397 100644 (file)
@@ -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"
 
index 8813169c60efa4da597ffdcafd726ea9953f17d6..1db2dec5c30c9c979fcafd4843d694066cdc847d 100644 (file)
@@ -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"
index 1ffa2d7e4eb7de84d0dedb010580fb6cec644ac5..2625d80d0b8b12bd20c872c9e7922e40ff16ed29 100644 (file)
@@ -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"
 
 
index 7645349ac5b4e62c863ff3b808f7647bfed53713..641f22514eccfe94e41386664bc86f2e992102f9 100644 (file)
@@ -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;
index 7b6aac181a3888f3f5eaee455a0135b5c0cd3dbb..0fef8ffbc7c53de1a24a78a261031bd734bb54b2 100644 (file)
@@ -1,3 +1,8 @@
+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.
index 6398c6714f25ed09252d058316840bd24c17bd4a..58ac333c1e6c6be19d38a66eacec6d53163fd0eb 100644 (file)
@@ -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>
index c2b631cda6646283d6840a6f936b71b79107ba06..17febb295b7a1805d612f053c4cce8e88d490270 100644 (file)
@@ -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.  */
index 966cacf5693d4954e514f4ff0b60199cb7648d9a..8233c20cefd7c2a4195dabcf6b3eddd7d626e1db 100644 (file)
@@ -19,8 +19,6 @@
 #ifndef PRU_SIM_MAIN
 #define PRU_SIM_MAIN
 
-#include "config.h"
-
 #include <stdint.h>
 #include <stddef.h>
 #include "pru.h"
index 9fe89f4527762707a7b04e6613ac70676a0bb1f9..53081dc0bb93951333838714a3dbbde8a6265587 100644 (file)
@@ -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.
index 6192b6dc5b23ad1189ce0821f9466c2a00a255ef..d430d77d701c95773ee2fe4402637ebd6f55f077 100644 (file)
@@ -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"
index 853a3afb42f61a07bb475708df925a213391a43e..9ff23033678767c5988fd4db55c56f7b8a5bc397 100644 (file)
@@ -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"
 
index bb45ffee576a9487fa81de3d68ea28ea2fdcf4cb..7f87f1beb5061b50a5f948b0a0bc06ed3bf48892 100644 (file)
@@ -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>
index 9fc92e1e040412dffd651af87c4534a169971a5c..ecd9ed0fc76c733b3ef21b70110eb2db79e6c9ad 100644 (file)
@@ -1,3 +1,8 @@
+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.
index fde8afee96b041ceb868d8dd783f6707c7ab5ea3..1bd8b6ee38f2c99ce18d2c125bc591b5123bee1d 100644 (file)
@@ -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>
index 87e343cdd485e26b7c0d4f4f8d467d7251df7bb7..a2414f9a35573fce0e780f751a7269281ff06e6f 100644 (file)
@@ -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>
index c137ba6e40e42ea430cea2ee7817da7700e37192..a2a57b0b198dae84ba5d745a705cd86ee86d61b3 100644 (file)
@@ -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>
index 8d8a79d5da89b2d7e500b329ff4a56ea22c36545..178fa75f79f9cd43ee7db1a32f28ac92f45f08b9 100644 (file)
@@ -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>
index 77e4987b6ff18048010403eeb18ffff939bc76b4..0b6ab8e79f1848152d8d44da22533318e597dd2d 100644 (file)
@@ -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>
index 006691c4c0afbb01df174b68d825030aed72615b..e45750ad7bf5c511b8b5653a177c9f970a975b95 100644 (file)
@@ -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>
index 6f897eb03393e498eb748df7ddee248b8e4fece6..1b4b365af1e3b707d84d2dca6c412e0ed8281762 100644 (file)
@@ -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>
index db00b6e5a5629e84c947dc61c2090cfd6dd55b87..dc30d46090dfdcdfe233ff0c880d9512789b1652 100644 (file)
@@ -1,3 +1,9 @@
+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.
index e72b6d3ddeeb8fb51743a55fa32b9de2086b1a6b..c9b1c3cb57cbf022cb80e471fa6c947c1d6be3ef 100644 (file)
@@ -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>
 
index 6c4738c0b21d338705acfe6eae4449f9d61801c3..611d9123d48176cd877292d80d36150f31a39be5 100644 (file)
@@ -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>
 
index 4a0f0701a56b650ef5aafe909243b869feadbd31..7298631965bc9138ebe21cb6bd27ec7c97534e96 100644 (file)
@@ -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>
index b04826f55c7f212839cc3bc575ab5df3f2dcfb97..d144888027792b5f4c9472edc817100a3cd06e00 100644 (file)
@@ -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>
index 20a8434388e9bc51a570655fb0013bcd9725e214..5d7092ba1d14fe4d078ff51bbeda5299eff1f046 100644 (file)
@@ -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>
index 7e62bfb89535222c7cc26786c3236223dba480cc..f9b9cc1a97ed0f14fe2fa9b464a2d6510a99997c 100644 (file)
@@ -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>
index 2a4a2539e4171a5622df828f294d7d35ca41ea35..e7447aca463dfecc96470e3906a263bced39d777 100644 (file)
@@ -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"
index bdf2debac69df94e8870aca0bf348881b4091205..1d27c59bb943a2567f8b23b263ec07366305ce13 100644 (file)
@@ -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>
index e3737a56e98ad02794727c1626b0f74bda591ffe..869dd3aa89c96c8782138645cf4ed375cceec2a0 100644 (file)
@@ -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>
index 73ca0f2b190e3d23acb7bf4697f4c4731239279d..1981b5d3c3e2d9fffc8796bc0a554a3a6bcd4df2 100644 (file)
@@ -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>
index a005797b4ecbcf09d68578b0f7d2e790edf02235..bb191dbdd393c47a98dcd52e77d8d383bb3ae54c 100644 (file)
@@ -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>
index 4f687e8b52b14d5b8a87786cdbef779aa791d814..3dc1630fc5eaf67060d7990278ca25661ff16694 100644 (file)
@@ -1,3 +1,7 @@
+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.
index 5fb6aff02f0dfe5f21d63571c47f876a3ce1fc43..652450357766b44e9200a16453455163549ac3ea 100644 (file)
@@ -18,7 +18,8 @@
 
 */
 
-#include "config.h"
+/* This must come before any other includes.  */
+#include "defs.h"
 
 #include <ctype.h>
 #include <stdio.h>
index 21706571e5131ca051182323318957d3588cae54..81120ed51c0db8932bc0c2ece77588e0c3f5f0a5 100644 (file)
@@ -1,3 +1,8 @@
+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.
index ff2f6a23e56d8989404174a091c1b4982fc6446d..79c6e0f7ddcc154e91c2419e8d099bbdc07e48a6 100644 (file)
@@ -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"
index e7276a68f8f6728afd4f487c2162f1754bfd578d..6556273f67816596086bdbb3daac0a5583ae602d 100644 (file)
@@ -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"
index bd23f92aba4d56578940070e4969d1099b39c82a..62a2bbcbb61504c96b7f0b6a9226c9bf8c9e63ff 100644 (file)
@@ -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"