/* 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
#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. */
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;
int signal;
{
static char buf[] = "Signal 12345678901234567890";
-
+
if (signal > 0 || signal < NSIG)
return (char *) sys_siglist[signal];
-
+
sprintf (buf, "Signal %d", signal);
return buf;
}