summaryrefslogtreecommitdiff
path: root/signame.c
diff options
context:
space:
mode:
authorRoland McGrath <roland@redhat.com>1996-03-20 14:59:27 +0000
committerRoland McGrath <roland@redhat.com>1996-03-20 14:59:27 +0000
commit712c43dde12ce2a35b7df0cf17c0396eb032da3a (patch)
tree2f1a89b6501d21c045b68bf86e7354640cf0a492 /signame.c
parentc0e8c1012d8e5426cc9f0a962b8b778456915b34 (diff)
downloadgunmake-712c43dde12ce2a35b7df0cf17c0396eb032da3a.tar.gz
[HAVE_STRING_H]: Include string.h.
Diffstat (limited to 'signame.c')
-rw-r--r--signame.c12
1 files changed, 8 insertions, 4 deletions
diff --git a/signame.c b/signame.c
index 96a6cfe..0db511c 100644
--- a/signame.c
+++ b/signame.c
@@ -1,5 +1,5 @@
/* Convert between signal names and numbers.
- Copyright (C) 1990, 1992, 1993, 1995 Free Software Foundation, Inc.
+ Copyright (C) 1990, 1992, 1993, 1995, 1996 Free Software Foundation, Inc.
This program is free software; you can redistribute it and/or modify
it under the terms of the GNU General Public License as published by
@@ -23,6 +23,10 @@ the Free Software Foundation, 675 Mass Ave, Cambridge, MA 02139, USA. */
#include <sys/types.h> /* Some systems need this for <signal.h>. */
#include <signal.h>
+#ifdef HAVE_STRING_H
+#include <string.h>
+#endif
+
/* Some systems declare `sys_siglist in <unistd.h>; if
configure defined SYS_SIGLIST_DECLARED, it may expect
to find the declaration there. */
@@ -239,7 +243,7 @@ sig_abbrev (number)
if (sig_table_nelts == 0)
signame_init ();
-
+
for (i = 0; i < sig_table_nelts; i++)
if (sig_table[i].number == number)
return (char *)sig_table[i].abbrev;
@@ -293,10 +297,10 @@ strsignal (signal)
int signal;
{
static char buf[] = "Signal 12345678901234567890";
-
+
if (signal > 0 || signal < NSIG)
return (char *) sys_siglist[signal];
-
+
sprintf (buf, "Signal %d", signal);
return buf;
}