New modules: utf8-ucs4, utf16-ucs4, ucs4-utf8, ucs4-utf16.
[gnulib.git] / lib / sig2str.c
index 1edc9f1..f1eec22 100644 (file)
 #include <stdio.h>
 #include <string.h>
 
-#if HAVE_SYS_WAIT_H
-# include <sys/wait.h>
-#endif
-#ifndef WTERMSIG
-# define WTERMSIG(s) ((s) & 0x7F)
-#endif
-
 #include "sig2str.h"
 
 #ifndef SIGRTMIN
@@ -224,7 +217,7 @@ static struct numname { int num; char const name[8]; } numname_table[] =
 #endif
 
     /* Older AIX versions.  */
-#ifdef SIGALRM1 
+#ifdef SIGALRM1
     NUMNAME (ALRM1),   /* unknown; taken from Bash 2.05 */
 #endif
 #ifdef SIGKAP
@@ -277,7 +270,7 @@ str2signum (char const *signame)
     }
   else
     {
-      int i;
+      unsigned i;
       for (i = 0; i < NUMNAME_ENTRIES; i++)
        if (strcmp (numname_table[i].name, signame) == 0)
          return numname_table[i].num;
@@ -322,7 +315,7 @@ str2sig (char const *signame, int *signum)
 int
 sig2str (int signum, char *signame)
 {
-  int i;
+  unsigned i;
   for (i = 0; i < NUMNAME_ENTRIES; i++)
     if (numname_table[i].num == signum)
       {