From f074c07d8d4d36d2712117eace2e4db48d544291 Mon Sep 17 00:00:00 2001 From: Mike Frysinger Date: Sat, 9 Jan 2021 03:04:42 -0500 Subject: [PATCH] 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. --- sim/common/ChangeLog | 5 +++++ sim/common/sim-basics.h | 5 ----- sim/common/sim-core.c | 1 + sim/common/sim-watch.c | 1 + 4 files changed, 7 insertions(+), 5 deletions(-) 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" -- 2.30.2