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.
This commit is contained in:
parent
f1cf2aa54e
commit
b760fb3a1c
|
@ -1,3 +1,12 @@
|
||||||
|
2020-01-19 Simon Marchi <simon.marchi@polymtl.ca>
|
||||||
|
|
||||||
|
* 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.
|
||||||
|
|
||||||
2019-12-19 Tom Tromey <tromey@adacore.com>
|
2019-12-19 Tom Tromey <tromey@adacore.com>
|
||||||
|
|
||||||
PR build/24572:
|
PR build/24572:
|
||||||
|
|
|
@ -20,6 +20,7 @@ along with this program. If not, see <http://www.gnu.org/licenses/>. */
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
#include <signal.h>
|
#include <signal.h>
|
||||||
|
#include <stdlib.h>
|
||||||
|
|
||||||
/* For strsignal. */
|
/* For strsignal. */
|
||||||
#ifdef HAVE_STRING_H
|
#ifdef HAVE_STRING_H
|
||||||
|
|
|
@ -30,6 +30,8 @@
|
||||||
#include "sim-hw.h"
|
#include "sim-hw.h"
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
|
#include <stdlib.h>
|
||||||
|
|
||||||
/* "core" module install handler.
|
/* "core" module install handler.
|
||||||
|
|
||||||
This is called via sim_module_install to install the "core"
|
This is called via sim_module_install to install the "core"
|
||||||
|
|
|
@ -17,11 +17,12 @@ GNU General Public License for more details.
|
||||||
You should have received a copy of the GNU General Public License
|
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/>. */
|
||||||
|
|
||||||
#include <stdio.h>
|
|
||||||
|
|
||||||
#include "sim-main.h"
|
#include "sim-main.h"
|
||||||
#include "sim-assert.h"
|
#include "sim-assert.h"
|
||||||
|
|
||||||
|
#include <stdio.h>
|
||||||
|
#include <stdlib.h>
|
||||||
|
|
||||||
/* Get the run state.
|
/* Get the run state.
|
||||||
REASON/SIGRC are the values returned by sim_stop_reason.
|
REASON/SIGRC are the values returned by sim_stop_reason.
|
||||||
??? Should each cpu have its own copy? */
|
??? Should each cpu have its own copy? */
|
||||||
|
|
|
@ -33,6 +33,8 @@
|
||||||
#include <unistd.h>
|
#include <unistd.h>
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
|
#include <stdlib.h>
|
||||||
|
|
||||||
/* Define the rate at which the simulator should poll the host
|
/* Define the rate at which the simulator should poll the host
|
||||||
for a quit. */
|
for a quit. */
|
||||||
#ifndef POLL_QUIT_INTERVAL
|
#ifndef POLL_QUIT_INTERVAL
|
||||||
|
|
|
@ -36,6 +36,8 @@ along with this program. If not, see <http://www.gnu.org/licenses/>. */
|
||||||
|
|
||||||
#include "libiberty.h"
|
#include "libiberty.h"
|
||||||
|
|
||||||
|
#include <stdlib.h>
|
||||||
|
|
||||||
/* List of all modules. */
|
/* List of all modules. */
|
||||||
static MODULE_INSTALL_FN * const modules[] = {
|
static MODULE_INSTALL_FN * const modules[] = {
|
||||||
standard_install,
|
standard_install,
|
||||||
|
|
|
@ -20,6 +20,8 @@ along with this program. If not, see <http://www.gnu.org/licenses/>. */
|
||||||
#include "sim-main.h"
|
#include "sim-main.h"
|
||||||
#include "sim-assert.h"
|
#include "sim-assert.h"
|
||||||
|
|
||||||
|
#include <stdlib.h>
|
||||||
|
|
||||||
/* Generic implementation of sim_stop_reason */
|
/* Generic implementation of sim_stop_reason */
|
||||||
|
|
||||||
void
|
void
|
||||||
|
|
Loading…
Reference in New Issue