Mirror of the gdb-patches mailing list
 help / color / mirror / Atom feed
* [PATCH] sim: make sure to include strsignal prototype
@ 2012-03-23  4:23 Mike Frysinger
  2012-03-23  4:35 ` Mike Frysinger
                   ` (2 more replies)
  0 siblings, 3 replies; 21+ messages in thread
From: Mike Frysinger @ 2012-03-23  4:23 UTC (permalink / raw)
  To: gdb-patches

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


^ permalink raw reply	[flat|nested] 21+ messages in thread

end of thread, other threads:[~2012-03-25 14:26 UTC | newest]

Thread overview: 21+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2012-03-23  4:23 [PATCH] sim: make sure to include strsignal prototype Mike Frysinger
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

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox