aboutsummaryrefslogtreecommitdiff
path: root/sim/erc32
diff options
context:
space:
mode:
authorMike Frysinger <vapier@gentoo.org>2021-05-01 18:05:23 -0400
committerMike Frysinger <vapier@gentoo.org>2021-05-16 22:38:41 -0400
commit6df01ab8ab8509b04f86d7da069ec2d25eb31bf9 (patch)
tree21a00924bc74b7d5ec239a133d223f9d52f1dd67 /sim/erc32
parent681eb80f1217f66c83dec4a3db83577a2a09f74a (diff)
downloadfsf-binutils-gdb-6df01ab8ab8509b04f86d7da069ec2d25eb31bf9.zip
fsf-binutils-gdb-6df01ab8ab8509b04f86d7da069ec2d25eb31bf9.tar.gz
fsf-binutils-gdb-6df01ab8ab8509b04f86d7da069ec2d25eb31bf9.tar.bz2
sim: switch config.h usage to defs.h
The defs.h header will take care of including the various config.h headers. For now, it's just config.h, but we'll add more when we integrate gnulib in. This header should be used instead of config.h, and should be the first include in every .c file. We won't rely on the old behavior where we expected files to include the port's sim-main.h which then includes the common sim-basics.h which then includes config.h. We have a ton of code that includes things before sim-main.h, and it sometimes needs to be that way. Creating a dedicated header avoids the ordering mess and implicit inclusion that shows up otherwise.
Diffstat (limited to 'sim/erc32')
-rw-r--r--sim/erc32/ChangeLog6
-rw-r--r--sim/erc32/erc32.c4
-rw-r--r--sim/erc32/exec.c4
-rw-r--r--sim/erc32/float.c4
-rw-r--r--sim/erc32/func.c4
-rw-r--r--sim/erc32/help.c4
-rw-r--r--sim/erc32/interf.c4
-rw-r--r--sim/erc32/sis.c4
-rw-r--r--sim/erc32/sis.h1
9 files changed, 27 insertions, 8 deletions
diff --git a/sim/erc32/ChangeLog b/sim/erc32/ChangeLog
index 40dd931..355880e 100644
--- a/sim/erc32/ChangeLog
+++ b/sim/erc32/ChangeLog
@@ -1,5 +1,11 @@
2021-05-16 Mike Frysinger <vapier@gentoo.org>
+ * erc32.c, exec.c, float.c, func.c, help.c, interf.c, sis.c: Replace
+ config.h include with defs.h.
+ * sis.h: Delete config.h include.
+
+2021-05-16 Mike Frysinger <vapier@gentoo.org>
+
* config.in, configure: Regenerate.
2021-05-14 Mike Frysinger <vapier@gentoo.org>
diff --git a/sim/erc32/erc32.c b/sim/erc32/erc32.c
index a93b62b..747ac78 100644
--- a/sim/erc32/erc32.c
+++ b/sim/erc32/erc32.c
@@ -18,7 +18,9 @@
/* The control space devices */
-#include "config.h"
+/* This must come before any other includes. */
+#include "defs.h"
+
#include <sys/types.h>
#include <stdio.h>
#include <string.h>
diff --git a/sim/erc32/exec.c b/sim/erc32/exec.c
index 8daf759..d8a8c6c 100644
--- a/sim/erc32/exec.c
+++ b/sim/erc32/exec.c
@@ -16,7 +16,9 @@
You should have received a copy of the GNU General Public License
along with this program. If not, see <http://www.gnu.org/licenses/>. */
-#include "config.h"
+/* This must come before any other includes. */
+#include "defs.h"
+
#include "sis.h"
#include <math.h>
#include <stdio.h>
diff --git a/sim/erc32/float.c b/sim/erc32/float.c
index 6d3d2bd..d2ae397 100644
--- a/sim/erc32/float.c
+++ b/sim/erc32/float.c
@@ -26,7 +26,9 @@
4. Clear host exception bits.
*/
-#include "config.h"
+/* This must come before any other includes. */
+#include "defs.h"
+
#include "sis.h"
#include <fenv.h>
diff --git a/sim/erc32/func.c b/sim/erc32/func.c
index 52428e4..ff53f3b 100644
--- a/sim/erc32/func.c
+++ b/sim/erc32/func.c
@@ -16,7 +16,9 @@
You should have received a copy of the GNU General Public License
along with this program. If not, see <http://www.gnu.org/licenses/>. */
-#include "config.h"
+/* This must come before any other includes. */
+#include "defs.h"
+
#include <signal.h>
#include <string.h>
#include <stdio.h>
diff --git a/sim/erc32/help.c b/sim/erc32/help.c
index 419ab0d..211de52 100644
--- a/sim/erc32/help.c
+++ b/sim/erc32/help.c
@@ -16,7 +16,9 @@
You should have received a copy of the GNU General Public License
along with this program. If not, see <http://www.gnu.org/licenses/>. */
-#include "config.h"
+/* This must come before any other includes. */
+#include "defs.h"
+
#include <stdio.h>
#include "sis.h"
diff --git a/sim/erc32/interf.c b/sim/erc32/interf.c
index c199dab..28c981b 100644
--- a/sim/erc32/interf.c
+++ b/sim/erc32/interf.c
@@ -16,7 +16,9 @@
You should have received a copy of the GNU General Public License
along with this program. If not, see <http://www.gnu.org/licenses/>. */
-#include "config.h"
+/* This must come before any other includes. */
+#include "defs.h"
+
#include <signal.h>
#include <string.h>
#include <stdio.h>
diff --git a/sim/erc32/sis.c b/sim/erc32/sis.c
index 05044c3..749d256 100644
--- a/sim/erc32/sis.c
+++ b/sim/erc32/sis.c
@@ -16,7 +16,9 @@
You should have received a copy of the GNU General Public License
along with this program. If not, see <http://www.gnu.org/licenses/>. */
-#include "config.h"
+/* This must come before any other includes. */
+#include "defs.h"
+
#include <signal.h>
#include <string.h>
#include <stdlib.h>
diff --git a/sim/erc32/sis.h b/sim/erc32/sis.h
index 10c500f..7f787cf 100644
--- a/sim/erc32/sis.h
+++ b/sim/erc32/sis.h
@@ -13,7 +13,6 @@
You should have received a copy of the GNU General Public License
along with this program. If not, see <http://www.gnu.org/licenses/>. */
-#include "config.h"
#include "ansidecl.h"
#include "sim/callback.h"
#include "sim/sim.h"