Mirror of the gdb-patches mailing list
 help / color / mirror / Atom feed
From: Mike Frysinger <vapier@gentoo.org>
To: gdb-patches@sourceware.org
Subject: [PATCH] sim: make sure to include strsignal prototype
Date: Fri, 23 Mar 2012 04:23:00 -0000	[thread overview]
Message-ID: <1332476592-12930-1-git-send-email-vapier@gentoo.org> (raw)

Before POSIX standardized strsignal(), old systems would hide the
prototype unless the normal extension defines were enabled.  So use
the AC_USE_SYSTEM_EXTENSIONS helper for that.

Then make sure we include string.h ourselves in nrun.c rather than
relying on implicit includes via other sim headers.

Signed-off-by: Mike Frysinger <vapier@gentoo.org>

sim/common/:
2012-03-23  Mike Frysinger  <vapier@gentoo.org>

	* acinclude.m4 (SIM_AC_COMMON): Call AC_USE_SYSTEM_EXTENSIONS.
	* nrun.c: Include string.h/strings.h.
	* aclocal.m4, config.in, configure: Regenerate.

sim/arm:
sim/bfin:
sim/avr:
sim/d10v:
sim/cr16:
sim/cris:
sim/erc32:
sim/frv:
sim/h8300:
sim/iq2000:
sim/m32c:
sim/m32r:
sim/lm32:
sim/m68hc11:
sim/microblaze:
sim/mcore:
sim/mips:
sim/mn10300:
sim/moxie:
sim/rl78:
sim/rx:
sim/sh64:
sim/sh:
sim/v850:
2012-03-23  Mike Frysinger  <vapier@gentoo.org>

	* aclocal.m4, config.in, configure: Regenerate.

sim/igen:
sim/ppc:
sim/testsuite:
2012-03-23  Mike Frysinger  <vapier@gentoo.org>

	* configure: Regenerate.

---
 sim/common/acinclude.m4 |    1 +
 sim/common/nrun.c       |   10 ++++++++++
 2 files changed, 11 insertions(+), 0 deletions(-)

diff --git a/sim/common/acinclude.m4 b/sim/common/acinclude.m4
index 2833d8e..ef42775 100644
--- a/sim/common/acinclude.m4
+++ b/sim/common/acinclude.m4
@@ -29,6 +29,7 @@ AC_REQUIRE([AC_PROG_CC])
 # autoconf.info says this should be called right after AC_INIT.
 AC_CONFIG_HEADER(ifelse([$1],,config.h,[$1]):config.in)
 AC_CANONICAL_SYSTEM
+AC_USE_SYSTEM_EXTENSIONS
 AC_ARG_PROGRAM
 AC_PROG_INSTALL
 
diff --git a/sim/common/nrun.c b/sim/common/nrun.c
index a50ae06..8e92879 100644
--- a/sim/common/nrun.c
+++ b/sim/common/nrun.c
@@ -15,6 +15,16 @@ 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 <signal.h>
+
+/* For strsignal.  */
+#ifdef HAVE_STRING_H
+#include <string.h>
+#else
+#ifdef HAVE_STRINGS_H
+#include <strings.h>
+#endif
+#endif
+
 #include "sim-main.h"
 
 #include "bfd.h"
-- 
1.7.8.5


             reply	other threads:[~2012-03-23  4:23 UTC|newest]

Thread overview: 21+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2012-03-23  4:23 Mike Frysinger [this message]
2012-03-23  4:35 ` Mike Frysinger
2012-03-23  5:24 ` Hans-Peter Nilsson
2012-03-23 15:43   ` Mike Frysinger
2012-03-23 22:12     ` Hans-Peter Nilsson
2012-03-23 22:43       ` Mike Frysinger
2012-03-24  5:34     ` Mike Frysinger
2012-03-24  4:12   ` Mike Frysinger
2012-03-24  5:53     ` Hans-Peter Nilsson
2012-03-24  6:12       ` Mike Frysinger
2012-03-24  6:49         ` Hans-Peter Nilsson
2012-03-24 18:18           ` Mike Frysinger
2012-03-24 10:55   ` Finalizing fix committed for "[PATCH] sim: make sure to include strsignal prototype" Hans-Peter Nilsson
2012-03-24 18:24     ` Mike Frysinger
2012-03-24 20:55       ` Hans-Peter Nilsson
2012-03-25  8:14         ` Mike Frysinger
2012-03-25 14:03           ` Hans-Peter Nilsson
2012-03-25  7:40       ` Mike Frysinger
2012-03-25  7:54         ` Mike Frysinger
2012-03-25 14:26           ` Hans-Peter Nilsson
2012-03-24  5:39 ` [PATCH] sim: make sure to include strsignal prototype Mike Frysinger

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=1332476592-12930-1-git-send-email-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