public inbox for gdb-cvs@sourceware.org
help / color / mirror / Atom feed
* [binutils-gdb] sim: include ansidecl.h when needed
@ 2021-12-05  9:44 Michael Frysinger
  0 siblings, 0 replies; only message in thread
From: Michael Frysinger @ 2021-12-05  9:44 UTC (permalink / raw)
  To: gdb-cvs

https://sourceware.org/git/gitweb.cgi?p=binutils-gdb.git;h=843bf75416dd11d91a5d617f7a49f6e9e5025b42

commit 843bf75416dd11d91a5d617f7a49f6e9e5025b42
Author: Mike Frysinger <vapier@gentoo.org>
Date:   Sat Dec 4 21:09:23 2021 -0500

    sim: include ansidecl.h when needed
    
    Avoid implicit include deps with this to help untangle sim headers
    so we can get rid of arch-specific sim-main.h.

Diff:
---
 sim/common/cgen-trace.h  | 2 ++
 sim/common/genmloop.sh   | 1 +
 sim/common/hw-device.h   | 2 ++
 sim/common/hw-events.h   | 2 ++
 sim/common/hw-tree.h     | 2 ++
 sim/common/sim-basics.h  | 1 -
 sim/common/sim-engine.h  | 2 ++
 sim/common/sim-events.h  | 2 ++
 sim/common/sim-hw.h      | 2 ++
 sim/common/sim-inline.h  | 1 +
 sim/common/sim-io.h      | 2 ++
 sim/common/sim-profile.c | 2 ++
 sim/common/sim-syscall.c | 2 ++
 sim/common/sim-trace.c   | 1 +
 sim/common/sim-trace.h   | 1 +
 sim/common/sim-utils.h   | 2 ++
 16 files changed, 26 insertions(+), 1 deletion(-)

diff --git a/sim/common/cgen-trace.h b/sim/common/cgen-trace.h
index c617e7e21e1..96048b906e2 100644
--- a/sim/common/cgen-trace.h
+++ b/sim/common/cgen-trace.h
@@ -20,6 +20,8 @@ along with this program.  If not, see <http://www.gnu.org/licenses/>.  */
 #ifndef CGEN_TRACE_H
 #define CGEN_TRACE_H
 
+#include "ansidecl.h"
+
 void cgen_trace_insn_init (SIM_CPU *, int);
 void cgen_trace_insn_fini (SIM_CPU *, const struct argbuf *, int);
 void cgen_trace_insn (SIM_CPU *, const struct cgen_insn *,
diff --git a/sim/common/genmloop.sh b/sim/common/genmloop.sh
index e1eb08c1bdf..63e01ec4d98 100755
--- a/sim/common/genmloop.sh
+++ b/sim/common/genmloop.sh
@@ -312,6 +312,7 @@ cat << EOF
 #define WANT_CPU @cpu@
 #define WANT_CPU_@CPU@
 
+#include "ansidecl.h"
 #include "bfd.h"
 
 #include "sim-main.h"
diff --git a/sim/common/hw-device.h b/sim/common/hw-device.h
index a7e598bb40e..711001d13c9 100644
--- a/sim/common/hw-device.h
+++ b/sim/common/hw-device.h
@@ -25,6 +25,8 @@
 
 #include <stdarg.h>
 
+#include "ansidecl.h"
+
 /* Introduction:
 
    As explained in earlier sections, the device, device instance,
diff --git a/sim/common/hw-events.h b/sim/common/hw-events.h
index 7d750007c09..0b55542ad32 100644
--- a/sim/common/hw-events.h
+++ b/sim/common/hw-events.h
@@ -22,6 +22,8 @@ along with this program.  If not, see <http://www.gnu.org/licenses/>.  */
 
 #include <stdarg.h>
 
+#include "ansidecl.h"
+
 /* Event manager customized for hardware models.
 
    This interface is discussed further in sim-events.h. */
diff --git a/sim/common/hw-tree.h b/sim/common/hw-tree.h
index 2f717ec8d9f..07a95b4177d 100644
--- a/sim/common/hw-tree.h
+++ b/sim/common/hw-tree.h
@@ -25,6 +25,8 @@
 
 #include <stdarg.h>
 
+#include "ansidecl.h"
+
 struct hw *hw_tree_create
 (SIM_DESC sd,
  const char *device);
diff --git a/sim/common/sim-basics.h b/sim/common/sim-basics.h
index f09a4f26720..62d47e41726 100644
--- a/sim/common/sim-basics.h
+++ b/sim/common/sim-basics.h
@@ -111,7 +111,6 @@ typedef enum {
 \f
 /* Basic definitions - ordered so that nothing calls what comes after it.  */
 
-#include "ansidecl.h"
 #include "sim/sim.h"
 
 #include "sim-config.h"
diff --git a/sim/common/sim-engine.h b/sim/common/sim-engine.h
index 159d96bf119..4d77856ef7e 100644
--- a/sim/common/sim-engine.h
+++ b/sim/common/sim-engine.h
@@ -22,6 +22,8 @@ along with this program.  If not, see <http://www.gnu.org/licenses/>.  */
 
 #include <stdarg.h>
 
+#include "ansidecl.h"
+
 typedef struct _sim_engine sim_engine;
 struct _sim_engine
 {
diff --git a/sim/common/sim-events.h b/sim/common/sim-events.h
index 3c30d6489f8..b102a959ede 100644
--- a/sim/common/sim-events.h
+++ b/sim/common/sim-events.h
@@ -25,6 +25,8 @@
 
 #include <stdarg.h>
 
+#include "ansidecl.h"
+
 /* Notes:
 
    When scheduling an event, the a delta of zero/one refers to the
diff --git a/sim/common/sim-hw.h b/sim/common/sim-hw.h
index 71dc8378b1d..0207aa3e5fc 100644
--- a/sim/common/sim-hw.h
+++ b/sim/common/sim-hw.h
@@ -22,6 +22,8 @@ along with this program.  If not, see <http://www.gnu.org/licenses/>.  */
 
 #include <stdarg.h>
 
+#include "ansidecl.h"
+
 /* Parse a hardware definition */
 
 struct hw *sim_hw_parse
diff --git a/sim/common/sim-inline.h b/sim/common/sim-inline.h
index a397e58e10f..216f30d2b63 100644
--- a/sim/common/sim-inline.h
+++ b/sim/common/sim-inline.h
@@ -23,6 +23,7 @@
 #ifndef SIM_INLINE_H
 #define SIM_INLINE_H
 
+#include "ansidecl.h"
 
 /* INLINE CODE SELECTION:
 
diff --git a/sim/common/sim-io.h b/sim/common/sim-io.h
index 2fc22f332cc..c77b4f8189d 100644
--- a/sim/common/sim-io.h
+++ b/sim/common/sim-io.h
@@ -28,6 +28,8 @@
 #include <sys/stat.h>
 #include <sys/types.h>
 
+#include "ansidecl.h"
+
 /* See the file include/callbacks.h for a description */
 
 int sim_io_init (SIM_DESC sd);
diff --git a/sim/common/sim-profile.c b/sim/common/sim-profile.c
index 393a0b733ed..f4cdf40b05b 100644
--- a/sim/common/sim-profile.c
+++ b/sim/common/sim-profile.c
@@ -25,6 +25,8 @@ along with this program.  If not, see <http://www.gnu.org/licenses/>.  */
 #include <stdlib.h>
 #include <string.h>
 
+#include "ansidecl.h"
+
 #include "sim-main.h"
 #include "sim-io.h"
 #include "sim-options.h"
diff --git a/sim/common/sim-syscall.c b/sim/common/sim-syscall.c
index 1e83db2ae8a..26f57f431bf 100644
--- a/sim/common/sim-syscall.c
+++ b/sim/common/sim-syscall.c
@@ -22,6 +22,8 @@
 
 #include <errno.h>
 
+#include "ansidecl.h"
+
 #include "sim-main.h"
 #include "sim-syscall.h"
 #include "sim/callback.h"
diff --git a/sim/common/sim-trace.c b/sim/common/sim-trace.c
index fbfa27fac6f..15816100d56 100644
--- a/sim/common/sim-trace.c
+++ b/sim/common/sim-trace.c
@@ -24,6 +24,7 @@ along with this program.  If not, see <http://www.gnu.org/licenses/>.  */
 #include <stdlib.h>
 #include <string.h>
 
+#include "ansidecl.h"
 #include "bfd.h"
 #include "dis-asm.h"
 #include "libiberty.h"
diff --git a/sim/common/sim-trace.h b/sim/common/sim-trace.h
index f17bbc63420..09e900c9f57 100644
--- a/sim/common/sim-trace.h
+++ b/sim/common/sim-trace.h
@@ -24,6 +24,7 @@ along with this program.  If not, see <http://www.gnu.org/licenses/>.  */
 
 #include <stdarg.h>
 
+#include "ansidecl.h"
 #include "dis-asm.h"
 
 /* Standard traceable entities.  */
diff --git a/sim/common/sim-utils.h b/sim/common/sim-utils.h
index 1af4ea206b8..20ca9fcfe23 100644
--- a/sim/common/sim-utils.h
+++ b/sim/common/sim-utils.h
@@ -20,6 +20,8 @@ along with this program.  If not, see <http://www.gnu.org/licenses/>.  */
 #ifndef SIM_UTILS_H
 #define SIM_UTILS_H
 
+#include "ansidecl.h"
+
 /* Memory management with an allocator that clears memory before use. */
 
 void *zalloc (unsigned long size);


^ permalink raw reply	[flat|nested] only message in thread

only message in thread, other threads:[~2021-12-05  9:44 UTC | newest]

Thread overview: (only message) (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2021-12-05  9:44 [binutils-gdb] sim: include ansidecl.h when needed Michael Frysinger

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).