public inbox for gdb-patches@sourceware.org
 help / color / mirror / Atom feed
* [PATCH/committed] sim: stdlib.h for abs()
@ 2021-01-05  1:13 Mike Frysinger
  0 siblings, 0 replies; only message in thread
From: Mike Frysinger @ 2021-01-05  1:13 UTC (permalink / raw)
  To: gdb-patches

Make sure the files using abs() include stdlib.h for its prototype.
These files were relying on it being included implicitly by others
which isn't guaranteed, and newer toolchains produce warnings.
---
 sim/arm/ChangeLog                  | 4 ++++
 sim/arm/iwmmxt.c                   | 1 +
 sim/bfin/ChangeLog                 | 4 ++++
 sim/bfin/dv-bfin_dma.c             | 2 ++
 sim/testsuite/sim/bfin/ChangeLog   | 4 ++++
 sim/testsuite/sim/bfin/mdma-skel.h | 1 +
 6 files changed, 16 insertions(+)

diff --git a/sim/arm/ChangeLog b/sim/arm/ChangeLog
index 9d98bcd839a0..75fcec27c6de 100644
--- a/sim/arm/ChangeLog
+++ b/sim/arm/ChangeLog
@@ -1,3 +1,7 @@
+2021-01-04  Mike Frysinger  <vapier@gentoo.org>
+
+	* iwmmxt.c: Include stdlib.h.
+
 2021-01-04  Mike Frysinger  <vapier@gentoo.org>
 
 	* configure: Regenerate.
diff --git a/sim/arm/iwmmxt.c b/sim/arm/iwmmxt.c
index 0362cf07ab49..8e818248645d 100644
--- a/sim/arm/iwmmxt.c
+++ b/sim/arm/iwmmxt.c
@@ -15,6 +15,7 @@
     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 <stdlib.h>
 #include <string.h>
 
 #include "armdefs.h"
diff --git a/sim/bfin/ChangeLog b/sim/bfin/ChangeLog
index d82bc5ee742a..b000b82d7b91 100644
--- a/sim/bfin/ChangeLog
+++ b/sim/bfin/ChangeLog
@@ -1,3 +1,7 @@
+2021-01-04  Mike Frysinger  <vapier@gentoo.org>
+
+	* dv-bfin_dma.c: Include stdlib.h.
+
 2021-01-02  Mike Frysinger  <vapier@gentoo.org>
 
 	* interp.c: Change ALIGN to align_up.
diff --git a/sim/bfin/dv-bfin_dma.c b/sim/bfin/dv-bfin_dma.c
index 06fe5ed738ba..e3834d761433 100644
--- a/sim/bfin/dv-bfin_dma.c
+++ b/sim/bfin/dv-bfin_dma.c
@@ -20,6 +20,8 @@
 
 #include "config.h"
 
+#include <stdlib.h>
+
 #include "sim-main.h"
 #include "devices.h"
 #include "hw-device.h"
diff --git a/sim/testsuite/sim/bfin/ChangeLog b/sim/testsuite/sim/bfin/ChangeLog
index 4fc604f9af65..b8fdc047234f 100644
--- a/sim/testsuite/sim/bfin/ChangeLog
+++ b/sim/testsuite/sim/bfin/ChangeLog
@@ -1,3 +1,7 @@
+2021-01-04  Mike Frysinger  <vapier@gentoo.org>
+
+	* mdma-skel.h: Include stdlib.h.
+
 2015-10-11  Mike Frysinger  <vapier@gentoo.org>
 
 	PR sim/18407
diff --git a/sim/testsuite/sim/bfin/mdma-skel.h b/sim/testsuite/sim/bfin/mdma-skel.h
index 399cddc9559b..920eff271163 100644
--- a/sim/testsuite/sim/bfin/mdma-skel.h
+++ b/sim/testsuite/sim/bfin/mdma-skel.h
@@ -1,3 +1,4 @@
+#include <stdlib.h>
 #include <string.h>
 
 void _mdma_memcpy (bu32 dst, bu32 src, bu32 size, bs16 mod)
-- 
2.28.0


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

only message in thread, other threads:[~2021-01-05  1:13 UTC | newest]

Thread overview: (only message) (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2021-01-05  1:13 [PATCH/committed] sim: stdlib.h for abs() Mike 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).