sim: common: clean up asprintf includes a bit
authorMike Frysinger <vapier@gentoo.org>
Sat, 9 Jan 2021 08:04:42 +0000 (03:04 -0500)
committerMike Frysinger <vapier@gentoo.org>
Sat, 9 Jan 2021 14:32:34 +0000 (09:32 -0500)
Delete stale prototypes that libiberty.h already provides, and add
missing libiberty.h includes to files that use those functions.

sim/common/ChangeLog
sim/common/sim-basics.h
sim/common/sim-core.c
sim/common/sim-watch.c

index c75ffd59e60ce26213264707c2c0778ff20774cf..e525110bf4155ec85423aa17e73492e67864f805 100644 (file)
@@ -1,3 +1,8 @@
+2021-01-09  Mike Frysinger  <vapier@gentoo.org>
+
+       * sim-basics.h [__CYGWIN32__] (vasprintf, asprintf): Delete.
+       * sim-core.c, sim-watch.c: Include libiberty.h.
+
 2021-01-09  Mike Frysinger  <vapier@gentoo.org>
 
        * acinclude.m4: Replace duplicate text with pointer to README-HACKING.
index 8634f42d8ac9081bfc6f3bd3759b76bedb5c127e..52c9b2fa40c3f7c809f106518ec978f0307dfa16 100644 (file)
 #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
index 538230635bc94421c842b07572e2db1ba737639f..ade345ef16fb25b98506c9aa8d49cf1c1408b252 100644 (file)
@@ -25,6 +25,7 @@
 
 #include "sim-main.h"
 #include "sim-assert.h"
+#include "libiberty.h"
 
 #if (WITH_HW)
 #include "sim-hw.h"
index 95266501f12854d6194362b8062c97d21124b69c..9c929a15731be7c454d486607bd49d0b863cb008 100644 (file)
@@ -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"