sim: add some stdlib.h includes
authorSimon Marchi <simon.marchi@polymtl.ca>
Mon, 20 Jan 2020 00:47:17 +0000 (19:47 -0500)
committerSimon Marchi <simon.marchi@polymtl.ca>
Mon, 20 Jan 2020 00:48:16 +0000 (19:48 -0500)
commitb760fb3a1cd35fda01843ee7cdb3e420f07d27b9
tree866133f85c6aef8e7770391006115721c9b2c312
parentf1cf2aa54e20257c7d68b795077ac41c3e492f57
sim: add some stdlib.h includes

When trying to compile GDB with --target=avr, with gcc 9.2.0, I am
getting a bunch of:

    /home/simark/src/binutils-gdb/sim/avr/../common/nrun.c:94:7: error: implicit declaration of function â€˜abort’ [-Werror=implicit-function-declaration]
       94 |       abort ();
          |       ^~~~~
    /home/simark/src/binutils-gdb/sim/avr/../common/nrun.c:94:7: error: incompatible implicit declaration of built-in function â€˜abort’ [-Werror]
    /home/simark/src/binutils-gdb/sim/avr/../common/nrun.c:94:7: note: include â€˜<stdlib.h>’ or provide a declaration of â€˜abort’

I did what the compiler told me and added the relevant includes in the
problematic files.

sim/common/ChangeLog:

* nrun.c: Include stdlib.h.
* sim-core.c: Likewise.
* sim-engine.c: Likewise.
* sim-io.c: Likewise.
* sim-module.c: Likewise.
* sim-reason.c: Likewise.
sim/common/ChangeLog
sim/common/nrun.c
sim/common/sim-core.c
sim/common/sim-engine.c
sim/common/sim-io.c
sim/common/sim-module.c
sim/common/sim-reason.c