From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 28958 invoked by alias); 23 Mar 2012 04:23:24 -0000 Received: (qmail 28918 invoked by uid 22791); 23 Mar 2012 04:23:22 -0000 X-SWARE-Spam-Status: No, hits=-4.7 required=5.0 tests=AWL,BAYES_00,RCVD_IN_DNSWL_HI,T_RP_MATCHES_RCVD X-Spam-Check-By: sourceware.org Received: from smtp.gentoo.org (HELO smtp.gentoo.org) (140.211.166.183) by sourceware.org (qpsmtpd/0.43rc1) with ESMTP; Fri, 23 Mar 2012 04:23:08 +0000 Received: from localhost.localdomain (localhost [127.0.0.1]) by smtp.gentoo.org (Postfix) with ESMTP id 38ABA1B401F for ; Fri, 23 Mar 2012 04:23:08 +0000 (UTC) From: Mike Frysinger To: gdb-patches@sourceware.org Subject: [PATCH] sim: make sure to include strsignal prototype Date: Fri, 23 Mar 2012 04:23:00 -0000 Message-Id: <1332476592-12930-1-git-send-email-vapier@gentoo.org> X-IsSubscribed: yes Mailing-List: contact gdb-patches-help@sourceware.org; run by ezmlm Precedence: bulk List-Id: List-Subscribe: List-Archive: List-Post: List-Help: , Sender: gdb-patches-owner@sourceware.org X-SW-Source: 2012-03/txt/msg00799.txt.bz2 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 sim/common/: 2012-03-23 Mike Frysinger * 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 * aclocal.m4, config.in, configure: Regenerate. sim/igen: sim/ppc: sim/testsuite: 2012-03-23 Mike Frysinger * 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 . */ #include + +/* For strsignal. */ +#ifdef HAVE_STRING_H +#include +#else +#ifdef HAVE_STRINGS_H +#include +#endif +#endif + #include "sim-main.h" #include "bfd.h" -- 1.7.8.5