summaryrefslogtreecommitdiff
path: root/signame.c
diff options
context:
space:
mode:
Diffstat (limited to 'signame.c')
-rw-r--r--signame.c24
1 files changed, 11 insertions, 13 deletions
diff --git a/signame.c b/signame.c
index 6f3383d..59dc949 100644
--- a/signame.c
+++ b/signame.c
@@ -1,7 +1,5 @@
/* Convert between signal names and numbers.
-Copyright (C) 1990, 1991, 1992, 1993, 1994, 1995, 1996, 1997, 1998, 1999,
-2000, 2001, 2002, 2003, 2004, 2005, 2006, 2007, 2008, 2009, 2010 Free Software
-Foundation, Inc.
+Copyright (C) 1990-2013 Free Software Foundation, Inc.
This file is part of GNU Make.
GNU Make is free software; you can redistribute it and/or modify it under the
@@ -16,7 +14,7 @@ A PARTICULAR PURPOSE. See the GNU General Public License for more details.
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 "make.h"
+#include "makeint.h"
/* If the system provides strsignal, we don't need it. */
@@ -29,11 +27,11 @@ this program. If not, see <http://www.gnu.org/licenses/>. */
#if !HAVE_DECL_SYS_SIGLIST
/* Some systems do not define NSIG in <signal.h>. */
-#ifndef NSIG
-#ifdef _NSIG
-#define NSIG _NSIG
+#ifndef NSIG
+#ifdef _NSIG
+#define NSIG _NSIG
#else
-#define NSIG 32
+#define NSIG 32
#endif
#endif
@@ -194,10 +192,10 @@ signame_init (void)
init_sig (SIGURG, "URG", _("Urgent I/O condition"));
#endif
#if defined (SIGIO)
- /* "I/O pending" has also been suggested. A disadvantage is
- that signal only happens when the process has
- asked for it, not everytime I/O is pending. Another disadvantage
- is the confusion from giving it a different name than under Unix. */
+ /* "I/O pending" has also been suggested. A disadvantage is that signal
+ only happens when the process has asked for it, not every time I/O is
+ pending. Another disadvantage is the confusion from giving it a
+ different name than under Unix. */
init_sig (SIGIO, "IO", _("I/O possible"));
#endif
#if defined (SIGWIND)
@@ -246,7 +244,7 @@ strsignal (int sig)
# endif
#endif
- if (sig > 0 || sig < NSIG)
+ if (sig > 0 && sig < NSIG)
return (char *) sys_siglist[sig];
sprintf (buf, "Signal %d", sig);