Add system includes in sim
authorTom Tromey <tom@tromey.com>
Thu, 8 Apr 2021 14:52:50 +0000 (08:52 -0600)
committerTom Tromey <tom@tromey.com>
Thu, 8 Apr 2021 20:34:42 +0000 (14:34 -0600)
This updates various parts of the sim to include missing system
headers.  I made the includes unconditional, because other parts of
the tree are already doing this.

2021-04-08  Tom Tromey  <tom@tromey.com>

* traps.c: Include stdlib.h.
* cris-tmpl.c: Include stdlib.h.

sim/erc32/ChangeLog
2021-04-08  Tom Tromey  <tom@tromey.com>

* func.c: Include sys/time.h.

sim/frv/ChangeLog
2021-04-08  Tom Tromey  <tom@tromey.com>

* traps.c: Include stdlib.h.
* registers.c: Include stdlib.h.
* profile.c: Include stdlib.h.
* memory.c: Include stdlib.h.
* interrupts.c: Include stdlib.h.
* frv.c: Include stdlib.h.
* cache.c: Include stdlib.h.

sim/iq2000/ChangeLog
2021-04-08  Tom Tromey  <tom@tromey.com>

* iq2000.c: Include stdlib.h.

sim/m32r/ChangeLog
2021-04-08  Tom Tromey  <tom@tromey.com>

* traps.c: Include stdlib.h.
* m32r.c: Include stdlib.h.

sim/ppc/ChangeLog
2021-04-08  Tom Tromey  <tom@tromey.com>

* emul_unix.c: Include time.h.

20 files changed:
sim/cris/ChangeLog
sim/cris/cris-tmpl.c
sim/cris/traps.c
sim/erc32/ChangeLog
sim/erc32/func.c
sim/frv/ChangeLog
sim/frv/cache.c
sim/frv/frv.c
sim/frv/interrupts.c
sim/frv/memory.c
sim/frv/profile.c
sim/frv/registers.c
sim/frv/traps.c
sim/iq2000/ChangeLog
sim/iq2000/iq2000.c
sim/m32r/ChangeLog
sim/m32r/m32r.c
sim/m32r/traps.c
sim/ppc/ChangeLog
sim/ppc/emul_unix.c

index 3899045c7bf7f898c7a9b9886a364a717b6622e4..45907986303d2a07db2edc788585bc5fd86d490b 100644 (file)
@@ -1,3 +1,8 @@
+2021-04-08  Tom Tromey  <tom@tromey.com>
+
+       * traps.c: Include stdlib.h.
+       * cris-tmpl.c: Include stdlib.h.
+
 2021-04-02  Mike Frysinger  <vapier@gentoo.org>
 
        * aclocal.m4, configure: Regenerate.
index b5ad718919120a9382cea1a3b9ac60d29bd3a60d..95579dbffa9b6b2b3090f77bb3c35a1c7f3e01f6 100644 (file)
@@ -25,6 +25,8 @@ along with this program.  If not, see <http://www.gnu.org/licenses/>.  */
 #include "cgen-mem.h"
 #include "cgen-ops.h"
 
+#include <stdlib.h>
+
 #define MY(f) XCONCAT3(crisv,BASENUM,f)
 
 /* Dispatcher for break insn.  */
index 2aaa1f43b1685e5b12e280136290036b2c097750..1c8ca41d14eec8b64cf45bc87f3c7868ed53b164 100644 (file)
@@ -23,6 +23,7 @@ along with this program.  If not, see <http://www.gnu.org/licenses/>.  */
 #include "bfd.h"
 /* FIXME: get rid of targ-vals.h usage everywhere else.  */
 
+#include <stdlib.h>
 #include <stdarg.h>
 #include <errno.h>
 #ifdef HAVE_UNISTD_H
index 72de217ece94b4ce4b8fab1646ed7d2770152d97..3b85c66beebc534aa7668619e7754ee24f03a68c 100644 (file)
@@ -1,3 +1,7 @@
+2021-04-08  Tom Tromey  <tom@tromey.com>
+
+       * func.c: Include sys/time.h.
+
 2021-04-08  Tom Tromey  <tom@tromey.com>
 
        * sis.c (run_sim, main): Use new-style declaration.
index 98217f062aeef5ef1f3f9b486465f2e53872a3a8..c6dfa1927ad4b332d4168e9b20be50d9e35ad16c 100644 (file)
@@ -26,6 +26,7 @@
 #include <dis-asm.h>
 #include "sim-config.h"
 #include <inttypes.h>
+#include <sys/time.h>
 
 #define        VAL(x)  strtoul(x,(char **)NULL,0)
 
index c32d2c5131c6809223bb15141487ba292584b335..a067ff80c3e3c74a204a1d84bfb537b8a133ad1b 100644 (file)
@@ -1,3 +1,13 @@
+2021-04-08  Tom Tromey  <tom@tromey.com>
+
+       * traps.c: Include stdlib.h.
+       * registers.c: Include stdlib.h.
+       * profile.c: Include stdlib.h.
+       * memory.c: Include stdlib.h.
+       * interrupts.c: Include stdlib.h.
+       * frv.c: Include stdlib.h.
+       * cache.c: Include stdlib.h.
+
 2021-04-08  Tom Tromey  <tom@tromey.com>
 
        * sim-if.c (sim_open, frv_sim_close, sim_create_inferior): Use
index 9e2a99f5f7e16eb83fb3450e266bc4988a3643de..c10d46373f51bef7c54e939a6b740bb428a0f42f 100644 (file)
@@ -24,6 +24,7 @@ along with this program.  If not, see <http://www.gnu.org/licenses/>.  */
 #include "sim-main.h"
 #include "cache.h"
 #include "bfd.h"
+#include <stdlib.h>
 
 void
 frv_cache_init (SIM_CPU *cpu, FRV_CACHE *cache)
index 88290be3e8e128d4c55fb509eed39f0d9a2a6c86..fee59c2aae77a3fb6ef4f87fb7058497d3d225c4 100644 (file)
@@ -28,6 +28,7 @@ along with this program.  If not, see <http://www.gnu.org/licenses/>.  */
 #include "bfd.h"
 #include "gdb/sim-frv.h"
 #include <math.h>
+#include <stdlib.h>
 
 /* Maintain a flag in order to know when to write the address of the next
    VLIW instruction into the LR register.  Used by JMPL. JMPIL, and CALL
index d38620c9a72b12d1361b15c54447a626beaebfe2..0b8ed763987ac5e97879d42f3dd23d72a7d17c94 100644 (file)
@@ -22,6 +22,7 @@ along with this program.  If not, see <http://www.gnu.org/licenses/>.  */
 
 #include "sim-main.h"
 #include "bfd.h"
+#include <stdlib.h>
 
 /* FR-V Interrupt table.
    Describes the interrupts supported by the FR-V.
index ea7f68e4349ac62e66585ef05a358a99d2ae320a..5978d151627b013858f9fe3c66571ce5d3ef40ef 100644 (file)
@@ -23,6 +23,7 @@ along with this program.  If not, see <http://www.gnu.org/licenses/>.  */
 #include "sim-main.h"
 #include "cgen-mem.h"
 #include "bfd.h"
+#include <stdlib.h>
 
 /* Check for alignment and access restrictions.  Return the corrected address.
  */
index c08950886d105a118fbd0c503cceee4dbeabc8d0..441590eb581d66d4b31c337fb38a334c326cf675 100644 (file)
@@ -24,6 +24,7 @@ along with this program.  If not, see <http://www.gnu.org/licenses/>.
 
 #include "sim-main.h"
 #include "bfd.h"
+#include <stdlib.h>
 
 #if WITH_PROFILE_MODEL_P
 
index c9d26fda01819b1965a075504d8c06d03f08e0f4..764a6755b3f9f9f56cd3783e963e81b2a20a3d18 100644 (file)
@@ -22,6 +22,7 @@ along with this program.  If not, see <http://www.gnu.org/licenses/>.  */
 
 #include "sim-main.h"
 #include "bfd.h"
+#include <stdlib.h>
 
 #define IMPL 1 /* Implemented */
 #define SUP  1 /* Supervisor register */
index 79ea1571ac2bfd8143801da6d1c9697ef24dd3f3..c0ed9b1c49ff160a6ed6c540500d3c16082dd7a3 100644 (file)
@@ -29,6 +29,8 @@ along with this program.  If not, see <http://www.gnu.org/licenses/>.  */
 #include "bfd.h"
 #include "libiberty.h"
 
+#include <stdlib.h>
+
 CGEN_ATTR_VALUE_ENUM_TYPE frv_current_fm_slot;
 
 /* The semantic code invokes this for invalid (unrecognized) instructions.  */
index 970df7988a026612c1164314f39e307a119db397..95ad2a8ce6e32f77db989b1d260c5d6f2efff8e0 100644 (file)
@@ -1,3 +1,7 @@
+2021-04-08  Tom Tromey  <tom@tromey.com>
+
+       * iq2000.c: Include stdlib.h.
+
 2021-04-08  Tom Tromey  <tom@tromey.com>
 
        * sim-if.c (sim_open, sim_create_inferior): Use new-style
index 23a342983ce41ae8d994895f6144a7ee0f688c8b..e03c47919fdf7b7d85f4627c66b1a9b20184c602 100644 (file)
@@ -23,6 +23,7 @@
 #include "sim-main.h"
 #include "cgen-mem.h"
 #include "cgen-ops.h"
+#include <stdlib.h>
 
 enum
 {
index f964397d5a399259edb55851568bcf4988625e60..3252bdea457e7480f739c23d4624141080d6b668 100644 (file)
@@ -1,3 +1,8 @@
+2021-04-08  Tom Tromey  <tom@tromey.com>
+
+       * traps.c: Include stdlib.h.
+       * m32r.c: Include stdlib.h.
+
 2021-04-08  Tom Tromey  <tom@tromey.com>
 
        * sim-if.c (sim_open, sim_create_inferior): Use new-style
index 1c5379cfd7470f9074ff83fa15f829fd7ed68ee4..1d0a7356bb0ff5738c63c3710215835a01d58100 100644 (file)
@@ -23,6 +23,7 @@
 #include "sim-main.h"
 #include "cgen-mem.h"
 #include "cgen-ops.h"
+#include <stdlib.h>
 
 /* Return the size of REGNO in bytes.  */
 
index 9edf66b58f1fc83b8e52fc6214b6b141d35e7c0d..9fca2b1ec1d1189cf8ab06aaafa4455d139a0a07 100644 (file)
@@ -20,6 +20,7 @@
 #include "sim-main.h"
 #include "sim-syscall.h"
 #include "targ-vals.h"
+#include <stdlib.h>
 
 #define TRAP_FLUSH_CACHE 12
 /* The semantic code invokes this for invalid (unrecognized) instructions.  */
index 910996fe3460aa8e478ef49617f4e6ae5fc90252..269411e2ab14d7c0cfcd7becb6d6d8123d79ec86 100644 (file)
@@ -1,3 +1,7 @@
+2021-04-08  Tom Tromey  <tom@tromey.com>
+
+       * emul_unix.c: Include time.h.
+
 2021-04-08  Simon Marchi  <simon.marchi@polymtl.ca>
 
        * Makefile.in: Set ASAN_OPTIONS when running igen.
index 92c3c1ededfacdc509993d94a0ec1aee8baed632..2616ae408ba7e595942658df7933aa400fd60980 100644 (file)
@@ -124,6 +124,7 @@ int getrusage();
 #endif
 
 #include <stdlib.h>
+#include <time.h>
 
 #if defined(BSD) && !defined(errno) && (BSD < 199306)  /* here BSD as just a bug */
 extern int errno;
This page took 0.037292 seconds and 4 git commands to generate.