[PUSHED,OBV] sim m32c: Include defs.h in m32c.opc and r8c.opc.

Message ID 20210602154857.91402-1-jhb@FreeBSD.org
State New
Headers show
Series
  • [PUSHED,OBV] sim m32c: Include defs.h in m32c.opc and r8c.opc.
Related show

Commit Message

John Baldwin June 2, 2021, 3:48 p.m.
gnulib can override stdio.h and/or stdlib.h in which case the gnulib
headers require config.h to be included first.

gdb/sim/m32c/ChangeLog:

	* m32c.opc: Include defs.h.
	* r8c.opc: Likewise.
---
 sim/m32c/ChangeLog | 5 +++++
 sim/m32c/m32c.opc  | 2 ++
 sim/m32c/r8c.opc   | 2 ++
 3 files changed, 9 insertions(+)

-- 
2.31.1

Patch

diff --git a/sim/m32c/ChangeLog b/sim/m32c/ChangeLog
index eec489f29db..679559932c2 100644
--- a/sim/m32c/ChangeLog
+++ b/sim/m32c/ChangeLog
@@ -1,3 +1,8 @@ 
+2021-06-02  John Baldwin  <jhb@FreeBSD.org>
+
+	* m32c.opc: Include defs.h.
+	* r8c.opc: Likewise.
+
 2021-05-28  Mike Frysinger  <vapier@gentoo.org>
 
 	* gdb-if.c (open): Rename to ...
diff --git a/sim/m32c/m32c.opc b/sim/m32c/m32c.opc
index d19aaf00e1e..3be5c97f8c5 100644
--- a/sim/m32c/m32c.opc
+++ b/sim/m32c/m32c.opc
@@ -18,6 +18,8 @@  GNU General Public License for more details.
 You should have received a copy of the GNU General Public License
 along with this program.  If not, see <http://www.gnu.org/licenses/>.  */
 
+/* This must come before any other includes.  */
+#include "defs.h"
 
 #include <stdio.h>
 #include <stdlib.h>
diff --git a/sim/m32c/r8c.opc b/sim/m32c/r8c.opc
index 6645ff8b306..19a213c2586 100644
--- a/sim/m32c/r8c.opc
+++ b/sim/m32c/r8c.opc
@@ -18,6 +18,8 @@  GNU General Public License for more details.
 You should have received a copy of the GNU General Public License
 along with this program.  If not, see <http://www.gnu.org/licenses/>.  */
 
+/* This must come before any other includes.  */
+#include "defs.h"
 
 #include <stdio.h>
 #include <stdlib.h>