mirror of
https://git.FreeBSD.org/src.git
synced 2025-01-19 15:33:56 +00:00
Fix the signature of the psignal() function.
POSIX 2008 added the psignal() function which has already been part of the BSDs for a long time. The only difference is, the POSIX version uses an 'int' for the signal number, unlike our version which uses an 'unsigned int'. Fix up the function to use an 'int'. This should not affect the ABI.
This commit is contained in:
parent
07acf54b4b
commit
0977bd1e88
Notes:
svn2git
2020-12-20 02:59:44 +00:00
svn path=/head/; revision=300997
@ -113,7 +113,7 @@ int siginterrupt(int, int);
|
||||
#endif
|
||||
|
||||
#if __POSIX_VISIBLE >= 200809
|
||||
void psignal(unsigned int, const char *);
|
||||
void psignal(int, const char *);
|
||||
#endif
|
||||
|
||||
#if __BSD_VISIBLE
|
||||
|
@ -28,7 +28,7 @@
|
||||
.\" @(#)psignal.3 8.2 (Berkeley) 2/27/95
|
||||
.\" $FreeBSD$
|
||||
.\"
|
||||
.Dd February 4, 2011
|
||||
.Dd May 30, 2016
|
||||
.Dt PSIGNAL 3
|
||||
.Os
|
||||
.Sh NAME
|
||||
@ -42,7 +42,7 @@
|
||||
.Sh SYNOPSIS
|
||||
.In signal.h
|
||||
.Ft void
|
||||
.Fn psignal "unsigned sig" "const char *s"
|
||||
.Fn psignal "int sig" "const char *s"
|
||||
.Vt extern const char * const sys_siglist[] ;
|
||||
.Vt extern const char * const sys_signame[] ;
|
||||
.In string.h
|
||||
|
@ -44,11 +44,11 @@ __FBSDID("$FreeBSD$");
|
||||
#include "un-namespace.h"
|
||||
|
||||
void
|
||||
psignal(unsigned int sig, const char *s)
|
||||
psignal(int sig, const char *s)
|
||||
{
|
||||
const char *c;
|
||||
|
||||
if (sig < NSIG)
|
||||
if (sig >= 0 && sig < NSIG)
|
||||
c = sys_siglist[sig];
|
||||
else
|
||||
c = "Unknown signal";
|
||||
|
Loading…
Reference in New Issue
Block a user