Fixed wrong prototype and missing include for strsignal(3). strsignal()
takes an int arg and is prototyped in <string.h>. It has the opposite interface botches to psignal(3) which takes a bogus unsigned arg but is prototyped in the right place. This is not the last of the interface problems for strsignal(). We obtained it from NetBSD, but NetBSD has moved its prototype to <unistd.h>. strsignal() should return const char *, but it returns char * for historical reasons. NetBSD declares it as returning __aconst char, where __aconst is normally empty but can be set to `const' to give better error checking. glibc-2.1.1 prototypes strsignal() in <string.h>.
This commit is contained in:
parent
3050159ad5
commit
79ac896751
@ -45,10 +45,11 @@
|
||||
.Fd #include <signal.h>
|
||||
.Ft void
|
||||
.Fn psignal "unsigned sig" "const char *s"
|
||||
.Ft "char *"
|
||||
.Fn strsignal "unsigned sig"
|
||||
.Vt extern const char * const sys_siglist[];
|
||||
.Vt extern const char * const sys_signame[];
|
||||
.Fd #include <string.h>
|
||||
.Ft "char *"
|
||||
.Fn strsignal "int sig"
|
||||
.Sh DESCRIPTION
|
||||
The
|
||||
.Fn psignal
|
||||
|
Loading…
x
Reference in New Issue
Block a user