Add system includes in sim

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.
This commit is contained in:
Tom Tromey 2021-04-08 08:52:50 -06:00
parent 81e6e8ae40
commit 32a046ab0d
20 changed files with 48 additions and 0 deletions

View 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> 2021-04-02 Mike Frysinger <vapier@gentoo.org>
* aclocal.m4, configure: Regenerate. * aclocal.m4, configure: Regenerate.

View File

@ -25,6 +25,8 @@ along with this program. If not, see <http://www.gnu.org/licenses/>. */
#include "cgen-mem.h" #include "cgen-mem.h"
#include "cgen-ops.h" #include "cgen-ops.h"
#include <stdlib.h>
#define MY(f) XCONCAT3(crisv,BASENUM,f) #define MY(f) XCONCAT3(crisv,BASENUM,f)
/* Dispatcher for break insn. */ /* Dispatcher for break insn. */

View File

@ -23,6 +23,7 @@ along with this program. If not, see <http://www.gnu.org/licenses/>. */
#include "bfd.h" #include "bfd.h"
/* FIXME: get rid of targ-vals.h usage everywhere else. */ /* FIXME: get rid of targ-vals.h usage everywhere else. */
#include <stdlib.h>
#include <stdarg.h> #include <stdarg.h>
#include <errno.h> #include <errno.h>
#ifdef HAVE_UNISTD_H #ifdef HAVE_UNISTD_H

View 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> 2021-04-08 Tom Tromey <tom@tromey.com>
* sis.c (run_sim, main): Use new-style declaration. * sis.c (run_sim, main): Use new-style declaration.

View File

@ -26,6 +26,7 @@
#include <dis-asm.h> #include <dis-asm.h>
#include "sim-config.h" #include "sim-config.h"
#include <inttypes.h> #include <inttypes.h>
#include <sys/time.h>
#define VAL(x) strtoul(x,(char **)NULL,0) #define VAL(x) strtoul(x,(char **)NULL,0)

View 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> 2021-04-08 Tom Tromey <tom@tromey.com>
* sim-if.c (sim_open, frv_sim_close, sim_create_inferior): Use * sim-if.c (sim_open, frv_sim_close, sim_create_inferior): Use

View File

@ -24,6 +24,7 @@ along with this program. If not, see <http://www.gnu.org/licenses/>. */
#include "sim-main.h" #include "sim-main.h"
#include "cache.h" #include "cache.h"
#include "bfd.h" #include "bfd.h"
#include <stdlib.h>
void void
frv_cache_init (SIM_CPU *cpu, FRV_CACHE *cache) frv_cache_init (SIM_CPU *cpu, FRV_CACHE *cache)

View File

@ -28,6 +28,7 @@ along with this program. If not, see <http://www.gnu.org/licenses/>. */
#include "bfd.h" #include "bfd.h"
#include "gdb/sim-frv.h" #include "gdb/sim-frv.h"
#include <math.h> #include <math.h>
#include <stdlib.h>
/* Maintain a flag in order to know when to write the address of the next /* 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 VLIW instruction into the LR register. Used by JMPL. JMPIL, and CALL

View File

@ -22,6 +22,7 @@ along with this program. If not, see <http://www.gnu.org/licenses/>. */
#include "sim-main.h" #include "sim-main.h"
#include "bfd.h" #include "bfd.h"
#include <stdlib.h>
/* FR-V Interrupt table. /* FR-V Interrupt table.
Describes the interrupts supported by the FR-V. Describes the interrupts supported by the FR-V.

View File

@ -23,6 +23,7 @@ along with this program. If not, see <http://www.gnu.org/licenses/>. */
#include "sim-main.h" #include "sim-main.h"
#include "cgen-mem.h" #include "cgen-mem.h"
#include "bfd.h" #include "bfd.h"
#include <stdlib.h>
/* Check for alignment and access restrictions. Return the corrected address. /* Check for alignment and access restrictions. Return the corrected address.
*/ */

View File

@ -24,6 +24,7 @@ along with this program. If not, see <http://www.gnu.org/licenses/>.
#include "sim-main.h" #include "sim-main.h"
#include "bfd.h" #include "bfd.h"
#include <stdlib.h>
#if WITH_PROFILE_MODEL_P #if WITH_PROFILE_MODEL_P

View File

@ -22,6 +22,7 @@ along with this program. If not, see <http://www.gnu.org/licenses/>. */
#include "sim-main.h" #include "sim-main.h"
#include "bfd.h" #include "bfd.h"
#include <stdlib.h>
#define IMPL 1 /* Implemented */ #define IMPL 1 /* Implemented */
#define SUP 1 /* Supervisor register */ #define SUP 1 /* Supervisor register */

View File

@ -29,6 +29,8 @@ along with this program. If not, see <http://www.gnu.org/licenses/>. */
#include "bfd.h" #include "bfd.h"
#include "libiberty.h" #include "libiberty.h"
#include <stdlib.h>
CGEN_ATTR_VALUE_ENUM_TYPE frv_current_fm_slot; CGEN_ATTR_VALUE_ENUM_TYPE frv_current_fm_slot;
/* The semantic code invokes this for invalid (unrecognized) instructions. */ /* The semantic code invokes this for invalid (unrecognized) instructions. */

View 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> 2021-04-08 Tom Tromey <tom@tromey.com>
* sim-if.c (sim_open, sim_create_inferior): Use new-style * sim-if.c (sim_open, sim_create_inferior): Use new-style

View File

@ -23,6 +23,7 @@
#include "sim-main.h" #include "sim-main.h"
#include "cgen-mem.h" #include "cgen-mem.h"
#include "cgen-ops.h" #include "cgen-ops.h"
#include <stdlib.h>
enum enum
{ {

View 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> 2021-04-08 Tom Tromey <tom@tromey.com>
* sim-if.c (sim_open, sim_create_inferior): Use new-style * sim-if.c (sim_open, sim_create_inferior): Use new-style

View File

@ -23,6 +23,7 @@
#include "sim-main.h" #include "sim-main.h"
#include "cgen-mem.h" #include "cgen-mem.h"
#include "cgen-ops.h" #include "cgen-ops.h"
#include <stdlib.h>
/* Return the size of REGNO in bytes. */ /* Return the size of REGNO in bytes. */

View File

@ -20,6 +20,7 @@
#include "sim-main.h" #include "sim-main.h"
#include "sim-syscall.h" #include "sim-syscall.h"
#include "targ-vals.h" #include "targ-vals.h"
#include <stdlib.h>
#define TRAP_FLUSH_CACHE 12 #define TRAP_FLUSH_CACHE 12
/* The semantic code invokes this for invalid (unrecognized) instructions. */ /* The semantic code invokes this for invalid (unrecognized) instructions. */

View 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> 2021-04-08 Simon Marchi <simon.marchi@polymtl.ca>
* Makefile.in: Set ASAN_OPTIONS when running igen. * Makefile.in: Set ASAN_OPTIONS when running igen.

View File

@ -124,6 +124,7 @@ int getrusage();
#endif #endif
#include <stdlib.h> #include <stdlib.h>
#include <time.h>
#if defined(BSD) && !defined(errno) && (BSD < 199306) /* here BSD as just a bug */ #if defined(BSD) && !defined(errno) && (BSD < 199306) /* here BSD as just a bug */
extern int errno; extern int errno;