[PATCH/committed] sim: nrun: add local strsignal prototype

Message ID 20210501204427.25997-1-vapier@gentoo.org
State New
Headers show
Series
  • [PATCH/committed] sim: nrun: add local strsignal prototype
Related show

Commit Message

Wei-min Pan via Gdb-patches May 1, 2021, 8:44 p.m.
While libiberty provides a definition for this for systems that lack
the function (e.g. Windows), it doesn't provide a prototype.  So add
our own local copy in the one file that uses the func.
---
 sim/ChangeLog                 | 4 ++++
 sim/aarch64/ChangeLog         | 4 ++++
 sim/aarch64/config.in         | 3 +++
 sim/aarch64/configure         | 7 +++++--
 sim/arm/ChangeLog             | 4 ++++
 sim/arm/config.in             | 3 +++
 sim/arm/configure             | 7 +++++--
 sim/avr/ChangeLog             | 4 ++++
 sim/avr/config.in             | 3 +++
 sim/avr/configure             | 7 +++++--
 sim/bfin/ChangeLog            | 4 ++++
 sim/bfin/config.in            | 3 +++
 sim/bfin/configure            | 7 +++++--
 sim/bpf/ChangeLog             | 4 ++++
 sim/bpf/config.in             | 3 +++
 sim/bpf/configure             | 7 +++++--
 sim/common/ChangeLog          | 4 ++++
 sim/common/nrun.c             | 5 +++++
 sim/cr16/ChangeLog            | 4 ++++
 sim/cr16/config.in            | 3 +++
 sim/cr16/configure            | 7 +++++--
 sim/cris/ChangeLog            | 4 ++++
 sim/cris/config.in            | 3 +++
 sim/cris/configure            | 7 +++++--
 sim/d10v/ChangeLog            | 4 ++++
 sim/d10v/config.in            | 3 +++
 sim/d10v/configure            | 7 +++++--
 sim/erc32/ChangeLog           | 4 ++++
 sim/erc32/config.in           | 3 +++
 sim/erc32/configure           | 7 +++++--
 sim/example-synacor/ChangeLog | 4 ++++
 sim/example-synacor/config.in | 3 +++
 sim/example-synacor/configure | 7 +++++--
 sim/frv/ChangeLog             | 4 ++++
 sim/frv/config.in             | 3 +++
 sim/frv/configure             | 7 +++++--
 sim/ft32/ChangeLog            | 4 ++++
 sim/ft32/config.in            | 3 +++
 sim/ft32/configure            | 7 +++++--
 sim/h8300/ChangeLog           | 4 ++++
 sim/h8300/config.in           | 3 +++
 sim/h8300/configure           | 7 +++++--
 sim/iq2000/ChangeLog          | 4 ++++
 sim/iq2000/config.in          | 3 +++
 sim/iq2000/configure          | 7 +++++--
 sim/lm32/ChangeLog            | 4 ++++
 sim/lm32/config.in            | 3 +++
 sim/lm32/configure            | 7 +++++--
 sim/m32c/ChangeLog            | 4 ++++
 sim/m32c/config.in            | 3 +++
 sim/m32c/configure            | 7 +++++--
 sim/m32r/ChangeLog            | 4 ++++
 sim/m32r/config.in            | 3 +++
 sim/m32r/configure            | 7 +++++--
 sim/m4/sim_ac_common.m4       | 1 +
 sim/m68hc11/ChangeLog         | 4 ++++
 sim/m68hc11/config.in         | 3 +++
 sim/m68hc11/configure         | 7 +++++--
 sim/mcore/ChangeLog           | 4 ++++
 sim/mcore/config.in           | 3 +++
 sim/mcore/configure           | 7 +++++--
 sim/microblaze/ChangeLog      | 4 ++++
 sim/microblaze/config.in      | 3 +++
 sim/microblaze/configure      | 7 +++++--
 sim/mips/ChangeLog            | 4 ++++
 sim/mips/config.in            | 3 +++
 sim/mips/configure            | 7 +++++--
 sim/mn10300/ChangeLog         | 4 ++++
 sim/mn10300/config.in         | 3 +++
 sim/mn10300/configure         | 7 +++++--
 sim/moxie/ChangeLog           | 4 ++++
 sim/moxie/config.in           | 3 +++
 sim/moxie/configure           | 7 +++++--
 sim/msp430/ChangeLog          | 4 ++++
 sim/msp430/config.in          | 3 +++
 sim/msp430/configure          | 7 +++++--
 sim/or1k/ChangeLog            | 4 ++++
 sim/or1k/config.in            | 3 +++
 sim/or1k/configure            | 7 +++++--
 sim/pru/ChangeLog             | 4 ++++
 sim/pru/config.in             | 3 +++
 sim/pru/configure             | 7 +++++--
 sim/riscv/ChangeLog           | 4 ++++
 sim/riscv/config.in           | 3 +++
 sim/riscv/configure           | 7 +++++--
 sim/rl78/ChangeLog            | 4 ++++
 sim/rl78/config.in            | 3 +++
 sim/rl78/configure            | 7 +++++--
 sim/rx/ChangeLog              | 4 ++++
 sim/rx/config.in              | 3 +++
 sim/rx/configure              | 7 +++++--
 sim/sh/ChangeLog              | 4 ++++
 sim/sh/config.in              | 3 +++
 sim/sh/configure              | 7 +++++--
 sim/v850/ChangeLog            | 4 ++++
 sim/v850/config.in            | 3 +++
 sim/v850/configure            | 7 +++++--
 97 files changed, 386 insertions(+), 62 deletions(-)

-- 
2.31.1

Patch

diff --git a/sim/common/nrun.c b/sim/common/nrun.c
index 0caa82062a24..1ceb0837e2c2 100644
--- a/sim/common/nrun.c
+++ b/sim/common/nrun.c
@@ -28,6 +28,11 @@  along with this program.  If not, see <http://www.gnu.org/licenses/>.  */
 
 #include "bfd.h"
 
+#ifndef HAVE_STRSIGNAL
+/* While libiberty provides a fallback, it doesn't provide a prototype.  */
+extern const char *strsignal (int);
+#endif
+
 #ifdef HAVE_ENVIRON
 extern char **environ;
 #endif
diff --git a/sim/m4/sim_ac_common.m4 b/sim/m4/sim_ac_common.m4
index 01825990bea3..35fcbfc41995 100644
--- a/sim/m4/sim_ac_common.m4
+++ b/sim/m4/sim_ac_common.m4
@@ -60,6 +60,7 @@  AC_CHECK_FUNCS_ONCE(m4_flatten([
   munmap
   posix_fallocate
   sigaction
+  strsignal
   time
   truncate
 ]))