summaryrefslogtreecommitdiffstats
path: root/lib/libc/gen
diff options
context:
space:
mode:
authorbde <bde@FreeBSD.org>1999-12-23 16:29:58 +0000
committerbde <bde@FreeBSD.org>1999-12-23 16:29:58 +0000
commit6c2d0e8c302f20e5b52acde44c3c0a4598742eaf (patch)
tree839f3fd0b113b03b0650401ad7ac82f348cc3e76 /lib/libc/gen
parenta7653abdc41362fb9148c7581862479cb19b89e2 (diff)
downloadFreeBSD-src-6c2d0e8c302f20e5b52acde44c3c0a4598742eaf.zip
FreeBSD-src-6c2d0e8c302f20e5b52acde44c3c0a4598742eaf.tar.gz
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>.
Diffstat (limited to 'lib/libc/gen')
-rw-r--r--lib/libc/gen/psignal.35
1 files changed, 3 insertions, 2 deletions
diff --git a/lib/libc/gen/psignal.3 b/lib/libc/gen/psignal.3
index 325f8ec..aad4133 100644
--- a/lib/libc/gen/psignal.3
+++ b/lib/libc/gen/psignal.3
@@ -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
OpenPOWER on IntegriCloud