From owner-svn-src-all@freebsd.org Mon May 30 13:51:29 2016 Return-Path: Delivered-To: svn-src-all@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id 03187B53DEC; Mon, 30 May 2016 13:51:29 +0000 (UTC) (envelope-from ed@FreeBSD.org) Received: from repo.freebsd.org (repo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id B05E11AFA; Mon, 30 May 2016 13:51:28 +0000 (UTC) (envelope-from ed@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id u4UDpR2q002902; Mon, 30 May 2016 13:51:27 GMT (envelope-from ed@FreeBSD.org) Received: (from ed@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id u4UDpRVp002899; Mon, 30 May 2016 13:51:27 GMT (envelope-from ed@FreeBSD.org) Message-Id: <201605301351.u4UDpRVp002899@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: ed set sender to ed@FreeBSD.org using -f From: Ed Schouten Date: Mon, 30 May 2016 13:51:27 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r300997 - in head: include lib/libc/gen X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.22 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Mon, 30 May 2016 13:51:29 -0000 Author: ed Date: Mon May 30 13:51:27 2016 New Revision: 300997 URL: https://svnweb.freebsd.org/changeset/base/300997 Log: 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. Modified: head/include/signal.h head/lib/libc/gen/psignal.3 head/lib/libc/gen/psignal.c Modified: head/include/signal.h ============================================================================== --- head/include/signal.h Mon May 30 13:37:11 2016 (r300996) +++ head/include/signal.h Mon May 30 13:51:27 2016 (r300997) @@ -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 Modified: head/lib/libc/gen/psignal.3 ============================================================================== --- head/lib/libc/gen/psignal.3 Mon May 30 13:37:11 2016 (r300996) +++ head/lib/libc/gen/psignal.3 Mon May 30 13:51:27 2016 (r300997) @@ -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 Modified: head/lib/libc/gen/psignal.c ============================================================================== --- head/lib/libc/gen/psignal.c Mon May 30 13:37:11 2016 (r300996) +++ head/lib/libc/gen/psignal.c Mon May 30 13:51:27 2016 (r300997) @@ -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";