* [PATCH] sim: common: clean up asprintf includes a bit
@ 2021-01-09 8:06 Mike Frysinger
2021-01-09 11:37 ` Andrew Burgess
0 siblings, 1 reply; 2+ messages in thread
From: Mike Frysinger @ 2021-01-09 8:06 UTC (permalink / raw)
To: gdb-patches
Delete stale prototypes that libiberty.h already provides, and add
missing libiberty.h includes to files that use those functions.
---
sim/common/sim-basics.h | 5 -----
sim/common/sim-core.c | 1 +
sim/common/sim-watch.c | 1 +
3 files changed, 2 insertions(+), 5 deletions(-)
diff --git a/sim/common/sim-basics.h b/sim/common/sim-basics.h
index 8634f42d8ac9..52c9b2fa40c3 100644
--- a/sim/common/sim-basics.h
+++ b/sim/common/sim-basics.h
@@ -37,11 +37,6 @@
#include <stdio.h>
#include <setjmp.h>
-#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 538230635bc9..ade345ef16fb 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 95266501f128..9c929a15731b 100644
--- a/sim/common/sim-watch.c
+++ b/sim/common/sim-watch.c
@@ -20,6 +20,7 @@ along with this program. If not, see <http://www.gnu.org/licenses/>. */
#include "config.h"
#include "sim-main.h"
#include "sim-options.h"
+#include "libiberty.h"
#include "sim-assert.h"
--
2.28.0
^ permalink raw reply [flat|nested] 2+ messages in thread
* Re: [PATCH] sim: common: clean up asprintf includes a bit
2021-01-09 8:06 [PATCH] sim: common: clean up asprintf includes a bit Mike Frysinger
@ 2021-01-09 11:37 ` Andrew Burgess
0 siblings, 0 replies; 2+ messages in thread
From: Andrew Burgess @ 2021-01-09 11:37 UTC (permalink / raw)
To: Mike Frysinger; +Cc: gdb-patches
* Mike Frysinger via Gdb-patches <gdb-patches@sourceware.org> [2021-01-09 03:06:02 -0500]:
> Delete stale prototypes that libiberty.h already provides, and add
> missing libiberty.h includes to files that use those functions.
> ---
> sim/common/sim-basics.h | 5 -----
> sim/common/sim-core.c | 1 +
> sim/common/sim-watch.c | 1 +
> 3 files changed, 2 insertions(+), 5 deletions(-)
LGTM, but will need a ChangeLog entry.
Thanks,
Andrew
>
> diff --git a/sim/common/sim-basics.h b/sim/common/sim-basics.h
> index 8634f42d8ac9..52c9b2fa40c3 100644
> --- a/sim/common/sim-basics.h
> +++ b/sim/common/sim-basics.h
> @@ -37,11 +37,6 @@
> #include <stdio.h>
> #include <setjmp.h>
>
> -#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 538230635bc9..ade345ef16fb 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 95266501f128..9c929a15731b 100644
> --- a/sim/common/sim-watch.c
> +++ b/sim/common/sim-watch.c
> @@ -20,6 +20,7 @@ along with this program. If not, see <http://www.gnu.org/licenses/>. */
> #include "config.h"
> #include "sim-main.h"
> #include "sim-options.h"
> +#include "libiberty.h"
>
> #include "sim-assert.h"
>
> --
> 2.28.0
>
^ permalink raw reply [flat|nested] 2+ messages in thread
end of thread, other threads:[~2021-01-09 11:37 UTC | newest]
Thread overview: 2+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2021-01-09 8:06 [PATCH] sim: common: clean up asprintf includes a bit Mike Frysinger
2021-01-09 11:37 ` Andrew Burgess
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).