1
0
mirror of https://github.com/openbsd/src.git synced 2026-04-23 21:54:32 +00:00

psignal(3): align the type of the signal parameter with POSIX

POSIX uses an int for the signal number instead of an unsigned int. NetBSD
made this change in 2010 and FreeBSD made this change in 2016. Follow suit
with the other BSDs and match what POSIX specifies.

This should not have an impact on the ABI and therefore no bump is needed.

Flagged by Sortix os-test.

ok deraadt@, millert@
This commit is contained in:
daniel
2026-03-23 21:33:43 +00:00
parent 2084961b94
commit b75055f7ac
3 changed files with 7 additions and 7 deletions

View File

@@ -1,4 +1,4 @@
/* $OpenBSD: signal.h,v 1.26 2018/05/30 13:20:38 bluhm Exp $ */
/* $OpenBSD: signal.h,v 1.27 2026/03/23 21:33:43 daniel Exp $ */
/* $NetBSD: signal.h,v 1.8 1996/02/29 00:04:57 jtc Exp $ */
/*-
@@ -132,7 +132,7 @@ int thrkill(pid_t _tid, int _signum, void *_tcb);
int sigwait(const sigset_t *__restrict, int *__restrict);
#endif
#if __BSD_VISIBLE || __POSIX_VISIBLE >= 200809
void psignal(unsigned int, const char *);
void psignal(int, const char *);
#endif
#endif /* __BSD_VISIBLE || __POSIX_VISIBLE || __XPG_VISIBLE */
__END_DECLS

View File

@@ -1,4 +1,4 @@
.\" $OpenBSD: psignal.3,v 1.14 2019/05/16 13:35:16 schwarze Exp $
.\" $OpenBSD: psignal.3,v 1.15 2026/03/23 21:33:43 daniel Exp $
.\"
.\" Copyright (c) 1983, 1991, 1993
.\" The Regents of the University of California. All rights reserved.
@@ -27,7 +27,7 @@
.\" OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
.\" SUCH DAMAGE.
.\"
.Dd $Mdocdate: May 16 2019 $
.Dd $Mdocdate: March 23 2026 $
.Dt PSIGNAL 3
.Os
.Sh NAME
@@ -38,7 +38,7 @@
.Sh SYNOPSIS
.In signal.h
.Ft void
.Fn psignal "unsigned int sig" "const char *s"
.Fn psignal "int sig" "const char *s"
.Vt extern char *sys_siglist[];
.Vt extern char *sys_signame[];
.Sh DESCRIPTION

View File

@@ -1,4 +1,4 @@
/* $OpenBSD: psignal.c,v 1.10 2015/08/31 02:53:57 guenther Exp $ */
/* $OpenBSD: psignal.c,v 1.11 2026/03/23 21:33:43 daniel Exp $ */
/*
* Copyright (c) 1983, 1993
* The Regents of the University of California. All rights reserved.
@@ -40,7 +40,7 @@
#include <limits.h>
void
psignal(unsigned int sig, const char *s)
psignal(int sig, const char *s)
{
static char buf[NL_TEXTMAX];
const char *c;