From patchwork Tue Oct 16 16:42:19 2018 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 8bit X-Patchwork-Submitter: Antonio Ospite X-Patchwork-Id: 10643865 X-Patchwork-Delegate: herbert@gondor.apana.org.au Return-Path: Received: from mail.wl.linuxfoundation.org (pdx-wl-mail.web.codeaurora.org [172.30.200.125]) by pdx-korg-patchwork-2.web.codeaurora.org (Postfix) with ESMTP id D63DA3C13 for ; Tue, 16 Oct 2018 16:42:38 +0000 (UTC) Received: from mail.wl.linuxfoundation.org (localhost [127.0.0.1]) by mail.wl.linuxfoundation.org (Postfix) with ESMTP id C42462A5B8 for ; Tue, 16 Oct 2018 16:42:38 +0000 (UTC) Received: by mail.wl.linuxfoundation.org (Postfix, from userid 486) id B832A2A5D0; Tue, 16 Oct 2018 16:42:38 +0000 (UTC) X-Spam-Checker-Version: SpamAssassin 3.3.1 (2010-03-16) on pdx-wl-mail.web.codeaurora.org X-Spam-Level: X-Spam-Status: No, score=-8.0 required=2.0 tests=BAYES_00,DKIM_SIGNED, DKIM_VALID,DKIM_VALID_AU,MAILING_LIST_MULTI,RCVD_IN_DNSWL_HI autolearn=ham version=3.3.1 Received: from vger.kernel.org (vger.kernel.org [209.132.180.67]) by mail.wl.linuxfoundation.org (Postfix) with ESMTP id E89CF2A5EC for ; Tue, 16 Oct 2018 16:42:36 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1727384AbeJQAdu (ORCPT ); Tue, 16 Oct 2018 20:33:50 -0400 Received: from mail.ao2.it ([92.243.12.208]:59683 "EHLO ao2.it" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1727386AbeJQAdt (ORCPT ); Tue, 16 Oct 2018 20:33:49 -0400 DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=ao2.it; s=20180927; h=Content-Transfer-Encoding:Content-Type:MIME-Version:References:In-Reply-To:Message-Id:Date:Subject:Cc:To:From; bh=raBLxgv2fTdYAjRX8zDgt1hIGgcwIPQpuDviF0lRUWE=; b=oniKH0hESXVgXciih1QngI8w2OUx/wkE0omiBObwJTxBtW+hUDbO1puPInusKS0fmq4/HnFxJXwMpdLbLFazotCXUhfwLVOLtVSxMs6iY3X/TlgNyGXy1f+8HeMC0JHGIWanV/nf9I6b0VSJ1gJn6PimHPzyHREtg7VdA1DErxi+R/hvcppzLrFvfqlpXpju+kHKSmaPYJpgTs5equ/LYRxqoQ1uOoS1cp+Z9ykCwVdlS3YDvJeUcXUeqKeQJEnX0KorBEx9p0y2i0C/QE038+l+Tqsrc0BXj0jbDr8GZygUATdpQP1vDibUq8KDCvPtyfs7Idr3Ad94fNrQ21Anjw==; Received: from localhost ([::1] helo=jcn) by ao2.it with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.84_2) (envelope-from ) id 1gCSQK-0003wX-74; Tue, 16 Oct 2018 18:42:24 +0200 Received: from ao2 by jcn with local (Exim 4.91) (envelope-from ) id 1gCSQS-0007fM-LU; Tue, 16 Oct 2018 18:42:32 +0200 From: Antonio Ospite To: dash@vger.kernel.org Cc: Antonio Ospite Subject: [PATCH 4/5] Stop using deprecated function sigsetmask() Date: Tue, 16 Oct 2018 18:42:19 +0200 Message-Id: <20181016164220.29413-5-ao2@ao2.it> X-Mailer: git-send-email 2.19.1 In-Reply-To: <20181016164220.29413-1-ao2@ao2.it> References: <20181016164220.29413-1-ao2@ao2.it> MIME-Version: 1.0 X-Face: z*RaLf`X<@C75u6Ig9}{oW$H;1_\2t5)({*|jhM/Vb;]yA5\I~93>J<_`<4)A{':UrE Sender: dash-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: dash@vger.kernel.org X-Virus-Scanned: ClamAV using ClamSMTP sigsetmask() is deprecated, at least on recent glibc; stop using it to silence the following compiler warning: ----------------------------------------------------------------------- system.h:40:2: warning: ‘sigsetmask’ is deprecated [-Wdeprecated-declarations] sigsetmask(0); ^~~~~~~~~~ In file included from /usr/include/x86_64-linux-gnu/sys/param.h:28, from shell.h:52, from nodes.c:46: /usr/include/signal.h:173:12: note: declared here extern int sigsetmask (int __mask) __THROW __attribute_deprecated__; ^~~~~~~~~~ ----------------------------------------------------------------------- Using sigprocmask() and friends unconditionally should not be a problem, as commit e94a964 (eval: Add vfork support, 2018-05-19) also does it. Signed-off-by: Antonio Ospite --- configure.ac | 2 +- src/system.h | 4 ---- 2 files changed, 1 insertion(+), 5 deletions(-) diff --git a/configure.ac b/configure.ac index 036730d..32ef456 100644 --- a/configure.ac +++ b/configure.ac @@ -89,7 +89,7 @@ AC_CHECK_DECL([PRIdMAX],, dnl Checks for library functions. AC_CHECK_FUNCS(bsearch faccessat getpwnam getrlimit isalpha killpg \ mempcpy \ - sigsetmask stpcpy strchrnul strsignal strtod strtoimax \ + stpcpy strchrnul strsignal strtod strtoimax \ strtoumax sysconf) dnl Check whether it's worth working around FreeBSD PR kern/125009. diff --git a/src/system.h b/src/system.h index a8d09b3..6950e6e 100644 --- a/src/system.h +++ b/src/system.h @@ -36,13 +36,9 @@ static inline void sigclearmask(void) { -#ifdef HAVE_SIGSETMASK - sigsetmask(0); -#else sigset_t set; sigemptyset(&set); sigprocmask(SIG_SETMASK, &set, 0); -#endif } #ifndef HAVE_MEMPCPY