public inbox for gdb-patches@sourceware.org
 help / color / mirror / Atom feed
From: Mike Frysinger <vapier@gentoo.org>
To: gdb-patches@sourceware.org
Subject: [PATCH/committed] sim: stdlib.h for abs()
Date: Mon,  4 Jan 2021 20:13:54 -0500	[thread overview]
Message-ID: <20210105011354.2884-1-vapier@gentoo.org> (raw)

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


                 reply	other threads:[~2021-01-05  1:13 UTC|newest]

Thread overview: [no followups] expand[flat|nested]  mbox.gz  Atom feed

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=20210105011354.2884-1-vapier@gentoo.org \
    --to=vapier@gentoo.org \
    --cc=gdb-patches@sourceware.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
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).