From: Mike Frysinger Date: Sat, 9 Jan 2021 08:04:42 +0000 (-0500) Subject: sim: common: clean up asprintf includes a bit X-Git-Url: https://git.libre-soc.org/?a=commitdiff_plain;h=f074c07d8d4d36d2712117eace2e4db48d544291;p=binutils-gdb.git sim: common: clean up asprintf includes a bit Delete stale prototypes that libiberty.h already provides, and add missing libiberty.h includes to files that use those functions. --- diff --git a/sim/common/ChangeLog b/sim/common/ChangeLog index c75ffd59e60..e525110bf41 100644 --- a/sim/common/ChangeLog +++ b/sim/common/ChangeLog @@ -1,3 +1,8 @@ +2021-01-09 Mike Frysinger + + * sim-basics.h [__CYGWIN32__] (vasprintf, asprintf): Delete. + * sim-core.c, sim-watch.c: Include libiberty.h. + 2021-01-09 Mike Frysinger * acinclude.m4: Replace duplicate text with pointer to README-HACKING. diff --git a/sim/common/sim-basics.h b/sim/common/sim-basics.h index 8634f42d8ac..52c9b2fa40c 100644 --- a/sim/common/sim-basics.h +++ b/sim/common/sim-basics.h @@ -37,11 +37,6 @@ #include #include -#ifdef __CYGWIN32__ -extern int vasprintf (char **result, const char *format, va_list args); -extern int asprintf (char **result, const char *format, ...); -#endif - #ifndef NULL #define NULL 0 diff --git a/sim/common/sim-core.c b/sim/common/sim-core.c index 538230635bc..ade345ef16f 100644 --- a/sim/common/sim-core.c +++ b/sim/common/sim-core.c @@ -25,6 +25,7 @@ #include "sim-main.h" #include "sim-assert.h" +#include "libiberty.h" #if (WITH_HW) #include "sim-hw.h" diff --git a/sim/common/sim-watch.c b/sim/common/sim-watch.c index 95266501f12..9c929a15731 100644 --- a/sim/common/sim-watch.c +++ b/sim/common/sim-watch.c @@ -20,6 +20,7 @@ along with this program. If not, see . */ #include "config.h" #include "sim-main.h" #include "sim-options.h" +#include "libiberty.h" #include "sim-assert.h"