summaryrefslogtreecommitdiff
path: root/sim
diff options
context:
space:
mode:
authorJoel Brobecker <brobecker@gnat.com>2012-06-19 22:46:57 +0000
committerJoel Brobecker <brobecker@gnat.com>2012-06-19 22:46:57 +0000
commit6037a072b2f0dc9eea3316c74b3ef56f953a15f4 (patch)
tree30a15c3d6b64b07fa4ab8eac999bf89bc6b20ec1 /sim
parentab7b9759a6b8c5d7d591adfa3a617d3d19783802 (diff)
downloadgdb-6037a072b2f0dc9eea3316c74b3ef56f953a15f4.tar.gz
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. sim/d10v/ChangeLog: * 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.
Diffstat (limited to 'sim')
-rw-r--r--sim/d10v/ChangeLog6
-rw-r--r--sim/d10v/interp.c14
2 files changed, 19 insertions, 1 deletions
diff --git a/sim/d10v/ChangeLog b/sim/d10v/ChangeLog
index 1266ead6051..107befc31c4 100644
--- a/sim/d10v/ChangeLog
+++ b/sim/d10v/ChangeLog
@@ -1,3 +1,9 @@
+2012-06-19 Joel Brobecker <brobecker@adacore.com>
+
+ * 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.
+
2012-06-15 Joel Brobecker <brobecker@adacore.com>
* config.in, configure: Regenerate.
diff --git a/sim/d10v/interp.c b/sim/d10v/interp.c
index 92f161bd95c..23db647a33c 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"
+#ifdef HAVE_STRING_H
+#include <string.h>
+#else
+#ifdef HAVE_STRINGS_H
+#include <strings.h>
+#endif /* HAVE_STRING_H */
+#endif /* HAVE_STRINGS_H */
+
+#ifdef HAVE_STDLIB_H
+#include <stdlib.h>
+#endif
+
enum _leftright { LEFT_FIRST, RIGHT_FIRST };
static char *myname;