From patchwork Wed Mar 10 18:31:27 2021 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Alejandro Colomar X-Patchwork-Id: 1450717 Return-Path: X-Original-To: incoming@patchwork.ozlabs.org Delivered-To: patchwork-incoming@bilbo.ozlabs.org Authentication-Results: ozlabs.org; spf=pass (sender SPF authorized) smtp.mailfrom=sourceware.org (client-ip=2620:52:3:1:0:246e:9693:128c; helo=sourceware.org; envelope-from=libc-alpha-bounces@sourceware.org; receiver=) Authentication-Results: ozlabs.org; dkim=pass (1024-bit key; secure) header.d=sourceware.org header.i=@sourceware.org header.a=rsa-sha256 header.s=default header.b=nvg8PS2Q; dkim-atps=neutral Received: from sourceware.org (server2.sourceware.org [IPv6:2620:52:3:1:0:246e:9693:128c]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256) (No client certificate requested) by ozlabs.org (Postfix) with ESMTPS id 4DwgfS3w8bz9sS8 for ; Thu, 11 Mar 2021 05:32:16 +1100 (AEDT) Received: from server2.sourceware.org (localhost [IPv6:::1]) by sourceware.org (Postfix) with ESMTP id DE50F3951C4F; Wed, 10 Mar 2021 18:32:10 +0000 (GMT) DKIM-Filter: OpenDKIM Filter v2.11.0 sourceware.org DE50F3951C4F DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=sourceware.org; s=default; t=1615401130; bh=uolUfYcCUT91l2rELFMahsSmULprXhf9wlzi61GU2G8=; h=To:Subject:Date:In-Reply-To:References:List-Id:List-Unsubscribe: List-Archive:List-Post:List-Help:List-Subscribe:From:Reply-To:Cc: From; b=nvg8PS2QIKUmZLETOfqTUDMhI8BFhfuK+FJahY96m/revGKbf2If3DRWs2RcVXjn2 NzuDTS3xl01nOc2TthKzps4sN8uSAVxddtpYMoihm2jcrPloT+kgSaFUqfqJHBhGEU 8n6eaeWyQKZvjLrkY879iixy6r5UyTCS95boE+jc= X-Original-To: libc-alpha@sourceware.org Delivered-To: libc-alpha@sourceware.org Received: from mail-wm1-x32c.google.com (mail-wm1-x32c.google.com [IPv6:2a00:1450:4864:20::32c]) by sourceware.org (Postfix) with ESMTPS id 25F04382D83E for ; Wed, 10 Mar 2021 18:32:08 +0000 (GMT) DMARC-Filter: OpenDMARC Filter v1.3.2 sourceware.org 25F04382D83E Received: by mail-wm1-x32c.google.com with SMTP id d139-20020a1c1d910000b029010b895cb6f2so11351121wmd.5 for ; Wed, 10 Mar 2021 10:32:08 -0800 (PST) X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:from:to:cc:subject:date:message-id:in-reply-to :references:mime-version:content-transfer-encoding; bh=uolUfYcCUT91l2rELFMahsSmULprXhf9wlzi61GU2G8=; b=KQG4ZdkmW4M8yHYwdye1FfijmmVUQxBwgsSQQCCSlmUzgG9Sa1ElO5/6N6Fr8TSSPZ /ca82ftEytFba9i3QybhdBq6GBXWgzHN1aLFpoGMOz+tqeXOrX2Ukwn7BEYBiTlZvLxl qwp8XtqIIlPn/2ky4/9jZaAW8dsCa3axKldRU27hnbtNENE4Kc39ZSTxy9WTN11NVZ2f bkjhn4aBAHppU21/p4CGMdzA4fVoFFuT9MiwHbZT29fMoY5hONVOOA3E61WTiHZGx0YA i5cIb9mUY4v6kzx1c4zsupT+bqf4st+UV4MV1U27B39uBAGnpMGFaE4LyREBU/dBDl4B kmdg== X-Gm-Message-State: AOAM531fqNkKtN48FHM/AiSxrIydCXC4t/1irn81YArGeygiBUBZDmbN 7Z3SlxLpxezIOhHy4zfuhNI= X-Google-Smtp-Source: ABdhPJwXuLpskv01ZUXvVx59eEouDoJvOjUIRnwOqHuxBJ/tl2dM1W4itlWFlbo+/r1EJsqk1JxIdA== X-Received: by 2002:a7b:c119:: with SMTP id w25mr4544839wmi.127.1615401127343; Wed, 10 Mar 2021 10:32:07 -0800 (PST) Received: from localhost.localdomain ([170.253.51.130]) by smtp.googlemail.com with ESMTPSA id k11sm325374wmj.1.2021.03.10.10.32.06 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Wed, 10 Mar 2021 10:32:07 -0800 (PST) To: mtk.manpages@gmail.com Subject: [PATCH 01/24] sem_getvalue.3: SYNOPSIS: Use 'restrict' in prototypes Date: Wed, 10 Mar 2021 19:31:27 +0100 Message-Id: <20210310183149.194717-2-alx.manpages@gmail.com> X-Mailer: git-send-email 2.30.1.721.g45526154a5 In-Reply-To: <20210310183149.194717-1-alx.manpages@gmail.com> References: <20210310183149.194717-1-alx.manpages@gmail.com> MIME-Version: 1.0 X-Spam-Status: No, score=-12.3 required=5.0 tests=BAYES_00, DKIM_SIGNED, DKIM_VALID, DKIM_VALID_AU, DKIM_VALID_EF, FREEMAIL_FROM, GIT_PATCH_0, RCVD_IN_DNSWL_NONE, SPF_HELO_NONE, SPF_PASS, TXREP autolearn=ham autolearn_force=no version=3.4.2 X-Spam-Checker-Version: SpamAssassin 3.4.2 (2018-09-13) on server2.sourceware.org X-BeenThere: libc-alpha@sourceware.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: Libc-alpha mailing list List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-Patchwork-Original-From: Alejandro Colomar via Libc-alpha From: Alejandro Colomar Reply-To: Alejandro Colomar Cc: Alejandro Colomar , linux-man@vger.kernel.org, libc-alpha@sourceware.org Errors-To: libc-alpha-bounces@sourceware.org Sender: "Libc-alpha" Both POSIX and glibc use 'restrict' in sem_getvalue(). Let's use it here too. .../glibc$ grep_glibc_prototype sem_getvalue sysdeps/pthread/semaphore.h:81: extern int sem_getvalue (sem_t *__restrict __sem, int *__restrict __sval) __THROW __nonnull ((1, 2)); .../glibc$ Signed-off-by: Alejandro Colomar --- man3/sem_getvalue.3 | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/man3/sem_getvalue.3 b/man3/sem_getvalue.3 index ddfb1899a..084dc510d 100644 --- a/man3/sem_getvalue.3 +++ b/man3/sem_getvalue.3 @@ -29,7 +29,7 @@ sem_getvalue \- get the value of a semaphore .nf .B #include .PP -.BI "int sem_getvalue(sem_t *" sem ", int *" sval ); +.BI "int sem_getvalue(sem_t *restrict " sem ", int *restrict " sval ); .fi .PP Link with \fI\-pthread\fP. From patchwork Wed Mar 10 18:31:28 2021 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Alejandro Colomar X-Patchwork-Id: 1450718 Return-Path: X-Original-To: incoming@patchwork.ozlabs.org Delivered-To: patchwork-incoming@bilbo.ozlabs.org Authentication-Results: ozlabs.org; spf=pass (sender SPF authorized) smtp.mailfrom=sourceware.org (client-ip=8.43.85.97; helo=sourceware.org; envelope-from=libc-alpha-bounces@sourceware.org; receiver=) Authentication-Results: ozlabs.org; dkim=pass (1024-bit key; secure) header.d=sourceware.org header.i=@sourceware.org header.a=rsa-sha256 header.s=default header.b=Ke08bqCx; dkim-atps=neutral Received: from sourceware.org (server2.sourceware.org [8.43.85.97]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256) (No client certificate requested) by ozlabs.org (Postfix) with ESMTPS id 4DwgfX5ks0z9sS8 for ; Thu, 11 Mar 2021 05:32:20 +1100 (AEDT) Received: from server2.sourceware.org (localhost [IPv6:::1]) by sourceware.org (Postfix) with ESMTP id 7456C3987C13; Wed, 10 Mar 2021 18:32:12 +0000 (GMT) DKIM-Filter: OpenDKIM Filter v2.11.0 sourceware.org 7456C3987C13 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=sourceware.org; s=default; t=1615401132; bh=MYO3X/yjg3wkBx4QD0PRVd2tX8XIpNPx7l46JwQWDSY=; h=To:Subject:Date:In-Reply-To:References:List-Id:List-Unsubscribe: List-Archive:List-Post:List-Help:List-Subscribe:From:Reply-To:Cc: From; b=Ke08bqCxNmRSP+eTEpPy4HHckgyiIs8KCO6MRH8s908qjMIxxfGcsoYM5/kLQLIFi ogkFIXSbbh6Il6Xk8fWBzfKLf7n9Wx5/gbsxw2LPp9yqR6yMVD5QeieZPfbtpqppbB 0HBwF44AU7eH4ekKfW5eS93LPEptCjIHrTLOL0hg= X-Original-To: libc-alpha@sourceware.org Delivered-To: libc-alpha@sourceware.org Received: from mail-wr1-x429.google.com (mail-wr1-x429.google.com [IPv6:2a00:1450:4864:20::429]) by sourceware.org (Postfix) with ESMTPS id E30C23857011 for ; Wed, 10 Mar 2021 18:32:08 +0000 (GMT) DMARC-Filter: OpenDMARC Filter v1.3.2 sourceware.org E30C23857011 Received: by mail-wr1-x429.google.com with SMTP id d15so24456202wrv.5 for ; Wed, 10 Mar 2021 10:32:08 -0800 (PST) X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:from:to:cc:subject:date:message-id:in-reply-to :references:mime-version:content-transfer-encoding; bh=MYO3X/yjg3wkBx4QD0PRVd2tX8XIpNPx7l46JwQWDSY=; b=YVmuXxiemXXASkKI/HevH/XM190wbS0BdtxTygvXFst5ifyzFtULtiBepGhbVGP54e lSlY0MOYUYyxxHnVSlTRxHiyPGX2sMUgaqH7CtXh8QH5HdGSg/eJMqdqHDJz4c0/idYy YqE5d7kkHfodzGwK07HXX0ROeGU19eAPzLgBdLiwlAyRvKtMaxqwWkxoW5vbzWcGBBQL TZsgp0D8YqECC/sGjdHH9TGh+nSOzv6z5FZ1geVuN5lpz0s7DfjP5LXIzSlvQS//KMFy L2HxxAmDzaOSxlAjUV1QnxBeTAF+n/iataBMk0BCFnXcl7+NTKZ0KcmhWRMgEUqFGS0e Fmxw== X-Gm-Message-State: AOAM531bDlkYqSgqPP7bbgClOHJMqpNj290kA/bKMm9PPYUrdGKinNxB B/ltjD96mcWyMxHIvxhC164bQYaSqTKI4w== X-Google-Smtp-Source: ABdhPJz2reFKLc3m5cUFHhAswdT9TKX4RoB2rDx29NEdr1KkK0KUb0t3EKz047u2/O2znZrmB/8o1w== X-Received: by 2002:adf:b355:: with SMTP id k21mr4934029wrd.156.1615401128071; Wed, 10 Mar 2021 10:32:08 -0800 (PST) Received: from localhost.localdomain ([170.253.51.130]) by smtp.googlemail.com with ESMTPSA id k11sm325374wmj.1.2021.03.10.10.32.07 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Wed, 10 Mar 2021 10:32:07 -0800 (PST) To: mtk.manpages@gmail.com Subject: [PATCH 02/24] sem_wait.3: SYNOPSIS: Use 'restrict' in prototypes Date: Wed, 10 Mar 2021 19:31:28 +0100 Message-Id: <20210310183149.194717-3-alx.manpages@gmail.com> X-Mailer: git-send-email 2.30.1.721.g45526154a5 In-Reply-To: <20210310183149.194717-1-alx.manpages@gmail.com> References: <20210310183149.194717-1-alx.manpages@gmail.com> MIME-Version: 1.0 X-Spam-Status: No, score=-12.3 required=5.0 tests=BAYES_00, DKIM_SIGNED, DKIM_VALID, DKIM_VALID_AU, DKIM_VALID_EF, FREEMAIL_FROM, GIT_PATCH_0, RCVD_IN_DNSWL_NONE, SPF_HELO_NONE, SPF_PASS, TXREP autolearn=ham autolearn_force=no version=3.4.2 X-Spam-Checker-Version: SpamAssassin 3.4.2 (2018-09-13) on server2.sourceware.org X-BeenThere: libc-alpha@sourceware.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: Libc-alpha mailing list List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-Patchwork-Original-From: Alejandro Colomar via Libc-alpha From: Alejandro Colomar Reply-To: Alejandro Colomar Cc: Alejandro Colomar , linux-man@vger.kernel.org, libc-alpha@sourceware.org Errors-To: libc-alpha-bounces@sourceware.org Sender: "Libc-alpha" Both POSIX and glibc use 'restrict' in sem_timedwait(). Let's use it here too. .../glibc$ grep_glibc_prototype sem_timedwait sysdeps/pthread/semaphore.h:62: extern int sem_timedwait (sem_t *__restrict __sem, const struct timespec *__restrict __abstime) __nonnull ((1, 2)); .../glibc$ Signed-off-by: Alejandro Colomar --- man3/sem_wait.3 | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/man3/sem_wait.3 b/man3/sem_wait.3 index d57b6f6ce..da7ae72c2 100644 --- a/man3/sem_wait.3 +++ b/man3/sem_wait.3 @@ -31,7 +31,8 @@ sem_wait, sem_timedwait, sem_trywait \- lock a semaphore .PP .BI "int sem_wait(sem_t *" sem ); .BI "int sem_trywait(sem_t *" sem ); -.BI "int sem_timedwait(sem_t *" sem ", const struct timespec *" abs_timeout ); +.BI "int sem_timedwait(sem_t *restrict " sem , +.BI " const struct timespec *restrict " abs_timeout ); .fi .PP Link with \fI\-pthread\fP. From patchwork Wed Mar 10 18:31:29 2021 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Alejandro Colomar X-Patchwork-Id: 1450719 Return-Path: X-Original-To: incoming@patchwork.ozlabs.org Delivered-To: patchwork-incoming@bilbo.ozlabs.org Authentication-Results: ozlabs.org; spf=pass (sender SPF authorized) smtp.mailfrom=sourceware.org (client-ip=2620:52:3:1:0:246e:9693:128c; helo=sourceware.org; envelope-from=libc-alpha-bounces@sourceware.org; receiver=) Authentication-Results: ozlabs.org; dkim=pass (1024-bit key; secure) header.d=sourceware.org header.i=@sourceware.org header.a=rsa-sha256 header.s=default header.b=HdX+YGWK; dkim-atps=neutral Received: from sourceware.org (server2.sourceware.org [IPv6:2620:52:3:1:0:246e:9693:128c]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256) (No client certificate requested) by ozlabs.org (Postfix) with ESMTPS id 4Dwgfd4QVJz9sS8 for ; Thu, 11 Mar 2021 05:32:25 +1100 (AEDT) Received: from server2.sourceware.org (localhost [IPv6:::1]) by sourceware.org (Postfix) with ESMTP id 05A9D3987C17; Wed, 10 Mar 2021 18:32:13 +0000 (GMT) DKIM-Filter: OpenDKIM Filter v2.11.0 sourceware.org 05A9D3987C17 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=sourceware.org; s=default; t=1615401133; bh=/2cJ8HWX1tQaJ+wSbquo1BnR87Ep6w0X6W75wazdkM4=; h=To:Subject:Date:In-Reply-To:References:List-Id:List-Unsubscribe: List-Archive:List-Post:List-Help:List-Subscribe:From:Reply-To:Cc: From; b=HdX+YGWKe8vZzlATkt9xAC8fOWxKLH/1smH89VUjZ+ljtCVmo0SrPjcIqHLLRuayd Ql4fCcB/Sie+S81IiWWgoVzM3j7A9uel/1QxwmX5TRZhCZUsxljq/lhEpIiyjoXgyL hOHUXnFxcEBzTN75cAJ94YzDTZmbbiWJKet84vHs= X-Original-To: libc-alpha@sourceware.org Delivered-To: libc-alpha@sourceware.org Received: from mail-wm1-x332.google.com (mail-wm1-x332.google.com [IPv6:2a00:1450:4864:20::332]) by sourceware.org (Postfix) with ESMTPS id B750E382E83A for ; Wed, 10 Mar 2021 18:32:09 +0000 (GMT) DMARC-Filter: OpenDMARC Filter v1.3.2 sourceware.org B750E382E83A Received: by mail-wm1-x332.google.com with SMTP id 124-20020a1c00820000b029010b871409cfso11686768wma.4 for ; Wed, 10 Mar 2021 10:32:09 -0800 (PST) X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:from:to:cc:subject:date:message-id:in-reply-to :references:mime-version:content-transfer-encoding; bh=/2cJ8HWX1tQaJ+wSbquo1BnR87Ep6w0X6W75wazdkM4=; b=lYpG5/AGwLRNkVKaA8Vg6YJgyfUysh+2Qf5g7I/miCtsZzuY3BwLjDhf+LsMc4kZFp TGN9rj4iJfOqYEr/el0h3nsCWSX6b2yYen+keslRGld7uQwp5VoIiH23Ut87gRNkP+f6 EMqb7Dtd2F/KW7pLrL0CsD5iSJa96TNISCmg+mD6vO0YSpn4RYTeYILp4UhhBPKsgnKa NEVeDpht71XsjFdepOPrIBwr1RhZjEIkkKbywCBU9XjoOVNgRL8+3Ji0dSiN8X5QrFqx IyKh8aUou8za8k31BvPVwMXCbCdZgMgA9RZC3i+UnInJRRBWBAI/wRI3y4sUhx1pGlQh hAhQ== X-Gm-Message-State: AOAM530Ssn87327WBFcY+d79tc02O+idUfairf+5W/n8Ja9SoQM5EerI RGq2UWwrqAmYqt6OIR5htq6cd9e21J1c/w== X-Google-Smtp-Source: ABdhPJzwg7T1/dNA8WBf893v2a04OxmWRZ88jOINbyiQULamvrBy++/Yk1Rt/RN2dG0OY7RiuYPK1Q== X-Received: by 2002:a1c:32ca:: with SMTP id y193mr4614814wmy.56.1615401128956; Wed, 10 Mar 2021 10:32:08 -0800 (PST) Received: from localhost.localdomain ([170.253.51.130]) by smtp.googlemail.com with ESMTPSA id k11sm325374wmj.1.2021.03.10.10.32.08 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Wed, 10 Mar 2021 10:32:08 -0800 (PST) To: mtk.manpages@gmail.com Subject: [PATCH 03/24] setaliasent.3: SYNOPSIS: Use 'restrict' in prototypes Date: Wed, 10 Mar 2021 19:31:29 +0100 Message-Id: <20210310183149.194717-4-alx.manpages@gmail.com> X-Mailer: git-send-email 2.30.1.721.g45526154a5 In-Reply-To: <20210310183149.194717-1-alx.manpages@gmail.com> References: <20210310183149.194717-1-alx.manpages@gmail.com> MIME-Version: 1.0 X-Spam-Status: No, score=-12.3 required=5.0 tests=BAYES_00, DKIM_SIGNED, DKIM_VALID, DKIM_VALID_AU, DKIM_VALID_EF, FREEMAIL_FROM, GIT_PATCH_0, RCVD_IN_DNSWL_NONE, SPF_HELO_NONE, SPF_PASS, TXREP autolearn=ham autolearn_force=no version=3.4.2 X-Spam-Checker-Version: SpamAssassin 3.4.2 (2018-09-13) on server2.sourceware.org X-BeenThere: libc-alpha@sourceware.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: Libc-alpha mailing list List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-Patchwork-Original-From: Alejandro Colomar via Libc-alpha From: Alejandro Colomar Reply-To: Alejandro Colomar Cc: Alejandro Colomar , linux-man@vger.kernel.org, libc-alpha@sourceware.org Errors-To: libc-alpha-bounces@sourceware.org Sender: "Libc-alpha" glibc uses 'restrict' in getaliasent_r(), getaliasbyname_r(). Let's use it here too. .../glibc$ grep_glibc_prototype getaliasent_r inet/aliases.h:48: extern int getaliasent_r (struct aliasent *__restrict __result_buf, char *__restrict __buffer, size_t __buflen, struct aliasent **__restrict __result) __THROW; .../glibc$ grep_glibc_prototype getaliasbyname_r inet/aliases.h:56: extern int getaliasbyname_r (const char *__restrict __name, struct aliasent *__restrict __result_buf, char *__restrict __buffer, size_t __buflen, struct aliasent **__restrict __result) __THROW; .../glibc$ Signed-off-by: Alejandro Colomar --- man3/setaliasent.3 | 13 +++++++------ 1 file changed, 7 insertions(+), 6 deletions(-) diff --git a/man3/setaliasent.3 b/man3/setaliasent.3 index 027bc91b6..b1b3a4ae5 100644 --- a/man3/setaliasent.3 +++ b/man3/setaliasent.3 @@ -18,14 +18,15 @@ getaliasbyname, getaliasbyname_r \- read an alias entry .B "void endaliasent(void);" .PP .B "struct aliasent *getaliasent(void);" -.BI "int getaliasent_r(struct aliasent *" result "," -.BI " char *" buffer ", size_t " buflen \ -", struct aliasent **" res ); +.BI "int getaliasent_r(struct aliasent *restrict " result , +.BI " char *restrict " buffer ", size_t " buflen , +.BI " struct aliasent **restrict " res ); .PP .BI "struct aliasent *getaliasbyname(const char *" name ); -.BI "int getaliasbyname_r(const char *" name ", struct aliasent *" result , -.BI " char *" buffer ", size_t " buflen \ -", struct aliasent **" res ); +.BI "int getaliasbyname_r(const char *restrict " name , +.BI " struct aliasent *restrict " result , +.BI " char *restrict " buffer ", size_t " buflen , +.BI " struct aliasent **restrict " res ); .fi .SH DESCRIPTION One of the databases available with the Name Service Switch (NSS) From patchwork Wed Mar 10 18:31:30 2021 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Alejandro Colomar X-Patchwork-Id: 1450720 Return-Path: X-Original-To: incoming@patchwork.ozlabs.org Delivered-To: patchwork-incoming@bilbo.ozlabs.org Authentication-Results: ozlabs.org; spf=pass (sender SPF authorized) smtp.mailfrom=sourceware.org (client-ip=8.43.85.97; helo=sourceware.org; envelope-from=libc-alpha-bounces@sourceware.org; receiver=) Authentication-Results: ozlabs.org; dkim=pass (1024-bit key; secure) header.d=sourceware.org header.i=@sourceware.org header.a=rsa-sha256 header.s=default header.b=Tm7SxiEv; dkim-atps=neutral Received: from sourceware.org (server2.sourceware.org [8.43.85.97]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256) (No client certificate requested) by ozlabs.org (Postfix) with ESMTPS id 4Dwgfk4C14z9sVw for ; Thu, 11 Mar 2021 05:32:30 +1100 (AEDT) Received: from server2.sourceware.org (localhost [IPv6:::1]) by sourceware.org (Postfix) with ESMTP id A07353987C1F; Wed, 10 Mar 2021 18:32:14 +0000 (GMT) DKIM-Filter: OpenDKIM Filter v2.11.0 sourceware.org A07353987C1F DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=sourceware.org; s=default; t=1615401134; bh=fdohn1pb1rZi0D62QJtzqKxiCptxB5fPp9OXm6eHGlM=; h=To:Subject:Date:In-Reply-To:References:List-Id:List-Unsubscribe: List-Archive:List-Post:List-Help:List-Subscribe:From:Reply-To:Cc: From; b=Tm7SxiEv9G40HS80a5s3OOlug2YVxT6gJmRtucG7sA+VKnB8gNOiNbYDd37CIkJfs YSPpitxz6kChfmwZTxMfrJnlRFUbN2LDnl0E801IYNcLhcWkCiNFQa78gD22BVhiHa s3IZdMJfwZ6he7O3wVHAFr1YogGws8u0TDrctOCQ= X-Original-To: libc-alpha@sourceware.org Delivered-To: libc-alpha@sourceware.org Received: from mail-wr1-x42e.google.com (mail-wr1-x42e.google.com [IPv6:2a00:1450:4864:20::42e]) by sourceware.org (Postfix) with ESMTPS id 8528A3894422 for ; Wed, 10 Mar 2021 18:32:10 +0000 (GMT) DMARC-Filter: OpenDMARC Filter v1.3.2 sourceware.org 8528A3894422 Received: by mail-wr1-x42e.google.com with SMTP id h98so24397902wrh.11 for ; Wed, 10 Mar 2021 10:32:10 -0800 (PST) X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:from:to:cc:subject:date:message-id:in-reply-to :references:mime-version:content-transfer-encoding; bh=fdohn1pb1rZi0D62QJtzqKxiCptxB5fPp9OXm6eHGlM=; b=JDv7mV6UoBk04CbnZQs1m8oaWjjBsr9mkc9xodsgz76hqPmYFbyW0+DyxlAL5V7UqP JAVgDo3nsx2sVmS5L1TDL7KiVjRnUqtA4B1dGwdRGBgg1irBFUPGBEg9rMuqbW/Hoeo4 yrdhCK2/por3lrZrI/OatDF5CywfHSYG0akFAICB7zgZRtWy7AhPbH6529ds79kN4AN4 4t68dirUsO7mutntCmY2h+20TKgz7JcoI6CMFfb8heBBZFh9QzggKp4w5wTMLOFg4VP7 w0Wx29Wu85ZU/KySXlxTnEcjgqXSRJz2/dRxOG0G1f+ZZydgyaO0LNP5cB34Otfqg6Cl 41tQ== X-Gm-Message-State: AOAM531BoSjCq147ncVWme2A73XgF6DU4Tpj3APzQyNVmP8RnzsrpJIV vzQA4d9H7cEeRwo0B7VrRUSooCCLwzO5Lg== X-Google-Smtp-Source: ABdhPJy2W1N0HAl+XMFPPoZICa8B7nNzmjaito4c6qpxVBfxLDdkM3HSHw/9QZTYXvCha+2qHu3jcQ== X-Received: by 2002:a5d:6312:: with SMTP id i18mr4937816wru.149.1615401129769; Wed, 10 Mar 2021 10:32:09 -0800 (PST) Received: from localhost.localdomain ([170.253.51.130]) by smtp.googlemail.com with ESMTPSA id k11sm325374wmj.1.2021.03.10.10.32.09 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Wed, 10 Mar 2021 10:32:09 -0800 (PST) To: mtk.manpages@gmail.com Subject: [PATCH 04/24] setbuf.3: SYNOPSIS: Use 'restrict' in prototypes Date: Wed, 10 Mar 2021 19:31:30 +0100 Message-Id: <20210310183149.194717-5-alx.manpages@gmail.com> X-Mailer: git-send-email 2.30.1.721.g45526154a5 In-Reply-To: <20210310183149.194717-1-alx.manpages@gmail.com> References: <20210310183149.194717-1-alx.manpages@gmail.com> MIME-Version: 1.0 X-Spam-Status: No, score=-12.3 required=5.0 tests=BAYES_00, DKIM_SIGNED, DKIM_VALID, DKIM_VALID_AU, DKIM_VALID_EF, FREEMAIL_FROM, GIT_PATCH_0, RCVD_IN_DNSWL_NONE, SPF_HELO_NONE, SPF_PASS, TXREP autolearn=ham autolearn_force=no version=3.4.2 X-Spam-Checker-Version: SpamAssassin 3.4.2 (2018-09-13) on server2.sourceware.org X-BeenThere: libc-alpha@sourceware.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: Libc-alpha mailing list List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-Patchwork-Original-From: Alejandro Colomar via Libc-alpha From: Alejandro Colomar Reply-To: Alejandro Colomar Cc: Alejandro Colomar , linux-man@vger.kernel.org, libc-alpha@sourceware.org Errors-To: libc-alpha-bounces@sourceware.org Sender: "Libc-alpha" glibc uses 'restrict' in setbuffer(). Let's use it here too. .../glibc$ grep_glibc_prototype setbuffer libio/stdio.h:314: extern void setbuffer (FILE *__restrict __stream, char *__restrict __buf, size_t __size) __THROW; .../glibc$ Signed-off-by: Alejandro Colomar --- man3/setbuf.3 | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/man3/setbuf.3 b/man3/setbuf.3 index ccfeb83ba..ac73bb06e 100644 --- a/man3/setbuf.3 +++ b/man3/setbuf.3 @@ -56,7 +56,8 @@ setbuf, setbuffer, setlinebuf, setvbuf \- stream buffering operations ", size_t " size ); .PP .BI "void setbuf(FILE *" stream ", char *" buf ); -.BI "void setbuffer(FILE *" stream ", char *" buf ", size_t " size ); +.BI "void setbuffer(FILE *restrict " stream ", char *restrict " buf , +.BI " size_t " size ); .BI "void setlinebuf(FILE *" stream ); .fi .PP From patchwork Wed Mar 10 18:31:31 2021 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Alejandro Colomar X-Patchwork-Id: 1450721 Return-Path: X-Original-To: incoming@patchwork.ozlabs.org Delivered-To: patchwork-incoming@bilbo.ozlabs.org Authentication-Results: ozlabs.org; spf=pass (sender SPF authorized) smtp.mailfrom=sourceware.org (client-ip=2620:52:3:1:0:246e:9693:128c; helo=sourceware.org; envelope-from=libc-alpha-bounces@sourceware.org; receiver=) Authentication-Results: ozlabs.org; dkim=pass (1024-bit key; secure) header.d=sourceware.org header.i=@sourceware.org header.a=rsa-sha256 header.s=default header.b=mH6eqoyJ; dkim-atps=neutral Received: from sourceware.org (server2.sourceware.org [IPv6:2620:52:3:1:0:246e:9693:128c]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256) (No client certificate requested) by ozlabs.org (Postfix) with ESMTPS id 4Dwgfq1txFz9sS8 for ; Thu, 11 Mar 2021 05:32:35 +1100 (AEDT) Received: from server2.sourceware.org (localhost [IPv6:::1]) by sourceware.org (Postfix) with ESMTP id 334E33987C0C; Wed, 10 Mar 2021 18:32:15 +0000 (GMT) DKIM-Filter: OpenDKIM Filter v2.11.0 sourceware.org 334E33987C0C DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=sourceware.org; s=default; t=1615401135; bh=TTdSfDoRiVb1tuE+92dsswKwFjc3WvqJM2t894HwE+0=; h=To:Subject:Date:In-Reply-To:References:List-Id:List-Unsubscribe: List-Archive:List-Post:List-Help:List-Subscribe:From:Reply-To:Cc: From; b=mH6eqoyJM+Z/GJpPpVC9q/2rhFvmMLOcM/oaMC6Cm3XZfjJrorqWYMs1Qu6nhl/Sr jWcOa10c1BmARGRm6MIciKIGcM3to0OF+uwh05NbeLoGASwc/QGGG3vzCU/nEcxggJ B8va7Ve3ORo9RFf0a248dF8wzHOFc36MjLRf2yD8= X-Original-To: libc-alpha@sourceware.org Delivered-To: libc-alpha@sourceware.org Received: from mail-wm1-x332.google.com (mail-wm1-x332.google.com [IPv6:2a00:1450:4864:20::332]) by sourceware.org (Postfix) with ESMTPS id 53C06396E475 for ; Wed, 10 Mar 2021 18:32:11 +0000 (GMT) DMARC-Filter: OpenDMARC Filter v1.3.2 sourceware.org 53C06396E475 Received: by mail-wm1-x332.google.com with SMTP id i9so7745828wml.0 for ; Wed, 10 Mar 2021 10:32:11 -0800 (PST) X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:from:to:cc:subject:date:message-id:in-reply-to :references:mime-version:content-transfer-encoding; bh=TTdSfDoRiVb1tuE+92dsswKwFjc3WvqJM2t894HwE+0=; b=MzRJl27VKvgfSujWyPVK5wEv+/WnIKojzHldh199m4gQ3DQoI7EE/fIfKVYitYzNxC PauEtYU0qI+5ZxuOh57R1ObgNJ67KEsMoVRH+s93IPCRlsaIMrevWWVEENwRoi8A40zB WObsvSv0rhpa6rdc5T0KYpVUuPGXiIkczlAmMLoQ2AHMMhIJKZhfl3k7LlOP5/wfN602 8WGeoDJaAAXb1nNap08RvEjT0PAz0Mkn+RCJRxQgyGbGd3YCLJS7vBp5alJrmhXank4f WRJyvRrTtRyZtGZzMXK97eHcS/ZtJyLuVCNgZ3fCaEcMHJbE5qkEIiRJc42lMqJCQDc4 tsQQ== X-Gm-Message-State: AOAM5339A8Pw3HLQqZIwTvH9zbEqIueyzjUSCnLWWHvp4nQl7W2OSqxo Vzd1D1ixOoK1LBrfffWn33s= X-Google-Smtp-Source: ABdhPJyPjNiZoNtH9EE7CB3RWZiEjP57WGXFB2E9xeBOAgbxHH43Fkh1RqdfZSIoC2J5qrDhpEbgow== X-Received: by 2002:a1c:6543:: with SMTP id z64mr4706350wmb.50.1615401130522; Wed, 10 Mar 2021 10:32:10 -0800 (PST) Received: from localhost.localdomain ([170.253.51.130]) by smtp.googlemail.com with ESMTPSA id k11sm325374wmj.1.2021.03.10.10.32.09 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Wed, 10 Mar 2021 10:32:10 -0800 (PST) To: mtk.manpages@gmail.com Subject: [PATCH 05/24] setbuf.3: SYNOPSIS: Use 'restrict' in prototypes Date: Wed, 10 Mar 2021 19:31:31 +0100 Message-Id: <20210310183149.194717-6-alx.manpages@gmail.com> X-Mailer: git-send-email 2.30.1.721.g45526154a5 In-Reply-To: <20210310183149.194717-1-alx.manpages@gmail.com> References: <20210310183149.194717-1-alx.manpages@gmail.com> MIME-Version: 1.0 X-Spam-Status: No, score=-12.3 required=5.0 tests=BAYES_00, DKIM_SIGNED, DKIM_VALID, DKIM_VALID_AU, DKIM_VALID_EF, FREEMAIL_FROM, GIT_PATCH_0, RCVD_IN_DNSWL_NONE, SPF_HELO_NONE, SPF_PASS, TXREP autolearn=ham autolearn_force=no version=3.4.2 X-Spam-Checker-Version: SpamAssassin 3.4.2 (2018-09-13) on server2.sourceware.org X-BeenThere: libc-alpha@sourceware.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: Libc-alpha mailing list List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-Patchwork-Original-From: Alejandro Colomar via Libc-alpha From: Alejandro Colomar Reply-To: Alejandro Colomar Cc: Alejandro Colomar , linux-man@vger.kernel.org, libc-alpha@sourceware.org Errors-To: libc-alpha-bounces@sourceware.org Sender: "Libc-alpha" Both POSIX and glibc use 'restrict' in setvbuf(), setbuf(). Let's use it here too. .../glibc$ grep_glibc_prototype setvbuf libio/stdio.h:308: extern int setvbuf (FILE *__restrict __stream, char *__restrict __buf, int __modes, size_t __n) __THROW; .../glibc$ grep_glibc_prototype setbuf libio/stdio.h:304: extern void setbuf (FILE *__restrict __stream, char *__restrict __buf) __THROW; .../glibc$ Signed-off-by: Alejandro Colomar --- man3/setbuf.3 | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/man3/setbuf.3 b/man3/setbuf.3 index ac73bb06e..708e5c5aa 100644 --- a/man3/setbuf.3 +++ b/man3/setbuf.3 @@ -52,10 +52,10 @@ setbuf, setbuffer, setlinebuf, setvbuf \- stream buffering operations .nf .B #include .PP -.BI "int setvbuf(FILE *" stream ", char *" buf ", int " mode \ -", size_t " size ); +.BI "int setvbuf(FILE *restrict " stream ", char *restrict " buf , +.BI " int " mode ", size_t " size ); .PP -.BI "void setbuf(FILE *" stream ", char *" buf ); +.BI "void setbuf(FILE *restrict " stream ", char *restrict " buf ); .BI "void setbuffer(FILE *restrict " stream ", char *restrict " buf , .BI " size_t " size ); .BI "void setlinebuf(FILE *" stream ); From patchwork Wed Mar 10 18:31:32 2021 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Alejandro Colomar X-Patchwork-Id: 1450722 Return-Path: X-Original-To: incoming@patchwork.ozlabs.org Delivered-To: patchwork-incoming@bilbo.ozlabs.org Authentication-Results: ozlabs.org; spf=pass (sender SPF authorized) smtp.mailfrom=sourceware.org (client-ip=2620:52:3:1:0:246e:9693:128c; helo=sourceware.org; envelope-from=libc-alpha-bounces@sourceware.org; receiver=) Authentication-Results: ozlabs.org; dkim=pass (1024-bit key; secure) header.d=sourceware.org header.i=@sourceware.org header.a=rsa-sha256 header.s=default header.b=LDNS5IIw; dkim-atps=neutral Received: from sourceware.org (server2.sourceware.org [IPv6:2620:52:3:1:0:246e:9693:128c]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256) (No client certificate requested) by ozlabs.org (Postfix) with ESMTPS id 4Dwgfv70mgz9sS8 for ; Thu, 11 Mar 2021 05:32:39 +1100 (AEDT) Received: from server2.sourceware.org (localhost [IPv6:::1]) by sourceware.org (Postfix) with ESMTP id CB8C23987C23; Wed, 10 Mar 2021 18:32:15 +0000 (GMT) DKIM-Filter: OpenDKIM Filter v2.11.0 sourceware.org CB8C23987C23 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=sourceware.org; s=default; t=1615401135; bh=+bzWvWDLSxoT6KTAh+c1ca6ECWOIV1SYop1drWRGp9k=; h=To:Subject:Date:In-Reply-To:References:List-Id:List-Unsubscribe: List-Archive:List-Post:List-Help:List-Subscribe:From:Reply-To:Cc: From; b=LDNS5IIwkjMnF+zxVrMvREIoxPMaL2G6ScyXbTyUpVbh1tLQJKAPlzyyLdgrnuTgv DE1zi48Tl86i7hkLfJ+/FuHp32J5MEs9sVJN7Uo30rrJq3+D4VFa0kW//kk50UvcOb BN68HL5L0WVNM3dw1No5RjEFICozG6hVOPtyhWOU= X-Original-To: libc-alpha@sourceware.org Delivered-To: libc-alpha@sourceware.org Received: from mail-wm1-x32a.google.com (mail-wm1-x32a.google.com [IPv6:2a00:1450:4864:20::32a]) by sourceware.org (Postfix) with ESMTPS id 281E63987C09 for ; Wed, 10 Mar 2021 18:32:12 +0000 (GMT) DMARC-Filter: OpenDMARC Filter v1.3.2 sourceware.org 281E63987C09 Received: by mail-wm1-x32a.google.com with SMTP id r10-20020a05600c35cab029010c946c95easo11340328wmq.4 for ; Wed, 10 Mar 2021 10:32:12 -0800 (PST) X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:from:to:cc:subject:date:message-id:in-reply-to :references:mime-version:content-transfer-encoding; bh=+bzWvWDLSxoT6KTAh+c1ca6ECWOIV1SYop1drWRGp9k=; b=KR8L99+UODOxVFWivZWALo3Jc3YAHsAPTCOdrTkZlX/w2Wzw68tsBb8A9P8GJZ4Bei Gb6m6eee4VwL5pFxDNNvm0eR2RN6jm4aP0PMaxOlQFecN6B7OdLfMo+i1Ltzsvshl0F+ CKiwaYsz/nTXul6eboE11VRz0lnlzqU6oLiUE6imtoAAS0HIdMzglob+DkjBBi/cU6aw Tp4bH6vRT5dFFGa7DISe5+p5o1A2rSrhD46ZjVioeYm/0OErew2w9EkWkY8nsNsNHttA JUXSmab4y+qfoGQoymqnu6xYXoXElMacWXk2VoWPhvHMXnQAkepUQYnLq6owQvFLeMQ6 aL0A== X-Gm-Message-State: AOAM530AJZ0e2VnI7H8DamoSQyb7qiQx3OIcPTosOCaeLR4WIsE7h+XN f0Nl1N4H4sISbbxAyRvpkjU= X-Google-Smtp-Source: ABdhPJzjb2/By5pS2u2sqtxNmmtWyHrzyB5V+7X/3DpQB6WzzeYDtSbFdabqArePslKRCe10aCnaUw== X-Received: by 2002:a1c:4986:: with SMTP id w128mr4610975wma.37.1615401131356; Wed, 10 Mar 2021 10:32:11 -0800 (PST) Received: from localhost.localdomain ([170.253.51.130]) by smtp.googlemail.com with ESMTPSA id k11sm325374wmj.1.2021.03.10.10.32.10 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Wed, 10 Mar 2021 10:32:11 -0800 (PST) To: mtk.manpages@gmail.com Subject: [PATCH 06/24] setnetgrent.3: SYNOPSIS: Use 'restrict' in prototypes Date: Wed, 10 Mar 2021 19:31:32 +0100 Message-Id: <20210310183149.194717-7-alx.manpages@gmail.com> X-Mailer: git-send-email 2.30.1.721.g45526154a5 In-Reply-To: <20210310183149.194717-1-alx.manpages@gmail.com> References: <20210310183149.194717-1-alx.manpages@gmail.com> MIME-Version: 1.0 X-Spam-Status: No, score=-12.3 required=5.0 tests=BAYES_00, DKIM_SIGNED, DKIM_VALID, DKIM_VALID_AU, DKIM_VALID_EF, FREEMAIL_FROM, GIT_PATCH_0, RCVD_IN_DNSWL_NONE, SPF_HELO_NONE, SPF_PASS, TXREP autolearn=ham autolearn_force=no version=3.4.2 X-Spam-Checker-Version: SpamAssassin 3.4.2 (2018-09-13) on server2.sourceware.org X-BeenThere: libc-alpha@sourceware.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: Libc-alpha mailing list List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-Patchwork-Original-From: Alejandro Colomar via Libc-alpha From: Alejandro Colomar Reply-To: Alejandro Colomar Cc: Alejandro Colomar , linux-man@vger.kernel.org, libc-alpha@sourceware.org Errors-To: libc-alpha-bounces@sourceware.org Sender: "Libc-alpha" glibc uses 'restrict' in getnetgrent(), getnetgrent_r(). Let's use it here too. .../glibc$ grep_glibc_prototype getnetgrent resolv/netdb.h:410: extern int getnetgrent (char **__restrict __hostp, char **__restrict __userp, char **__restrict __domainp); .../glibc$ grep_glibc_prototype getnetgrent_r resolv/netdb.h:430: extern int getnetgrent_r (char **__restrict __hostp, char **__restrict __userp, char **__restrict __domainp, char *__restrict __buffer, size_t __buflen); .../glibc$ Signed-off-by: Alejandro Colomar --- man3/setnetgrent.3 | 12 +++++++----- 1 file changed, 7 insertions(+), 5 deletions(-) diff --git a/man3/setnetgrent.3 b/man3/setnetgrent.3 index 440cf2846..2a783ee58 100644 --- a/man3/setnetgrent.3 +++ b/man3/setnetgrent.3 @@ -18,12 +18,14 @@ handle network group entries .BI "int setnetgrent(const char *" netgroup ); .B "void endnetgrent(void);" .PP -.BI "int getnetgrent(char **" host ", char **" user ", char **" domain ); -.BI "int getnetgrent_r(char **" host ", char **" user "," -.BI " char **" domain ", char *" buf ", size_t " buflen ); +.BI "int getnetgrent(char **restrict " host , +.BI " char **restrict " user ", char **restrict " domain ); +.BI "int getnetgrent_r(char **restrict " host , +.BI " char **restrict " user ", char **restrict " domain , +.BI " char *restrict " buf ", size_t " buflen ); .PP -.BI "int innetgr(const char *" netgroup ", const char *" host "," -.BI " const char *" user ", const char *" domain ); +.BI "int innetgr(const char *" netgroup ", const char *" host , +.BI " const char *" user ", const char *" domain ); .fi .PP .RS -4 From patchwork Wed Mar 10 18:31:33 2021 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Alejandro Colomar X-Patchwork-Id: 1450723 Return-Path: X-Original-To: incoming@patchwork.ozlabs.org Delivered-To: patchwork-incoming@bilbo.ozlabs.org Authentication-Results: ozlabs.org; spf=pass (sender SPF authorized) smtp.mailfrom=sourceware.org (client-ip=8.43.85.97; helo=sourceware.org; envelope-from=libc-alpha-bounces@sourceware.org; receiver=) Authentication-Results: ozlabs.org; dkim=pass (1024-bit key; secure) header.d=sourceware.org header.i=@sourceware.org header.a=rsa-sha256 header.s=default header.b=oMxWZuPL; dkim-atps=neutral Received: from sourceware.org (server2.sourceware.org [8.43.85.97]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256) (No client certificate requested) by ozlabs.org (Postfix) with ESMTPS id 4Dwgg00r4Bz9sS8 for ; Thu, 11 Mar 2021 05:32:44 +1100 (AEDT) Received: from server2.sourceware.org (localhost [IPv6:::1]) by sourceware.org (Postfix) with ESMTP id CF5623987C26; Wed, 10 Mar 2021 18:32:17 +0000 (GMT) DKIM-Filter: OpenDKIM Filter v2.11.0 sourceware.org CF5623987C26 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=sourceware.org; s=default; t=1615401137; bh=11xyOr0Ft1na3ZpfXXYIITQcv17euKfzLSjwCxZI6c8=; h=To:Subject:Date:In-Reply-To:References:List-Id:List-Unsubscribe: List-Archive:List-Post:List-Help:List-Subscribe:From:Reply-To:Cc: From; b=oMxWZuPLdoPt39Ig6NA/1wZ7BfueBt5mV8jkuP0c8ZzVEQt8nVrqe7ihl/IS6VrcE v3wyS1QzaatpeWOfssNjqifEJ76/Qqilmryqh4uoYe0CzylQ+BXFLol55BcVti9S0U vsYNK9MbPn7sLnQUgg0URlc6rEXsKpSZumERct+o= X-Original-To: libc-alpha@sourceware.org Delivered-To: libc-alpha@sourceware.org Received: from mail-wr1-x42f.google.com (mail-wr1-x42f.google.com [IPv6:2a00:1450:4864:20::42f]) by sourceware.org (Postfix) with ESMTPS id E4EBF3987C16 for ; Wed, 10 Mar 2021 18:32:12 +0000 (GMT) DMARC-Filter: OpenDMARC Filter v1.3.2 sourceware.org E4EBF3987C16 Received: by mail-wr1-x42f.google.com with SMTP id j2so24429177wrx.9 for ; Wed, 10 Mar 2021 10:32:12 -0800 (PST) X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:from:to:cc:subject:date:message-id:in-reply-to :references:mime-version:content-transfer-encoding; bh=11xyOr0Ft1na3ZpfXXYIITQcv17euKfzLSjwCxZI6c8=; b=ifAH26vKN+ZeHJOYOqVWArL/0bmbzqLG1CZhcgUVLxvHlSFgwzqn1h1IVg0hhORAI1 Vfelx8ahCoPWGAGYvB+oqXbmte8jJbv1IxGSEMqN5JVgkyOuSZSugyQYiAEzEuq9IgdS bVq7pIG7uiRBQGWPUp+QUcQ53/Nf75Es09wYsVDTMJgNIWm2S5Jjx6YflPQYym5Apr1D 8Bg3rit8M1z4lg+Hjnp6reJQfd/vjO0/1JcgIz38GXYevhwObCkP4BRMIoh1HxQ5b5O6 hE4DfRathODvtK++cuXcne67+/cqiKisYqORvNN+XC0GCPHux5ysR6Fq2S2r6y092ptc ePUA== X-Gm-Message-State: AOAM530DyUjaxc5ebtkM60jBsYaCgEcljk2M5RVP/C7SgwNlPvecRQIf 1NfXlPfsSqugZ+rg4trzAp0= X-Google-Smtp-Source: ABdhPJwim9Ll7PPLPTQpXr+XWWKMJmYJCtA3e7w1ahaaRPnFY19bHu4C+BVHMJgFRLim7EKUWl1VpQ== X-Received: by 2002:a05:6000:5:: with SMTP id h5mr4999164wrx.97.1615401132127; Wed, 10 Mar 2021 10:32:12 -0800 (PST) Received: from localhost.localdomain ([170.253.51.130]) by smtp.googlemail.com with ESMTPSA id k11sm325374wmj.1.2021.03.10.10.32.11 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Wed, 10 Mar 2021 10:32:11 -0800 (PST) To: mtk.manpages@gmail.com Subject: [PATCH 07/24] sigwait.3: SYNOPSIS: Use 'restrict' in prototypes Date: Wed, 10 Mar 2021 19:31:33 +0100 Message-Id: <20210310183149.194717-8-alx.manpages@gmail.com> X-Mailer: git-send-email 2.30.1.721.g45526154a5 In-Reply-To: <20210310183149.194717-1-alx.manpages@gmail.com> References: <20210310183149.194717-1-alx.manpages@gmail.com> MIME-Version: 1.0 X-Spam-Status: No, score=-12.3 required=5.0 tests=BAYES_00, DKIM_SIGNED, DKIM_VALID, DKIM_VALID_AU, DKIM_VALID_EF, FREEMAIL_FROM, GIT_PATCH_0, RCVD_IN_DNSWL_NONE, SPF_HELO_NONE, SPF_PASS, TXREP autolearn=ham autolearn_force=no version=3.4.2 X-Spam-Checker-Version: SpamAssassin 3.4.2 (2018-09-13) on server2.sourceware.org X-BeenThere: libc-alpha@sourceware.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: Libc-alpha mailing list List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-Patchwork-Original-From: Alejandro Colomar via Libc-alpha From: Alejandro Colomar Reply-To: Alejandro Colomar Cc: Alejandro Colomar , linux-man@vger.kernel.org, libc-alpha@sourceware.org Errors-To: libc-alpha-bounces@sourceware.org Sender: "Libc-alpha" Both POSIX and glibc use 'restrict' in sigwait(). Let's use it here too. .../glibc$ grep_glibc_prototype sigwait signal/signal.h:255: extern int sigwait (const sigset_t *__restrict __set, int *__restrict __sig) __nonnull ((1, 2)); .../glibc$ Signed-off-by: Alejandro Colomar --- man3/sigwait.3 | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/man3/sigwait.3 b/man3/sigwait.3 index 47c79a24d..30b7af568 100644 --- a/man3/sigwait.3 +++ b/man3/sigwait.3 @@ -30,7 +30,7 @@ sigwait \- wait for a signal .nf .B #include .PP -.BI "int sigwait(const sigset_t *" set ", int *" sig ); +.BI "int sigwait(const sigset_t *restrict " set ", int *restrict " sig ); .fi .PP .RS -4 From patchwork Wed Mar 10 18:31:34 2021 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Alejandro Colomar X-Patchwork-Id: 1450725 Return-Path: X-Original-To: incoming@patchwork.ozlabs.org Delivered-To: patchwork-incoming@bilbo.ozlabs.org Authentication-Results: ozlabs.org; spf=pass (sender SPF authorized) smtp.mailfrom=sourceware.org (client-ip=2620:52:3:1:0:246e:9693:128c; helo=sourceware.org; envelope-from=libc-alpha-bounces@sourceware.org; receiver=) Authentication-Results: ozlabs.org; dkim=pass (1024-bit key; secure) header.d=sourceware.org header.i=@sourceware.org header.a=rsa-sha256 header.s=default header.b=NdT9Hm4T; dkim-atps=neutral Received: from sourceware.org (server2.sourceware.org [IPv6:2620:52:3:1:0:246e:9693:128c]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256) (No client certificate requested) by ozlabs.org (Postfix) with ESMTPS id 4Dwgg44WMmz9sS8 for ; Thu, 11 Mar 2021 05:32:48 +1100 (AEDT) Received: from server2.sourceware.org (localhost [IPv6:::1]) by sourceware.org (Postfix) with ESMTP id 620743987C2A; Wed, 10 Mar 2021 18:32:18 +0000 (GMT) DKIM-Filter: OpenDKIM Filter v2.11.0 sourceware.org 620743987C2A DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=sourceware.org; s=default; t=1615401138; bh=XCSDsp2q5xXoeQUsWa0c7bkMZ/kpYfI6jEnJNon/iaY=; h=To:Subject:Date:In-Reply-To:References:List-Id:List-Unsubscribe: List-Archive:List-Post:List-Help:List-Subscribe:From:Reply-To:Cc: From; b=NdT9Hm4Ty9D/+gWTyN8aQTCYg37hgYshDfteejlbSCkFhIkDs2fLyGaaFouQHiYLa HglwKhhIgT0Q8uh0t0ss8jo4d8pB91Y0LM/kobzPOyoNOSC+L+l8BC6rdoRlqKOPrQ lTvdNcOGcEYO3yVilHFZA+mo+6qHeNOROufCDgnQ= X-Original-To: libc-alpha@sourceware.org Delivered-To: libc-alpha@sourceware.org Received: from mail-wr1-x433.google.com (mail-wr1-x433.google.com [IPv6:2a00:1450:4864:20::433]) by sourceware.org (Postfix) with ESMTPS id D2436397283D for ; Wed, 10 Mar 2021 18:32:13 +0000 (GMT) DMARC-Filter: OpenDMARC Filter v1.3.2 sourceware.org D2436397283D Received: by mail-wr1-x433.google.com with SMTP id d15so24456478wrv.5 for ; Wed, 10 Mar 2021 10:32:13 -0800 (PST) X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:from:to:cc:subject:date:message-id:in-reply-to :references:mime-version:content-transfer-encoding; bh=XCSDsp2q5xXoeQUsWa0c7bkMZ/kpYfI6jEnJNon/iaY=; b=MeWSBsiPHIn7JJq0CxtgEofx2k788xkQnYmlRCqk/SGORKvTqOOoy1MRFQn2BIq01Y JIp5VyBsKi6cOlkC/P9uubx5I1b7nphlWdLJMtFFBF/rdb6AdjuB5OzOFcmkrW4H/JUv xIRsuYkEaj1mmGhUS6n8agtSa7N5c9e6qRQXzk0+0AonGvdjp0I5YPqAaefHyxFFr8BJ BU31+aoQEbn/+vBGOjizC4Bson2zU1omvQqCHQLyLSJkA9rIcNzbpNkuVA6kHNWBAMJz DBaeQAOwSw8E9FytX3agwsP6OowqjtlKk/nXErhAPztPwLLNc+2jUzoRZBX0PZ1e39/5 1alw== X-Gm-Message-State: AOAM533JMZvaOA0tPnXlY6wKsI+mknH3kCfYZqRkehSg7zMm7PouyuLf +VdpRngh5ek5CuX7H/RJFtzuBTBXO76qWw== X-Google-Smtp-Source: ABdhPJxFK+knhX+ENxqJsN+g/RId1RD1cxTYdPA0P9GIv4dWM0QwHP1eGierKCWQiYYyfMa+px2Jgw== X-Received: by 2002:adf:fb05:: with SMTP id c5mr4999718wrr.302.1615401133035; Wed, 10 Mar 2021 10:32:13 -0800 (PST) Received: from localhost.localdomain ([170.253.51.130]) by smtp.googlemail.com with ESMTPSA id k11sm325374wmj.1.2021.03.10.10.32.12 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Wed, 10 Mar 2021 10:32:12 -0800 (PST) To: mtk.manpages@gmail.com Subject: [PATCH 08/24] statvfs.3: SYNOPSIS: Use 'restrict' in prototypes Date: Wed, 10 Mar 2021 19:31:34 +0100 Message-Id: <20210310183149.194717-9-alx.manpages@gmail.com> X-Mailer: git-send-email 2.30.1.721.g45526154a5 In-Reply-To: <20210310183149.194717-1-alx.manpages@gmail.com> References: <20210310183149.194717-1-alx.manpages@gmail.com> MIME-Version: 1.0 X-Spam-Status: No, score=-12.3 required=5.0 tests=BAYES_00, DKIM_SIGNED, DKIM_VALID, DKIM_VALID_AU, DKIM_VALID_EF, FREEMAIL_FROM, GIT_PATCH_0, RCVD_IN_DNSWL_NONE, SPF_HELO_NONE, SPF_PASS, TXREP autolearn=ham autolearn_force=no version=3.4.2 X-Spam-Checker-Version: SpamAssassin 3.4.2 (2018-09-13) on server2.sourceware.org X-BeenThere: libc-alpha@sourceware.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: Libc-alpha mailing list List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-Patchwork-Original-From: Alejandro Colomar via Libc-alpha From: Alejandro Colomar Reply-To: Alejandro Colomar Cc: Alejandro Colomar , linux-man@vger.kernel.org, libc-alpha@sourceware.org Errors-To: libc-alpha-bounces@sourceware.org Sender: "Libc-alpha" Both POSIX and glibc use 'restrict' in statvfs(). Let's use it here too. .../glibc$ grep_glibc_prototype statvfs io/sys/statvfs.h:51: extern int statvfs (const char *__restrict __file, struct statvfs *__restrict __buf) __THROW __nonnull ((1, 2)); .../glibc$ Signed-off-by: Alejandro Colomar --- man3/statvfs.3 | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/man3/statvfs.3 b/man3/statvfs.3 index 4f2788614..6fbfdc719 100644 --- a/man3/statvfs.3 +++ b/man3/statvfs.3 @@ -34,7 +34,8 @@ statvfs, fstatvfs \- get filesystem statistics .nf .B #include .PP -.BI "int statvfs(const char *" path ", struct statvfs *" buf ); +.BI "int statvfs(const char *restrict " path \ +", struct statvfs *restrict " buf ); .BI "int fstatvfs(int " fd ", struct statvfs *" buf ); .fi .SH DESCRIPTION From patchwork Wed Mar 10 18:31:35 2021 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Alejandro Colomar X-Patchwork-Id: 1450726 Return-Path: X-Original-To: incoming@patchwork.ozlabs.org Delivered-To: patchwork-incoming@bilbo.ozlabs.org Authentication-Results: ozlabs.org; spf=pass (sender SPF authorized) smtp.mailfrom=sourceware.org (client-ip=8.43.85.97; helo=sourceware.org; envelope-from=libc-alpha-bounces@sourceware.org; receiver=) Authentication-Results: ozlabs.org; dkim=pass (1024-bit key; secure) header.d=sourceware.org header.i=@sourceware.org header.a=rsa-sha256 header.s=default header.b=aPlBz6vz; dkim-atps=neutral Received: from sourceware.org (server2.sourceware.org [8.43.85.97]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256) (No client certificate requested) by ozlabs.org (Postfix) with ESMTPS id 4Dwgg82pRwz9sS8 for ; Thu, 11 Mar 2021 05:32:52 +1100 (AEDT) Received: from server2.sourceware.org (localhost [IPv6:::1]) by sourceware.org (Postfix) with ESMTP id 0F0A23987C32; Wed, 10 Mar 2021 18:32:19 +0000 (GMT) DKIM-Filter: OpenDKIM Filter v2.11.0 sourceware.org 0F0A23987C32 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=sourceware.org; s=default; t=1615401139; bh=1ZZr1EvO5ui5u7KR0jLKyoq5CbBvdVKAFwtMZjteMFg=; h=To:Subject:Date:In-Reply-To:References:List-Id:List-Unsubscribe: List-Archive:List-Post:List-Help:List-Subscribe:From:Reply-To:Cc: From; b=aPlBz6vzRe662DBg5X1pwdz1LoGPoZF3IJsw6U5w2hDk4Q4TW0jznV+oAtKd3SEjE JGbtfVUtF5TRYOSIJC2erH9Om6F/Wsc9HPbGdRGI6cI278JPgTsIPRq9F6CItNJkSU q7FasWGv4qVY2IMrgBf7S38xWmERmrdl4ssnt310= X-Original-To: libc-alpha@sourceware.org Delivered-To: libc-alpha@sourceware.org Received: from mail-wr1-x436.google.com (mail-wr1-x436.google.com [IPv6:2a00:1450:4864:20::436]) by sourceware.org (Postfix) with ESMTPS id AB9053987C20 for ; Wed, 10 Mar 2021 18:32:14 +0000 (GMT) DMARC-Filter: OpenDMARC Filter v1.3.2 sourceware.org AB9053987C20 Received: by mail-wr1-x436.google.com with SMTP id w11so24454580wrr.10 for ; Wed, 10 Mar 2021 10:32:14 -0800 (PST) X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:from:to:cc:subject:date:message-id:in-reply-to :references:mime-version:content-transfer-encoding; bh=1ZZr1EvO5ui5u7KR0jLKyoq5CbBvdVKAFwtMZjteMFg=; b=tK6MbrkaxVQWPajnu7LqXGMu6/jGyf6o8sSnWLRWt/xKd9yG0lckLH5VdcI0YP0eOC yJusHtuequWSwVTC4cLM5d9yL0ff4ov6pni6CU9CVMYJKI7w7E2K1MrMJD2lRBz0j9+4 c3cvFA0rH+iJwAaRLgfVvQAb8lR0P8HqupHemWTeQTpgReH/6bULAzR9n50M7bs/vplj nTGKQtEFKuG7oS4xyc20viIfS4nYXowzT9NFKJud2LkniGqcT/CdRAosJhrhMAFIRbVj SZz9ONGSeluHM4ueJN/30l5TqrTJU1bf9wpfvvU7vt6fle0KvekDFDxUG/fed8YPq/Te ad6A== X-Gm-Message-State: AOAM531gwSD5NWQ6I7tqcByvjMu4uuMeGjAuhZ3a2u5Vhq0om1BDguiy zbUns9zohWnp0xtLfFR4qg2xgIkQq2yGKw== X-Google-Smtp-Source: ABdhPJwajoDtAelXDKdDDU9KBMJut0J2vvSbN6AWCg3BYqlg2Tl5lff/egchlgXvFCjQ8PU6fvAFZw== X-Received: by 2002:a5d:6610:: with SMTP id n16mr4767194wru.399.1615401133870; Wed, 10 Mar 2021 10:32:13 -0800 (PST) Received: from localhost.localdomain ([170.253.51.130]) by smtp.googlemail.com with ESMTPSA id k11sm325374wmj.1.2021.03.10.10.32.13 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Wed, 10 Mar 2021 10:32:13 -0800 (PST) To: mtk.manpages@gmail.com Subject: [PATCH 09/24] stpcpy.3: SYNOPSIS: Use 'restrict' in prototypes Date: Wed, 10 Mar 2021 19:31:35 +0100 Message-Id: <20210310183149.194717-10-alx.manpages@gmail.com> X-Mailer: git-send-email 2.30.1.721.g45526154a5 In-Reply-To: <20210310183149.194717-1-alx.manpages@gmail.com> References: <20210310183149.194717-1-alx.manpages@gmail.com> MIME-Version: 1.0 X-Spam-Status: No, score=-12.3 required=5.0 tests=BAYES_00, DKIM_SIGNED, DKIM_VALID, DKIM_VALID_AU, DKIM_VALID_EF, FREEMAIL_FROM, GIT_PATCH_0, RCVD_IN_DNSWL_NONE, SPF_HELO_NONE, SPF_PASS, TXREP autolearn=ham autolearn_force=no version=3.4.2 X-Spam-Checker-Version: SpamAssassin 3.4.2 (2018-09-13) on server2.sourceware.org X-BeenThere: libc-alpha@sourceware.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: Libc-alpha mailing list List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-Patchwork-Original-From: Alejandro Colomar via Libc-alpha From: Alejandro Colomar Reply-To: Alejandro Colomar Cc: Alejandro Colomar , linux-man@vger.kernel.org, libc-alpha@sourceware.org Errors-To: libc-alpha-bounces@sourceware.org Sender: "Libc-alpha" Both POSIX and glibc use 'restrict' in stpcpy(). Let's use it here too. .../glibc$ grep_glibc_prototype stpcpy string/string.h:475: extern char *stpcpy (char *__restrict __dest, const char *__restrict __src) __THROW __nonnull ((1, 2)); .../glibc$ Signed-off-by: Alejandro Colomar --- man3/stpcpy.3 | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/man3/stpcpy.3 b/man3/stpcpy.3 index 448b53955..e978dfb3e 100644 --- a/man3/stpcpy.3 +++ b/man3/stpcpy.3 @@ -29,7 +29,7 @@ stpcpy \- copy a string returning a pointer to its end .nf .B #include .PP -.BI "char *stpcpy(char *" dest ", const char *" src ); +.BI "char *stpcpy(char *restrict " dest ", const char *restrict " src ); .fi .PP .RS -4 From patchwork Wed Mar 10 18:31:36 2021 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Alejandro Colomar X-Patchwork-Id: 1450728 Return-Path: X-Original-To: incoming@patchwork.ozlabs.org Delivered-To: patchwork-incoming@bilbo.ozlabs.org Authentication-Results: ozlabs.org; spf=pass (sender SPF authorized) smtp.mailfrom=sourceware.org (client-ip=8.43.85.97; helo=sourceware.org; envelope-from=libc-alpha-bounces@sourceware.org; receiver=) Authentication-Results: ozlabs.org; dkim=pass (1024-bit key; secure) header.d=sourceware.org header.i=@sourceware.org header.a=rsa-sha256 header.s=default header.b=rsuEQAHc; dkim-atps=neutral Received: from sourceware.org (server2.sourceware.org [8.43.85.97]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256) (No client certificate requested) by ozlabs.org (Postfix) with ESMTPS id 4DwggD6ng6z9sS8 for ; Thu, 11 Mar 2021 05:32:56 +1100 (AEDT) Received: from server2.sourceware.org (localhost [IPv6:::1]) by sourceware.org (Postfix) with ESMTP id 97FBB3987C2E; Wed, 10 Mar 2021 18:32:20 +0000 (GMT) DKIM-Filter: OpenDKIM Filter v2.11.0 sourceware.org 97FBB3987C2E DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=sourceware.org; s=default; t=1615401140; bh=GwmJUFdVmQpqJBDhv4YOalGN2rFIVkaI+KfkWvD0mH4=; h=To:Subject:Date:In-Reply-To:References:List-Id:List-Unsubscribe: List-Archive:List-Post:List-Help:List-Subscribe:From:Reply-To:Cc: From; b=rsuEQAHcxLjNNoV95MkTYKMtN+4yBploLPsU2IGJZuSvzb4XgJLvMsIvEqgP+noZ9 ZQFVnJIEXFeyl7Tr787hBZxnD+RCAdpQPXkSUYrjzTDq8yzSSYU96Lb8dvQO1QxoR8 0ZbA8od5nC7nCpkG4Ml6UfhLZ+17zwib7WiBrqNQ= X-Original-To: libc-alpha@sourceware.org Delivered-To: libc-alpha@sourceware.org Received: from mail-wr1-x429.google.com (mail-wr1-x429.google.com [IPv6:2a00:1450:4864:20::429]) by sourceware.org (Postfix) with ESMTPS id 6B7343987C1B for ; Wed, 10 Mar 2021 18:32:15 +0000 (GMT) DMARC-Filter: OpenDMARC Filter v1.3.2 sourceware.org 6B7343987C1B Received: by mail-wr1-x429.google.com with SMTP id d15so24456549wrv.5 for ; Wed, 10 Mar 2021 10:32:15 -0800 (PST) X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:from:to:cc:subject:date:message-id:in-reply-to :references:mime-version:content-transfer-encoding; bh=GwmJUFdVmQpqJBDhv4YOalGN2rFIVkaI+KfkWvD0mH4=; b=XY6Eo/PhRVoCEHFf8hMKl5vjYf84PCBmzFSvfab0SiNiZDPYSdnUAvMVFzCsZETL9I N1ot3bS0mdZx8QgQwpAMwUaG3Vvhop+AG+xsNpAPoaj6qTGNeN15jnL8TIspEXfbtMJW /N2LT2wMnzy1J178F+1XDMpQe4J+4m96SAEo7TMpRWtgOPWUcpB6JIYwjGIFjfP/OZTy +7VJgGp1+8+DJlcTRNjmuQhFTvkHBwiPr1Djf/dknd5ehIqR1mm6QeZbe4e99MbIoPI4 C0fD1Dl8OpWiayPjaxpTBm0rgo/bgyuu3GoK2HmutXYiL43VDSZWYiTPxQhKEw9ITLE7 22vw== X-Gm-Message-State: AOAM532qbKzPHVr2cu/WMvcUkiMjP/DZ8iegRvxM09k7Snu+QAzCAW9r ebBez7pqj9plubB7FXF98U9wg3do7D5XQQ== X-Google-Smtp-Source: ABdhPJy/4S7XL76Fk3f7Mpp3vg3EX5cmQtH7KXgzUAMIye2lNfNFVmf9YAOAARlgAwsoFxK91Lof5A== X-Received: by 2002:adf:ee8f:: with SMTP id b15mr4802359wro.314.1615401134611; Wed, 10 Mar 2021 10:32:14 -0800 (PST) Received: from localhost.localdomain ([170.253.51.130]) by smtp.googlemail.com with ESMTPSA id k11sm325374wmj.1.2021.03.10.10.32.13 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Wed, 10 Mar 2021 10:32:14 -0800 (PST) To: mtk.manpages@gmail.com Subject: [PATCH 10/24] stpncpy.3: SYNOPSIS: Use 'restrict' in prototypes Date: Wed, 10 Mar 2021 19:31:36 +0100 Message-Id: <20210310183149.194717-11-alx.manpages@gmail.com> X-Mailer: git-send-email 2.30.1.721.g45526154a5 In-Reply-To: <20210310183149.194717-1-alx.manpages@gmail.com> References: <20210310183149.194717-1-alx.manpages@gmail.com> MIME-Version: 1.0 X-Spam-Status: No, score=-12.3 required=5.0 tests=BAYES_00, DKIM_SIGNED, DKIM_VALID, DKIM_VALID_AU, DKIM_VALID_EF, FREEMAIL_FROM, GIT_PATCH_0, RCVD_IN_DNSWL_NONE, SPF_HELO_NONE, SPF_PASS, TXREP autolearn=ham autolearn_force=no version=3.4.2 X-Spam-Checker-Version: SpamAssassin 3.4.2 (2018-09-13) on server2.sourceware.org X-BeenThere: libc-alpha@sourceware.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: Libc-alpha mailing list List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-Patchwork-Original-From: Alejandro Colomar via Libc-alpha From: Alejandro Colomar Reply-To: Alejandro Colomar Cc: Alejandro Colomar , linux-man@vger.kernel.org, libc-alpha@sourceware.org Errors-To: libc-alpha-bounces@sourceware.org Sender: "Libc-alpha" Both POSIX and glibc use 'restrict' in stpncpy(). Let's use it here too. .../glibc$ grep_glibc_prototype stpncpy string/string.h:483: extern char *stpncpy (char *__restrict __dest, const char *__restrict __src, size_t __n) __THROW __nonnull ((1, 2)); .../glibc$ Signed-off-by: Alejandro Colomar --- man3/stpncpy.3 | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/man3/stpncpy.3 b/man3/stpncpy.3 index 3adc5f426..493d42378 100644 --- a/man3/stpncpy.3 +++ b/man3/stpncpy.3 @@ -18,7 +18,8 @@ stpncpy \- copy a fixed-size string, returning a pointer to its end .nf .B #include .PP -.BI "char *stpncpy(char *" dest ", const char *" src ", size_t " n ); +.BI "char *stpncpy(char *restrict " dest ", const char *restrict " src \ +", size_t " n ); .fi .PP .RS -4 From patchwork Wed Mar 10 18:31:37 2021 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Alejandro Colomar X-Patchwork-Id: 1450729 Return-Path: X-Original-To: incoming@patchwork.ozlabs.org Delivered-To: patchwork-incoming@bilbo.ozlabs.org Authentication-Results: ozlabs.org; spf=pass (sender SPF authorized) smtp.mailfrom=sourceware.org (client-ip=2620:52:3:1:0:246e:9693:128c; helo=sourceware.org; envelope-from=libc-alpha-bounces@sourceware.org; receiver=) Authentication-Results: ozlabs.org; dkim=pass (1024-bit key; secure) header.d=sourceware.org header.i=@sourceware.org header.a=rsa-sha256 header.s=default header.b=f+spDf6k; dkim-atps=neutral Received: from sourceware.org (server2.sourceware.org [IPv6:2620:52:3:1:0:246e:9693:128c]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256) (No client certificate requested) by ozlabs.org (Postfix) with ESMTPS id 4DwggK0l52z9sS8 for ; Thu, 11 Mar 2021 05:33:01 +1100 (AEDT) Received: from server2.sourceware.org (localhost [IPv6:::1]) by sourceware.org (Postfix) with ESMTP id 28D653987C3C; Wed, 10 Mar 2021 18:32:21 +0000 (GMT) DKIM-Filter: OpenDKIM Filter v2.11.0 sourceware.org 28D653987C3C DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=sourceware.org; s=default; t=1615401141; bh=HEdE9FOWc9j3Y4cTJGMR/JWcdWsgHEC/wWTIgs2wasE=; h=To:Subject:Date:In-Reply-To:References:List-Id:List-Unsubscribe: List-Archive:List-Post:List-Help:List-Subscribe:From:Reply-To:Cc: From; b=f+spDf6kQCxXUA1UB3Kzb8ULFQzDetVTudu3Nl0FC4CiCaUL1pz+a9gTl1A2uYbOw gB4/CPabE4X5PET3Gz1sbQhwR4nV/mdAZgTBNFTe2xAPTihdZyzEekCqFjw+PcgndR 04pg2uF12aA5l9KqnfC42PdOfWNP73h5FUgjUWg4= X-Original-To: libc-alpha@sourceware.org Delivered-To: libc-alpha@sourceware.org Received: from mail-wm1-x32e.google.com (mail-wm1-x32e.google.com [IPv6:2a00:1450:4864:20::32e]) by sourceware.org (Postfix) with ESMTPS id 2E79B3987C26 for ; Wed, 10 Mar 2021 18:32:16 +0000 (GMT) DMARC-Filter: OpenDMARC Filter v1.3.2 sourceware.org 2E79B3987C26 Received: by mail-wm1-x32e.google.com with SMTP id n11-20020a05600c4f8bb029010e5cf86347so1942846wmq.1 for ; Wed, 10 Mar 2021 10:32:16 -0800 (PST) X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:from:to:cc:subject:date:message-id:in-reply-to :references:mime-version:content-transfer-encoding; bh=HEdE9FOWc9j3Y4cTJGMR/JWcdWsgHEC/wWTIgs2wasE=; b=qLK7OiiETDcowDvoUWQ/I3zluEQOIA2OwF0R+umkD5ZFlj7AsUAnA9NnoC38HZxOOb ae+1ZtuBx9fy09IC1nMnFEuZOJTiIRzu8Ab3D/ETKWb2UDKwYWPGA28gX7J2+Xa9kXml E5XU76WraBLLCRi6/b6iiQQW2JO4fxfaswep5dbkAJfPyJpeBUhyxhoz0qIptVZJje+I Ht0E8N0yR0IH6kzpFtyKLvFqMwJGmf479jKQqXskDDk7acxoOP7nWpRytfovC+38RqHp Fkgrg90Y+/Qjv73HqDX2QQRXqwUDzBzNbUzjzbjL5yjCCYwWWhsengPXbtBCsQj26CSt YYFA== X-Gm-Message-State: AOAM530twpfb4KzaNC4Q6O9sgSq/t1wtY4OzOTs/m8Pm0fht4/QsmWpm UELBFigGsNjhPlcdukg/IiU= X-Google-Smtp-Source: ABdhPJwm940RjcvLN8659kPWDDEVsB6xQ14r2MqMil/UJEb3RuZbXmKuDQLUG3a3qGSUcSCFzyUOIg== X-Received: by 2002:a05:600c:1405:: with SMTP id g5mr4576024wmi.140.1615401135402; Wed, 10 Mar 2021 10:32:15 -0800 (PST) Received: from localhost.localdomain ([170.253.51.130]) by smtp.googlemail.com with ESMTPSA id k11sm325374wmj.1.2021.03.10.10.32.14 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Wed, 10 Mar 2021 10:32:15 -0800 (PST) To: mtk.manpages@gmail.com Subject: [PATCH 11/24] strcat.3: SYNOPSIS: Use 'restrict' in prototypes Date: Wed, 10 Mar 2021 19:31:37 +0100 Message-Id: <20210310183149.194717-12-alx.manpages@gmail.com> X-Mailer: git-send-email 2.30.1.721.g45526154a5 In-Reply-To: <20210310183149.194717-1-alx.manpages@gmail.com> References: <20210310183149.194717-1-alx.manpages@gmail.com> MIME-Version: 1.0 X-Spam-Status: No, score=-12.3 required=5.0 tests=BAYES_00, DKIM_SIGNED, DKIM_VALID, DKIM_VALID_AU, DKIM_VALID_EF, FREEMAIL_FROM, GIT_PATCH_0, RCVD_IN_DNSWL_NONE, SPF_HELO_NONE, SPF_PASS, TXREP autolearn=ham autolearn_force=no version=3.4.2 X-Spam-Checker-Version: SpamAssassin 3.4.2 (2018-09-13) on server2.sourceware.org X-BeenThere: libc-alpha@sourceware.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: Libc-alpha mailing list List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-Patchwork-Original-From: Alejandro Colomar via Libc-alpha From: Alejandro Colomar Reply-To: Alejandro Colomar Cc: Alejandro Colomar , linux-man@vger.kernel.org, libc-alpha@sourceware.org Errors-To: libc-alpha-bounces@sourceware.org Sender: "Libc-alpha" Both POSIX and glibc use 'restrict' in strcat(), strncat(). Let's use it here too. .../glibc$ grep_glibc_prototype strcat string/string.h:133: extern char *strcat (char *__restrict __dest, const char *__restrict __src) __THROW __nonnull ((1, 2)); .../glibc$ grep_glibc_prototype strncat string/string.h:136: extern char *strncat (char *__restrict __dest, const char *__restrict __src, size_t __n) __THROW __nonnull ((1, 2)); .../glibc$ Signed-off-by: Alejandro Colomar --- man3/strcat.3 | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/man3/strcat.3 b/man3/strcat.3 index d8e6716c4..821d57d74 100644 --- a/man3/strcat.3 +++ b/man3/strcat.3 @@ -36,8 +36,9 @@ strcat, strncat \- concatenate two strings .nf .B #include .PP -.BI "char *strcat(char *" dest ", const char *" src ); -.BI "char *strncat(char *" dest ", const char *" src ", size_t " n ); +.BI "char *strcat(char *restrict " dest ", const char *restrict " src ); +.BI "char *strncat(char *restrict " dest ", const char *restrict " src \ +", size_t " n ); .fi .SH DESCRIPTION The From patchwork Wed Mar 10 18:31:38 2021 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Alejandro Colomar X-Patchwork-Id: 1450730 Return-Path: X-Original-To: incoming@patchwork.ozlabs.org Delivered-To: patchwork-incoming@bilbo.ozlabs.org Authentication-Results: ozlabs.org; spf=pass (sender SPF authorized) smtp.mailfrom=sourceware.org (client-ip=2620:52:3:1:0:246e:9693:128c; helo=sourceware.org; envelope-from=libc-alpha-bounces@sourceware.org; receiver=) Authentication-Results: ozlabs.org; dkim=pass (1024-bit key; secure) header.d=sourceware.org header.i=@sourceware.org header.a=rsa-sha256 header.s=default header.b=Tz1sUwOl; dkim-atps=neutral Received: from sourceware.org (server2.sourceware.org [IPv6:2620:52:3:1:0:246e:9693:128c]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256) (No client certificate requested) by ozlabs.org (Postfix) with ESMTPS id 4DwggP1RWRz9sS8 for ; Thu, 11 Mar 2021 05:33:05 +1100 (AEDT) Received: from server2.sourceware.org (localhost [IPv6:::1]) by sourceware.org (Postfix) with ESMTP id D05B53987C3E; Wed, 10 Mar 2021 18:32:21 +0000 (GMT) DKIM-Filter: OpenDKIM Filter v2.11.0 sourceware.org D05B53987C3E DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=sourceware.org; s=default; t=1615401141; bh=EqAyQylO8W1t/yhPmY8OxACFuG4Qjd3n9L9y54RJzuw=; h=To:Subject:Date:In-Reply-To:References:List-Id:List-Unsubscribe: List-Archive:List-Post:List-Help:List-Subscribe:From:Reply-To:Cc: From; b=Tz1sUwOlKm/x1aMlXn0G0bE3qzZgSFiqdVwb2qaQhP7F3PKhIGVFrzULW4vcMc74H 2gW8yQWoYoRiQVGeCm3mhy2MFhqpXPZIEAwNFYPII1UZkBsjV1akvDPuf2VTEMf+OT gZj72vry8FdBCMyH1t1kGAEzfF8qu6KYHhDlV2JY= X-Original-To: libc-alpha@sourceware.org Delivered-To: libc-alpha@sourceware.org Received: from mail-wr1-x42c.google.com (mail-wr1-x42c.google.com [IPv6:2a00:1450:4864:20::42c]) by sourceware.org (Postfix) with ESMTPS id 168A83987C2B for ; Wed, 10 Mar 2021 18:32:17 +0000 (GMT) DMARC-Filter: OpenDMARC Filter v1.3.2 sourceware.org 168A83987C2B Received: by mail-wr1-x42c.google.com with SMTP id w11so24454711wrr.10 for ; Wed, 10 Mar 2021 10:32:17 -0800 (PST) X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:from:to:cc:subject:date:message-id:in-reply-to :references:mime-version:content-transfer-encoding; bh=EqAyQylO8W1t/yhPmY8OxACFuG4Qjd3n9L9y54RJzuw=; b=N5qclmdJryqHHTZRTzVNQRuPU6nREnlWANwinfBbXShonvG4BNU5iWe88sHaHQ6D1w weCzPPHF8gfFkZfPEmee7m1ewmH6EkO1PrBOWvHuEf5iKV/uxhoXjaeGY/JBrtUDMomW RMmGWF1Gae5Hf64ArzMEF13PxztVyqMZOhFeZdEE5RBylGWFONEcq+lfRDEmnTK9Wob5 1fiKJsTc3beOT8bg9BpDhunQT6L24kmlcHGjYd59PXLJlTeg/rvFjbhB6r50ZP66h5uo jSF7QqMJp/DJpIGQtFYvknHjDN7MrUX8MhjVnrh/f9LQ8aWxiVAl+A2cOpCtkSDUDe7v /npg== X-Gm-Message-State: AOAM531B8qATx8kawKziQjdviFBeMLOck9z/sz71Yhyu4AJfboEt/kJk cmNDJ6PVqswAzgV+Um/tkb0= X-Google-Smtp-Source: ABdhPJyR3FAr9vlFvhVAlIeNo2xbN1N0WqpHSEPDkdkwqKjPKXAGwGKCEeZZHrhjDQkhQHMz0KsyrA== X-Received: by 2002:adf:a59a:: with SMTP id g26mr4864188wrc.271.1615401136193; Wed, 10 Mar 2021 10:32:16 -0800 (PST) Received: from localhost.localdomain ([170.253.51.130]) by smtp.googlemail.com with ESMTPSA id k11sm325374wmj.1.2021.03.10.10.32.15 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Wed, 10 Mar 2021 10:32:15 -0800 (PST) To: mtk.manpages@gmail.com Subject: [PATCH 12/24] strcpy.3: SYNOPSIS: Use 'restrict' in prototypes Date: Wed, 10 Mar 2021 19:31:38 +0100 Message-Id: <20210310183149.194717-13-alx.manpages@gmail.com> X-Mailer: git-send-email 2.30.1.721.g45526154a5 In-Reply-To: <20210310183149.194717-1-alx.manpages@gmail.com> References: <20210310183149.194717-1-alx.manpages@gmail.com> MIME-Version: 1.0 X-Spam-Status: No, score=-12.3 required=5.0 tests=BAYES_00, DKIM_SIGNED, DKIM_VALID, DKIM_VALID_AU, DKIM_VALID_EF, FREEMAIL_FROM, GIT_PATCH_0, RCVD_IN_DNSWL_NONE, SPF_HELO_NONE, SPF_PASS, TXREP autolearn=ham autolearn_force=no version=3.4.2 X-Spam-Checker-Version: SpamAssassin 3.4.2 (2018-09-13) on server2.sourceware.org X-BeenThere: libc-alpha@sourceware.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: Libc-alpha mailing list List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-Patchwork-Original-From: Alejandro Colomar via Libc-alpha From: Alejandro Colomar Reply-To: Alejandro Colomar Cc: Alejandro Colomar , linux-man@vger.kernel.org, libc-alpha@sourceware.org Errors-To: libc-alpha-bounces@sourceware.org Sender: "Libc-alpha" Both POSIX and glibc use 'restrict' in strcpy(), strncpy(). Let's use it here too. .../glibc$ grep_glibc_prototype strcpy string/string.h:125: extern char *strcpy (char *__restrict __dest, const char *__restrict __src) __THROW __nonnull ((1, 2)); .../glibc$ grep_glibc_prototype strncpy string/string.h:128: extern char *strncpy (char *__restrict __dest, const char *__restrict __src, size_t __n) __THROW __nonnull ((1, 2)); .../glibc$ Signed-off-by: Alejandro Colomar --- man3/strcpy.3 | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/man3/strcpy.3 b/man3/strcpy.3 index 46993cdb3..ade8b9412 100644 --- a/man3/strcpy.3 +++ b/man3/strcpy.3 @@ -39,8 +39,9 @@ strcpy, strncpy \- copy a string .nf .B #include .PP -.BI "char *strcpy(char *" dest ", const char *" src ); -.BI "char *strncpy(char *" dest ", const char *" src ", size_t " n ); +.BI "char *strcpy(char *restrict " dest ", const char *" src ); +.BI "char *strncpy(char *restrict " dest ", const char *restrict " src \ +", size_t " n ); .fi .SH DESCRIPTION The From patchwork Wed Mar 10 18:31:39 2021 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Alejandro Colomar X-Patchwork-Id: 1450731 Return-Path: X-Original-To: incoming@patchwork.ozlabs.org Delivered-To: patchwork-incoming@bilbo.ozlabs.org Authentication-Results: ozlabs.org; spf=pass (sender SPF authorized) smtp.mailfrom=sourceware.org (client-ip=8.43.85.97; helo=sourceware.org; envelope-from=libc-alpha-bounces@sourceware.org; receiver=) Authentication-Results: ozlabs.org; dkim=pass (1024-bit key; secure) header.d=sourceware.org header.i=@sourceware.org header.a=rsa-sha256 header.s=default header.b=loeeOq4a; dkim-atps=neutral Received: from sourceware.org (server2.sourceware.org [8.43.85.97]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256) (No client certificate requested) by ozlabs.org (Postfix) with ESMTPS id 4DwggS6z9zz9sS8 for ; Thu, 11 Mar 2021 05:33:08 +1100 (AEDT) Received: from server2.sourceware.org (localhost [IPv6:::1]) by sourceware.org (Postfix) with ESMTP id 6CB4D3987C3A; Wed, 10 Mar 2021 18:32:22 +0000 (GMT) DKIM-Filter: OpenDKIM Filter v2.11.0 sourceware.org 6CB4D3987C3A DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=sourceware.org; s=default; t=1615401142; bh=6+5cYVxGM416CCW1Kt63Tc4b+b6uRKL9mvOnyhbZ8iw=; h=To:Subject:Date:In-Reply-To:References:List-Id:List-Unsubscribe: List-Archive:List-Post:List-Help:List-Subscribe:From:Reply-To:Cc: From; b=loeeOq4aLLr3SckbV/cF3Jezd83L4tIGciw3WgNj/wh1uekJtwDsy0u9/MpIk1EVE ZenQSTJf/GcKA1c3HSSso9MkBPvW49dPL3+hUYWMOq/4Ov3538jO9MLFltNYZ/weq3 lh5E82TWHEDB9iFHMmTvE3aXUNtFsi65tHAtQsOE= X-Original-To: libc-alpha@sourceware.org Delivered-To: libc-alpha@sourceware.org Received: from mail-wm1-x32a.google.com (mail-wm1-x32a.google.com [IPv6:2a00:1450:4864:20::32a]) by sourceware.org (Postfix) with ESMTPS id D28023987C28 for ; Wed, 10 Mar 2021 18:32:17 +0000 (GMT) DMARC-Filter: OpenDMARC Filter v1.3.2 sourceware.org D28023987C28 Received: by mail-wm1-x32a.google.com with SMTP id y124-20020a1c32820000b029010c93864955so11697598wmy.5 for ; Wed, 10 Mar 2021 10:32:17 -0800 (PST) X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:from:to:cc:subject:date:message-id:in-reply-to :references:mime-version:content-transfer-encoding; bh=6+5cYVxGM416CCW1Kt63Tc4b+b6uRKL9mvOnyhbZ8iw=; b=J+NAwILPC6EBfl59tAuU3LcHmLB/hcxmx70Bo3IwPqVm9l8GgqzhaRKiAyAJ6jFXI3 XlsBMC6EwZ42yxVeKtS9cYQNS4IkMSSJGGTJy7g+ECymqe3vnB3OelgWTOqMm4gnjujm 1qUruBDLLNdL5lzBCN3E872knv5HlS7Gv1XZxgio1PT4eyYiREtYoOB5M5bi6hoI2H+6 AwbYbt+jSv4d0Qbe2hla05M0VqkBUHsLC49FTM9YcGcXXDhZ2B+bZzAohFw9KvyvR46m 7Ie+g9/8dhSwsEFcB6S4FzlxPu4bjv4oocAKBckVq3uFAfpUdSSJykR9aTcUhsbWCrjH EsNA== X-Gm-Message-State: AOAM532WGOnDk3ontZboJBZe0Cu9rHvApXc97s58N8kRdJYKbqDEYroY KZK/JEeqh2Jev2PWLldIkO8= X-Google-Smtp-Source: ABdhPJyoWrTUCFk1VbyimBHGDNC94q0t06EAKH82YRX2b9+0AT+Tmy/nKLnAcjLw/4ZeQ5DWJZsbEw== X-Received: by 2002:a7b:c055:: with SMTP id u21mr4750192wmc.68.1615401137077; Wed, 10 Mar 2021 10:32:17 -0800 (PST) Received: from localhost.localdomain ([170.253.51.130]) by smtp.googlemail.com with ESMTPSA id k11sm325374wmj.1.2021.03.10.10.32.16 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Wed, 10 Mar 2021 10:32:16 -0800 (PST) To: mtk.manpages@gmail.com Subject: [PATCH 13/24] strfmon.3: SYNOPSIS: Use 'restrict' in prototypes Date: Wed, 10 Mar 2021 19:31:39 +0100 Message-Id: <20210310183149.194717-14-alx.manpages@gmail.com> X-Mailer: git-send-email 2.30.1.721.g45526154a5 In-Reply-To: <20210310183149.194717-1-alx.manpages@gmail.com> References: <20210310183149.194717-1-alx.manpages@gmail.com> MIME-Version: 1.0 X-Spam-Status: No, score=-12.3 required=5.0 tests=BAYES_00, DKIM_SIGNED, DKIM_VALID, DKIM_VALID_AU, DKIM_VALID_EF, FREEMAIL_FROM, GIT_PATCH_0, RCVD_IN_DNSWL_NONE, SPF_HELO_NONE, SPF_PASS, TXREP autolearn=ham autolearn_force=no version=3.4.2 X-Spam-Checker-Version: SpamAssassin 3.4.2 (2018-09-13) on server2.sourceware.org X-BeenThere: libc-alpha@sourceware.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: Libc-alpha mailing list List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-Patchwork-Original-From: Alejandro Colomar via Libc-alpha From: Alejandro Colomar Reply-To: Alejandro Colomar Cc: Alejandro Colomar , linux-man@vger.kernel.org, libc-alpha@sourceware.org Errors-To: libc-alpha-bounces@sourceware.org Sender: "Libc-alpha" Both POSIX and glibc use 'restrict' in strfmon(), strfmon_l(). Let's use it here too. .../glibc$ grep_glibc_prototype strfmon stdlib/monetary.h:38: extern ssize_t strfmon (char *__restrict __s, size_t __maxsize, const char *__restrict __format, ...) __THROW __attribute_format_strfmon__ (3, 4); .../glibc$ grep_glibc_prototype strfmon_l stdlib/monetary.h:47: extern ssize_t strfmon_l (char *__restrict __s, size_t __maxsize, locale_t __loc, const char *__restrict __format, ...) __THROW __attribute_format_strfmon__ (4, 5); .../glibc$ Signed-off-by: Alejandro Colomar --- man3/strfmon.3 | 7 ++++--- 1 file changed, 4 insertions(+), 3 deletions(-) diff --git a/man3/strfmon.3 b/man3/strfmon.3 index f2434a7fa..98c8d34fe 100644 --- a/man3/strfmon.3 +++ b/man3/strfmon.3 @@ -28,9 +28,10 @@ strfmon, strfmon_l \- convert monetary value to a string .nf .B #include .PP -.BI "ssize_t strfmon(char *" s ", size_t " max ", const char *" format ", ...);" -.BI "ssize_t strfmon_l(char *" s ", size_t " max ", locale_t " locale , -.BI " const char *" format ", ...);" +.BI "ssize_t strfmon(char *restrict " s ", size_t " max , +.BI " const char *restrict " format ", ...);" +.BI "ssize_t strfmon_l(char *restrict " s ", size_t " max ", locale_t " locale , +.BI " const char *restrict " format ", ...);" .fi .SH DESCRIPTION The From patchwork Wed Mar 10 18:31:40 2021 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Alejandro Colomar X-Patchwork-Id: 1450732 Return-Path: X-Original-To: incoming@patchwork.ozlabs.org Delivered-To: patchwork-incoming@bilbo.ozlabs.org Authentication-Results: ozlabs.org; spf=pass (sender SPF authorized) smtp.mailfrom=sourceware.org (client-ip=2620:52:3:1:0:246e:9693:128c; helo=sourceware.org; envelope-from=libc-alpha-bounces@sourceware.org; receiver=) Authentication-Results: ozlabs.org; dkim=pass (1024-bit key; secure) header.d=sourceware.org header.i=@sourceware.org header.a=rsa-sha256 header.s=default header.b=LXnjW6jE; dkim-atps=neutral Received: from sourceware.org (server2.sourceware.org [IPv6:2620:52:3:1:0:246e:9693:128c]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256) (No client certificate requested) by ozlabs.org (Postfix) with ESMTPS id 4DwggY5kLTz9sS8 for ; Thu, 11 Mar 2021 05:33:13 +1100 (AEDT) Received: from server2.sourceware.org (localhost [IPv6:::1]) by sourceware.org (Postfix) with ESMTP id 67AEE398B14A; Wed, 10 Mar 2021 18:32:23 +0000 (GMT) DKIM-Filter: OpenDKIM Filter v2.11.0 sourceware.org 67AEE398B14A DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=sourceware.org; s=default; t=1615401143; bh=PXpkV+g7iYGeCC3Y9gXPCiNS2RX3vvaVvDMUhreMEns=; h=To:Subject:Date:In-Reply-To:References:List-Id:List-Unsubscribe: List-Archive:List-Post:List-Help:List-Subscribe:From:Reply-To:Cc: From; b=LXnjW6jEqc5mnWiQ0VnTcGFeFugbuAeD/RPtbDQeQiQkK2F3BEhPXBNOdOexwGduK JDaZoraFyJUecSfQD8lt7XHR6Vo4pi2T+BsDju21CSVPw2r3M4jyo/vNtbd/TyQKIJ b/5LfG3++pOinvzrMdA9Ce2LT9OzPj042cpOKk+g= X-Original-To: libc-alpha@sourceware.org Delivered-To: libc-alpha@sourceware.org Received: from mail-wr1-x42b.google.com (mail-wr1-x42b.google.com [IPv6:2a00:1450:4864:20::42b]) by sourceware.org (Postfix) with ESMTPS id 9741D3987C2B for ; Wed, 10 Mar 2021 18:32:18 +0000 (GMT) DMARC-Filter: OpenDMARC Filter v1.3.2 sourceware.org 9741D3987C2B Received: by mail-wr1-x42b.google.com with SMTP id v15so24460384wrx.4 for ; Wed, 10 Mar 2021 10:32:18 -0800 (PST) X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:from:to:cc:subject:date:message-id:in-reply-to :references:mime-version:content-transfer-encoding; bh=PXpkV+g7iYGeCC3Y9gXPCiNS2RX3vvaVvDMUhreMEns=; b=ZcXeWvaVJo8kLKI50jDaR0i36II8n1EPv5t6eUI9HWCrGiLE+o1flQXzvjcGCvyxw5 GO8XfhcaO31jfPVybnzbYpoAY7uthRYycqw+vucs6i8zcK+jlr8uc5kbo+YxXgRKAlKF 6zivRiXF6XvkE/Lwrp2g3X7dvvJv4Uek8SGjQcF7YEEVzk8jbAOoQ0ei97M4j9ho8VFW RhMd5ijZf22RDTM0D85LCto04uPE5EpEnr4leq9XbkfqvCDS6u5Chz1XJ5OY5f3yVLNj ZHs8ri94MEClF9kjBrMLRiBQiF1rJdQmeKyAyAYiL+UnvW9TI4Jhlq0zHcH3xi9L9mKn NyWw== X-Gm-Message-State: AOAM531AjBnEYvSdBGb2Uj4D+mHRbDKpn6ylAPTFcplVXQu7OxDtPRnG fYF9EB2ECgQuCvnUQ5UVPXDt0xD3SVp6nQ== X-Google-Smtp-Source: ABdhPJyU2mO3bp1TIPaNVwdo/e6f7sCw1ScejcDpIkct1yl+ose5Vs3ic+yoKhIisy0c5RuaBAv1ug== X-Received: by 2002:a05:6000:1363:: with SMTP id q3mr4892827wrz.74.1615401137813; Wed, 10 Mar 2021 10:32:17 -0800 (PST) Received: from localhost.localdomain ([170.253.51.130]) by smtp.googlemail.com with ESMTPSA id k11sm325374wmj.1.2021.03.10.10.32.17 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Wed, 10 Mar 2021 10:32:17 -0800 (PST) To: mtk.manpages@gmail.com Subject: [PATCH 14/24] strftime.3: SYNOPSIS: Use 'restrict' in prototypes Date: Wed, 10 Mar 2021 19:31:40 +0100 Message-Id: <20210310183149.194717-15-alx.manpages@gmail.com> X-Mailer: git-send-email 2.30.1.721.g45526154a5 In-Reply-To: <20210310183149.194717-1-alx.manpages@gmail.com> References: <20210310183149.194717-1-alx.manpages@gmail.com> MIME-Version: 1.0 X-Spam-Status: No, score=-12.3 required=5.0 tests=BAYES_00, DKIM_SIGNED, DKIM_VALID, DKIM_VALID_AU, DKIM_VALID_EF, FREEMAIL_FROM, GIT_PATCH_0, RCVD_IN_DNSWL_NONE, SPF_HELO_NONE, SPF_PASS, TXREP autolearn=ham autolearn_force=no version=3.4.2 X-Spam-Checker-Version: SpamAssassin 3.4.2 (2018-09-13) on server2.sourceware.org X-BeenThere: libc-alpha@sourceware.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: Libc-alpha mailing list List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-Patchwork-Original-From: Alejandro Colomar via Libc-alpha From: Alejandro Colomar Reply-To: Alejandro Colomar Cc: Alejandro Colomar , linux-man@vger.kernel.org, libc-alpha@sourceware.org Errors-To: libc-alpha-bounces@sourceware.org Sender: "Libc-alpha" Both POSIX and glibc use 'restrict' in strftime(). Let's use it here too. .../glibc$ grep_glibc_prototype strftime timezone/private.h:506: size_t strftime(char *restrict, size_t, char const *restrict, struct tm const *restrict); time/time.h:88: extern size_t strftime (char *__restrict __s, size_t __maxsize, const char *__restrict __format, const struct tm *__restrict __tp) __THROW; .../glibc$ Signed-off-by: Alejandro Colomar --- man3/strftime.3 | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/man3/strftime.3 b/man3/strftime.3 index e49465f29..6b14b7c5d 100644 --- a/man3/strftime.3 +++ b/man3/strftime.3 @@ -41,8 +41,9 @@ strftime \- format date and time .nf .B #include .PP -.BI "size_t strftime(char *" s ", size_t " max ", const char *" format , -.BI " const struct tm *" tm ); +.BI "size_t strftime(char *restrict " s ", size_t " max , +.BI " const char *restrict " format , +.BI " const struct tm *restrict " tm ); .fi .SH DESCRIPTION The From patchwork Wed Mar 10 18:31:41 2021 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Alejandro Colomar X-Patchwork-Id: 1450733 Return-Path: X-Original-To: incoming@patchwork.ozlabs.org Delivered-To: patchwork-incoming@bilbo.ozlabs.org Authentication-Results: ozlabs.org; spf=pass (sender SPF authorized) smtp.mailfrom=sourceware.org (client-ip=2620:52:3:1:0:246e:9693:128c; helo=sourceware.org; envelope-from=libc-alpha-bounces@sourceware.org; receiver=) Authentication-Results: ozlabs.org; dkim=pass (1024-bit key; secure) header.d=sourceware.org header.i=@sourceware.org header.a=rsa-sha256 header.s=default header.b=XiVT+/oo; dkim-atps=neutral Received: from sourceware.org (server2.sourceware.org [IPv6:2620:52:3:1:0:246e:9693:128c]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256) (No client certificate requested) by ozlabs.org (Postfix) with ESMTPS id 4Dwggf2cvhz9sS8 for ; Thu, 11 Mar 2021 05:33:18 +1100 (AEDT) Received: from server2.sourceware.org (localhost [IPv6:::1]) by sourceware.org (Postfix) with ESMTP id 43DAB398B150; Wed, 10 Mar 2021 18:32:24 +0000 (GMT) DKIM-Filter: OpenDKIM Filter v2.11.0 sourceware.org 43DAB398B150 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=sourceware.org; s=default; t=1615401144; bh=SbBJw7oZUCrdT15Cge/YxGfwbb0E/66cTP2LTmVSnRY=; h=To:Subject:Date:In-Reply-To:References:List-Id:List-Unsubscribe: List-Archive:List-Post:List-Help:List-Subscribe:From:Reply-To:Cc: From; b=XiVT+/oonrEzWYvIJpRGR1osoJp4q794VTCdka0AtKZT3+LYomD0JUt3LQAmNJxEn ryg2ZViQdYJLqdxj8aVF3EIgNEbV+vxj6wkXTx7g7JkAbixFTtIqc7U3Sn9AN18ufW ZneSMPhQxT3DBTCdqDf9GkTZuVQKEFAK1M3cvC1M= X-Original-To: libc-alpha@sourceware.org Delivered-To: libc-alpha@sourceware.org Received: from mail-wm1-x32c.google.com (mail-wm1-x32c.google.com [IPv6:2a00:1450:4864:20::32c]) by sourceware.org (Postfix) with ESMTPS id 7DF133987C33 for ; Wed, 10 Mar 2021 18:32:19 +0000 (GMT) DMARC-Filter: OpenDMARC Filter v1.3.2 sourceware.org 7DF133987C33 Received: by mail-wm1-x32c.google.com with SMTP id u187so7730883wmg.4 for ; Wed, 10 Mar 2021 10:32:19 -0800 (PST) X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:from:to:cc:subject:date:message-id:in-reply-to :references:mime-version:content-transfer-encoding; bh=SbBJw7oZUCrdT15Cge/YxGfwbb0E/66cTP2LTmVSnRY=; b=R3BFaKWJxo51s6QDAAJ3wHoy7Uyp76+cox93la+nwn72fenMKNE165jLy9gShJIuSZ RAomt1/XsJZv0TrqyLwhZ2ie8Af2PSIkGB6dPmGCLARaxhCX0A+k7RyirnvDFha+UTv6 3v+bjBQOKNhueUYB6PNPB11+M0ncv8kO5l+5tep/4gfnu8qJBYUWvh5UxtviJPxKKhBL cZT9PoJnmP69sMIauPBvdqRKQEaAO8/vlYzpLttGkJn4ca991HhdiSatwtFc37yomsnt ha5FktHAnU9oQmGeokqFlzyNrgsIP7h4AYA/8WevwW1AtcmlcAhZTgoJvACeGkAdPfSt jAUw== X-Gm-Message-State: AOAM532uYqnzZUHjt7a+fqKWzImeFGo1mpZy5/PPxni5BsNRH7erHiuZ t0yH9fBy5bXv+Tia1jm4o5A= X-Google-Smtp-Source: ABdhPJxq34au83jDv0d8RqnRgJJjOhgBrUwWWkmj0dT5LrDKozFY0E246553+aJrWe/KygcAKJG29A== X-Received: by 2002:a05:600c:2102:: with SMTP id u2mr4691389wml.22.1615401138646; Wed, 10 Mar 2021 10:32:18 -0800 (PST) Received: from localhost.localdomain ([170.253.51.130]) by smtp.googlemail.com with ESMTPSA id k11sm325374wmj.1.2021.03.10.10.32.17 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Wed, 10 Mar 2021 10:32:18 -0800 (PST) To: mtk.manpages@gmail.com Subject: [PATCH 15/24] string.3: SYNOPSIS: Use 'restrict' in prototypes Date: Wed, 10 Mar 2021 19:31:41 +0100 Message-Id: <20210310183149.194717-16-alx.manpages@gmail.com> X-Mailer: git-send-email 2.30.1.721.g45526154a5 In-Reply-To: <20210310183149.194717-1-alx.manpages@gmail.com> References: <20210310183149.194717-1-alx.manpages@gmail.com> MIME-Version: 1.0 X-Spam-Status: No, score=-12.4 required=5.0 tests=BAYES_00, DKIM_SIGNED, DKIM_VALID, DKIM_VALID_AU, DKIM_VALID_EF, FREEMAIL_FROM, GIT_PATCH_0, RCVD_IN_DNSWL_NONE, SPF_HELO_NONE, SPF_PASS, TXREP autolearn=ham autolearn_force=no version=3.4.2 X-Spam-Checker-Version: SpamAssassin 3.4.2 (2018-09-13) on server2.sourceware.org X-BeenThere: libc-alpha@sourceware.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: Libc-alpha mailing list List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-Patchwork-Original-From: Alejandro Colomar via Libc-alpha From: Alejandro Colomar Reply-To: Alejandro Colomar Cc: Alejandro Colomar , linux-man@vger.kernel.org, libc-alpha@sourceware.org Errors-To: libc-alpha-bounces@sourceware.org Sender: "Libc-alpha" Both POSIX and glibc use 'restrict' in stpcpy(), strcat(), strcpy(), strncat(), strncpy(), strtok(), strxfrm(). Let's use it here too. .../glibc$ grep_glibc_prototype stpcpy string/string.h:475: extern char *stpcpy (char *__restrict __dest, const char *__restrict __src) __THROW __nonnull ((1, 2)); .../glibc$ grep_glibc_prototype strcat string/string.h:133: extern char *strcat (char *__restrict __dest, const char *__restrict __src) __THROW __nonnull ((1, 2)); .../glibc$ grep_glibc_prototype strcpy string/string.h:125: extern char *strcpy (char *__restrict __dest, const char *__restrict __src) __THROW __nonnull ((1, 2)); .../glibc$ grep_glibc_prototype strncat string/string.h:136: extern char *strncat (char *__restrict __dest, const char *__restrict __src, size_t __n) __THROW __nonnull ((1, 2)); .../glibc$ grep_glibc_prototype strncpy string/string.h:128: extern char *strncpy (char *__restrict __dest, const char *__restrict __src, size_t __n) __THROW __nonnull ((1, 2)); .../glibc$ grep_glibc_prototype strtok string/string.h:340: extern char *strtok (char *__restrict __s, const char *__restrict __delim) __THROW __nonnull ((2)); .../glibc$ grep_glibc_prototype strxfrm string/string.h:150: extern size_t strxfrm (char *__restrict __dest, const char *__restrict __src, size_t __n) __THROW __nonnull ((2)) __attr_access ((__write_only__, 1, 3)); .../glibc$ Signed-off-by: Alejandro Colomar --- man3/string.3 | 19 +++++++++++-------- 1 file changed, 11 insertions(+), 8 deletions(-) diff --git a/man3/string.3 b/man3/string.3 index ab4cc3ce7..06da21c28 100644 --- a/man3/string.3 +++ b/man3/string.3 @@ -66,7 +66,7 @@ in the string .TP .B #include .TP -.BI "char *stpcpy(char *" dest ", const char *" src ); +.BI "char *stpcpy(char *restrict " dest ", const char *restrict " src ); Copy a string from .I src to @@ -74,7 +74,7 @@ to returning a pointer to the end of the resulting string at .IR dest . .TP -.BI "char *strcat(char *" dest ", const char *" src ); +.BI "char *strcat(char *restrict " dest ", const char *restrict " src ); Append the string .I src to the string @@ -101,7 +101,7 @@ with .I s2 using the current locale. .TP -.BI "char *strcpy(char *" dest ", const char *" src ); +.BI "char *strcpy(char *restrict " dest ", const char *restrict " src ); Copy the string .I src to @@ -129,7 +129,8 @@ Randomly swap the characters in Return the length of the string .IR s . .TP -.BI "char *strncat(char *" dest ", const char *" src ", size_t " n ); +.BI "char *strncat(char *restrict " dest ", const char *restrict " src \ +", size_t " n ); Append at most .I n bytes from the string @@ -147,7 +148,8 @@ bytes of the strings and .IR s2 . .TP -.BI "char *strncpy(char *" dest ", const char *" src ", size_t " n ); +.BI "char *strncpy(char *restrict " dest ", const char *restrict " src \ +", size_t " n ); Copy at most .I n bytes from string @@ -188,19 +190,20 @@ in the string .IR haystack , returning a pointer to the found substring. .TP -.BI "char *strtok(char *" s ", const char *" delim ); +.BI "char *strtok(char *restrict " s ", const char *restrict " delim ); Extract tokens from the string .I s that are delimited by one of the bytes in .IR delim . .TP -.BI "size_t strxfrm(char *" dest ", const char *" src ", size_t " n ); +.BI "size_t strxfrm(char *restrict " dst ", const char *restrict " src \ +", size_t " n ); Transforms .I src to the current locale and copies the first .I n bytes to -.IR dest . +.IR dst . .SH DESCRIPTION The string functions perform operations on null-terminated strings. From patchwork Wed Mar 10 18:31:42 2021 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Alejandro Colomar X-Patchwork-Id: 1450734 Return-Path: X-Original-To: incoming@patchwork.ozlabs.org Delivered-To: patchwork-incoming@bilbo.ozlabs.org Authentication-Results: ozlabs.org; spf=pass (sender SPF authorized) smtp.mailfrom=sourceware.org (client-ip=2620:52:3:1:0:246e:9693:128c; helo=sourceware.org; envelope-from=libc-alpha-bounces@sourceware.org; receiver=) Authentication-Results: ozlabs.org; dkim=pass (1024-bit key; secure) header.d=sourceware.org header.i=@sourceware.org header.a=rsa-sha256 header.s=default header.b=U0BD2qLl; dkim-atps=neutral Received: from sourceware.org (server2.sourceware.org [IPv6:2620:52:3:1:0:246e:9693:128c]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256) (No client certificate requested) by ozlabs.org (Postfix) with ESMTPS id 4Dwggk3wdhz9sS8 for ; Thu, 11 Mar 2021 05:33:22 +1100 (AEDT) Received: from server2.sourceware.org (localhost [IPv6:::1]) by sourceware.org (Postfix) with ESMTP id C3A64398B154; Wed, 10 Mar 2021 18:32:24 +0000 (GMT) DKIM-Filter: OpenDKIM Filter v2.11.0 sourceware.org C3A64398B154 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=sourceware.org; s=default; t=1615401144; bh=H8k9UdQsMXTORYdmaOp/4Mj59+nJPP71f8MfYKUnTEw=; h=To:Subject:Date:In-Reply-To:References:List-Id:List-Unsubscribe: List-Archive:List-Post:List-Help:List-Subscribe:From:Reply-To:Cc: From; b=U0BD2qLlqoGMVUugoAh0y1JUu8utDy6bs8ArQ14fK4jp1V3ruk7tk4P1N9JrgDtx8 Gska6D7MfkenukR8jGMWZSS3Du7UG8AqmfQrFqmlIMNsuTSCZ0s7HM2v2X7yITM4CB fiMa9/cFOH9+GZux27kx4XQra4O0YMNDUQ3ptjwM= X-Original-To: libc-alpha@sourceware.org Delivered-To: libc-alpha@sourceware.org Received: from mail-wm1-x32c.google.com (mail-wm1-x32c.google.com [IPv6:2a00:1450:4864:20::32c]) by sourceware.org (Postfix) with ESMTPS id 4F8013987C22 for ; Wed, 10 Mar 2021 18:32:20 +0000 (GMT) DMARC-Filter: OpenDMARC Filter v1.3.2 sourceware.org 4F8013987C22 Received: by mail-wm1-x32c.google.com with SMTP id i9so7746084wml.0 for ; Wed, 10 Mar 2021 10:32:20 -0800 (PST) X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:from:to:cc:subject:date:message-id:in-reply-to :references:mime-version:content-transfer-encoding; bh=H8k9UdQsMXTORYdmaOp/4Mj59+nJPP71f8MfYKUnTEw=; b=g7232XUAM6EsWJCtYH3pjT+7wqfLKtI/SB80VdmyIgtV69ZWRNH6PnjDPRsZo2X57q AusFdKI+9pjW4eZ6ovAGzJNT6fWSYYIfcySP+kJ3dr+hpzl4jAqKKcVe81IqGQN/0QsJ vlVKuRYjqv/xpP7zQq6bxceLOkqrsL4OBCqCNxQL5ANxBr3zlHVNjEjdH1sS9ZTPHTDY fX5esnbCr3+diD8BWCgj6ossA4RJ39W948HC8uB6+lQ0rWuXJv1mNwYwsEkaiv43WJ9s bZD7IuGUtS38UGrJDh9zRkfkz3Fq8Nm2woHVRcTZNYNdi3O3oWLAQJ4EKrqG6Snc/8cL yOvw== X-Gm-Message-State: AOAM533woMNJa+EK6s12KdIn6eeZE70CgXOCtGt7kAdZZm7rEf+jARHA jviaFYxu2aH1mzcpzCNU8AN5vxBA+xKZOg== X-Google-Smtp-Source: ABdhPJxMct7E4+JoqDh4LKVOIYI62RobQsVXQNuC6CpU0tcCpo3uHR1gUbkqXG4mZ8iO1qTk5upYlw== X-Received: by 2002:a7b:c010:: with SMTP id c16mr4713344wmb.134.1615401139412; Wed, 10 Mar 2021 10:32:19 -0800 (PST) Received: from localhost.localdomain ([170.253.51.130]) by smtp.googlemail.com with ESMTPSA id k11sm325374wmj.1.2021.03.10.10.32.18 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Wed, 10 Mar 2021 10:32:19 -0800 (PST) To: mtk.manpages@gmail.com Subject: [PATCH 16/24] string.3: SYNOPSIS: Use 'restrict' in prototypes Date: Wed, 10 Mar 2021 19:31:42 +0100 Message-Id: <20210310183149.194717-17-alx.manpages@gmail.com> X-Mailer: git-send-email 2.30.1.721.g45526154a5 In-Reply-To: <20210310183149.194717-1-alx.manpages@gmail.com> References: <20210310183149.194717-1-alx.manpages@gmail.com> MIME-Version: 1.0 X-Spam-Status: No, score=-12.4 required=5.0 tests=BAYES_00, DKIM_SIGNED, DKIM_VALID, DKIM_VALID_AU, DKIM_VALID_EF, FREEMAIL_FROM, GIT_PATCH_0, RCVD_IN_DNSWL_NONE, SPF_HELO_NONE, SPF_PASS, TXREP autolearn=ham autolearn_force=no version=3.4.2 X-Spam-Checker-Version: SpamAssassin 3.4.2 (2018-09-13) on server2.sourceware.org X-BeenThere: libc-alpha@sourceware.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: Libc-alpha mailing list List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-Patchwork-Original-From: Alejandro Colomar via Libc-alpha From: Alejandro Colomar Reply-To: Alejandro Colomar Cc: Alejandro Colomar , linux-man@vger.kernel.org, libc-alpha@sourceware.org Errors-To: libc-alpha-bounces@sourceware.org Sender: "Libc-alpha" glibc uses 'restrict' in strsep(). Let's use it here too. .../glibc$ grep_glibc_prototype strsep string/string.h:455: extern char *strsep (char **__restrict __stringp, const char *__restrict __delim) __THROW __nonnull ((1, 2)); .../glibc$ Signed-off-by: Alejandro Colomar --- man3/string.3 | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/man3/string.3 b/man3/string.3 index 06da21c28..4bacd8d8b 100644 --- a/man3/string.3 +++ b/man3/string.3 @@ -171,7 +171,7 @@ Return a pointer to the last occurrence of the character in the string .IR s . .TP -.BI "char *strsep(char **" stringp ", const char *" delim ); +.BI "char *strsep(char **restrict " stringp ", const char *restrict " delim ); Extract the initial token in .I stringp that is delimited by one of the bytes in From patchwork Wed Mar 10 18:31:43 2021 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Alejandro Colomar X-Patchwork-Id: 1450735 Return-Path: X-Original-To: incoming@patchwork.ozlabs.org Delivered-To: patchwork-incoming@bilbo.ozlabs.org Authentication-Results: ozlabs.org; spf=pass (sender SPF authorized) smtp.mailfrom=sourceware.org (client-ip=8.43.85.97; helo=sourceware.org; envelope-from=libc-alpha-bounces@sourceware.org; receiver=) Authentication-Results: ozlabs.org; dkim=pass (1024-bit key; secure) header.d=sourceware.org header.i=@sourceware.org header.a=rsa-sha256 header.s=default header.b=N58mycI5; dkim-atps=neutral Received: from sourceware.org (unknown [8.43.85.97]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256) (No client certificate requested) by ozlabs.org (Postfix) with ESMTPS id 4Dwggp3tsLz9sS8 for ; Thu, 11 Mar 2021 05:33:26 +1100 (AEDT) Received: from server2.sourceware.org (localhost [IPv6:::1]) by sourceware.org (Postfix) with ESMTP id 5144E3987C1B; Wed, 10 Mar 2021 18:32:25 +0000 (GMT) DKIM-Filter: OpenDKIM Filter v2.11.0 sourceware.org 5144E3987C1B DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=sourceware.org; s=default; t=1615401145; bh=OIW+c88WNANR2uQfAZvZY9uKjc23gROJ0crLhYmg8zw=; h=To:Subject:Date:In-Reply-To:References:List-Id:List-Unsubscribe: List-Archive:List-Post:List-Help:List-Subscribe:From:Reply-To:Cc: From; b=N58mycI5uMjLAUfauG9nexFsy1HVJ6nKCleZP4b2XnRSgm13EzcVU8r7a72RGK5R8 1yaZPAkHGvPGmoKYbyHYjF/OQEhl6Dd/jDE78lZ9f+Jg1u/XC3CJGSOtI0q48lBUPz A+gPMsBUrZgA/E5IxN7jsshzrlS36O3f9vKGd5cA= X-Original-To: libc-alpha@sourceware.org Delivered-To: libc-alpha@sourceware.org Received: from mail-wr1-x432.google.com (mail-wr1-x432.google.com [IPv6:2a00:1450:4864:20::432]) by sourceware.org (Postfix) with ESMTPS id 19B383987C39 for ; Wed, 10 Mar 2021 18:32:21 +0000 (GMT) DMARC-Filter: OpenDMARC Filter v1.3.2 sourceware.org 19B383987C39 Received: by mail-wr1-x432.google.com with SMTP id b18so24439359wrn.6 for ; Wed, 10 Mar 2021 10:32:21 -0800 (PST) X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:from:to:cc:subject:date:message-id:in-reply-to :references:mime-version:content-transfer-encoding; bh=OIW+c88WNANR2uQfAZvZY9uKjc23gROJ0crLhYmg8zw=; b=io26F1FCyWdSXr4L01qE01UiXlGndDLrhyFPhy9u+EExjW/+vOSZhzsLuRj8iUlDU+ LOME7IwlLf95i6VrxJAfwdVPm4DiEaaRizgJCuX04HDFfqdg0EMjPnQzc4MWYW+81euk YqqUp0hSr4BmxpgdPdG3bD46uAMMjfc3W9DVnin66Vt93eV8rF1Rv1HMOapRmznNiLad 2J32C3v46d1HyAXKtT4yymfuowDNc89ZCtBP/1iubyh+or+Fc7Hk8OIgJZkT+Yt6zs3Y XIakDNIW5BGJaAZ+tYwwR8NC5V8IEsVmnipfKg53a8QYs59m4pGBufcaSNFth0S2tqhM eFyA== X-Gm-Message-State: AOAM533fSWY3yuBC55BuAGUduvdZga5DXdYX1/noBKkBX/+GQY2WE1rp b8dapzpyzaG3NPFqpdD2rH4= X-Google-Smtp-Source: ABdhPJwcUtE9k4dsy5jRJf5EehZCPVxcDSQ5c0N5aQalrxysQMZtttgH/EBp9li3rhc8KEOyUNm0pg== X-Received: by 2002:a5d:4203:: with SMTP id n3mr4799407wrq.116.1615401140218; Wed, 10 Mar 2021 10:32:20 -0800 (PST) Received: from localhost.localdomain ([170.253.51.130]) by smtp.googlemail.com with ESMTPSA id k11sm325374wmj.1.2021.03.10.10.32.19 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Wed, 10 Mar 2021 10:32:19 -0800 (PST) To: mtk.manpages@gmail.com Subject: [PATCH 17/24] strptime.3: SYNOPSIS: Use 'restrict' in prototypes Date: Wed, 10 Mar 2021 19:31:43 +0100 Message-Id: <20210310183149.194717-18-alx.manpages@gmail.com> X-Mailer: git-send-email 2.30.1.721.g45526154a5 In-Reply-To: <20210310183149.194717-1-alx.manpages@gmail.com> References: <20210310183149.194717-1-alx.manpages@gmail.com> MIME-Version: 1.0 X-Spam-Status: No, score=-12.4 required=5.0 tests=BAYES_00, DKIM_SIGNED, DKIM_VALID, DKIM_VALID_AU, DKIM_VALID_EF, FREEMAIL_FROM, GIT_PATCH_0, RCVD_IN_DNSWL_NONE, SPF_HELO_NONE, SPF_PASS, TXREP autolearn=ham autolearn_force=no version=3.4.2 X-Spam-Checker-Version: SpamAssassin 3.4.2 (2018-09-13) on server2.sourceware.org X-BeenThere: libc-alpha@sourceware.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: Libc-alpha mailing list List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-Patchwork-Original-From: Alejandro Colomar via Libc-alpha From: Alejandro Colomar Reply-To: Alejandro Colomar Cc: Alejandro Colomar , linux-man@vger.kernel.org, libc-alpha@sourceware.org, Ulrich Drepper Errors-To: libc-alpha-bounces@sourceware.org Sender: "Libc-alpha" Both POSIX and glibc use 'restrict' in strptime(). However, glibc doesn't specify 'restrict' for the last parameter. Let's use the most restrictive form here (although I believe both to be equivalent). .../glibc$ grep_glibc_prototype strptime time/time.h:95: extern char *strptime (const char *__restrict __s, const char *__restrict __fmt, struct tm *__tp) __THROW; .../glibc$ Cc: Cc: Ulrich Drepper Signed-off-by: Alejandro Colomar --- man3/strptime.3 | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/man3/strptime.3 b/man3/strptime.3 index c1a66ffc0..30c6f59df 100644 --- a/man3/strptime.3 +++ b/man3/strptime.3 @@ -36,7 +36,8 @@ strptime \- convert a string representation of time to a time tm structure .BR "#define _XOPEN_SOURCE" " /* See feature_test_macros(7) */" .B #include .PP -.BI "char *strptime(const char *" s ", const char *" format ", struct tm *" tm ); +.BI "char *strptime(const char *restrict " s ", const char *restrict " format , +.BI " struct tm *restrict " tm ); .fi .SH DESCRIPTION The From patchwork Wed Mar 10 18:31:44 2021 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Alejandro Colomar X-Patchwork-Id: 1450736 Return-Path: X-Original-To: incoming@patchwork.ozlabs.org Delivered-To: patchwork-incoming@bilbo.ozlabs.org Authentication-Results: ozlabs.org; spf=pass (sender SPF authorized) smtp.mailfrom=sourceware.org (client-ip=2620:52:3:1:0:246e:9693:128c; helo=sourceware.org; envelope-from=libc-alpha-bounces@sourceware.org; receiver=) Authentication-Results: ozlabs.org; dkim=pass (1024-bit key; secure) header.d=sourceware.org header.i=@sourceware.org header.a=rsa-sha256 header.s=default header.b=DKh1e0MJ; dkim-atps=neutral Received: from sourceware.org (server2.sourceware.org [IPv6:2620:52:3:1:0:246e:9693:128c]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256) (No client certificate requested) by ozlabs.org (Postfix) with ESMTPS id 4Dwggv0vJLz9sS8 for ; Thu, 11 Mar 2021 05:33:30 +1100 (AEDT) Received: from server2.sourceware.org (localhost [IPv6:::1]) by sourceware.org (Postfix) with ESMTP id D68F5398B157; Wed, 10 Mar 2021 18:32:25 +0000 (GMT) DKIM-Filter: OpenDKIM Filter v2.11.0 sourceware.org D68F5398B157 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=sourceware.org; s=default; t=1615401145; bh=EXmvdA05gwvklwcoqJ0X5FCRQW8+WlZ6BE5TEg8JlFw=; h=To:Subject:Date:In-Reply-To:References:List-Id:List-Unsubscribe: List-Archive:List-Post:List-Help:List-Subscribe:From:Reply-To:Cc: From; b=DKh1e0MJza7CK0pgixzOIWLu0sv1wRxDGoF1YddS90sRR40Ue+eOwK3C2Jj0WIAac QPF3rbBb53BQfWvGAJtdqld6fmox3NZn8RFtfHLOxPVTd8kySZge25FXOIRQ574tK6 rjgH3kP9h2/rhTjfgzCzR8LFsYK37aXrDy88fYxs= X-Original-To: libc-alpha@sourceware.org Delivered-To: libc-alpha@sourceware.org Received: from mail-wm1-x32a.google.com (mail-wm1-x32a.google.com [IPv6:2a00:1450:4864:20::32a]) by sourceware.org (Postfix) with ESMTPS id E18BB398B145 for ; Wed, 10 Mar 2021 18:32:21 +0000 (GMT) DMARC-Filter: OpenDMARC Filter v1.3.2 sourceware.org E18BB398B145 Received: by mail-wm1-x32a.google.com with SMTP id r10-20020a05600c35cab029010c946c95easo11340579wmq.4 for ; Wed, 10 Mar 2021 10:32:21 -0800 (PST) X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:from:to:cc:subject:date:message-id:in-reply-to :references:mime-version:content-transfer-encoding; bh=EXmvdA05gwvklwcoqJ0X5FCRQW8+WlZ6BE5TEg8JlFw=; b=amcdfCanoMlu2Xy2LmsRPtn9y+hO/pqea+TG3yQPS7jyIiPffEvqhy4VlHlXH4keR5 Ve20bJmfmpmyd9OQGawMDEhBPzIjSYCcn73iTogVKcds6gfvFIAswCcZNRhNG/17Kv7C bPqImabWn6tRvziszFiG12e7ghBhXgwIn2HOlPSMOU2vL4XzWuWoZ8iUREjgpi6KP7xG Iposx5bKMeBM0TVBc/opmCcakXFoPaBxBop6mk6Xl6prEg5Ow6/McycorQubeoX4fywd Dx8RWqU5R5nTwWsGsvls66LPeqLeHsgNZnIaCWt9Evrrb3UTXiOyRnf6FDqJmIvfUOFH /GUQ== X-Gm-Message-State: AOAM532iet+ClvJTDUECyPZTZjqyh8yqStVSK4qKOAzezaAWsy5zkrLf ehQr0+E2XJjlIhA3nUsTEww= X-Google-Smtp-Source: ABdhPJx9KaA8iy/s8seJmvivCGPKPNWw/7McuXz8zVPY56ru30Du1YUoshFPD8U/SFTM1bAIwFsJ+Q== X-Received: by 2002:a1c:7fc9:: with SMTP id a192mr4500616wmd.15.1615401141086; Wed, 10 Mar 2021 10:32:21 -0800 (PST) Received: from localhost.localdomain ([170.253.51.130]) by smtp.googlemail.com with ESMTPSA id k11sm325374wmj.1.2021.03.10.10.32.20 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Wed, 10 Mar 2021 10:32:20 -0800 (PST) To: mtk.manpages@gmail.com Subject: [PATCH 18/24] strsep.3: SYNOPSIS: Use 'restrict' in prototypes Date: Wed, 10 Mar 2021 19:31:44 +0100 Message-Id: <20210310183149.194717-19-alx.manpages@gmail.com> X-Mailer: git-send-email 2.30.1.721.g45526154a5 In-Reply-To: <20210310183149.194717-1-alx.manpages@gmail.com> References: <20210310183149.194717-1-alx.manpages@gmail.com> MIME-Version: 1.0 X-Spam-Status: No, score=-12.4 required=5.0 tests=BAYES_00, DKIM_SIGNED, DKIM_VALID, DKIM_VALID_AU, DKIM_VALID_EF, FREEMAIL_FROM, GIT_PATCH_0, RCVD_IN_DNSWL_NONE, SPF_HELO_NONE, SPF_PASS, TXREP autolearn=ham autolearn_force=no version=3.4.2 X-Spam-Checker-Version: SpamAssassin 3.4.2 (2018-09-13) on server2.sourceware.org X-BeenThere: libc-alpha@sourceware.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: Libc-alpha mailing list List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-Patchwork-Original-From: Alejandro Colomar via Libc-alpha From: Alejandro Colomar Reply-To: Alejandro Colomar Cc: Alejandro Colomar , linux-man@vger.kernel.org, libc-alpha@sourceware.org Errors-To: libc-alpha-bounces@sourceware.org Sender: "Libc-alpha" glibc uses 'restrict' in strsep(). Let's use it here too. .../glibc$ grep_glibc_prototype strsep string/string.h:455: extern char *strsep (char **__restrict __stringp, const char *__restrict __delim) __THROW __nonnull ((1, 2)); .../glibc$ Signed-off-by: Alejandro Colomar --- man3/strsep.3 | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/man3/strsep.3 b/man3/strsep.3 index 9d40e208b..91c379bdb 100644 --- a/man3/strsep.3 +++ b/man3/strsep.3 @@ -37,7 +37,7 @@ strsep \- extract token from string .nf .B #include .PP -.BI "char *strsep(char **" stringp ", const char *" delim ); +.BI "char *strsep(char **restrict " stringp ", const char *restrict " delim ); .fi .PP .RS -4 From patchwork Wed Mar 10 18:31:45 2021 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Alejandro Colomar X-Patchwork-Id: 1450737 Return-Path: X-Original-To: incoming@patchwork.ozlabs.org Delivered-To: patchwork-incoming@bilbo.ozlabs.org Authentication-Results: ozlabs.org; spf=pass (sender SPF authorized) smtp.mailfrom=sourceware.org (client-ip=2620:52:3:1:0:246e:9693:128c; helo=sourceware.org; envelope-from=libc-alpha-bounces@sourceware.org; receiver=) Authentication-Results: ozlabs.org; dkim=pass (1024-bit key; secure) header.d=sourceware.org header.i=@sourceware.org header.a=rsa-sha256 header.s=default header.b=pdotajOq; dkim-atps=neutral Received: from sourceware.org (server2.sourceware.org [IPv6:2620:52:3:1:0:246e:9693:128c]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256) (No client certificate requested) by ozlabs.org (Postfix) with ESMTPS id 4Dwggz0fVnz9sS8 for ; Thu, 11 Mar 2021 05:33:35 +1100 (AEDT) Received: from server2.sourceware.org (localhost [IPv6:::1]) by sourceware.org (Postfix) with ESMTP id 81A65398B158; Wed, 10 Mar 2021 18:32:27 +0000 (GMT) DKIM-Filter: OpenDKIM Filter v2.11.0 sourceware.org 81A65398B158 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=sourceware.org; s=default; t=1615401147; bh=v+opXIiWov/WZw07j+Hr+F2pJZt+UphMGIAIEODD3N8=; h=To:Subject:Date:In-Reply-To:References:List-Id:List-Unsubscribe: List-Archive:List-Post:List-Help:List-Subscribe:From:Reply-To:Cc: From; b=pdotajOq/rlVzSn5GKyujOYYOB8hz34vk5DXx2ogdz5dxZg62g94g1G1cngs7h86X H09aehP4HgHTeUEvWJfsrco0Xd/P0XMPYrb1mKfRPb+e4TdHkwwVcB5AYSVP7gcuHO y3c2Bz/zYz8qMzhqDvyhyW4+pK/0kZFIA7VI2wWU= X-Original-To: libc-alpha@sourceware.org Delivered-To: libc-alpha@sourceware.org Received: from mail-wm1-x32a.google.com (mail-wm1-x32a.google.com [IPv6:2a00:1450:4864:20::32a]) by sourceware.org (Postfix) with ESMTPS id C25E7398B149 for ; Wed, 10 Mar 2021 18:32:22 +0000 (GMT) DMARC-Filter: OpenDMARC Filter v1.3.2 sourceware.org C25E7398B149 Received: by mail-wm1-x32a.google.com with SMTP id f22-20020a7bc8d60000b029010c024a1407so11708236wml.2 for ; Wed, 10 Mar 2021 10:32:22 -0800 (PST) X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:from:to:cc:subject:date:message-id:in-reply-to :references:mime-version:content-transfer-encoding; bh=v+opXIiWov/WZw07j+Hr+F2pJZt+UphMGIAIEODD3N8=; b=YnsQbdMxmZTAAR5d5BJX2nqLQk5qdvUyyE7c5HcCxeZJbOoK1yQVuZpfmclrVisN7t FnwvgWRCelQvkbxClXnfmzTbnix+ANF7Du2SFIBKtO6b288ay2nIUGzCJ0GFOg6ivE51 ZHqESEEtGuUEvnl0RtdlU0uqEZRF0tnzNcfCKyfx0lPM8od6ZDO2XBdncNfsxHrqVS47 M//FUzCovAHI3YStpEVZraJEuIfMFLmJRdhqOmaLfloynMLnz5VKyLh4Kjk2sggJQIL5 8TCbHG835IHTLiWUWXQI7NdkJtId/GQOa4feXh2TBSsMM25T+XhLusK/v8EQmzsZ9fRm lsaw== X-Gm-Message-State: AOAM531RKE2BvedDOVUUQUOtussEtSYFAMNMtlYltnnpxI1mQXd3y8sQ HSeon/kc3I0LyJf6gTNXEUiRZmhFegijTw== X-Google-Smtp-Source: ABdhPJxlFaJGZkRqr2m+WTSzKSvtt0l/HLnNy/hIzEw8u4s4B3QmC1ojP7yU2G9YMGML5GVx/gCEgw== X-Received: by 2002:a05:600c:204f:: with SMTP id p15mr4639490wmg.165.1615401142019; Wed, 10 Mar 2021 10:32:22 -0800 (PST) Received: from localhost.localdomain ([170.253.51.130]) by smtp.googlemail.com with ESMTPSA id k11sm325374wmj.1.2021.03.10.10.32.21 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Wed, 10 Mar 2021 10:32:21 -0800 (PST) To: mtk.manpages@gmail.com Subject: [PATCH 19/24] strtod.3: SYNOPSIS: Use 'restrict' in prototypes Date: Wed, 10 Mar 2021 19:31:45 +0100 Message-Id: <20210310183149.194717-20-alx.manpages@gmail.com> X-Mailer: git-send-email 2.30.1.721.g45526154a5 In-Reply-To: <20210310183149.194717-1-alx.manpages@gmail.com> References: <20210310183149.194717-1-alx.manpages@gmail.com> MIME-Version: 1.0 X-Spam-Status: No, score=-12.4 required=5.0 tests=BAYES_00, DKIM_SIGNED, DKIM_VALID, DKIM_VALID_AU, DKIM_VALID_EF, FREEMAIL_FROM, GIT_PATCH_0, RCVD_IN_DNSWL_NONE, SPF_HELO_NONE, SPF_PASS, TXREP autolearn=ham autolearn_force=no version=3.4.2 X-Spam-Checker-Version: SpamAssassin 3.4.2 (2018-09-13) on server2.sourceware.org X-BeenThere: libc-alpha@sourceware.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: Libc-alpha mailing list List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-Patchwork-Original-From: Alejandro Colomar via Libc-alpha From: Alejandro Colomar Reply-To: Alejandro Colomar Cc: Alejandro Colomar , linux-man@vger.kernel.org, libc-alpha@sourceware.org Errors-To: libc-alpha-bounces@sourceware.org Sender: "Libc-alpha" Both POSIX and glibc use 'restrict' in strtod(), strtof(), strtold(). Let's use it here too. .../glibc$ grep_glibc_prototype strtod stdlib/stdlib.h:117: extern double strtod (const char *__restrict __nptr, char **__restrict __endptr) __THROW __nonnull ((1)); .../glibc$ grep_glibc_prototype strtof stdlib/stdlib.h:123: extern float strtof (const char *__restrict __nptr, char **__restrict __endptr) __THROW __nonnull ((1)); .../glibc$ grep_glibc_prototype strtold stdlib/stdlib.h:126: extern long double strtold (const char *__restrict __nptr, char **__restrict __endptr) __THROW __nonnull ((1)); .../glibc$ Signed-off-by: Alejandro Colomar --- man3/strtod.3 | 7 ++++--- 1 file changed, 4 insertions(+), 3 deletions(-) diff --git a/man3/strtod.3 b/man3/strtod.3 index e77bd59ec..24cb4ad13 100644 --- a/man3/strtod.3 +++ b/man3/strtod.3 @@ -49,9 +49,10 @@ strtod, strtof, strtold \- convert ASCII string to floating-point number .nf .B #include .PP -.BI "double strtod(const char *" nptr ", char **" endptr ); -.BI "float strtof(const char *" nptr ", char **" endptr ); -.BI "long double strtold(const char *" nptr ", char **" endptr ); +.BI "double strtod(const char *restrict " nptr ", char **restrict " endptr ); +.BI "float strtof(const char *restrict " nptr ", char **restrict " endptr ); +.BI "long double strtold(const char *restrict " nptr \ +", char **restrict " endptr ); .fi .PP .RS -4 From patchwork Wed Mar 10 18:31:46 2021 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Alejandro Colomar X-Patchwork-Id: 1450738 Return-Path: X-Original-To: incoming@patchwork.ozlabs.org Delivered-To: patchwork-incoming@bilbo.ozlabs.org Authentication-Results: ozlabs.org; spf=pass (sender SPF authorized) smtp.mailfrom=sourceware.org (client-ip=2620:52:3:1:0:246e:9693:128c; helo=sourceware.org; envelope-from=libc-alpha-bounces@sourceware.org; receiver=) Authentication-Results: ozlabs.org; dkim=pass (1024-bit key; secure) header.d=sourceware.org header.i=@sourceware.org header.a=rsa-sha256 header.s=default header.b=VzIeg0Oa; dkim-atps=neutral Received: from sourceware.org (server2.sourceware.org [IPv6:2620:52:3:1:0:246e:9693:128c]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256) (No client certificate requested) by ozlabs.org (Postfix) with ESMTPS id 4Dwgh26vy0z9sS8 for ; Thu, 11 Mar 2021 05:33:38 +1100 (AEDT) Received: from server2.sourceware.org (localhost [IPv6:::1]) by sourceware.org (Postfix) with ESMTP id 10970398B15D; Wed, 10 Mar 2021 18:32:28 +0000 (GMT) DKIM-Filter: OpenDKIM Filter v2.11.0 sourceware.org 10970398B15D DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=sourceware.org; s=default; t=1615401148; bh=JYCOkSOGLwQwA9jccVOYx44poVBVY/7h2jsH9a+VRto=; h=To:Subject:Date:In-Reply-To:References:List-Id:List-Unsubscribe: List-Archive:List-Post:List-Help:List-Subscribe:From:Reply-To:Cc: From; b=VzIeg0Oa2Eg3xSQjf3egqlPdZvPqJsET2T+HAwVAG2obqsNxTh9sB4OGhQzGHeBX/ 7Op77dfUi0DH04Ov9bpSnkHuJl3lUl4bDBYDd8Fj5hZFWbQaMGqyFXa5ri8+L66PcU auQh9DPJlUP9dC+VLAu+nAR5S387zhTlgz3syQV8= X-Original-To: libc-alpha@sourceware.org Delivered-To: libc-alpha@sourceware.org Received: from mail-wm1-x335.google.com (mail-wm1-x335.google.com [IPv6:2a00:1450:4864:20::335]) by sourceware.org (Postfix) with ESMTPS id 98D06388A423 for ; Wed, 10 Mar 2021 18:32:23 +0000 (GMT) DMARC-Filter: OpenDMARC Filter v1.3.2 sourceware.org 98D06388A423 Received: by mail-wm1-x335.google.com with SMTP id d139-20020a1c1d910000b029010b895cb6f2so11351611wmd.5 for ; Wed, 10 Mar 2021 10:32:23 -0800 (PST) X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:from:to:cc:subject:date:message-id:in-reply-to :references:mime-version:content-transfer-encoding; bh=JYCOkSOGLwQwA9jccVOYx44poVBVY/7h2jsH9a+VRto=; b=IhNUIX/nhYyYL644Hjk3xOAi6f9Zaa8VvYWJ5ZCCmPP6B82D+TwfVdTlfPB5WeoNY/ ACP+8b7ggwnP/SoFMVpGprN0v5P4jgKdjtdtjuardC/v9zZeq05xCP7abhvUKv4nTykO MWUfiv+CYY81X8c+vzL4BMfzEPuaN5pqnt1krxvB9ezrCj3l2Jupk15EXtTDClYgpz1S qV/UjWO3ug35nFNXZSoblXqQZvEDsezfpHzm7nDb42H2OFR/EK+qv444PNB9ekXXHNJl /Py8emRZnTXT/Q8I6AjYrru3UdVtKqtYa0opq7zfvL5d2UnMrBm/po/bnrUuhFA++P5P UiVg== X-Gm-Message-State: AOAM533Xa6kfcKSPtkzL2AtLyYh5SioS66O7j4NRZ+kOqbz0t912vzFo IZsbYmCg/ag6e++xizdboYc= X-Google-Smtp-Source: ABdhPJwdB3UOMO++7YcoqGzMe2hTp0pI4rvVttM3MFQeNo9K/PFCPhbQ2ziE6L4T7U63g+XMMwfekw== X-Received: by 2002:a05:600c:4292:: with SMTP id v18mr4604546wmc.23.1615401142847; Wed, 10 Mar 2021 10:32:22 -0800 (PST) Received: from localhost.localdomain ([170.253.51.130]) by smtp.googlemail.com with ESMTPSA id k11sm325374wmj.1.2021.03.10.10.32.22 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Wed, 10 Mar 2021 10:32:22 -0800 (PST) To: mtk.manpages@gmail.com Subject: [PATCH 20/24] strtoimax.3: SYNOPSIS: Use 'restrict' in prototypes Date: Wed, 10 Mar 2021 19:31:46 +0100 Message-Id: <20210310183149.194717-21-alx.manpages@gmail.com> X-Mailer: git-send-email 2.30.1.721.g45526154a5 In-Reply-To: <20210310183149.194717-1-alx.manpages@gmail.com> References: <20210310183149.194717-1-alx.manpages@gmail.com> MIME-Version: 1.0 X-Spam-Status: No, score=-12.4 required=5.0 tests=BAYES_00, DKIM_SIGNED, DKIM_VALID, DKIM_VALID_AU, DKIM_VALID_EF, FREEMAIL_FROM, GIT_PATCH_0, RCVD_IN_DNSWL_NONE, SPF_HELO_NONE, SPF_PASS, TXREP autolearn=ham autolearn_force=no version=3.4.2 X-Spam-Checker-Version: SpamAssassin 3.4.2 (2018-09-13) on server2.sourceware.org X-BeenThere: libc-alpha@sourceware.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: Libc-alpha mailing list List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-Patchwork-Original-From: Alejandro Colomar via Libc-alpha From: Alejandro Colomar Reply-To: Alejandro Colomar Cc: Alejandro Colomar , linux-man@vger.kernel.org, libc-alpha@sourceware.org Errors-To: libc-alpha-bounces@sourceware.org Sender: "Libc-alpha" Both POSIX and glibc use 'restrict' in strtoimax(), strtoumax(). Let's use it here too. .../glibc$ grep_glibc_prototype strtoimax stdlib/inttypes.h:297: extern intmax_t strtoimax (const char *__restrict __nptr, char **__restrict __endptr, int __base) __THROW; .../glibc$ grep_glibc_prototype strtoumax stdlib/inttypes.h:301: extern uintmax_t strtoumax (const char *__restrict __nptr, char ** __restrict __endptr, int __base) __THROW; .../glibc$ Signed-off-by: Alejandro Colomar --- man3/strtoimax.3 | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/man3/strtoimax.3 b/man3/strtoimax.3 index 9acaa1244..6c14c6ac8 100644 --- a/man3/strtoimax.3 +++ b/man3/strtoimax.3 @@ -28,8 +28,10 @@ strtoimax, strtoumax \- convert string to integer .nf .B #include .PP -.BI "intmax_t strtoimax(const char *" nptr ", char **" endptr ", int " base ); -.BI "uintmax_t strtoumax(const char *" nptr ", char **" endptr ", int " base ); +.BI "intmax_t strtoimax(const char *restrict " nptr ", char **restrict " endptr , +.BI " int " base ); +.BI "uintmax_t strtoumax(const char *restrict " nptr ", char **restrict " endptr , +.BI " int " base ); .fi .SH DESCRIPTION These functions are just like From patchwork Wed Mar 10 18:31:47 2021 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Alejandro Colomar X-Patchwork-Id: 1450740 Return-Path: X-Original-To: incoming@patchwork.ozlabs.org Delivered-To: patchwork-incoming@bilbo.ozlabs.org Authentication-Results: ozlabs.org; spf=pass (sender SPF authorized) smtp.mailfrom=sourceware.org (client-ip=2620:52:3:1:0:246e:9693:128c; helo=sourceware.org; envelope-from=libc-alpha-bounces@sourceware.org; receiver=) Authentication-Results: ozlabs.org; dkim=pass (1024-bit key; secure) header.d=sourceware.org header.i=@sourceware.org header.a=rsa-sha256 header.s=default header.b=lWSvlTdA; dkim-atps=neutral Received: from sourceware.org (server2.sourceware.org [IPv6:2620:52:3:1:0:246e:9693:128c]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256) (No client certificate requested) by ozlabs.org (Postfix) with ESMTPS id 4Dwgh72XNTz9sS8 for ; Thu, 11 Mar 2021 05:33:43 +1100 (AEDT) Received: from server2.sourceware.org (localhost [IPv6:::1]) by sourceware.org (Postfix) with ESMTP id 98462398B164; Wed, 10 Mar 2021 18:32:28 +0000 (GMT) DKIM-Filter: OpenDKIM Filter v2.11.0 sourceware.org 98462398B164 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=sourceware.org; s=default; t=1615401148; bh=UbqNJxji0iog/ihZEREGvWtqIWGF3dWUVT8PqeBhNDY=; h=To:Subject:Date:In-Reply-To:References:List-Id:List-Unsubscribe: List-Archive:List-Post:List-Help:List-Subscribe:From:Reply-To:Cc: From; b=lWSvlTdAN5b/rswLF73Yq4qZ6EdNPnOz7fESL5GjXvxtGnf8mGYH0hdVjoXzyLAfc Yn6XmecnlmaEauWzwUuQClOfqEWXNZBy8jxrOPoyJqKf2n8zX8iHzGizdyNj865VaT TY9T7LvUwH3f5GU+wnPFSTFu3sBGLFGGa6rvl5GU= X-Original-To: libc-alpha@sourceware.org Delivered-To: libc-alpha@sourceware.org Received: from mail-wr1-x42d.google.com (mail-wr1-x42d.google.com [IPv6:2a00:1450:4864:20::42d]) by sourceware.org (Postfix) with ESMTPS id 6DDE2398B152 for ; Wed, 10 Mar 2021 18:32:24 +0000 (GMT) DMARC-Filter: OpenDMARC Filter v1.3.2 sourceware.org 6DDE2398B152 Received: by mail-wr1-x42d.google.com with SMTP id u14so24450886wri.3 for ; Wed, 10 Mar 2021 10:32:24 -0800 (PST) X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:from:to:cc:subject:date:message-id:in-reply-to :references:mime-version:content-transfer-encoding; bh=UbqNJxji0iog/ihZEREGvWtqIWGF3dWUVT8PqeBhNDY=; b=ZEXyMkh8qsxjc0KNerosbfC68nZGm1k0+IpUiq0//xBUzaFOUOyjPUIZ5VQJF02dVL fuTtXaI7774L2i0XWI4lVfwv2MpD4bVC6Fyms6MxY/Bhz/s3sM1qv5Wu5xtppoLWbDJL J/jRvcsvXXxpqHJ4153XN/npfMF7e7BymZoZ+GFjVGt7ztbOCr/kOBRgBMorS75X1Nxq 06mI6p1KbFgXFmPlzh38vr0Nrnl37NFMFScEp8MKCWR5AG7PvpKQ1bZ/9ihiXrNB9mQQ uGoLRnSUNVXB20SY6MLbvYybxG339Wa52FM9n+VgmlmToF+4UzrG/Jz/5NVf1Vwj6sTd czfQ== X-Gm-Message-State: AOAM532J1sPZX7kjLo7o7UMVz1c4k2qAdyDiyNWtDHqHy7BXLiMOd8OK jHtWNcDs15oxEse7Qmce73zGz7X6gYb0Gw== X-Google-Smtp-Source: ABdhPJwITlZItXQJTT4ESeSmwDDKDuhYIZED+Lat/lWmxR77ZkMDemH2ojyZHTsTW7kiLYlETGGytg== X-Received: by 2002:adf:b355:: with SMTP id k21mr4934952wrd.156.1615401143632; Wed, 10 Mar 2021 10:32:23 -0800 (PST) Received: from localhost.localdomain ([170.253.51.130]) by smtp.googlemail.com with ESMTPSA id k11sm325374wmj.1.2021.03.10.10.32.22 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Wed, 10 Mar 2021 10:32:23 -0800 (PST) To: mtk.manpages@gmail.com Subject: [PATCH 21/24] strtok.3: SYNOPSIS: Use 'restrict' in prototypes Date: Wed, 10 Mar 2021 19:31:47 +0100 Message-Id: <20210310183149.194717-22-alx.manpages@gmail.com> X-Mailer: git-send-email 2.30.1.721.g45526154a5 In-Reply-To: <20210310183149.194717-1-alx.manpages@gmail.com> References: <20210310183149.194717-1-alx.manpages@gmail.com> MIME-Version: 1.0 X-Spam-Status: No, score=-12.4 required=5.0 tests=BAYES_00, DKIM_SIGNED, DKIM_VALID, DKIM_VALID_AU, DKIM_VALID_EF, FREEMAIL_FROM, GIT_PATCH_0, RCVD_IN_DNSWL_NONE, SPF_HELO_NONE, SPF_PASS, TXREP autolearn=ham autolearn_force=no version=3.4.2 X-Spam-Checker-Version: SpamAssassin 3.4.2 (2018-09-13) on server2.sourceware.org X-BeenThere: libc-alpha@sourceware.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: Libc-alpha mailing list List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-Patchwork-Original-From: Alejandro Colomar via Libc-alpha From: Alejandro Colomar Reply-To: Alejandro Colomar Cc: Alejandro Colomar , linux-man@vger.kernel.org, libc-alpha@sourceware.org Errors-To: libc-alpha-bounces@sourceware.org Sender: "Libc-alpha" Both POSIX and glibc use 'restrict' in strtok(), strtok_r(). Let's use it here too. .../glibc$ grep_glibc_prototype strtok string/string.h:340: extern char *strtok (char *__restrict __s, const char *__restrict __delim) __THROW __nonnull ((2)); .../glibc$ grep_glibc_prototype strtok_r string/string.h:350: extern char *strtok_r (char *__restrict __s, const char *__restrict __delim, char **__restrict __save_ptr) __THROW __nonnull ((2, 3)); .../glibc$ Signed-off-by: Alejandro Colomar --- man3/strtok.3 | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/man3/strtok.3 b/man3/strtok.3 index 6db48b677..8058ff2fe 100644 --- a/man3/strtok.3 +++ b/man3/strtok.3 @@ -36,8 +36,9 @@ strtok, strtok_r \- extract tokens from strings .nf .B #include .PP -.BI "char *strtok(char *" str ", const char *" delim ); -.BI "char *strtok_r(char *" str ", const char *" delim ", char **" saveptr ); +.BI "char *strtok(char *restrict " str ", const char *restrict " delim ); +.BI "char *strtok_r(char *restrict " str ", const char *restrict " delim , +.BI " char **restrict " saveptr ); .fi .PP .RS -4 From patchwork Wed Mar 10 18:31:48 2021 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Alejandro Colomar X-Patchwork-Id: 1450741 Return-Path: X-Original-To: incoming@patchwork.ozlabs.org Delivered-To: patchwork-incoming@bilbo.ozlabs.org Authentication-Results: ozlabs.org; spf=pass (sender SPF authorized) smtp.mailfrom=sourceware.org (client-ip=2620:52:3:1:0:246e:9693:128c; helo=sourceware.org; envelope-from=libc-alpha-bounces@sourceware.org; receiver=) Authentication-Results: ozlabs.org; dkim=pass (1024-bit key; secure) header.d=sourceware.org header.i=@sourceware.org header.a=rsa-sha256 header.s=default header.b=CAuba+gP; dkim-atps=neutral Received: from sourceware.org (server2.sourceware.org [IPv6:2620:52:3:1:0:246e:9693:128c]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256) (No client certificate requested) by ozlabs.org (Postfix) with ESMTPS id 4DwghC2Hrkz9sVw for ; Thu, 11 Mar 2021 05:33:47 +1100 (AEDT) Received: from server2.sourceware.org (localhost [IPv6:::1]) by sourceware.org (Postfix) with ESMTP id 291A4398A85E; Wed, 10 Mar 2021 18:32:29 +0000 (GMT) DKIM-Filter: OpenDKIM Filter v2.11.0 sourceware.org 291A4398A85E DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=sourceware.org; s=default; t=1615401149; bh=hVnhWYituodV/kzNGhKhIhdhny8rADVzvRuqiSRhoQk=; h=To:Subject:Date:In-Reply-To:References:List-Id:List-Unsubscribe: List-Archive:List-Post:List-Help:List-Subscribe:From:Reply-To:Cc: From; b=CAuba+gPMmCFvzfgW66nCTQ20WQ/0AJ55QOn2oqEEbplMemTB/EbFQLGpY3rJMQHm XPr358cL/71WGITxbU8aDMooifO0U+6bsrH/CNFLUkfqdggaKvzIziyP/aMdYIVUXY L+beEeF9ZBfx3ySIeW3bbQY37Af3+OtsT3FEpvuU= X-Original-To: libc-alpha@sourceware.org Delivered-To: libc-alpha@sourceware.org Received: from mail-wm1-x332.google.com (mail-wm1-x332.google.com [IPv6:2a00:1450:4864:20::332]) by sourceware.org (Postfix) with ESMTPS id 333B63987C27 for ; Wed, 10 Mar 2021 18:32:25 +0000 (GMT) DMARC-Filter: OpenDMARC Filter v1.3.2 sourceware.org 333B63987C27 Received: by mail-wm1-x332.google.com with SMTP id m20-20020a7bcb940000b029010cab7e5a9fso11685109wmi.3 for ; Wed, 10 Mar 2021 10:32:25 -0800 (PST) X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:from:to:cc:subject:date:message-id:in-reply-to :references:mime-version:content-transfer-encoding; bh=hVnhWYituodV/kzNGhKhIhdhny8rADVzvRuqiSRhoQk=; b=U1ye13MEYI+tb72k1x+X1dYX+iD0ACGQ9w8UR4TUCXQ4EKQC0sCCx+hDS73QFWL51Q a9Umf3dK2u/l0iHqgHYKPCSsxcjSdWfYPJdohLcNbqaGRLa8VhwClU23HeQqV28BIYeu aexktXk0Ju6HJ9itfvmVTtnba0lNqtrBA3RXU8xYsRnWzXNrs9iUkvOAc7ffbBUPtLW6 QLWL1tlxfm+OVzIukpqWJQtBkZjtFSWOCvc/ykg9+naBz91uR98eFqUiZzE7FFq/kpuw cU+CNmMA6jvAKLnViZqr1NJdT9FVmSRtksUL+cDEHFRLkHcAHrTFuuud4BNd0bRLCdSL 2LlA== X-Gm-Message-State: AOAM530b+8Bx9VstJjOR+0GKqPpZyvy9t6CV7mU3Il6czRQ/THa8/gId m6fE7A7ppWBAwlJb+iAmwfY= X-Google-Smtp-Source: ABdhPJxwHneauBzPJ7UfMAGw6NEHyWsCnh3Su63HvKs0xx/Dbr0U+Nrmrn0/ARwu+OfRasikbk3Z7g== X-Received: by 2002:a1c:32ca:: with SMTP id y193mr4615649wmy.56.1615401144420; Wed, 10 Mar 2021 10:32:24 -0800 (PST) Received: from localhost.localdomain ([170.253.51.130]) by smtp.googlemail.com with ESMTPSA id k11sm325374wmj.1.2021.03.10.10.32.23 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Wed, 10 Mar 2021 10:32:24 -0800 (PST) To: mtk.manpages@gmail.com Subject: [PATCH 22/24] strtol.3, strtoul.3: SYNOPSIS: Use 'restrict' in prototypes Date: Wed, 10 Mar 2021 19:31:48 +0100 Message-Id: <20210310183149.194717-23-alx.manpages@gmail.com> X-Mailer: git-send-email 2.30.1.721.g45526154a5 In-Reply-To: <20210310183149.194717-1-alx.manpages@gmail.com> References: <20210310183149.194717-1-alx.manpages@gmail.com> MIME-Version: 1.0 X-Spam-Status: No, score=-12.4 required=5.0 tests=BAYES_00, DKIM_SIGNED, DKIM_VALID, DKIM_VALID_AU, DKIM_VALID_EF, FREEMAIL_FROM, GIT_PATCH_0, RCVD_IN_DNSWL_NONE, SPF_HELO_NONE, SPF_PASS, TXREP autolearn=ham autolearn_force=no version=3.4.2 X-Spam-Checker-Version: SpamAssassin 3.4.2 (2018-09-13) on server2.sourceware.org X-BeenThere: libc-alpha@sourceware.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: Libc-alpha mailing list List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-Patchwork-Original-From: Alejandro Colomar via Libc-alpha From: Alejandro Colomar Reply-To: Alejandro Colomar Cc: Alejandro Colomar , linux-man@vger.kernel.org, libc-alpha@sourceware.org Errors-To: libc-alpha-bounces@sourceware.org Sender: "Libc-alpha" Both POSIX and glibc use 'restrict' in strtol(), strtoll(), strtoul(), strtoull(). Let's use it here too. .../glibc$ grep_glibc_prototype strtol stdlib/stdlib.h:176: extern long int strtol (const char *__restrict __nptr, char **__restrict __endptr, int __base) __THROW __nonnull ((1)); .../glibc$ grep_glibc_prototype strtoll stdlib/stdlib.h:199: __extension__ extern long long int strtoll (const char *__restrict __nptr, char **__restrict __endptr, int __base) __THROW __nonnull ((1)); .../glibc$ grep_glibc_prototype strtoul stdlib/stdlib.h:180: extern unsigned long int strtoul (const char *__restrict __nptr, char **__restrict __endptr, int __base) __THROW __nonnull ((1)); .../glibc$ grep_glibc_prototype strtoull stdlib/stdlib.h:204: __extension__ extern unsigned long long int strtoull (const char *__restrict __nptr, char **__restrict __endptr, int __base) __THROW __nonnull ((1)); .../glibc$ Signed-off-by: Alejandro Colomar --- man3/strtol.3 | 7 ++++--- man3/strtoul.3 | 8 ++++---- 2 files changed, 8 insertions(+), 7 deletions(-) diff --git a/man3/strtol.3 b/man3/strtol.3 index 8f4a5e54c..148586b99 100644 --- a/man3/strtol.3 +++ b/man3/strtol.3 @@ -36,9 +36,10 @@ strtol, strtoll, strtoq \- convert a string to a long integer .nf .B #include .PP -.BI "long strtol(const char *" nptr ", char **" endptr ", int " base ); -.BI "long long strtoll(const char *" nptr ", char **" endptr \ -", int " base ); +.BI "long strtol(const char *restrict " nptr , +.BI " char **restrict " endptr ", int " base ); +.BI "long long strtoll(const char *restrict " nptr , +.BI " char **restrict " endptr ", int " base ); .fi .PP .RS -4 diff --git a/man3/strtoul.3 b/man3/strtoul.3 index b0a5c34fe..c6a55e732 100644 --- a/man3/strtoul.3 +++ b/man3/strtoul.3 @@ -37,10 +37,10 @@ strtoul, strtoull, strtouq \- convert a string to an unsigned long integer .nf .B #include .PP -.BI "unsigned long strtoul(const char *" nptr ", char **" endptr \ -", int " base ); -.BI "unsigned long long strtoull(const char *" nptr ", char **" endptr , -.BI " int " base ); +.BI "unsigned long strtoul(const char *restrict " nptr , +.BI " char **restrict " endptr ", int " base ); +.BI "unsigned long long strtoull(const char *restrict " nptr , +.BI " char **restrict " endptr ", int " base ); .fi .PP .RS -4 From patchwork Wed Mar 10 18:31:49 2021 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Alejandro Colomar X-Patchwork-Id: 1450742 Return-Path: X-Original-To: incoming@patchwork.ozlabs.org Delivered-To: patchwork-incoming@bilbo.ozlabs.org Authentication-Results: ozlabs.org; spf=pass (sender SPF authorized) smtp.mailfrom=sourceware.org (client-ip=8.43.85.97; helo=sourceware.org; envelope-from=libc-alpha-bounces@sourceware.org; receiver=) Authentication-Results: ozlabs.org; dkim=pass (1024-bit key; secure) header.d=sourceware.org header.i=@sourceware.org header.a=rsa-sha256 header.s=default header.b=JFk3A4Dj; dkim-atps=neutral Received: from sourceware.org (server2.sourceware.org [8.43.85.97]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256) (No client certificate requested) by ozlabs.org (Postfix) with ESMTPS id 4DwghH4rjGz9sVw for ; Thu, 11 Mar 2021 05:33:51 +1100 (AEDT) Received: from server2.sourceware.org (localhost [IPv6:::1]) by sourceware.org (Postfix) with ESMTP id 239C4398B16C; Wed, 10 Mar 2021 18:32:30 +0000 (GMT) DKIM-Filter: OpenDKIM Filter v2.11.0 sourceware.org 239C4398B16C DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=sourceware.org; s=default; t=1615401150; bh=KaFj7Tr9fR/tAVTbWXI0CsnmRuh98rZPZlMDuCQ86yA=; h=To:Subject:Date:In-Reply-To:References:List-Id:List-Unsubscribe: List-Archive:List-Post:List-Help:List-Subscribe:From:Reply-To:Cc: From; b=JFk3A4DjD/1Bj6aYQ9zdFpY4/VHnWfmBB1kul1b29Rayhz2eKIKuy8ucqBYlvrhRA 8/hsf5s10YphQQP8asnJ13aKEGa5TFFeE0ISB7OvRF1QdpACvNFV21AtR0CamRlVKV Y7/3a8uInw6jV2ze+8p5Omo1I/OJQOVwNgqzhkUs= X-Original-To: libc-alpha@sourceware.org Delivered-To: libc-alpha@sourceware.org Received: from mail-wm1-x331.google.com (mail-wm1-x331.google.com [IPv6:2a00:1450:4864:20::331]) by sourceware.org (Postfix) with ESMTPS id D6B51398B158 for ; Wed, 10 Mar 2021 18:32:25 +0000 (GMT) DMARC-Filter: OpenDMARC Filter v1.3.2 sourceware.org D6B51398B158 Received: by mail-wm1-x331.google.com with SMTP id c76-20020a1c9a4f0000b029010c94499aedso11698828wme.0 for ; Wed, 10 Mar 2021 10:32:25 -0800 (PST) X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:from:to:cc:subject:date:message-id:in-reply-to :references:mime-version:content-transfer-encoding; bh=KaFj7Tr9fR/tAVTbWXI0CsnmRuh98rZPZlMDuCQ86yA=; b=YsE9n/XNr7IFMcs0BBk3iRcyyxmxfvHyhv+271KcEUNoMrsmQqa21ohd4b3ve4FRAX THppKATpsukauKCdOuAhUkoLSgyK7t048Kgl8NEgfxITXWid+Hsi8BwjE0ZxWCUOTmza Y0as2zlV7mdGvwjyyn+XBYIYEpfhK0z25Vd9WNKPl20T61As3CEyJRwikd+d51jIDueH TtX7HWJluLyS6rbnSljJob3jN+xhBA4LS7RFJ2JE70a+1z0Z59hkYvnT5rm+AHI5tat8 +f3EcG730AAuKAzFClCDMmDx3VidG1l093DCXM5fi73NP6CxJ98r7//glX4zeXnv8Wc4 fUkA== X-Gm-Message-State: AOAM533NVcCSunWC/clFEgcLv4f5sXf9i8lf0EihNnHMDY6ZoDYiZ7aE 41BYRFertso9SXG9kpbWNJOsKrlbLZiBaw== X-Google-Smtp-Source: ABdhPJwm2W+d5W6AgtTJA61TYoI2c7AS5coRvVnDlXra1cQychOeMafqXyIj7Ii+G9M8gFpPCM2mLg== X-Received: by 2002:a1c:6543:: with SMTP id z64mr4707167wmb.50.1615401145084; Wed, 10 Mar 2021 10:32:25 -0800 (PST) Received: from localhost.localdomain ([170.253.51.130]) by smtp.googlemail.com with ESMTPSA id k11sm325374wmj.1.2021.03.10.10.32.24 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Wed, 10 Mar 2021 10:32:24 -0800 (PST) To: mtk.manpages@gmail.com Subject: [PATCH 23/24] strxfrm.3: SYNOPSIS: Use 'restrict' in prototypes Date: Wed, 10 Mar 2021 19:31:49 +0100 Message-Id: <20210310183149.194717-24-alx.manpages@gmail.com> X-Mailer: git-send-email 2.30.1.721.g45526154a5 In-Reply-To: <20210310183149.194717-1-alx.manpages@gmail.com> References: <20210310183149.194717-1-alx.manpages@gmail.com> MIME-Version: 1.0 X-Spam-Status: No, score=-12.4 required=5.0 tests=BAYES_00, DKIM_SIGNED, DKIM_VALID, DKIM_VALID_AU, DKIM_VALID_EF, FREEMAIL_FROM, GIT_PATCH_0, RCVD_IN_DNSWL_NONE, SPF_HELO_NONE, SPF_PASS, TXREP autolearn=ham autolearn_force=no version=3.4.2 X-Spam-Checker-Version: SpamAssassin 3.4.2 (2018-09-13) on server2.sourceware.org X-BeenThere: libc-alpha@sourceware.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: Libc-alpha mailing list List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-Patchwork-Original-From: Alejandro Colomar via Libc-alpha From: Alejandro Colomar Reply-To: Alejandro Colomar Cc: Alejandro Colomar , linux-man@vger.kernel.org, libc-alpha@sourceware.org Errors-To: libc-alpha-bounces@sourceware.org Sender: "Libc-alpha" Both POSIX and glibc use 'restrict' in strxfrm(). Let's use it here too. .../glibc$ grep_glibc_prototype strxfrm string/string.h:150: extern size_t strxfrm (char *__restrict __dest, const char *__restrict __src, size_t __n) __THROW __nonnull ((2)) __attr_access ((__write_only__, 1, 3)); .../glibc$ Signed-off-by: Alejandro Colomar --- man3/strxfrm.3 | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/man3/strxfrm.3 b/man3/strxfrm.3 index a6e0e4515..276497450 100644 --- a/man3/strxfrm.3 +++ b/man3/strxfrm.3 @@ -34,7 +34,8 @@ strxfrm \- string transformation .nf .B #include .PP -.BI "size_t strxfrm(char *" dest ", const char *" src ", size_t " n ); +.BI "size_t strxfrm(char *restrict " dest ", const char *restrict " src , +.BI " size_t " n ); .fi .SH DESCRIPTION The From patchwork Wed Mar 10 18:31:50 2021 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Alejandro Colomar X-Patchwork-Id: 1450743 Return-Path: X-Original-To: incoming@patchwork.ozlabs.org Delivered-To: patchwork-incoming@bilbo.ozlabs.org Authentication-Results: ozlabs.org; spf=pass (sender SPF authorized) smtp.mailfrom=sourceware.org (client-ip=8.43.85.97; helo=sourceware.org; envelope-from=libc-alpha-bounces@sourceware.org; receiver=) Authentication-Results: ozlabs.org; dkim=pass (1024-bit key; secure) header.d=sourceware.org header.i=@sourceware.org header.a=rsa-sha256 header.s=default header.b=I7tVEcua; dkim-atps=neutral Received: from sourceware.org (unknown [8.43.85.97]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256) (No client certificate requested) by ozlabs.org (Postfix) with ESMTPS id 4DwghM5vYDz9sS8 for ; Thu, 11 Mar 2021 05:33:55 +1100 (AEDT) Received: from server2.sourceware.org (localhost [IPv6:::1]) by sourceware.org (Postfix) with ESMTP id A8066398B16D; Wed, 10 Mar 2021 18:32:30 +0000 (GMT) DKIM-Filter: OpenDKIM Filter v2.11.0 sourceware.org A8066398B16D DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=sourceware.org; s=default; t=1615401150; bh=Rg/uisPDWdJXJiNctQ2c56fF8wJdfkaJ9RGAuxYwaxo=; h=To:Subject:Date:In-Reply-To:References:List-Id:List-Unsubscribe: List-Archive:List-Post:List-Help:List-Subscribe:From:Reply-To:Cc: From; b=I7tVEcua3xXvq+73Gb1060nBIz3ZXDzEdmr7YGtMMKHkmCQLU78O67Z0oQtHQBdCV NQ+qmjvmelLXr1RF8A97EoppVF07OM/R2gG7VLnC05j5OVw3hTQ5qygn8srdQBcPYY bHcEKKUlkjB/GtZYm+t/k+3ijrUkFdKD1ML1FYck= X-Original-To: libc-alpha@sourceware.org Delivered-To: libc-alpha@sourceware.org Received: from mail-wm1-x336.google.com (mail-wm1-x336.google.com [IPv6:2a00:1450:4864:20::336]) by sourceware.org (Postfix) with ESMTPS id 9AB4B3987C27 for ; Wed, 10 Mar 2021 18:32:26 +0000 (GMT) DMARC-Filter: OpenDMARC Filter v1.3.2 sourceware.org 9AB4B3987C27 Received: by mail-wm1-x336.google.com with SMTP id u5-20020a7bcb050000b029010e9316b9d5so8400778wmj.2 for ; Wed, 10 Mar 2021 10:32:26 -0800 (PST) X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:from:to:cc:subject:date:message-id:in-reply-to :references:mime-version:content-transfer-encoding; bh=Rg/uisPDWdJXJiNctQ2c56fF8wJdfkaJ9RGAuxYwaxo=; b=ZwYY5eI4xzNrla0I8ABOjisehUbVfXblCYd1vsUdk8MvyjikyA92UUHdnfnMLYwUmM gBiO3DRLJbVAVX01TL5sKoSaj2VH9ZpkW3JGWxmvj5hhej7ElAah5kSoYUmr5KC94M6O mCexwfQyZnM39mpNGUAPwfSC4ksB+Dmk1zH76p4YeYUpK6oDSF79ZdZJYn4npv0FK8y7 dpkMXEK0YDnWbVBjQH/6hQpLcQy6tmPDTx2N3TmlAkbk4F4wqxxTd9wRZEIWB9AzYRgw T4WeBoGEiFR7Gk+3HGPz9ZjPMwecilDv6SG5g/l2sliRpqGCEqsnTxtKuwNq2ppC0XdW wOUg== X-Gm-Message-State: AOAM531hJfjj4+wj0Q0CwNy+PH/0dSDd2KiUFHeWc0jf33vrr3JDpq7P KGT5mrpIUwy7V33D6OZ8PAE= X-Google-Smtp-Source: ABdhPJxopxsG2u7B6bq3QJ1OnVYjZf7Em0oJZWvF38k0IrIAXQpoEyHihjutR/gxP63NXWqqkZBMuw== X-Received: by 2002:a1c:2288:: with SMTP id i130mr4623952wmi.62.1615401145785; Wed, 10 Mar 2021 10:32:25 -0800 (PST) Received: from localhost.localdomain ([170.253.51.130]) by smtp.googlemail.com with ESMTPSA id k11sm325374wmj.1.2021.03.10.10.32.25 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Wed, 10 Mar 2021 10:32:25 -0800 (PST) To: mtk.manpages@gmail.com Subject: [PATCH 24/24] swab.3: SYNOPSIS: Use 'restrict' in prototypes Date: Wed, 10 Mar 2021 19:31:50 +0100 Message-Id: <20210310183149.194717-25-alx.manpages@gmail.com> X-Mailer: git-send-email 2.30.1.721.g45526154a5 In-Reply-To: <20210310183149.194717-1-alx.manpages@gmail.com> References: <20210310183149.194717-1-alx.manpages@gmail.com> MIME-Version: 1.0 X-Spam-Status: No, score=-12.4 required=5.0 tests=BAYES_00, DKIM_SIGNED, DKIM_VALID, DKIM_VALID_AU, DKIM_VALID_EF, FREEMAIL_FROM, GIT_PATCH_0, RCVD_IN_DNSWL_NONE, SPF_HELO_NONE, SPF_PASS, TXREP autolearn=ham autolearn_force=no version=3.4.2 X-Spam-Checker-Version: SpamAssassin 3.4.2 (2018-09-13) on server2.sourceware.org X-BeenThere: libc-alpha@sourceware.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: Libc-alpha mailing list List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-Patchwork-Original-From: Alejandro Colomar via Libc-alpha From: Alejandro Colomar Reply-To: Alejandro Colomar Cc: Alejandro Colomar , linux-man@vger.kernel.org, libc-alpha@sourceware.org Errors-To: libc-alpha-bounces@sourceware.org Sender: "Libc-alpha" Both POSIX and glibc use 'restrict' in swab(). Let's use it here too. .../glibc$ grep_glibc_prototype swab posix/unistd.h:1147: extern void swab (const void *__restrict __from, void *__restrict __to, ssize_t __n) __THROW __nonnull ((1, 2)) __attr_access ((__read_only__, 1, 3)) __attr_access ((__write_only__, 2, 3)); .../glibc$ Signed-off-by: Alejandro Colomar --- man3/swab.3 | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/man3/swab.3 b/man3/swab.3 index b68d698d7..700d2d5f4 100644 --- a/man3/swab.3 +++ b/man3/swab.3 @@ -36,7 +36,8 @@ swab \- swap adjacent bytes .BR "#define _XOPEN_SOURCE" " /* See feature_test_macros(7) */" .B #include .PP -.BI "void swab(const void *" from ", void *" to ", ssize_t " n ); +.BI "void swab(const void *restrict " from ", void *restrict " to \ +", ssize_t " n ); .fi .SH DESCRIPTION The