define new library function getgrouplist
[unix-history] / usr / src / lib / libc / gen / psignal.c
index eff088a..4020b7b 100644 (file)
@@ -6,20 +6,21 @@
  */
 
 #if defined(LIBC_SCCS) && !defined(lint)
  */
 
 #if defined(LIBC_SCCS) && !defined(lint)
-static char sccsid[] = "@(#)psignal.c  5.4 (Berkeley) %G%";
+static char sccsid[] = "@(#)psignal.c  5.6 (Berkeley) %G%";
 #endif /* LIBC_SCCS and not lint */
 
 /*
  * Print the name of the signal indicated
  * along with the supplied message.
  */
 #endif /* LIBC_SCCS and not lint */
 
 /*
  * Print the name of the signal indicated
  * along with the supplied message.
  */
-#include <signal.h>
-
-extern char *sys_siglist[];
+#include <sys/signal.h>
+#include <string.h>
+#include <unistd.h>
 
 
+void
 psignal(sig, s)
        unsigned int sig;
 psignal(sig, s)
        unsigned int sig;
-       char *s;
+       const char *s;
 {
        register char *c;
        register int n;
 {
        register char *c;
        register int n;
@@ -30,9 +31,9 @@ psignal(sig, s)
                c = "Unknown signal";
        n = strlen(s);
        if (n) {
                c = "Unknown signal";
        n = strlen(s);
        if (n) {
-               (void)write(2, s, n);
-               (void)write(2, ": ", 2);
+               (void)write(STDERR_FILENO, s, n);
+               (void)write(STDERR_FILENO, ": ", 2);
        }
        }
-       (void)write(2, c, strlen(c));
-       (void)write(2, "\n", 1);
+       (void)write(STDERR_FILENO, c, strlen(c));
+       (void)write(STDERR_FILENO, "\n", 1);
 }
 }