This is the mail archive of the mailing list for the GDB project.

Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

[RFA] include "config.h" instead of BFD's sysdep.h in d10v/interp.c

The change of include file introduces some new warnings about functions
being used without a prototype. So a few more system includes have been
added to compensate for that.

There are still some other similar compilation warnings, but there were
already there before, and should be fixed independently of this.


        * interp.c: #include "config.h" instead of "sysdep.h".
        Add conditional include of string.h or strings.h, as well as
        conditional include of stdlib.h.

Tested by rebuilding the sim.

 sim/d10v/interp.c |   14 +++++++++++++-
 1 files changed, 13 insertions(+), 1 deletions(-)

diff --git a/sim/d10v/interp.c b/sim/d10v/interp.c
index 92f161b..23db647 100644
--- a/sim/d10v/interp.c
+++ b/sim/d10v/interp.c
@@ -1,5 +1,5 @@
+#include "config.h"
 #include <signal.h>
-#include "sysdep.h"
 #include "bfd.h"
 #include "gdb/callback.h"
 #include "gdb/remote-sim.h"
@@ -8,6 +8,18 @@
 #include "gdb/sim-d10v.h"
 #include "gdb/signals.h"
+#include <string.h>
+#include <strings.h>
+#endif /* HAVE_STRING_H */
+#endif /* HAVE_STRINGS_H */
+#include <stdlib.h>
 enum _leftright { LEFT_FIRST, RIGHT_FIRST };
 static char *myname;

Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]