projects
/
mmh
/ blobdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
raw
|
inline
| side by side
Added test-anno, test-dist, test-msgchk, and test-rcvtty.
[mmh]
/
sbr
/
pidstatus.c
diff --git
a/sbr/pidstatus.c
b/sbr/pidstatus.c
index
7991d59
..
fab90d5
100644
(file)
--- a/
sbr/pidstatus.c
+++ b/
sbr/pidstatus.c
@@
-2,13
+2,12
@@
/*
* pidstatus.c -- report child's status
*
/*
* pidstatus.c -- report child's status
*
- * $Id$
- *
* This code is Copyright (c) 2002, by the authors of nmh. See the
* COPYRIGHT file in the root directory of the nmh distribution for
* complete copyright information.
*/
* This code is Copyright (c) 2002, by the authors of nmh. See the
* COPYRIGHT file in the root directory of the nmh distribution for
* complete copyright information.
*/
+#include <sys/wait.h>
#include <h/mh.h>
/*
#include <h/mh.h>
/*
@@
-16,10
+15,6
@@
*/
#include <sigmsg.h>
*/
#include <sigmsg.h>
-#ifdef HAVE_SYS_WAIT_H
-# include <sys/wait.h>
-#endif
-
#ifndef WTERMSIG
# define WTERMSIG(s) ((int)((s) & 0x7F))
#endif
#ifndef WTERMSIG
# define WTERMSIG(s) ((int)((s) & 0x7F))
#endif
@@
-55,7
+50,8
@@
pidstatus (int status, FILE *fp, char *cp)
if (cp)
fprintf (fp, "%s: ", cp);
fprintf (fp, "signal %d", signum);
if (cp)
fprintf (fp, "%s: ", cp);
fprintf (fp, "signal %d", signum);
- if (signum >= 0 && signum < sizeof(sigmsg) && sigmsg[signum] != NULL)
+ if (signum >= 0 && signum < (int) sizeof(sigmsg) &&
+ sigmsg[signum] != NULL)
fprintf (fp, " (%s%s)\n", sigmsg[signum],
WCOREDUMP(status) ? ", core dumped" : "");
else
fprintf (fp, " (%s%s)\n", sigmsg[signum],
WCOREDUMP(status) ? ", core dumped" : "");
else