From patchwork Fri Mar 5 23:50: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: 1448296 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=g4yx6riF; 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 4Dskz15RFkz9sVt for ; Sat, 6 Mar 2021 10:51:25 +1100 (AEDT) Received: from server2.sourceware.org (localhost [IPv6:::1]) by sourceware.org (Postfix) with ESMTP id 5706D383E826; Fri, 5 Mar 2021 23:51:19 +0000 (GMT) DKIM-Filter: OpenDKIM Filter v2.11.0 sourceware.org 5706D383E826 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=sourceware.org; s=default; t=1614988279; bh=mSn3yoW/12Ru/TyYcPhA2gU0BhlZA9Vvk34Eo3ralpo=; 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=g4yx6riFCMiu22yieVUqJtIgP6k+RF0iTZbQzXg1nmbtU8LKHTW9EdKn6zRXsv9Mh 860rlaHawviWKUz4RRxpuR02WdxFoA4cXz7l1ZcawBIWU7JRKjFwKG8nw08emjVddL KEA2glyt9wORW2DovULxNJgLS5cQOiqytvpA0Bhc= 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 924F33854838 for ; Fri, 5 Mar 2021 23:51:16 +0000 (GMT) DMARC-Filter: OpenDMARC Filter v1.3.2 sourceware.org 924F33854838 Received: by mail-wr1-x433.google.com with SMTP id b18so3922439wrn.6 for ; Fri, 05 Mar 2021 15:51: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=mSn3yoW/12Ru/TyYcPhA2gU0BhlZA9Vvk34Eo3ralpo=; b=UpM8STrnTZmRqwzU0qAYxuknU6SGqnhkyD3yNy3+2Wm5ukf1j6gtrKo2S7BJdNwqmc bMtz2MqJ8jbcOXm5eJPD4TrZSiFEfZf9ZaOFBAbREf9OHh36R61R96UIhp0t1/LEMUD9 S1KA9cPZC2m0zLVPrrhJBwaJJae1fDBxsEsd1eZVTlbc4JzZ3zH/AM7pyi1G0qYdnkZ4 rhpGv9vWo28OrjTzyJq6Pf0bqtpm0kGN8Oz7skmnsCNdQJMDJoPEMEpsqgALW1RoW1GT +hYwktyayhV2IarSAo/mQ5bigW8zkAKh/nJJrtWyFP3OiFIGAfB+iKA9Mr9GO3FQ9JQ1 nNSg== X-Gm-Message-State: AOAM530f3XR6oFUVcRbw7sy4UnP1sPuAyafjYZURg7nlmPXsmEH9Sins 1EExKapiZstffRQqRxVOtEc= X-Google-Smtp-Source: ABdhPJxz8dmAiGiXgh5BHG+FQX5lcOw5izdwL1BoaTyvNmc+ToArcYmn6P0Mq4mr30VFuK9tmwsQ+w== X-Received: by 2002:adf:e5c4:: with SMTP id a4mr11617321wrn.174.1614988275785; Fri, 05 Mar 2021 15:51:15 -0800 (PST) Received: from localhost.localdomain ([170.253.51.130]) by smtp.googlemail.com with ESMTPSA id f7sm7219835wrm.36.2021.03.05.15.51.15 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Fri, 05 Mar 2021 15:51:15 -0800 (PST) To: mtk.manpages@gmail.com Subject: [PATCH 01/22] getservent_r.3: SYNOPSIS: Use 'restrict' in prototypes Date: Sat, 6 Mar 2021 00:50:45 +0100 Message-Id: <20210305235105.177359-2-alx.manpages@gmail.com> X-Mailer: git-send-email 2.30.1.721.g45526154a5 In-Reply-To: <20210305235105.177359-1-alx.manpages@gmail.com> References: <20210305235105.177359-1-alx.manpages@gmail.com> MIME-Version: 1.0 X-Spam-Status: No, score=-12.2 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 getservent_r(), getservbyname_r(), getservbyport_r(). Let's use it here too. .../glibc$ grep_glibc_prototype getservent_r resolv/netdb.h:306: extern int getservent_r (struct servent *__restrict __result_buf, char *__restrict __buf, size_t __buflen, struct servent **__restrict __result); .../glibc$ grep_glibc_prototype getservbyname_r resolv/netdb.h:310: extern int getservbyname_r (const char *__restrict __name, const char *__restrict __proto, struct servent *__restrict __result_buf, char *__restrict __buf, size_t __buflen, struct servent **__restrict __result); .../glibc$ grep_glibc_prototype getservbyport_r resolv/netdb.h:316: extern int getservbyport_r (int __port, const char *__restrict __proto, struct servent *__restrict __result_buf, char *__restrict __buf, size_t __buflen, struct servent **__restrict __result); .../glibc$ Signed-off-by: Alejandro Colomar --- man3/getservent_r.3 | 21 +++++++++++++-------- 1 file changed, 13 insertions(+), 8 deletions(-) diff --git a/man3/getservent_r.3 b/man3/getservent_r.3 index ad7fd22e4..c73a93afc 100644 --- a/man3/getservent_r.3 +++ b/man3/getservent_r.3 @@ -31,14 +31,19 @@ service entry (reentrant) .nf .B #include .PP -.BI "int getservent_r(struct servent *" result_buf ", char *" buf , -.BI " size_t " buflen ", struct servent **" result ); -.BI "int getservbyname_r(const char *" name ", const char *" proto , -.BI " struct servent *" result_buf ", char *" buf , -.BI " size_t " buflen ", struct servent **" result ); -.BI "int getservbyport_r(int " port ", const char *" proto , -.BI " struct servent *" result_buf ", char *" buf , -.BI " size_t " buflen ", struct servent **" result ); +.BI "int getservent_r(struct servent *restrict " result_buf , +.BI " char *restrict " buf ", size_t " buflen , +.BI " struct servent **restrict " result ); +.BI "int getservbyname_r(const char *restrict " name , +.BI " const char *restrict " proto , +.BI " struct servent *restrict " result_buf , +.BI " char *restrict " buf ", size_t " buflen , +.BI " struct servent **restrict " result ); +.BI "int getservbyport_r(int " port , +.BI " const char *restrict " proto , +.BI " struct servent *restrict " result_buf , +.BI " char *restrict " buf ", size_t " buflen , +.BI " struct servent **restrict " result ); .PP .fi .RS -4 From patchwork Fri Mar 5 23:50: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: 1448297 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=R0lmMkBj; 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 4Dskz672gwz9sVt for ; Sat, 6 Mar 2021 10:51:30 +1100 (AEDT) Received: from server2.sourceware.org (localhost [IPv6:::1]) by sourceware.org (Postfix) with ESMTP id E28AC386F40C; Fri, 5 Mar 2021 23:51:19 +0000 (GMT) DKIM-Filter: OpenDKIM Filter v2.11.0 sourceware.org E28AC386F40C DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=sourceware.org; s=default; t=1614988279; bh=MXjq2DN+YJn4kUCwgg0gYtbwvNKne04W2dMax4QblGk=; 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=R0lmMkBjWajYqoPN9sS6U6b6ierUuu0OyhdND3dwtxUwfE+KpnYtfeCuzDXRAOPVs H2OhhRmBJo5lq2/MBq54TRfxudpe151+F0hyM1ZPTKCkiPorDIOhEr/z4SBfdHWGDi Od1S3OSGEz3a+9kWRZJUb5kvGePQRE57OOB6w69I= X-Original-To: libc-alpha@sourceware.org Delivered-To: libc-alpha@sourceware.org Received: from mail-wr1-x430.google.com (mail-wr1-x430.google.com [IPv6:2a00:1450:4864:20::430]) by sourceware.org (Postfix) with ESMTPS id 8A73C3857C40 for ; Fri, 5 Mar 2021 23:51:17 +0000 (GMT) DMARC-Filter: OpenDMARC Filter v1.3.2 sourceware.org 8A73C3857C40 Received: by mail-wr1-x430.google.com with SMTP id l11so517087wrp.7 for ; Fri, 05 Mar 2021 15:51: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=MXjq2DN+YJn4kUCwgg0gYtbwvNKne04W2dMax4QblGk=; b=lk4LugBDo0HlB1X5rm7O13hR6zfTrznaRKZjOelG5oGOqBdQbBEjhy9+uVCESimFwU jJ6Hol7+74GKf8czlvtI1yq3u9skhBcQqHGKZH9kMtM+6UME/g/PAbqiS2+gYCvQcdrH u887yzM6Q9+ZsTM6srFzVDon60CgsE34RXRf4zkc58ohMBkEui84JKXW9PfsytwfjWHr tDvQqS/EBZbJm1DE41YCgzrVoedUkZxEG5ojIFVu6H6AnyH0vk5TZB+2H/vSpcJdNBmL LrJiuNNJ7ub870Qp4pr99Z9TvLWhR8wgQENLQz1JtYMqk63vsf10w14K7cfDZeeO6E8/ zNmg== X-Gm-Message-State: AOAM530FZ45Rgkzj9xdo8fYlv9hL5tmJZ5RC54Op60j6LCqdy5r2HmQx KO3VClYMTfdesvt55eEgxC35+6+J9LLBWA== X-Google-Smtp-Source: ABdhPJyt6sb/bWb/cwpPA6Y/SAoKVpA0vl4Fk06Z/SZkws8GXuuDyd2w6ctGnZn+oyNWqy83Cffm+Q== X-Received: by 2002:adf:f584:: with SMTP id f4mr11834386wro.311.1614988276573; Fri, 05 Mar 2021 15:51:16 -0800 (PST) Received: from localhost.localdomain ([170.253.51.130]) by smtp.googlemail.com with ESMTPSA id f7sm7219835wrm.36.2021.03.05.15.51.15 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Fri, 05 Mar 2021 15:51:16 -0800 (PST) To: mtk.manpages@gmail.com Subject: [PATCH 02/22] getsubopt.3: SYNOPSIS: Use 'restrict' in prototypes Date: Sat, 6 Mar 2021 00:50:46 +0100 Message-Id: <20210305235105.177359-3-alx.manpages@gmail.com> X-Mailer: git-send-email 2.30.1.721.g45526154a5 In-Reply-To: <20210305235105.177359-1-alx.manpages@gmail.com> References: <20210305235105.177359-1-alx.manpages@gmail.com> MIME-Version: 1.0 X-Spam-Status: No, score=-12.2 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" POSIX does NOT specify getsubopt() to use 'restrict'. However, glibc uses 'restrict'. Users might be surprised by this! Let's use it here too! .../glibc$ grep_glibc_prototype getsubopt stdlib/stdlib.h:958: extern int getsubopt (char **__restrict __optionp, char *const *__restrict __tokens, char **__restrict __valuep) __THROW __nonnull ((1, 2, 3)) __wur; .../glibc$ Cc: glibc Cc: Ulrich Drepper Signed-off-by: Alejandro Colomar --- man3/getsubopt.3 | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/man3/getsubopt.3 b/man3/getsubopt.3 index ed6a24ed6..9bceed075 100644 --- a/man3/getsubopt.3 +++ b/man3/getsubopt.3 @@ -29,8 +29,8 @@ getsubopt \- parse suboption arguments from a string .nf .B #include .PP -.BI "int getsubopt(char **"optionp ", char * const *" tokens \ -", char **" valuep ); +.BI "int getsubopt(char **restrict " optionp ", char *const *restrict " tokens , +.BI " char **restrict " valuep ); .fi .PP .RS -4 From patchwork Fri Mar 5 23:50: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: 1448298 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=LVOMRRu/; 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 4DskzC3MDHz9sVt for ; Sat, 6 Mar 2021 10:51:35 +1100 (AEDT) Received: from server2.sourceware.org (localhost [IPv6:::1]) by sourceware.org (Postfix) with ESMTP id 7FD77382D425; Fri, 5 Mar 2021 23:51:21 +0000 (GMT) DKIM-Filter: OpenDKIM Filter v2.11.0 sourceware.org 7FD77382D425 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=sourceware.org; s=default; t=1614988281; bh=6PT7vriHQS0EVj3o09yovnwOZKM/iDM6QcQOYGGTtO8=; 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=LVOMRRu/BJu1rheEB4xuW8J5dGKNpke5Izr4Zw2WNETds+0Do/6Z6kMWeBzsej5DM Pnms82qIkarGygpx6OXnj+8YKrLZOmUHS9SjRH0noCLkrxV43bPFNmblYOsUGLFJw5 5DeTwjXYI32q52SyycYa4KImjhnY3YyBsyZysBAE= X-Original-To: libc-alpha@sourceware.org Delivered-To: libc-alpha@sourceware.org Received: from mail-wm1-x32d.google.com (mail-wm1-x32d.google.com [IPv6:2a00:1450:4864:20::32d]) by sourceware.org (Postfix) with ESMTPS id 172A13854838 for ; Fri, 5 Mar 2021 23:51:18 +0000 (GMT) DMARC-Filter: OpenDMARC Filter v1.3.2 sourceware.org 172A13854838 Received: by mail-wm1-x32d.google.com with SMTP id a25-20020a1cf0190000b029010b1cbe2dd0so242823wmb.2 for ; Fri, 05 Mar 2021 15:51: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=6PT7vriHQS0EVj3o09yovnwOZKM/iDM6QcQOYGGTtO8=; b=pGI0I+pYg6EJSbakKVjftHFjrd57zrFaeMRHaWwkUglaUr1dRElq/pql4soIGOQopX nFt1oCTsSS4lhgSK5zpUYH1uOHUIuUmfUMCJXKTLRkjjYPYMRg8B9KQZDwls5lUQVXyv X+tDY6gO3+zP/CrVUjhpvNgml1GZnTBiCyny67uyiz8/zyhNgDcbL500czxJ43m7KiPt JIiQqEf4S7827lgKZ8NLmIfvuE9gGLUpMBDv2CRK3QEeDc36Kyo6lIJ0gDx2dNw3u/hP tPIatu18aTjT9dPMQUOTV7Q29vVDdaY/bWTmmEpR4XVg3nBiZatTiRkjaWJX4l/0hd4R wS1w== X-Gm-Message-State: AOAM533KRzLM8BcJmkmka/V0ij67dj0QKUpXeREZP4KaZnJhll1ZZiwx tOKKmBSDldXvUUt2Hn3fqUg= X-Google-Smtp-Source: ABdhPJzss1PpGIXfC5S4X6pWomqvTHZfDHFWxze2AvicD8oxB/gs3y0sFMGDcWDgbiL2oRSx6h7qEg== X-Received: by 2002:a1c:5f54:: with SMTP id t81mr6229334wmb.84.1614988277295; Fri, 05 Mar 2021 15:51:17 -0800 (PST) Received: from localhost.localdomain ([170.253.51.130]) by smtp.googlemail.com with ESMTPSA id f7sm7219835wrm.36.2021.03.05.15.51.16 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Fri, 05 Mar 2021 15:51:17 -0800 (PST) To: mtk.manpages@gmail.com Subject: [PATCH 03/22] glob.3: SYNOPSIS: Use 'restrict' in prototypes Date: Sat, 6 Mar 2021 00:50:47 +0100 Message-Id: <20210305235105.177359-4-alx.manpages@gmail.com> X-Mailer: git-send-email 2.30.1.721.g45526154a5 In-Reply-To: <20210305235105.177359-1-alx.manpages@gmail.com> References: <20210305235105.177359-1-alx.manpages@gmail.com> MIME-Version: 1.0 X-Spam-Status: No, score=-12.2 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 glob(). Let's use it here too. .../glibc$ grep_glibc_prototype glob posix/glob.h:146: extern int glob (const char *__restrict __pattern, int __flags, int (*__errfunc) (const char *, int), glob_t *__restrict __pglob) __THROW; .../glibc$ Signed-off-by: Alejandro Colomar --- man3/glob.3 | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/man3/glob.3 b/man3/glob.3 index 94e668e0d..be41fec13 100644 --- a/man3/glob.3 +++ b/man3/glob.3 @@ -38,9 +38,9 @@ glob, globfree \- find pathnames matching a pattern, free memory from glob() .nf .B #include .PP -.BI "int glob(const char *" pattern ", int " flags , +.BI "int glob(const char *restrict " pattern ", int " flags , .BI " int (*" errfunc ")(const char *" epath ", int " eerrno ), -.BI " glob_t *" pglob ); +.BI " glob_t *restrict " pglob ); .BI "void globfree(glob_t *" pglob ); .fi .SH DESCRIPTION From patchwork Fri Mar 5 23:50: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: 1448299 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=cavMEYPV; 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 4DskzH6Q6Jz9sVt for ; Sat, 6 Mar 2021 10:51:39 +1100 (AEDT) Received: from server2.sourceware.org (localhost [IPv6:::1]) by sourceware.org (Postfix) with ESMTP id 0D58C382D430; Fri, 5 Mar 2021 23:51:22 +0000 (GMT) DKIM-Filter: OpenDKIM Filter v2.11.0 sourceware.org 0D58C382D430 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=sourceware.org; s=default; t=1614988282; bh=3AQVq/y+UeopTnJwiIr1fpypm37BnmpdpcVMmUMU+PA=; 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=cavMEYPVA+QW0FZC6LpgraS5iYFNvzDKG3GEh6MhK9xh2fyO/NkIalqJWo3cEeooG oKd0zkMd60MJnhc0y4uyMXE2Wbo59sed5ZwRL+lmxDByrt9HPOkQ543UALMhXV6ivM oCC+Ti++RngezAZKh/an8hmM8l4VCNYabQ3x3x0o= 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 D2202386EC2F for ; Fri, 5 Mar 2021 23:51:18 +0000 (GMT) DMARC-Filter: OpenDMARC Filter v1.3.2 sourceware.org D2202386EC2F Received: by mail-wr1-x42e.google.com with SMTP id v15so3921989wrx.4 for ; Fri, 05 Mar 2021 15:51: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=3AQVq/y+UeopTnJwiIr1fpypm37BnmpdpcVMmUMU+PA=; b=OLS5Yp9nvXAFu6HY13bIHycKoROSd3ExetE7oQIUhzkQpOtAhZ6eSZ5nx9yJZh0cIJ cDnVxUzQbelUCa/HPn0ySWgdz9S1NN/A2sM6Ou9FuuYcqeshg6WYicQDRLJVTlXVYYcn o5NZk2cUNCR/621h/+8otbFlwpltmPKnuNZbAPGg51kQnB1dGjTRWFkdzV72gtRY3TfQ lV5R8q7mOgiT6boNUZNag/L0DTi+Zun4FQ/lXs8afXjJHaxSpb3Fb+kFlookiLkVdK1y 7pUgSHtaBg2kZ62JejlN7WtER7Ldm5i/SBKKIlaGeu/b6GD1zZ+JK7J49cMHwn4ynoEL LopA== X-Gm-Message-State: AOAM530jF+skuA3Sx2yIfRPwk5D/qYtiBEpHGqwPujXdid2O8UHvTyuj Yi4VL+6/EYslgYyVlq2+AVE= X-Google-Smtp-Source: ABdhPJymbzmqFRtUY9Gj9fiNNXRGOOdCG2cxjABpCzN3H+CHkmQTTuR5DrNitJn3XQksn1pV+FtYoA== X-Received: by 2002:adf:f186:: with SMTP id h6mr11743322wro.290.1614988278088; Fri, 05 Mar 2021 15:51:18 -0800 (PST) Received: from localhost.localdomain ([170.253.51.130]) by smtp.googlemail.com with ESMTPSA id f7sm7219835wrm.36.2021.03.05.15.51.17 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Fri, 05 Mar 2021 15:51:17 -0800 (PST) To: mtk.manpages@gmail.com Subject: [PATCH 04/22] iconv.3: SYNOPSIS: Use 'restrict' in prototypes Date: Sat, 6 Mar 2021 00:50:48 +0100 Message-Id: <20210305235105.177359-5-alx.manpages@gmail.com> X-Mailer: git-send-email 2.30.1.721.g45526154a5 In-Reply-To: <20210305235105.177359-1-alx.manpages@gmail.com> References: <20210305235105.177359-1-alx.manpages@gmail.com> MIME-Version: 1.0 X-Spam-Status: No, score=-12.2 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 iconv(). Let's use it here too. .../glibc$ grep_glibc_prototype iconv iconv/iconv.h:42: extern size_t iconv (iconv_t __cd, char **__restrict __inbuf, size_t *__restrict __inbytesleft, char **__restrict __outbuf, size_t *__restrict __outbytesleft); .../glibc$ Signed-off-by: Alejandro Colomar --- man3/iconv.3 | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/man3/iconv.3 b/man3/iconv.3 index c3c243e3a..b40eca387 100644 --- a/man3/iconv.3 +++ b/man3/iconv.3 @@ -23,8 +23,8 @@ iconv \- perform character set conversion .B #include .PP .BI "size_t iconv(iconv_t " cd , -.BI " char **" inbuf ", size_t *" inbytesleft , -.BI " char **" outbuf ", size_t *" outbytesleft ); +.BI " char **restrict " inbuf ", size_t *restrict " inbytesleft , +.BI " char **restrict " outbuf ", size_t *restrict " outbytesleft ); .fi .SH DESCRIPTION The From patchwork Fri Mar 5 23:50: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: 1448300 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=scifPnXk; 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 4DskzN0QvWz9sVt for ; Sat, 6 Mar 2021 10:51:44 +1100 (AEDT) Received: from server2.sourceware.org (localhost [IPv6:::1]) by sourceware.org (Postfix) with ESMTP id 96D72388A418; Fri, 5 Mar 2021 23:51:22 +0000 (GMT) DKIM-Filter: OpenDKIM Filter v2.11.0 sourceware.org 96D72388A418 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=sourceware.org; s=default; t=1614988282; bh=Na9fqCLj6gqYVuSm/deOAFHJh297IfvHV4/YM4XoJ8w=; 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=scifPnXk1ED7RScK6MTUgw7uYr3BVoU5oqP6HrrrPduah4scfe3QELhKFw0YwKk7w n+87EDxZC7x+S6hzZPbl9h/JnRliEjfA5Yt7cIrJmw9A8vr3uonCbM/6WHBGR4HiX9 Z6nIZZsOtiogu81AZ5+a9HD195DbcKDkIB+ba2tw= X-Original-To: libc-alpha@sourceware.org Delivered-To: libc-alpha@sourceware.org Received: from mail-wm1-x333.google.com (mail-wm1-x333.google.com [IPv6:2a00:1450:4864:20::333]) by sourceware.org (Postfix) with ESMTPS id 927D43835416 for ; Fri, 5 Mar 2021 23:51:19 +0000 (GMT) DMARC-Filter: OpenDMARC Filter v1.3.2 sourceware.org 927D43835416 Received: by mail-wm1-x333.google.com with SMTP id m20-20020a7bcb940000b029010cab7e5a9fso254781wmi.3 for ; Fri, 05 Mar 2021 15:51: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=Na9fqCLj6gqYVuSm/deOAFHJh297IfvHV4/YM4XoJ8w=; b=nebAJe9SMU39uFnhWtxYXzLWMzjJRXe3e3uYpLWVFWRe4W7qn9sPiN0QJ+QxoiwGD8 bHKAGnIWlc7lBwaT7lI3/x+apSH7mESCCZHw/tjVKpZWmnTy6SRIptjDe58JhC47TLjz K9bOuVKGr4hMOZAw7VMy+4rlOy0g/G9Jb+2EDogTA0/3SW/bRiOxAGRQ0+Zq2E1uYXL1 2BskKg0qR3HbWV0rYF9ErzA54IWdVRbfChyFgJE1mmumMC7wBcYS7aXwgYL4mSeTtPLR P+ltrIiY9Z35slz20NRoTpywcH4FZl7ULv8uO8OTOu3T0E+f1F8k7L0dkyzfWuhRbisg sQFw== X-Gm-Message-State: AOAM5324kYBb5ITCONcwS6HW2lz4i2HZIW7omXJr4eny++AiiKIjZKTM qirtyA41lObStsTki1aun90= X-Google-Smtp-Source: ABdhPJzn6YyGboP1afcDpBEPr6PKI7gqMaHyNj5whOWlYKabAUUurzthRN3grhp/QM1zNLbzmKHzAA== X-Received: by 2002:a05:600c:2145:: with SMTP id v5mr11242616wml.65.1614988278792; Fri, 05 Mar 2021 15:51:18 -0800 (PST) Received: from localhost.localdomain ([170.253.51.130]) by smtp.googlemail.com with ESMTPSA id f7sm7219835wrm.36.2021.03.05.15.51.18 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Fri, 05 Mar 2021 15:51:18 -0800 (PST) To: mtk.manpages@gmail.com Subject: [PATCH 05/22] inet_ntop.3: SYNOPSIS: Use 'restrict' in prototypes Date: Sat, 6 Mar 2021 00:50:49 +0100 Message-Id: <20210305235105.177359-6-alx.manpages@gmail.com> X-Mailer: git-send-email 2.30.1.721.g45526154a5 In-Reply-To: <20210305235105.177359-1-alx.manpages@gmail.com> References: <20210305235105.177359-1-alx.manpages@gmail.com> MIME-Version: 1.0 X-Spam-Status: No, score=-12.2 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 inet_ntop(). Let's use it here too. .../glibc$ grep_glibc_prototype inet_ntop inet/arpa/inet.h:64: extern const char *inet_ntop (int __af, const void *__restrict __cp, char *__restrict __buf, socklen_t __len) __THROW; .../glibc$ Signed-off-by: Alejandro Colomar --- man3/inet_ntop.3 | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/man3/inet_ntop.3 b/man3/inet_ntop.3 index 9abb9556d..fc15ba859 100644 --- a/man3/inet_ntop.3 +++ b/man3/inet_ntop.3 @@ -30,8 +30,8 @@ inet_ntop \- convert IPv4 and IPv6 addresses from binary to text form .nf .B #include .PP -.BI "const char *inet_ntop(int " "af" ", const void *" "src" , -.BI " char *" "dst" ", socklen_t " "size" ); +.BI "const char *inet_ntop(int " af ", const void *restrict " src , +.BI " char *restrict " dst ", socklen_t " size ); .fi .SH DESCRIPTION This function converts the network address structure From patchwork Fri Mar 5 23:50: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: 1448301 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=OVar9Zwg; 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 4DskzS00mtz9sVt for ; Sat, 6 Mar 2021 10:51:47 +1100 (AEDT) Received: from server2.sourceware.org (localhost [IPv6:::1]) by sourceware.org (Postfix) with ESMTP id 2C051382D43C; Fri, 5 Mar 2021 23:51:24 +0000 (GMT) DKIM-Filter: OpenDKIM Filter v2.11.0 sourceware.org 2C051382D43C DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=sourceware.org; s=default; t=1614988284; bh=xUyRNl6Q2Rj6Vo2rrRfIywC7BhDfUeXrnktUg4SMgcY=; 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=OVar9ZwgfTZJfVCl76R8qNYbV33/Ngxt/YirrI2xSislG0FzN2nusn9cPumORyscF luiuANuuXG4nKqKsklQ3KFGOxfx23+bF2sARmVvoy7bWzpNooMgZv5kZJ8pj3BcLVy V4FTJ1gpsqfp8cBgXH8OxaeLV4Ms6kBOve8HZLZI= 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 69BFF3834428 for ; Fri, 5 Mar 2021 23:51:20 +0000 (GMT) DMARC-Filter: OpenDMARC Filter v1.3.2 sourceware.org 69BFF3834428 Received: by mail-wm1-x336.google.com with SMTP id f22-20020a7bc8d60000b029010c024a1407so254175wml.2 for ; Fri, 05 Mar 2021 15:51: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=xUyRNl6Q2Rj6Vo2rrRfIywC7BhDfUeXrnktUg4SMgcY=; b=BwLsUq4Bnc7iUs/0VLGaFGSohbMp5dT1SIUsBBQsGi50Y/3+iSHonYxgVz19L9hot1 F8MbRIEfxNkHgWv+0em0K+fPRxCaq7t+7vsUeLPbNXyBNL8+PuFF1snumwJ50h4dx8Zi Wf4nrT/dJH48o/Qt31n0hz8Ot3uPVyy02mvrZXbbF5ivunVGpH/2cNhMYXQSOppUE/mF XEXv2XvCHnfuAyu4HnzOYTiNNDVH5ytIjGRJfSkiXnOJsTQz+L17E41k0D6Z091p9UEp 7GwZLHoYixP+Av+z970MsaK984epLjleP2MAPT0AfFlbepTwEq2Dzhm3Iuct+WFUfy3b KEwQ== X-Gm-Message-State: AOAM532YJhV6pR2+V2vBEIhEMZ6tNUbV3D18S/XJKfz/JDVMuYmkFC+y kOhH6D+6fzQlbZ32sNxpQWUhhFfHF62pXw== X-Google-Smtp-Source: ABdhPJzrp0AY5rNtq0mQtC5ofLN7z8IJU5OldNn48jNefd4onRkUKXQWXtaNqkDV68ls2NF23WqdGw== X-Received: by 2002:a05:600c:2cd8:: with SMTP id l24mr4920015wmc.88.1614988279590; Fri, 05 Mar 2021 15:51:19 -0800 (PST) Received: from localhost.localdomain ([170.253.51.130]) by smtp.googlemail.com with ESMTPSA id f7sm7219835wrm.36.2021.03.05.15.51.18 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Fri, 05 Mar 2021 15:51:19 -0800 (PST) To: mtk.manpages@gmail.com Subject: [PATCH 06/22] inet_pton.3: SYNOPSIS: Use 'restrict' in prototypes Date: Sat, 6 Mar 2021 00:50:50 +0100 Message-Id: <20210305235105.177359-7-alx.manpages@gmail.com> X-Mailer: git-send-email 2.30.1.721.g45526154a5 In-Reply-To: <20210305235105.177359-1-alx.manpages@gmail.com> References: <20210305235105.177359-1-alx.manpages@gmail.com> MIME-Version: 1.0 X-Spam-Status: No, score=-12.2 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 inet_pton(). Let's use it here too. .../glibc$ grep_glibc_prototype inet_pton inet/arpa/inet.h:58: extern int inet_pton (int __af, const char *__restrict __cp, void *__restrict __buf) __THROW; .../glibc$ Signed-off-by: Alejandro Colomar --- man3/inet_pton.3 | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/man3/inet_pton.3 b/man3/inet_pton.3 index 304aafb1e..f367fc6d2 100644 --- a/man3/inet_pton.3 +++ b/man3/inet_pton.3 @@ -31,7 +31,8 @@ inet_pton \- convert IPv4 and IPv6 addresses from text to binary form .nf .B #include .PP -.BI "int inet_pton(int " "af" ", const char *" "src" ", void *" "dst" ); +.BI "int inet_pton(int " af ", const char *restrict " src \ +", void *restrict " dst ); .fi .SH DESCRIPTION This function converts the character string From patchwork Fri Mar 5 23:50:51 2021 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Alejandro Colomar X-Patchwork-Id: 1448302 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=h49OPHNO; 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 4DskzW67ggz9sVt for ; Sat, 6 Mar 2021 10:51:51 +1100 (AEDT) Received: from server2.sourceware.org (localhost [IPv6:::1]) by sourceware.org (Postfix) with ESMTP id B6B8D383440E; Fri, 5 Mar 2021 23:51:24 +0000 (GMT) DKIM-Filter: OpenDKIM Filter v2.11.0 sourceware.org B6B8D383440E DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=sourceware.org; s=default; t=1614988284; bh=rwMbXBcdVIzlI2PqTJEt8bjtXUamR+0zXscAcBktAA0=; 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=h49OPHNOSTYM4jcdWctgIZL9mSyEdbKG38uZ+eqIFDN8zrI9X7dPjI9eRxLpeAh1c /c3/PKMZ1XzGWuMPnom8jE5hA6nQVBw9zLubFENsO3cg7IpDKbHdR5CyHew5JHdWQ6 zJTE91336Efm6oBB2fk/wHigG1rIXjeGWtnXiiyA= X-Original-To: libc-alpha@sourceware.org Delivered-To: libc-alpha@sourceware.org Received: from mail-wm1-x32d.google.com (mail-wm1-x32d.google.com [IPv6:2a00:1450:4864:20::32d]) by sourceware.org (Postfix) with ESMTPS id 70DB5382D414 for ; Fri, 5 Mar 2021 23:51:21 +0000 (GMT) DMARC-Filter: OpenDMARC Filter v1.3.2 sourceware.org 70DB5382D414 Received: by mail-wm1-x32d.google.com with SMTP id b2-20020a7bc2420000b029010be1081172so241684wmj.1 for ; Fri, 05 Mar 2021 15:51: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=rwMbXBcdVIzlI2PqTJEt8bjtXUamR+0zXscAcBktAA0=; b=MjYWNYJuldUBH5xgF5jud0XRkY4Sx02GeFp+d8ntPzanOwGs2YDmoXRQGLx7fZea4i yIbP2Ymeh/qzhn3OzqWShKdzEp1/JQE8xNNTax32vXa1zNsZD+/XFByR4YuTCNig5ZWH WDSmykFfn5Ll107GM70PfGKI2Ztg16M3GlWpYZ5kppylaulcyEYD9wCFQj9UMaotPJzI asirYDeVXCWecnxaz1j8VPcc7v6vDIkJZJpQ+wm222rpp0V5zqViNqFRaENNIOtRylY4 0cixyNritHoKCixAEqK8gDc1dsYBTUcNyeJlh+JeziJ7Qt4DpWgbjK9Z9oKv+a4/zh4N Bffw== X-Gm-Message-State: AOAM531tiTJVUMzs019TrWyZ/7C4rNFAfQyTcjE7yXPrvfgOXFwhFLXh SRapHP9dtlpHD6hGwZl0X7M= X-Google-Smtp-Source: ABdhPJyDKy9QfeH6FGedI+rRhpp7V6mbwZNCH5laXNiDsSxnMR/UHCoGNzNpdq5oICHMbI6OeA1xgg== X-Received: by 2002:a7b:cf16:: with SMTP id l22mr10838884wmg.26.1614988280677; Fri, 05 Mar 2021 15:51:20 -0800 (PST) Received: from localhost.localdomain ([170.253.51.130]) by smtp.googlemail.com with ESMTPSA id f7sm7219835wrm.36.2021.03.05.15.51.19 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Fri, 05 Mar 2021 15:51:20 -0800 (PST) To: mtk.manpages@gmail.com Subject: [PATCH 07/22] lio_listio.3: SYNOPSIS: Use 'restrict' in prototypes Date: Sat, 6 Mar 2021 00:50:51 +0100 Message-Id: <20210305235105.177359-8-alx.manpages@gmail.com> X-Mailer: git-send-email 2.30.1.721.g45526154a5 In-Reply-To: <20210305235105.177359-1-alx.manpages@gmail.com> References: <20210305235105.177359-1-alx.manpages@gmail.com> MIME-Version: 1.0 X-Spam-Status: No, score=-12.2 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, Florian Weimer , Szabolcs Nagy , Ulrich Drepper , "Joseph S. Myers" Errors-To: libc-alpha-bounces@sourceware.org Sender: "Libc-alpha" Both POSIX and glibc use 'restrict' in lio_listio(). However, POSIX is a bit more restrictive than glibc for the second parameter. Let's document the more restrictive POSIX variant. $ man 3p lio_listio |sed -n '/^SYNOPSIS/,/;/p' SYNOPSIS #include int lio_listio(int mode, struct aiocb *restrict const list[restrict], int nent, struct sigevent *restrict sig); $ .../glibc$ grep_glibc_prototype lio_listio rt/aio.h:148: extern int lio_listio (int __mode, struct aiocb *const __list[__restrict_arr], int __nent, struct sigevent *__restrict __sig) __THROW __nonnull ((2)); .../glibc$ Cc: Szabolcs Nagy Cc: "Joseph S. Myers" Cc: Ulrich Drepper Cc: Florian Weimer Cc: glibc Bug: glibc Signed-off-by: Alejandro Colomar --- man3/lio_listio.3 | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/man3/lio_listio.3 b/man3/lio_listio.3 index d89670f7c..d40ac89fb 100644 --- a/man3/lio_listio.3 +++ b/man3/lio_listio.3 @@ -28,8 +28,8 @@ lio_listio \- initiate a list of I/O requests .nf .B "#include " .PP -.BI "int lio_listio(int " mode ", struct aiocb *const " aiocb_list [], -.BI " int " nitems ", struct sigevent *" sevp ); +.BI "int lio_listio(int " mode ", struct aiocb *restrict const " aiocb_list [restrict], +.BI " int " nitems ", struct sigevent *restrict " sevp ); .PP Link with \fI\-lrt\fP. .fi From patchwork Fri Mar 5 23:50:52 2021 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Alejandro Colomar X-Patchwork-Id: 1448303 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=pFYiqlTI; 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 4Dskzc6ZTGz9sVt for ; Sat, 6 Mar 2021 10:51:56 +1100 (AEDT) Received: from server2.sourceware.org (localhost [IPv6:::1]) by sourceware.org (Postfix) with ESMTP id C017E388A81E; Fri, 5 Mar 2021 23:51:25 +0000 (GMT) DKIM-Filter: OpenDKIM Filter v2.11.0 sourceware.org C017E388A81E DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=sourceware.org; s=default; t=1614988285; bh=iXfj+ysqq81ozyYtY+Jv42rHAHmCy5CcVEwV8ZEX+XY=; 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=pFYiqlTIUtKoWlBNfk4R4Fun+SFMhWymdLQMJZeLhdG9DS2+M6vn7+OKLVikwIyn0 k3Ssvam2jlFPrMru92UjblA/157AtidKMROK3vhcqvuBFEEg0o/BNK80WLBQhMR8W4 TBSfWpdHxCgdgdU+PGaBWzzDVs3FS9lbs4TiwzEo= 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 48F7C382D43C for ; Fri, 5 Mar 2021 23:51:22 +0000 (GMT) DMARC-Filter: OpenDMARC Filter v1.3.2 sourceware.org 48F7C382D43C Received: by mail-wm1-x335.google.com with SMTP id n11-20020a05600c4f8bb029010e5cf86347so1375581wmq.1 for ; Fri, 05 Mar 2021 15:51: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=iXfj+ysqq81ozyYtY+Jv42rHAHmCy5CcVEwV8ZEX+XY=; b=rYhW7b/ZP/zQPYFWeWnetUie1PfZqkbneZfbaX79g86Xme1n85bGOwCWhSfY2Muyo3 18J1xML4t2emB9bX15SfEDELNmCwc6CNfKfCt6M+nOpqMnniXcPGuX/VTyHblQIRMIgK aNbg3TELG5XlcejYsXjhtCAx11VYR/bP3xEGANcpmglVGvUD+gocySShdMPCMgMfhOyS XeK5Rv7ZV1+dLEs5xdQWps7V8Iy3nJaEAFA3B4lW1FTfeCw4iWCHzi/n4f+3G4eq68vI AABppU3nGkfWSL1nXc84mdxaz/aNZl73yKD6wRrzA6/QhlFtDZJeIcZIoLBPszSecEPI T52w== X-Gm-Message-State: AOAM531EM6G+2woDKIlhE2KVeGSpTdgj+6QIKY6Kopo5ASt5GHqC1jD0 5Xa+cq3CVborsnf9CKKzviI= X-Google-Smtp-Source: ABdhPJzSeeXls5PCc8ijcdMrdAu2P0qo5ICQoo65/4aB6UlhHWujMHLQrVMc/Jrg/rawcJZf1Iu6+w== X-Received: by 2002:a1c:7916:: with SMTP id l22mr10895132wme.86.1614988281474; Fri, 05 Mar 2021 15:51:21 -0800 (PST) Received: from localhost.localdomain ([170.253.51.130]) by smtp.googlemail.com with ESMTPSA id f7sm7219835wrm.36.2021.03.05.15.51.20 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Fri, 05 Mar 2021 15:51:21 -0800 (PST) To: mtk.manpages@gmail.com Subject: [PATCH 08/22] makecontext.3: SYNOPSIS: Use 'restrict' in prototypes Date: Sat, 6 Mar 2021 00:50:52 +0100 Message-Id: <20210305235105.177359-9-alx.manpages@gmail.com> X-Mailer: git-send-email 2.30.1.721.g45526154a5 In-Reply-To: <20210305235105.177359-1-alx.manpages@gmail.com> References: <20210305235105.177359-1-alx.manpages@gmail.com> MIME-Version: 1.0 X-Spam-Status: No, score=-12.2 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.1-2001 and glibc use 'restrict' in swapcontext(). Let's use it here too. .../glibc$ grep_glibc_prototype swapcontext stdlib/ucontext.h:41: extern int swapcontext (ucontext_t *__restrict __oucp, const ucontext_t *__restrict __ucp) __THROWNL __INDIRECT_RETURN; .../glibc$ Signed-off-by: Alejandro Colomar --- man3/makecontext.3 | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/man3/makecontext.3 b/man3/makecontext.3 index 83720dd2c..859181ddb 100644 --- a/man3/makecontext.3 +++ b/man3/makecontext.3 @@ -32,8 +32,10 @@ makecontext, swapcontext \- manipulate user context .nf .B #include .PP -.BI "void makecontext(ucontext_t *" ucp ", void (*" func ")(), int " argc ", ...);" -.BI "int swapcontext(ucontext_t *" oucp ", const ucontext_t *" ucp ); +.BI "void makecontext(ucontext_t *" ucp ", void (*" func ")(), int " argc \ +", ...);" +.BI "int swapcontext(ucontext_t *restrict " oucp , +.BI " const ucontext_t *restrict " ucp ); .fi .SH DESCRIPTION In a System V-like environment, one has the type From patchwork Fri Mar 5 23:50:53 2021 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Alejandro Colomar X-Patchwork-Id: 1448304 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=xn4uXvcE; 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 4Dskzj6xpvz9sVt for ; Sat, 6 Mar 2021 10:52:01 +1100 (AEDT) Received: from server2.sourceware.org (localhost [IPv6:::1]) by sourceware.org (Postfix) with ESMTP id 54E06399C024; Fri, 5 Mar 2021 23:51:27 +0000 (GMT) DKIM-Filter: OpenDKIM Filter v2.11.0 sourceware.org 54E06399C024 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=sourceware.org; s=default; t=1614988287; bh=braMiz+RmjCWbXkO3k2735BiRuyVPf15QOPaEoS+Fho=; 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=xn4uXvcE9Id2glPaA3AguXSMKGqPLjsYoXUd/7P3LURHRHBTUxvARMEJVDjKPxcfR xNFsehc3k/ZSMORjptM7Z4SEeOadKj0oxcay3EUh1ChIKrCrjfqR74DM6CrT5wRwxe A87xhMTGH1X51wpXLuXpyvIuARdZZFq26J0TKGew= X-Original-To: libc-alpha@sourceware.org Delivered-To: libc-alpha@sourceware.org Received: from mail-wm1-x334.google.com (mail-wm1-x334.google.com [IPv6:2a00:1450:4864:20::334]) by sourceware.org (Postfix) with ESMTPS id CC0B7384240B for ; Fri, 5 Mar 2021 23:51:23 +0000 (GMT) DMARC-Filter: OpenDMARC Filter v1.3.2 sourceware.org CC0B7384240B Received: by mail-wm1-x334.google.com with SMTP id i9so2617349wml.0 for ; Fri, 05 Mar 2021 15:51: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=braMiz+RmjCWbXkO3k2735BiRuyVPf15QOPaEoS+Fho=; b=HosM3hWvqcNzUrVTxbWZkdhPbdsb0LGdDruyWsz6gcItnLMByu2iJeJodRJUFRVI+E 9sEvPIi27U0YHBY8t92K2DEhw5RfjKQR5CcFctQvGqa2hA8Ed3VRDjkXOdZF/bfa9sqS UTpu/cQTd5jekkJtMCjm/9jwRtfw/7HNb/O6LSjReDwOu7Vpl10xF16n18bJMA15AmQs MEOaqcEMIbYqvXwnAoxqRp0UAWFfpSNBEDCTt3yuTlYuWmzAvgO0Vv9OgUGbhOd953Oe /QifAK6wQbgBCl5xEUzbMfXjW6QnGvtRaJ6AZer9EQ2xPIBdTIuwwI1IWdPrurybZCJL JzWA== X-Gm-Message-State: AOAM531fMAZF+xuUFrYenVQi0989CROse5EqGatJQt9rT8qbzMWxDXlY 5jOzR+4QHgelO6jambvxw1ZGtT7swc0akQ== X-Google-Smtp-Source: ABdhPJzdr3BunYszFDoiRGIJOZ0gyejPrAy1obzsPz2fvOO2a/xKIKOStDvY2W/L0iajxWUGesrwig== X-Received: by 2002:a05:600c:2204:: with SMTP id z4mr11423399wml.31.1614988282973; Fri, 05 Mar 2021 15:51:22 -0800 (PST) Received: from localhost.localdomain ([170.253.51.130]) by smtp.googlemail.com with ESMTPSA id f7sm7219835wrm.36.2021.03.05.15.51.21 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Fri, 05 Mar 2021 15:51:22 -0800 (PST) To: mtk.manpages@gmail.com Subject: [PATCH 09/22] malloc_hook.3: SYNOPSIS: Use 'volatile' in prototypes Date: Sat, 6 Mar 2021 00:50:53 +0100 Message-Id: <20210305235105.177359-10-alx.manpages@gmail.com> X-Mailer: git-send-email 2.30.1.721.g45526154a5 In-Reply-To: <20210305235105.177359-1-alx.manpages@gmail.com> References: <20210305235105.177359-1-alx.manpages@gmail.com> MIME-Version: 1.0 X-Spam-Status: No, score=-12.2 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 'volatile' in __malloc_hook, __realloc_hook, __memalign_hook, __free_hook, and __after_morecore_hook. Let's use it here too. .../glibc$ find * -type f \ |grep '\.h$' \ |xargs pcregrep -Mn '(?s)\b__malloc_hook\b.*?;'; malloc/malloc.h:168: extern void *(*__MALLOC_HOOK_VOLATILE __malloc_hook)(size_t __size, const void *) __MALLOC_DEPRECATED; .../glibc$ find * -type f \ |grep '\.h$' \ |xargs pcregrep -Mn '(?s)\b__realloc_hook\b.*?;'; malloc/malloc.h:171: extern void *(*__MALLOC_HOOK_VOLATILE __realloc_hook)(void *__ptr, size_t __size, const void *) __MALLOC_DEPRECATED; .../glibc$ find * -type f \ |grep '\.h$' \ |xargs pcregrep -Mn '(?s)\b__memalign_hook\b.*?;'; malloc/malloc.h:175: extern void *(*__MALLOC_HOOK_VOLATILE __memalign_hook)(size_t __alignment, size_t __size, const void *) __MALLOC_DEPRECATED; .../glibc$ find * -type f \ |grep '\.h$' \ |xargs pcregrep -Mn '(?s)\b__free_hook\b.*?;'; malloc/malloc.h:165: extern void (*__MALLOC_HOOK_VOLATILE __free_hook) (void *__ptr, const void *) __MALLOC_DEPRECATED; .../glibc$ find * -type f \ |grep '\.h$' \ |xargs pcregrep -Mn '(?s)\*\w*\s*\b__malloc_initialize_hook\b.*?;'; malloc/malloc-hooks.h:22: void (*__malloc_initialize_hook) (void); .../glibc$ find * -type f \ |grep '\.h$' \ |xargs pcregrep -Mn '(?s)\*\w*\s*\b__after_morecore_hook\b.*?;'; malloc/malloc.h:179: extern void (*__MALLOC_HOOK_VOLATILE __after_morecore_hook) (void) __MALLOC_DEPRECATED; .../glibc$ Signed-off-by: Alejandro Colomar --- man3/malloc_hook.3 | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) diff --git a/man3/malloc_hook.3 b/man3/malloc_hook.3 index 7f1e35043..74c493c83 100644 --- a/man3/malloc_hook.3 +++ b/man3/malloc_hook.3 @@ -16,19 +16,19 @@ __after_morecore_hook \- malloc debugging variables .nf .B "#include " .PP -.BI "void *(*__malloc_hook)(size_t " size ", const void *" caller ); +.BI "void *(*volatile __malloc_hook)(size_t " size ", const void *" caller ); .PP -.BI "void *(*__realloc_hook)(void *" ptr ", size_t " size \ +.BI "void *(*volatile __realloc_hook)(void *" ptr ", size_t " size \ ", const void *" caller ); .PP -.BI "void *(*__memalign_hook)(size_t " alignment ", size_t " size , +.BI "void *(*volatile __memalign_hook)(size_t " alignment ", size_t " size , .BI " const void *" caller ); .PP -.BI "void (*__free_hook)(void *" ptr ", const void *" caller ); +.BI "void (*volatile __free_hook)(void *" ptr ", const void *" caller ); .PP .B "void (*__malloc_initialize_hook)(void);" .PP -.B "void (*__after_morecore_hook)(void);" +.B "void (*volatile __after_morecore_hook)(void);" .fi .SH DESCRIPTION The GNU C library lets you modify the behavior of From patchwork Fri Mar 5 23:50:54 2021 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Alejandro Colomar X-Patchwork-Id: 1448305 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=JdmQom/E; 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 4Dskzn6YQLz9sVt for ; Sat, 6 Mar 2021 10:52:05 +1100 (AEDT) Received: from server2.sourceware.org (localhost [IPv6:::1]) by sourceware.org (Postfix) with ESMTP id DE5EC399C02F; Fri, 5 Mar 2021 23:51:27 +0000 (GMT) DKIM-Filter: OpenDKIM Filter v2.11.0 sourceware.org DE5EC399C02F DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=sourceware.org; s=default; t=1614988287; bh=hHn0u2OT8h7IYFzQCH/l5VZgOTcgitnRZP897M9A4CA=; 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=JdmQom/EN+eKX0OvOK528exucV7nVhnIfGZAEm8OSH8iqqOSaiHe/EBK8SZW4Hsoo yKACVmzIZromkjY7iZabLp+iNDdcwiS7FwaMemiqCp/kzFLNTGwPuju8Lc0H430olB Lfp6YeCW1uUnnSbLUEc/5r4ixq/zn5nNzWEW2ZNY= 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 79D43388A81E for ; Fri, 5 Mar 2021 23:51:24 +0000 (GMT) DMARC-Filter: OpenDMARC Filter v1.3.2 sourceware.org 79D43388A81E Received: by mail-wm1-x336.google.com with SMTP id n22so2667969wmc.2 for ; Fri, 05 Mar 2021 15:51: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=hHn0u2OT8h7IYFzQCH/l5VZgOTcgitnRZP897M9A4CA=; b=VvDNNkCzLF93GLsi6Rg7AFj5rdHYpkkyngcC+I6ZHntYHhhiyHe9o10v3WxYUxxq+8 mLJ4EllwQKiuvrb7vswquoLOoQhxwkdXlJcil1Pph3wgX8ABVU6FtMCioJaMW3KP7aEW 7690JoyNy8wYl0iLYA1a06xPkE4nrCWP/6NEKNOy094TucW0ETyPlsjmkASO7zf9zjIw jI0SZbrkroLIcFr8Kr8fR3RCdC1qpipXGsK71kzuNvcqTrxl8HJNB3TYqwHELYpHqqaB +8Lxs/ZpJb0lbdDRZ6hReKKz5empxXqfE9saxeGgO75ukieUEL3w3i7cZYh2KpBAQeWT nVXQ== X-Gm-Message-State: AOAM531UiX5HKW3MRtQ83FjMJ0iDw/huoo3K5rPcz5LV6fXiVQWZ229D VNudnFlWESvDgfyIriMjjEU= X-Google-Smtp-Source: ABdhPJzZ2GF9IlZDcpvuGN4QJvKb6wiJz3/eDd3eI+3W8l+K/yvdS7ouHsgJYPN892tHYjTFEYhtxQ== X-Received: by 2002:a7b:c119:: with SMTP id w25mr10839051wmi.127.1614988283710; Fri, 05 Mar 2021 15:51:23 -0800 (PST) Received: from localhost.localdomain ([170.253.51.130]) by smtp.googlemail.com with ESMTPSA id f7sm7219835wrm.36.2021.03.05.15.51.23 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Fri, 05 Mar 2021 15:51:23 -0800 (PST) To: mtk.manpages@gmail.com Subject: [PATCH 10/22] mbrlen.3: SYNOPSIS: Use 'restrict' in prototypes Date: Sat, 6 Mar 2021 00:50:54 +0100 Message-Id: <20210305235105.177359-11-alx.manpages@gmail.com> X-Mailer: git-send-email 2.30.1.721.g45526154a5 In-Reply-To: <20210305235105.177359-1-alx.manpages@gmail.com> References: <20210305235105.177359-1-alx.manpages@gmail.com> MIME-Version: 1.0 X-Spam-Status: No, score=-12.2 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 mbrlen(). Let's use it here too. .../glibc$ grep_glibc_prototype mbrlen wcsmbs/wchar.h:307: extern size_t mbrlen (const char *__restrict __s, size_t __n, mbstate_t *__restrict __ps) __THROW; .../glibc$ Signed-off-by: Alejandro Colomar --- man3/mbrlen.3 | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/man3/mbrlen.3 b/man3/mbrlen.3 index 8ef088724..9167eeae5 100644 --- a/man3/mbrlen.3 +++ b/man3/mbrlen.3 @@ -20,7 +20,8 @@ mbrlen \- determine number of bytes in next multibyte character .nf .B #include .PP -.BI "size_t mbrlen(const char *" s ", size_t " n ", mbstate_t *" ps ); +.BI "size_t mbrlen(const char *restrict " s ", size_t " n , +.BI " mbstate_t *restrict " ps ); .fi .SH DESCRIPTION The From patchwork Fri Mar 5 23:50:55 2021 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Alejandro Colomar X-Patchwork-Id: 1448306 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=rjJ3ARoq; 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 4Dskzt31v9z9sVt for ; Sat, 6 Mar 2021 10:52:10 +1100 (AEDT) Received: from server2.sourceware.org (localhost [IPv6:::1]) by sourceware.org (Postfix) with ESMTP id 8B098399C035; Fri, 5 Mar 2021 23:51:28 +0000 (GMT) DKIM-Filter: OpenDKIM Filter v2.11.0 sourceware.org 8B098399C035 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=sourceware.org; s=default; t=1614988288; bh=pEIqZAAZRuOzbuWzODHq3Y3qLFS8eWijrMpzbLrbTDs=; 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=rjJ3ARoqjhxiflaSeVdfC0sS1rWLPBVAzrvVQ4k+tlI9DpOPU/n1+Wu0KMS60q6cW eSW+sSDnQdn9nuIrHczfenfA/R9+UUk1R5iiOG6RImapz3JZ/SmS7CPyOSS59JPHGh Vo/GOz2Ic41I01IsFD/DqLIwWUlYZO79O9s+HIsU= 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 5BC38384240B for ; Fri, 5 Mar 2021 23:51:25 +0000 (GMT) DMARC-Filter: OpenDMARC Filter v1.3.2 sourceware.org 5BC38384240B Received: by mail-wr1-x42e.google.com with SMTP id a18so3881855wrc.13 for ; Fri, 05 Mar 2021 15:51: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=pEIqZAAZRuOzbuWzODHq3Y3qLFS8eWijrMpzbLrbTDs=; b=mW8Wy0ysnOiFdXgcU2S9zLyCLS4olnBRDftKGRuZYw+Lpo46oIbQCNvuKL7Scd+6PV i08oNGYyIrIe64/XlTNgto45Uu5uEBhSPEEVjl5F3hpohx0uf6Iaiu0Dl0Wd6aeNKUyO lqa6nb/QnLjX/B0WJDRqJCTNncd7TGQ5uvOkA6c7Rv7SkM0N1NHMopNjeeOVKN7Rjg7f 5x6j5aCuWTD3jgbkSBdV+19sdZv/R0wiPcBca7mfOnV6O6UQZzGQZIG+L+CsRaelybns ATB+1DGqVJbdWbaUjZPaxrCSJ9/GUVnT/DkJk6pfrNMhQ9ZV7OFlOC3EFyMf/Du1jURU Kqiw== X-Gm-Message-State: AOAM532rBCaG7m+15Uih+O/aPUoc54c6htvtn4EbBQFiYK4q9vhB4a2L grIm0g4Z4QNz2XXOI7QVYzk5NKdJncjHiQ== X-Google-Smtp-Source: ABdhPJwI+CMmlg1ohgWONgwWBMT5esz9Qrcaake6baukHvyDQABJu1zTsnvzCqSM4jB5DJmWr16Nsw== X-Received: by 2002:a5d:4d01:: with SMTP id z1mr11577493wrt.133.1614988284549; Fri, 05 Mar 2021 15:51:24 -0800 (PST) Received: from localhost.localdomain ([170.253.51.130]) by smtp.googlemail.com with ESMTPSA id f7sm7219835wrm.36.2021.03.05.15.51.23 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Fri, 05 Mar 2021 15:51:24 -0800 (PST) To: mtk.manpages@gmail.com Subject: [PATCH 11/22] mbrtowc.3: SYNOPSIS: Use 'restrict' in prototypes Date: Sat, 6 Mar 2021 00:50:55 +0100 Message-Id: <20210305235105.177359-12-alx.manpages@gmail.com> X-Mailer: git-send-email 2.30.1.721.g45526154a5 In-Reply-To: <20210305235105.177359-1-alx.manpages@gmail.com> References: <20210305235105.177359-1-alx.manpages@gmail.com> MIME-Version: 1.0 X-Spam-Status: No, score=-12.2 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 mbrtowc(). Let's use it here too. .../glibc$ grep_glibc_prototype mbrtowc wcsmbs/wchar.h:296: extern size_t mbrtowc (wchar_t *__restrict __pwc, const char *__restrict __s, size_t __n, mbstate_t *__restrict __p) __THROW; .../glibc$ Signed-off-by: Alejandro Colomar --- man3/mbrtowc.3 | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/man3/mbrtowc.3 b/man3/mbrtowc.3 index c092b2d63..f3ea9d049 100644 --- a/man3/mbrtowc.3 +++ b/man3/mbrtowc.3 @@ -21,8 +21,9 @@ mbrtowc \- convert a multibyte sequence to a wide character .nf .B #include .PP -.BI "size_t mbrtowc(wchar_t *" pwc ", const char *" s ", size_t " n \ -", mbstate_t *" ps ); +.BI "size_t mbrtowc(wchar_t *restrict " pwc ", const char *restrict " s \ +", size_t " n , +.BI " mbstate_t *restrict " ps ); .fi .SH DESCRIPTION The main case for this function is when From patchwork Fri Mar 5 23:50:56 2021 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Alejandro Colomar X-Patchwork-Id: 1448307 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=lwY1OaR8; 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 4Dskzy1rjNz9sVt for ; Sat, 6 Mar 2021 10:52:14 +1100 (AEDT) Received: from server2.sourceware.org (localhost [IPv6:::1]) by sourceware.org (Postfix) with ESMTP id 1C83E399C03A; Fri, 5 Mar 2021 23:51:29 +0000 (GMT) DKIM-Filter: OpenDKIM Filter v2.11.0 sourceware.org 1C83E399C03A DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=sourceware.org; s=default; t=1614988289; bh=55/55zPIbRrRBbrzasP7UTaApC67GJ4iUi1V5UoOYPo=; 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=lwY1OaR8DvHETYlAlRoK2DD+8F+WjpTumadFJrJNHc7b1FPEH/4w2kLrHl0jdI7Dm KoBJOHxnejYAAIi4l/hrSdZf0Gq6ogg7y4Q1AqQOkmdY9/fzm0Y9vzYGrLdZgaH2wO LR8Zx414sSLluBvbZMDl27fcdEtKsc44IExBTWXQ= 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 2A47F399C021 for ; Fri, 5 Mar 2021 23:51:26 +0000 (GMT) DMARC-Filter: OpenDMARC Filter v1.3.2 sourceware.org 2A47F399C021 Received: by mail-wr1-x433.google.com with SMTP id b18so3922757wrn.6 for ; Fri, 05 Mar 2021 15:51: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=55/55zPIbRrRBbrzasP7UTaApC67GJ4iUi1V5UoOYPo=; b=WVb/5i2kZ31PXj6UkHmFrp3Yrto51rsjga1Z59qrMJr2pBzShHawjKijMD4Z9l6LwB CvuiOXO5rczA68xZRC9qBaR2CI2uuubkC1vJiyi97dAxhRwNBy6ertd2emYCRCyM7KSW XdtEDKYe0lMSy0DDXSdO3OizL5dBKFL7PGQmPqXPQRGmtYKQDbjEvdWyB6EKWxJwlc9x sqqGhpjNP7UltGIn5V4jgLvAa09rmqbuOwygcm8LDeN4p3jtY/Cyn5iG1gpSWxvamueG NNvMGms+Yz6gbbf/+tuZzAM49QHwOvkY83V/GsyaaPgCeuuBcZPpVEc/baIgR+7u6IjB FYSw== X-Gm-Message-State: AOAM533lQdWoSONg0G7yTb887LWyQPW0yknAVcnimROKwQPfAWXC9gz8 z+unGRTSVY7czTbeMIqP6hU= X-Google-Smtp-Source: ABdhPJwgZpRYLeXAEGGUydYL6EzEDXS/vokNWBhdpQOr9U7Y+FMT+FKKypfIYSdhCxXPzQOonVtNOQ== X-Received: by 2002:adf:e38f:: with SMTP id e15mr11111190wrm.321.1614988285345; Fri, 05 Mar 2021 15:51:25 -0800 (PST) Received: from localhost.localdomain ([170.253.51.130]) by smtp.googlemail.com with ESMTPSA id f7sm7219835wrm.36.2021.03.05.15.51.24 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Fri, 05 Mar 2021 15:51:25 -0800 (PST) To: mtk.manpages@gmail.com Subject: [PATCH 12/22] mbsnrtowcs.3: SYNOPSIS: Use 'restrict' in prototypes Date: Sat, 6 Mar 2021 00:50:56 +0100 Message-Id: <20210305235105.177359-13-alx.manpages@gmail.com> X-Mailer: git-send-email 2.30.1.721.g45526154a5 In-Reply-To: <20210305235105.177359-1-alx.manpages@gmail.com> References: <20210305235105.177359-1-alx.manpages@gmail.com> MIME-Version: 1.0 X-Spam-Status: No, score=-12.2 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 mbsnrtowcs(). Let's use it here too. .../glibc$ grep_glibc_prototype mbsnrtowcs wcsmbs/wchar.h:351: extern size_t mbsnrtowcs (wchar_t *__restrict __dst, const char **__restrict __src, size_t __nmc, size_t __len, mbstate_t *__restrict __ps) __THROW; .../glibc$ Signed-off-by: Alejandro Colomar --- man3/mbsnrtowcs.3 | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/man3/mbsnrtowcs.3 b/man3/mbsnrtowcs.3 index 68b7dc02d..c6428e001 100644 --- a/man3/mbsnrtowcs.3 +++ b/man3/mbsnrtowcs.3 @@ -19,8 +19,9 @@ mbsnrtowcs \- convert a multibyte string to a wide-character string .nf .B #include .PP -.BI "size_t mbsnrtowcs(wchar_t *" dest ", const char **" src , -.BI " size_t " nms ", size_t " len ", mbstate_t *" ps ); +.BI "size_t mbsnrtowcs(wchar_t *restrict " dest ", const char **restrict " src , +.BI " size_t " nms ", size_t " len \ +", mbstate_t *restrict " ps ); .fi .PP .RS -4 From patchwork Fri Mar 5 23:50:57 2021 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Alejandro Colomar X-Patchwork-Id: 1448308 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=b38YnbRv; 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 4Dsl0245tsz9sVt for ; Sat, 6 Mar 2021 10:52:18 +1100 (AEDT) Received: from server2.sourceware.org (localhost [IPv6:::1]) by sourceware.org (Postfix) with ESMTP id B9523399F000; Fri, 5 Mar 2021 23:51:29 +0000 (GMT) DKIM-Filter: OpenDKIM Filter v2.11.0 sourceware.org B9523399F000 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=sourceware.org; s=default; t=1614988289; bh=Q1pjliYa+Fqfa23JL9Oat0fPdR24xbt5VeZBKpsNeZE=; 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=b38YnbRvUl8+SZ30LP8cb8Meu8FEtP3GKIbB+fBT/Yxwto37xfFIB2h2W+DOB8n8r G7taVdi1d6xSDU6wFHRaxWRMRRwwc7OCMXyJerOiA0N3MGz9gRKEy9B6P1QaVcH4s4 hyvddYM+lmwluvUjMUYkEpUgNtzcDglekiKH6Dq4= 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 08933384240B for ; Fri, 5 Mar 2021 23:51:27 +0000 (GMT) DMARC-Filter: OpenDMARC Filter v1.3.2 sourceware.org 08933384240B Received: by mail-wr1-x432.google.com with SMTP id h98so3878824wrh.11 for ; Fri, 05 Mar 2021 15:51: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=Q1pjliYa+Fqfa23JL9Oat0fPdR24xbt5VeZBKpsNeZE=; b=Nep9Mr6OgH4VrxGMt9+SaygW4tCZB1tm7hEkUhiwhl/BLGA8S6yNVDdTmHJinFZcbe XQ2bjEoRyIRUZ4Yut1kWrN878kDHJ3R8FpjwdPkUDVwXYS1oloMc7088iI7neMkuTqTD Xwzs2eswOwbLfDbVGiNu79yhgF60MdN33u8qR2PeUsKt8d3TCy81Ogt09DP7tZQ8/reJ ilaQ2+o5oGdN/yFOHl1iPqQrQaxo0dz5Kdqd3c4vt2UBRmtNmS+VEFwvk2EhhoDJ8Rz9 pVxrUwiIx1ba7zzTv491A7TlgavVoTeCLHizpHPiCTyskNN8ursRIFBanF5HZPIo20wf BxFg== X-Gm-Message-State: AOAM5311C8H47EMGx4HDr1mHkI8u2eOw0SEKidcq290qlF6dY6XPWCJZ gUdot8hlluyx/j39cJpCMgU= X-Google-Smtp-Source: ABdhPJwNtmAXL/kpIVID8W2Qp27gmGizxUH+7G5P6wD1RpD7Zhq10fT9z353PtOzDpgmwaez4Hdhcg== X-Received: by 2002:a05:6000:1ca:: with SMTP id t10mr11593207wrx.45.1614988286189; Fri, 05 Mar 2021 15:51:26 -0800 (PST) Received: from localhost.localdomain ([170.253.51.130]) by smtp.googlemail.com with ESMTPSA id f7sm7219835wrm.36.2021.03.05.15.51.25 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Fri, 05 Mar 2021 15:51:25 -0800 (PST) To: mtk.manpages@gmail.com Subject: [PATCH 13/22] mbsrtowcs.3: SYNOPSIS: Use 'restrict' in prototypes Date: Sat, 6 Mar 2021 00:50:57 +0100 Message-Id: <20210305235105.177359-14-alx.manpages@gmail.com> X-Mailer: git-send-email 2.30.1.721.g45526154a5 In-Reply-To: <20210305235105.177359-1-alx.manpages@gmail.com> References: <20210305235105.177359-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 mbsrtowcs(). Let's use it here too. .../glibc$ grep_glibc_prototype mbsrtowcs wcsmbs/wchar.h:337: extern size_t mbsrtowcs (wchar_t *__restrict __dst, const char **__restrict __src, size_t __len, mbstate_t *__restrict __ps) __THROW; .../glibc$ Signed-off-by: Alejandro Colomar --- man3/mbsrtowcs.3 | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/man3/mbsrtowcs.3 b/man3/mbsrtowcs.3 index 429af329e..7b7acaf7c 100644 --- a/man3/mbsrtowcs.3 +++ b/man3/mbsrtowcs.3 @@ -20,8 +20,8 @@ mbsrtowcs \- convert a multibyte string to a wide-character string .nf .B #include .PP -.BI "size_t mbsrtowcs(wchar_t *" dest ", const char **" src , -.BI " size_t " len ", mbstate_t *" ps ); +.BI "size_t mbsrtowcs(wchar_t *restrict " dest ", const char **restrict " src , +.BI " size_t " len ", mbstate_t *restrict " ps ); .fi .SH DESCRIPTION If From patchwork Fri Mar 5 23:50:58 2021 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Alejandro Colomar X-Patchwork-Id: 1448309 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=VNS2gkdO; 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 4Dsl0642jcz9sVt for ; Sat, 6 Mar 2021 10:52:22 +1100 (AEDT) Received: from server2.sourceware.org (localhost [IPv6:::1]) by sourceware.org (Postfix) with ESMTP id 54EF4399F001; Fri, 5 Mar 2021 23:51:30 +0000 (GMT) DKIM-Filter: OpenDKIM Filter v2.11.0 sourceware.org 54EF4399F001 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=sourceware.org; s=default; t=1614988290; bh=bMiccUfefY2Gtr226ElJf0uvf2BmgPVvU3vq2+zVeoM=; 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=VNS2gkdOmtHUW9CE0vph5t7l6GtlKgYl3J4aM+n1pNwqFLVaykcO7dsgGhUbOiP0M oYvcGF3qIP5oxdSSupM8eqTLHWtYyxYMLOY1Ih2DQHm7hu3/05zm/6t1BzoBpaUbIG BMvpEhk/iJ/xX0IzjEHKpjoCu0uyju2zb4PZERE4= 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 C3011399C02A for ; Fri, 5 Mar 2021 23:51:27 +0000 (GMT) DMARC-Filter: OpenDMARC Filter v1.3.2 sourceware.org C3011399C02A Received: by mail-wr1-x436.google.com with SMTP id w11so3898919wrr.10 for ; Fri, 05 Mar 2021 15:51:27 -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=bMiccUfefY2Gtr226ElJf0uvf2BmgPVvU3vq2+zVeoM=; b=XsJjsYzIYZVemw5+H9eny/wXZlq0bPrAwYpsuxd3xUTEPAMgzyPUtOi6YXw1pvCTPo IlcIlvCH5DC2wokrB7zE+SaBQXgozCpFt7MvpmyF5Dik1HdtHvJXaTcHHCyeOx6lP5cl dVz5pr7l8ntVY76hKjYz4N/JxFLOyBD5FrTPxWEigFsrqB/EPpQ5dGdHPropnZB6NDa+ kZqYU/idqT2ZQXRDsVsrtBVUZ5UrgrgqYX80KE9/0xzt/ANfueA/J+9dOgKa1Ndc5S9P H3auNdA+BJRxXPhYD8FYy+P0mD173qPFZyomVGliPE+0IZke5vvkFzH8CoqEg0QHNwtF 1nVw== X-Gm-Message-State: AOAM532SVTmAHpomVUehG4iXHbKRAkKSQTCxM9fntROBqeIYqK2nIwyT 4FlULfRkTsgNw3pXwYBumhs= X-Google-Smtp-Source: ABdhPJy0Q0Cn8APXYdGokROxpzZMpuoFraefN+zLl6QGCJmO063U/EV+FjePMIZUzDNd5SpM8PqQrQ== X-Received: by 2002:adf:f587:: with SMTP id f7mr11693990wro.147.1614988287002; Fri, 05 Mar 2021 15:51:27 -0800 (PST) Received: from localhost.localdomain ([170.253.51.130]) by smtp.googlemail.com with ESMTPSA id f7sm7219835wrm.36.2021.03.05.15.51.26 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Fri, 05 Mar 2021 15:51:26 -0800 (PST) To: mtk.manpages@gmail.com Subject: [PATCH 14/22] mbstowcs.3: SYNOPSIS: Use 'restrict' in prototypes Date: Sat, 6 Mar 2021 00:50:58 +0100 Message-Id: <20210305235105.177359-15-alx.manpages@gmail.com> X-Mailer: git-send-email 2.30.1.721.g45526154a5 In-Reply-To: <20210305235105.177359-1-alx.manpages@gmail.com> References: <20210305235105.177359-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 mbstowcs(). Let's use it here too. .../glibc$ grep_glibc_prototype mbstowcs stdlib/stdlib.h:933: extern size_t mbstowcs (wchar_t *__restrict __pwcs, const char *__restrict __s, size_t __n) __THROW __attr_access ((__read_only__, 2)); .../glibc$ Signed-off-by: Alejandro Colomar --- man3/mbstowcs.3 | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/man3/mbstowcs.3 b/man3/mbstowcs.3 index 03078c81d..c79ba9044 100644 --- a/man3/mbstowcs.3 +++ b/man3/mbstowcs.3 @@ -21,7 +21,8 @@ mbstowcs \- convert a multibyte string to a wide-character string .nf .B #include .PP -.BI "size_t mbstowcs(wchar_t *" dest ", const char *" src ", size_t " n ); +.BI "size_t mbstowcs(wchar_t *restrict " dest ", const char *restrict " src , +.BI " size_t " n ); .fi .SH DESCRIPTION If From patchwork Fri Mar 5 23:50:59 2021 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Alejandro Colomar X-Patchwork-Id: 1448310 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=tiNpR2Iw; 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 4Dsl0B60txz9sW1 for ; Sat, 6 Mar 2021 10:52:26 +1100 (AEDT) Received: from server2.sourceware.org (localhost [IPv6:::1]) by sourceware.org (Postfix) with ESMTP id 6054D399C03C; Fri, 5 Mar 2021 23:51:32 +0000 (GMT) DKIM-Filter: OpenDKIM Filter v2.11.0 sourceware.org 6054D399C03C DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=sourceware.org; s=default; t=1614988292; bh=AD94mE1d4lWMJqXY5sVZhK/h3b3IRzBgJIe03vSZtAo=; 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=tiNpR2IwEVnvt0BXDTODSq5MpN+IjXj4TdlZ0IgCV41v2RlItEB1Fp1PCAxhcCgS3 kryPL3k4GzvuZarOQOxh9+4n0PkuwPdmGtbdq1HzW4XR+PTou1e0DWlE9JdokiIuUS 0eYjmYXhlg4wA2uvgIRnHblVsipfqu5hVMIHkS+U= 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 861F6399C034 for ; Fri, 5 Mar 2021 23:51:28 +0000 (GMT) DMARC-Filter: OpenDMARC Filter v1.3.2 sourceware.org 861F6399C034 Received: by mail-wr1-x42f.google.com with SMTP id 7so3947859wrz.0 for ; Fri, 05 Mar 2021 15:51:28 -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=AD94mE1d4lWMJqXY5sVZhK/h3b3IRzBgJIe03vSZtAo=; b=skDENQW6KSkwJu1h+/edTtYyah5aPhfR9sGbH0BelxxDGzczltuBUb4RyNigKC7f7z cMKplcqLHxRW6ynL/XC0imdB2cnDG+SiCNnhed2CCD35w/XA16MItNvR3qxdjErRkNHz AqZkcnFq4Ehq9MTfSvmk/8K0NW8xt/CGz2ctUsiJGWzlObcBV4pDwIdiZW3/VY7sLOs6 vnhyvcOwC40sqpWb690AKB27xcfkJqci5a+7F1nMSJbgU7RmA0/fGxeSj28LJLoEmV8y P+mO984mFYatfQ4EhN8f1TTE5RHc+BaSU24n08jTN14FqoD8qh3FOhtAY0XW9LtpuxqA PpFA== X-Gm-Message-State: AOAM530gyWhadi1ZXaIMSdfA5QjkMFDTdW+Zww0XDWhDJgre/tJdUCIm BkBSFxN6ja4szGH50nbZa2Y= X-Google-Smtp-Source: ABdhPJy4zQ7atUoIQiggcujn6irWlYBCH5dkv1msmYh/5eF96wkTD/HQvanzJ99yfAaKzZWRdAt0pA== X-Received: by 2002:adf:cd8c:: with SMTP id q12mr11407986wrj.185.1614988287783; Fri, 05 Mar 2021 15:51:27 -0800 (PST) Received: from localhost.localdomain ([170.253.51.130]) by smtp.googlemail.com with ESMTPSA id f7sm7219835wrm.36.2021.03.05.15.51.27 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Fri, 05 Mar 2021 15:51:27 -0800 (PST) To: mtk.manpages@gmail.com Subject: [PATCH 15/22] mbtowc.3: SYNOPSIS: Use 'restrict' in prototypes Date: Sat, 6 Mar 2021 00:50:59 +0100 Message-Id: <20210305235105.177359-16-alx.manpages@gmail.com> X-Mailer: git-send-email 2.30.1.721.g45526154a5 In-Reply-To: <20210305235105.177359-1-alx.manpages@gmail.com> References: <20210305235105.177359-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 mbtowc(). Let's use it here too. .../glibc$ grep_glibc_prototype mbtowc stdlib/stdlib.h:925: extern int mbtowc (wchar_t *__restrict __pwc, const char *__restrict __s, size_t __n) __THROW; .../glibc$ Signed-off-by: Alejandro Colomar --- man3/mbtowc.3 | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/man3/mbtowc.3 b/man3/mbtowc.3 index d0af36831..80058a192 100644 --- a/man3/mbtowc.3 +++ b/man3/mbtowc.3 @@ -20,7 +20,8 @@ mbtowc \- convert a multibyte sequence to a wide character .nf .B #include .PP -.BI "int mbtowc(wchar_t *" pwc ", const char *" s ", size_t " n ); +.BI "int mbtowc(wchar_t *restrict " pwc ", const char *restrict " s \ +", size_t " n ); .fi .SH DESCRIPTION The main case for this function is when From patchwork Fri Mar 5 23:51:00 2021 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Alejandro Colomar X-Patchwork-Id: 1448311 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=oO/i8/v8; 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 4Dsl0G5ZVXz9sVt for ; Sat, 6 Mar 2021 10:52:30 +1100 (AEDT) Received: from server2.sourceware.org (localhost [IPv6:::1]) by sourceware.org (Postfix) with ESMTP id E9B80399F00D; Fri, 5 Mar 2021 23:51:32 +0000 (GMT) DKIM-Filter: OpenDKIM Filter v2.11.0 sourceware.org E9B80399F00D DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=sourceware.org; s=default; t=1614988293; bh=KdxOyC9Hv0CB7JvZPjCKcFOH0+O/XDEKOUtz7Jr6yfQ=; 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=oO/i8/v830fMuceROtCtN0fN8X6pXeihP6uTpNQmrOCT1hSJvFjvS16q6slfdEivm kjaPEp49N0qi8cplDukgKjcHV07DI5L3yWTSkvI+MVtXW1vaD04fc5xj+q4wRoRso/ 2mmJZcvrjfck60kPsbxSBpNhls5r3/kj1MxIfBOI= 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 6E03C399C03D for ; Fri, 5 Mar 2021 23:51:29 +0000 (GMT) DMARC-Filter: OpenDMARC Filter v1.3.2 sourceware.org 6E03C399C03D Received: by mail-wr1-x42e.google.com with SMTP id u14so3936823wri.3 for ; Fri, 05 Mar 2021 15:51:29 -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=KdxOyC9Hv0CB7JvZPjCKcFOH0+O/XDEKOUtz7Jr6yfQ=; b=NfP9YqNyzAcfSunqq+QFJSbAczdAnC4HVmU2W/95GVCEAR9jMMjFp29hLjYHRBiYKq vERoY8yMhunzSXJtndJoOBGp52LwJHR9OKkhj1gKv8sS/cZEA6XhjWXTxpc4YarZfE/T LTy7hIgcMmEnqjGgls/Cy8odO4o7D6Q9GKTmm89MC4gRKIWqEXKqgtQGkyFRGsydQQTk zuGlaqwoYDEBTleySdqfthqOTfo+ZLlzq4qxqhjPf/YLHnI2rjXKH/lbRqeR4TjXQPGs u3ighvKDWLn9w33l+XsC9y7eFHxXV36UjbKW/tlofmMi8WEPC+t2fUG/fCrbuRFPKsUb PYDQ== X-Gm-Message-State: AOAM533qNN3W+zCdvx9XtnnJFQ2zBBdI2O0KUEomYFU1/Yri/m7xZEXH Rr+LkMwUOcfWQPaeRjsF2xaBB9xvNrUTnQ== X-Google-Smtp-Source: ABdhPJw0QMYG8jYcDbtSve1101RhLNVhimdPnrcXSi1RSqKVyRHrKFynbF6R2JP1Ni58t7+Qm5e81g== X-Received: by 2002:adf:b313:: with SMTP id j19mr11377163wrd.188.1614988288677; Fri, 05 Mar 2021 15:51:28 -0800 (PST) Received: from localhost.localdomain ([170.253.51.130]) by smtp.googlemail.com with ESMTPSA id f7sm7219835wrm.36.2021.03.05.15.51.27 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Fri, 05 Mar 2021 15:51:28 -0800 (PST) To: mtk.manpages@gmail.com Subject: [PATCH 16/22] mempcpy.3: SYNOPSIS: Use 'restrict' in prototypes Date: Sat, 6 Mar 2021 00:51:00 +0100 Message-Id: <20210305235105.177359-17-alx.manpages@gmail.com> X-Mailer: git-send-email 2.30.1.721.g45526154a5 In-Reply-To: <20210305235105.177359-1-alx.manpages@gmail.com> References: <20210305235105.177359-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 mempcpy(), wmempcpy(). Let's use it here too. .../glibc$ grep_glibc_prototype mempcpy string/string.h:384: extern void *mempcpy (void *__restrict __dest, const void *__restrict __src, size_t __n) __THROW __nonnull ((1, 2)); .../glibc$ grep_glibc_prototype wmempcpy wcsmbs/wchar.h:276: extern wchar_t *wmempcpy (wchar_t *__restrict __s1, const wchar_t *__restrict __s2, size_t __n) __THROW; .../glibc$ Signed-off-by: Alejandro Colomar --- man3/mempcpy.3 | 7 +++++-- 1 file changed, 5 insertions(+), 2 deletions(-) diff --git a/man3/mempcpy.3 b/man3/mempcpy.3 index 33c032c50..8a810e6a5 100644 --- a/man3/mempcpy.3 +++ b/man3/mempcpy.3 @@ -15,12 +15,15 @@ mempcpy, wmempcpy \- copy memory area .BR "#define _GNU_SOURCE" " /* See feature_test_macros(7) */" .B #include .PP -.BI "void *mempcpy(void *" dest ", const void *" src ", size_t " n ); +.BI "void *mempcpy(void *restrict " dest ", const void *restrict " src \ +", size_t " n ); .PP .BR "#define _GNU_SOURCE" " /* See feature_test_macros(7) */" .B #include .PP -.BI "wchar_t *wmempcpy(wchar_t *" dest ", const wchar_t *" src ", size_t " n ); +.BI "wchar_t *wmempcpy(wchar_t *restrict " dest \ +", const wchar_t *restrict " src , +.BI " size_t " n ); .fi .SH DESCRIPTION The From patchwork Fri Mar 5 23:51:01 2021 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Alejandro Colomar X-Patchwork-Id: 1448312 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=UdMEDc2z; 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 4Dsl0L1X85z9sVt for ; Sat, 6 Mar 2021 10:52:34 +1100 (AEDT) Received: from server2.sourceware.org (localhost [IPv6:::1]) by sourceware.org (Postfix) with ESMTP id 7FF1E399F006; Fri, 5 Mar 2021 23:51:33 +0000 (GMT) DKIM-Filter: OpenDKIM Filter v2.11.0 sourceware.org 7FF1E399F006 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=sourceware.org; s=default; t=1614988293; bh=7iYcRtk8ePpQIgI+HpUz/1CukQcnMbfcb0xsWzo9UF8=; 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=UdMEDc2zy3nYT3CvnUnjvs7b4DczKBKJSiriZbF8kc16GfnJM0qVxwJ8EcZ8Imac0 bIa2LFxzUPML+d+uLBfb/3Wv0QovuagX3Utl1JMsTMOu0ocakqu2PxOfa6ouiIAIh4 J/wgrwGZenGQBqvUSNTk+T8hr7OgzNRa6XJGOPfA= X-Original-To: libc-alpha@sourceware.org Delivered-To: libc-alpha@sourceware.org Received: from mail-wm1-x32f.google.com (mail-wm1-x32f.google.com [IPv6:2a00:1450:4864:20::32f]) by sourceware.org (Postfix) with ESMTPS id 3C027399C033 for ; Fri, 5 Mar 2021 23:51:30 +0000 (GMT) DMARC-Filter: OpenDMARC Filter v1.3.2 sourceware.org 3C027399C033 Received: by mail-wm1-x32f.google.com with SMTP id b2-20020a7bc2420000b029010be1081172so241805wmj.1 for ; Fri, 05 Mar 2021 15:51:30 -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=7iYcRtk8ePpQIgI+HpUz/1CukQcnMbfcb0xsWzo9UF8=; b=CoMiN7FE25JeEdrre4U3Nb5TYiuFVY65Pc7ofwXd8DkYdmTR5Rlrv5KW8IRSczKMFX KHbupIJBRDWYNGmf6Q3E4MkEPxs88amTSwwrvwd9s1R43+1wYu5GMokwdALZ616Xs4FB J8zYRxYTsb2U2yPtdPoz5wlMxJeEvYDtYJGYPstiJ/Fer5qjLK/wXZLg97JBH4+3HTEZ z4X8adSO2f08bki6ELh68MbBNnC3L0kEMf8SOs3oTe0dK/b8lVmhjMyYxyA45RS1abF9 mCXyItsCEeulHDGQie0RGsj8K/W6Yn4lAG9WKx23BNMrD6Tox5VKsHh66LCQb6oZYRbQ uNjw== X-Gm-Message-State: AOAM532v7bLXLrXGaDD3a7TUtjFr+gALMMdgFbTQN7iav+jAP2tQB+nz Lz+O5q5CIyI7bUX1SsGvGqg= X-Google-Smtp-Source: ABdhPJzMSluTrw5oDtWGf8lL/tB5QtTmIdAsGCi8MML7mY3FGjTI10p83ziNaZXwKbAYYFBZ4jMSkA== X-Received: by 2002:a05:600c:2cb9:: with SMTP id h25mr11126321wmc.110.1614988289448; Fri, 05 Mar 2021 15:51:29 -0800 (PST) Received: from localhost.localdomain ([170.253.51.130]) by smtp.googlemail.com with ESMTPSA id f7sm7219835wrm.36.2021.03.05.15.51.28 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Fri, 05 Mar 2021 15:51:29 -0800 (PST) To: mtk.manpages@gmail.com Subject: [PATCH 17/22] mq_getattr.3: SYNOPSIS: Use 'restrict' in prototypes Date: Sat, 6 Mar 2021 00:51:01 +0100 Message-Id: <20210305235105.177359-18-alx.manpages@gmail.com> X-Mailer: git-send-email 2.30.1.721.g45526154a5 In-Reply-To: <20210305235105.177359-1-alx.manpages@gmail.com> References: <20210305235105.177359-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 mq_setattr(). Let's use it here too. .../glibc$ grep_glibc_prototype mq_setattr rt/mqueue.h:51: extern int mq_setattr (mqd_t __mqdes, const struct mq_attr *__restrict __mqstat, struct mq_attr *__restrict __omqstat) __THROW __nonnull ((2)); .../glibc$ Signed-off-by: Alejandro Colomar --- man3/mq_getattr.3 | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/man3/mq_getattr.3 b/man3/mq_getattr.3 index 32bfe21be..f1925fc71 100644 --- a/man3/mq_getattr.3 +++ b/man3/mq_getattr.3 @@ -30,8 +30,8 @@ mq_getattr, mq_setattr \- get/set message queue attributes .B #include .PP .BI "int mq_getattr(mqd_t " mqdes ", struct mq_attr *" attr ); -.BI "int mq_setattr(mqd_t " mqdes ", const struct mq_attr *" newattr "," -.BI " struct mq_attr *" oldattr ); +.BI "int mq_setattr(mqd_t " mqdes ", const struct mq_attr *restrict " newattr , +.BI " struct mq_attr *restrict " oldattr ); .fi .PP Link with \fI\-lrt\fP. From patchwork Fri Mar 5 23:51:02 2021 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Alejandro Colomar X-Patchwork-Id: 1448313 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=cKYHUw1L; 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 4Dsl0Q1Wl1z9sVt for ; Sat, 6 Mar 2021 10:52:38 +1100 (AEDT) Received: from server2.sourceware.org (localhost [IPv6:::1]) by sourceware.org (Postfix) with ESMTP id 1BE4A399C02E; Fri, 5 Mar 2021 23:51:34 +0000 (GMT) DKIM-Filter: OpenDKIM Filter v2.11.0 sourceware.org 1BE4A399C02E DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=sourceware.org; s=default; t=1614988294; bh=mIc6rGAqKPEz4YerYnPfyn1kpGW1lLvqw0RqeL5TtrE=; 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=cKYHUw1Ld7/3+gJwym4qs008W5YA3U/mZjHTMPW5Q3iRsFygMRMPiC30iaZY5GE5E omac2YNHtsTMcCpTcwaXgB5MZ8vAkvNh+IC8+cw4jbUO6+9VWN9zuRum5e2OHBRZfq QtqLPfq2CJ1L2S+suhKeui/zTtgwE8Wm/q8ZvEtA= X-Original-To: libc-alpha@sourceware.org Delivered-To: libc-alpha@sourceware.org Received: from mail-wm1-x329.google.com (mail-wm1-x329.google.com [IPv6:2a00:1450:4864:20::329]) by sourceware.org (Postfix) with ESMTPS id 05DA8399F003 for ; Fri, 5 Mar 2021 23:51:31 +0000 (GMT) DMARC-Filter: OpenDMARC Filter v1.3.2 sourceware.org 05DA8399F003 Received: by mail-wm1-x329.google.com with SMTP id y124-20020a1c32820000b029010c93864955so255211wmy.5 for ; Fri, 05 Mar 2021 15:51:30 -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=mIc6rGAqKPEz4YerYnPfyn1kpGW1lLvqw0RqeL5TtrE=; b=K/VT/zW6elvO0ugcxF0jI6y2p6qMeDIsz3e7AAeeFPuUM4zU9/2ZKJCwNKNQ07odU4 jLrj/zMiHnK9QPwYsEvHnd+Wky3KZ9htHhnpkxmKx3MTRvrzKxn6CLN1RVGLPfBajbfL hEvZzQ13SgWc4kTiRf2V2ScAEu6xCiEPCudWmphab1VcdYlP20QMgIG5zDNI9wFZV+Bs f/HRrQEQ8g0Wh1j6hFLy+0zNUIlMbwKM66HdI5PqKk6cYo78pmJMeoaI9BgzMg3TITXy 9VHPgPV97X5EBqosBPMcgA92ClFeeHsP0+qMuoWmGWD724r89uray15NrH0nOYMZKOun 9EaA== X-Gm-Message-State: AOAM532z5YCVlqz+JlyZuYHUdSEJLxIT2eUMVoF+7FSJ3t6B00BqD8Bo KiFibztxPOv043GV8pnUiG8= X-Google-Smtp-Source: ABdhPJzTcU8BnbhIOZJHPbgKafpgxWxUELWxuZlL162Q12qvhbG6X4stMU4hhCMrLIqEMkB76PX3dA== X-Received: by 2002:a05:600c:4f44:: with SMTP id m4mr643348wmq.175.1614988290192; Fri, 05 Mar 2021 15:51:30 -0800 (PST) Received: from localhost.localdomain ([170.253.51.130]) by smtp.googlemail.com with ESMTPSA id f7sm7219835wrm.36.2021.03.05.15.51.29 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Fri, 05 Mar 2021 15:51:29 -0800 (PST) To: mtk.manpages@gmail.com Subject: [PATCH 18/22] mq_receive.3: SYNOPSIS: Use 'restrict' in prototypes Date: Sat, 6 Mar 2021 00:51:02 +0100 Message-Id: <20210305235105.177359-19-alx.manpages@gmail.com> X-Mailer: git-send-email 2.30.1.721.g45526154a5 In-Reply-To: <20210305235105.177359-1-alx.manpages@gmail.com> References: <20210305235105.177359-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 mq_timedreceive(). Let's use it here too. .../glibc$ grep_glibc_prototype mq_timedreceive rt/mqueue.h:76: extern ssize_t mq_timedreceive (mqd_t __mqdes, char *__restrict __msg_ptr, size_t __msg_len, unsigned int *__restrict __msg_prio, const struct timespec *__restrict __abs_timeout) __nonnull ((2, 5)); .../glibc$ Signed-off-by: Alejandro Colomar --- man3/mq_receive.3 | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/man3/mq_receive.3 b/man3/mq_receive.3 index 418330bac..4dc1c3342 100644 --- a/man3/mq_receive.3 +++ b/man3/mq_receive.3 @@ -35,9 +35,9 @@ mq_receive, mq_timedreceive \- receive a message from a message queue .B #include .B #include .PP -.BI "ssize_t mq_timedreceive(mqd_t " mqdes ", char *" msg_ptr , -.BI " size_t " msg_len ", unsigned int *" msg_prio , -.BI " const struct timespec *" abs_timeout ); +.BI "ssize_t mq_timedreceive(mqd_t " mqdes ", char *restrict " msg_ptr , +.BI " size_t " msg_len ", unsigned int *restrict " msg_prio , +.BI " const struct timespec *restrict " abs_timeout ); .fi .PP Link with \fI\-lrt\fP. From patchwork Fri Mar 5 23:51:03 2021 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Alejandro Colomar X-Patchwork-Id: 1448314 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=XrAQm1pE; 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 4Dsl0T6sHgz9sVt for ; Sat, 6 Mar 2021 10:52:41 +1100 (AEDT) Received: from server2.sourceware.org (localhost [IPv6:::1]) by sourceware.org (Postfix) with ESMTP id A43D9399F01F; Fri, 5 Mar 2021 23:51:34 +0000 (GMT) DKIM-Filter: OpenDKIM Filter v2.11.0 sourceware.org A43D9399F01F DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=sourceware.org; s=default; t=1614988294; bh=ziriBOqKNZ9d4xO2UDwSKTeAENeQ3dZSV2nMSKavWl0=; 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=XrAQm1pEzfP7QxObNMygkAysFWGBQy3mtCSZPo0CrBW3IG72CFAY4ndR3zVBtschf Khmu4QCQXXdO8w2wHFgPqvUUnVSTDglus+lovO0+1UYr5uGsIrz6dql1gGtiJH5ups kETbdpOjgfSAqsXgf7ryN/ceEr/g4SpboZF2l3lg= X-Original-To: libc-alpha@sourceware.org Delivered-To: libc-alpha@sourceware.org Received: from mail-wm1-x32f.google.com (mail-wm1-x32f.google.com [IPv6:2a00:1450:4864:20::32f]) by sourceware.org (Postfix) with ESMTPS id D6AD6399F009 for ; Fri, 5 Mar 2021 23:51:31 +0000 (GMT) DMARC-Filter: OpenDMARC Filter v1.3.2 sourceware.org D6AD6399F009 Received: by mail-wm1-x32f.google.com with SMTP id n22so2668058wmc.2 for ; Fri, 05 Mar 2021 15:51:31 -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=ziriBOqKNZ9d4xO2UDwSKTeAENeQ3dZSV2nMSKavWl0=; b=RaxOuDOIO2H3U00a5fSL80eZI4cJxUvmk4NBpzpLaMBUuFEteow1EnBrfk8FYDbpW3 bqXqdk58q6exEZA66dLNEuM0Ij6hA6nMV7xoSKTQsQQDbi+rDGE2ZSMa7UgOwQsGgK4p A0mCNL/CtT1TEndVdTo/iKTLSoLC+yYAYfH9aGmuR2xGm0WLttXrMUpVvVC6bqk8Ntm7 C01401Y14DxwCfBXl4mcoFhj1M8pRxE2ygYLlIKo3cfVEUlrmVilWGXHIKPZPkARQvA/ YPkOerIjyVxrUKPwFWFqBf6lC0tII++ZaCOZcoiSJ+F+lxgF/LACNQmX89RTRebfC97Y pP/Q== X-Gm-Message-State: AOAM530A3JG2l+WC/lK+yP+hBcSRJWn+jbkCfTGZMUEH2yuNYpGHZOaL r27SCEhvFpjjWiUDUL5eWFY= X-Google-Smtp-Source: ABdhPJyO/a+vgchjGIKhrt6dGIL2qw6yOqq5BF3KO/hBEkdK/rrly6uLyNiHBukh8O2liq5RXHSRFw== X-Received: by 2002:a7b:c35a:: with SMTP id l26mr9399179wmj.104.1614988291059; Fri, 05 Mar 2021 15:51:31 -0800 (PST) Received: from localhost.localdomain ([170.253.51.130]) by smtp.googlemail.com with ESMTPSA id f7sm7219835wrm.36.2021.03.05.15.51.30 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Fri, 05 Mar 2021 15:51:30 -0800 (PST) To: mtk.manpages@gmail.com Subject: [PATCH 19/22] posix_spawn.3: SYNOPSIS: Use 'restrict' in prototypes Date: Sat, 6 Mar 2021 00:51:03 +0100 Message-Id: <20210305235105.177359-20-alx.manpages@gmail.com> X-Mailer: git-send-email 2.30.1.721.g45526154a5 In-Reply-To: <20210305235105.177359-1-alx.manpages@gmail.com> References: <20210305235105.177359-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, "G . Branden Robinson" , libc-alpha@sourceware.org Errors-To: libc-alpha-bounces@sourceware.org Sender: "Libc-alpha" Both POSIX and glibc use 'restrict' in posix_spawn(). Let's use it here too. .../glibc$ grep_glibc_prototype posix_spawn posix/spawn.h:72: extern int posix_spawn (pid_t *__restrict __pid, const char *__restrict __path, const posix_spawn_file_actions_t *__restrict __file_actions, const posix_spawnattr_t *__restrict __attrp, char *const __argv[__restrict_arr], char *const __envp[__restrict_arr]) __nonnull ((2, 5)); .../glibc$ I conciously did an exception with respect to the right margin of the rendered page. Instead of having the right margin at 78 as usual (per Branden's recommendation), I let it use col 79 this time, to avoid breaking the prototype in an ugly way, or shifting all of the parameters to the left, unaligned with respect to the function parentheses. Cc: G. Branden Robinson Signed-off-by: Alejandro Colomar --- man3/posix_spawn.3 | 9 +++++---- 1 file changed, 5 insertions(+), 4 deletions(-) diff --git a/man3/posix_spawn.3 b/man3/posix_spawn.3 index a56aa3e86..02f86fddd 100644 --- a/man3/posix_spawn.3 +++ b/man3/posix_spawn.3 @@ -35,10 +35,11 @@ posix_spawn, posix_spawnp \- spawn a process .nf .B #include .PP -.BI "int posix_spawn(pid_t *" pid ", const char *" path , -.BI " const posix_spawn_file_actions_t *" file_actions , -.BI " const posix_spawnattr_t *" attrp , -.BI " char *const " argv[] ", char *const " envp[] ); +.BI "int posix_spawn(pid_t *restrict " pid ", const char *restrict " path , +.BI " const posix_spawn_file_actions_t *restrict " file_actions , +.BI " const posix_spawnattr_t *restrict " attrp , +.BI " char *const " argv [restrict], +.BI " char *const " envp [restrict]); .BI "int posix_spawnp(pid_t *" pid ", const char *" file , .BI " const posix_spawn_file_actions_t *" file_actions , .BI " const posix_spawnattr_t *" attrp , From patchwork Fri Mar 5 23:51:04 2021 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Alejandro Colomar X-Patchwork-Id: 1448315 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=Z15zeP/6; 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 4Dsl0Y3ghbz9sVt for ; Sat, 6 Mar 2021 10:52:45 +1100 (AEDT) Received: from server2.sourceware.org (localhost [IPv6:::1]) by sourceware.org (Postfix) with ESMTP id 3608F399F017; Fri, 5 Mar 2021 23:51:37 +0000 (GMT) DKIM-Filter: OpenDKIM Filter v2.11.0 sourceware.org 3608F399F017 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=sourceware.org; s=default; t=1614988297; bh=QyD7HAEUxbDPgOVS/RxC+0k7Vr+8IAT+vsKJIPb38tg=; 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=Z15zeP/6sTK8k39U0nuh/Kj0pcDUSY/DeIMGowylJIOUlq5s+XmnBFRPHwgNCFAmv 0CreKEq8ZnxEICFBlO8iKPxImrjcA/Hhy5fMIc/b+WIiM+2dnMC98cHM81B4d1L9mH OI2eIRuPKAtCvBAoHXonr+RUmSAPXYgtAunfCO0g= X-Original-To: libc-alpha@sourceware.org Delivered-To: libc-alpha@sourceware.org Received: from mail-wm1-x32b.google.com (mail-wm1-x32b.google.com [IPv6:2a00:1450:4864:20::32b]) by sourceware.org (Postfix) with ESMTPS id B4597399F00B for ; Fri, 5 Mar 2021 23:51:32 +0000 (GMT) DMARC-Filter: OpenDMARC Filter v1.3.2 sourceware.org B4597399F00B Received: by mail-wm1-x32b.google.com with SMTP id e23so2665376wmh.3 for ; Fri, 05 Mar 2021 15:51:32 -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=QyD7HAEUxbDPgOVS/RxC+0k7Vr+8IAT+vsKJIPb38tg=; b=CQ7nq3Dmwd4gTWcyTkZGHInZgw08awifbZV+MuDCZBhRJyehz5WTDfgTPGhmBSmX9K G7PaR6B0RhBMEB+Ae5HI+O61mcd94BUTpm8e7kTm4uKWdFLAZ27w6b4D5oti8d3t1IBh unlFoDdBpXhA4xSY6xby511ZArilTmaJG6U1ALssP0y+EfTG7e46peNjCsoMSVVVIU9y 6c2RzLxGC0qlSka4EtylrxVHRxbVVxldaWnHLYvSWiYi/gU9hKn8o92r7hxmQpb4ckjT zWNqgFrHSGNFUMvjgo8r8OBR+bHbxNCdowdy6tshxueHL6p0VQ+d5mvT3LKH0DBNdmbu ff8Q== X-Gm-Message-State: AOAM532jDAKH+sLyQOJp3epvYstGs82/uTXz8dyK2Bfxz4vI+XzbzeZJ 8iiBF85l+8baNwnfRKyKjes= X-Google-Smtp-Source: ABdhPJxD7YX+AiCVof59MZCblO8lalFgSEz8XZNLcoCfhJMrnKOFHIrcawnni4xKp1Vs4N+ew0Z1Xg== X-Received: by 2002:a05:600c:4ba2:: with SMTP id e34mr11127848wmp.121.1614988291914; Fri, 05 Mar 2021 15:51:31 -0800 (PST) Received: from localhost.localdomain ([170.253.51.130]) by smtp.googlemail.com with ESMTPSA id f7sm7219835wrm.36.2021.03.05.15.51.31 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Fri, 05 Mar 2021 15:51:31 -0800 (PST) To: mtk.manpages@gmail.com Subject: [PATCH 20/22] posix_spawn.3: SYNOPSIS: Use 'restrict' in prototypes Date: Sat, 6 Mar 2021 00:51:04 +0100 Message-Id: <20210305235105.177359-21-alx.manpages@gmail.com> X-Mailer: git-send-email 2.30.1.721.g45526154a5 In-Reply-To: <20210305235105.177359-1-alx.manpages@gmail.com> References: <20210305235105.177359-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, "G . Branden Robinson" , libc-alpha@sourceware.org Errors-To: libc-alpha-bounces@sourceware.org Sender: "Libc-alpha" POSIX uses 'restrict' in posix_spawnp(). However, glibc doesn't. Let's document here the more restrictive of them, which is POSIX. I reported a bug to glibc about this. $ man 3p posix_spawnp |sed -n '/^SYNOPSIS/,/;/p' SYNOPSIS #include int posix_spawnp(pid_t *restrict pid, const char *restrict file, const posix_spawn_file_actions_t *file_actions, const posix_spawnattr_t *restrict attrp, char *const argv[restrict], char *const envp[restrict]); $ .../glibc$ grep_glibc_prototype posix_spawnp posix/spawn.h:85: extern int posix_spawnp (pid_t *__pid, const char *__file, const posix_spawn_file_actions_t *__file_actions, const posix_spawnattr_t *__attrp, char *const __argv[], char *const __envp[]) __nonnull ((2, 5)); .../glibc$ I conciously did an exception with respect to the right margin of the rendered page. Instead of having the right margin at 78 as usual (per Branden's recommendation), I let it use col 79 this time, to avoid breaking the prototype in an ugly way, or shifting all of the parameters to the left, unaligned with respect to the function parentheses. Bug: glibc Cc: G. Branden Robinson Cc: glibc Signed-off-by: Alejandro Colomar --- man3/posix_spawn.3 | 9 +++++---- 1 file changed, 5 insertions(+), 4 deletions(-) diff --git a/man3/posix_spawn.3 b/man3/posix_spawn.3 index 02f86fddd..df82a81df 100644 --- a/man3/posix_spawn.3 +++ b/man3/posix_spawn.3 @@ -40,10 +40,11 @@ posix_spawn, posix_spawnp \- spawn a process .BI " const posix_spawnattr_t *restrict " attrp , .BI " char *const " argv [restrict], .BI " char *const " envp [restrict]); -.BI "int posix_spawnp(pid_t *" pid ", const char *" file , -.BI " const posix_spawn_file_actions_t *" file_actions , -.BI " const posix_spawnattr_t *" attrp , -.BI " char *const " argv[] ", char *const " envp[] ); +.BI "int posix_spawnp(pid_t *restrict " pid ", const char *restrict " file , +.BI " const posix_spawn_file_actions_t *restrict " file_actions , +.BI " const posix_spawnattr_t *restrict " attrp , +.BI " char *const " argv [restrict], +.BI " char *const " envp [restrict]); .fi .SH DESCRIPTION The From patchwork Fri Mar 5 23:51:05 2021 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Alejandro Colomar X-Patchwork-Id: 1448316 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=DG4g2uSU; 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 4Dsl0c6VsMz9sVt for ; Sat, 6 Mar 2021 10:52:48 +1100 (AEDT) Received: from server2.sourceware.org (localhost [IPv6:::1]) by sourceware.org (Postfix) with ESMTP id BD122399C037; Fri, 5 Mar 2021 23:51:37 +0000 (GMT) DKIM-Filter: OpenDKIM Filter v2.11.0 sourceware.org BD122399C037 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=sourceware.org; s=default; t=1614988297; bh=HhvuXCSbRnCi7UkA1cJpWv2boJvtS+wypg1tiYOyje8=; 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=DG4g2uSUqL2w49mxXu/m2n3HI7gNF4pGBzznpiZueXqf+5wjI83UObfnF543t5H+X yXh83y6SHjf/QMhjacti8vmKvcVGEH9+c3/PNzUdaVw+vvmAneMOnKiM3a7hdr5pGj 87+9pbumacphNca+YC3LqhIm1ULtfFK8AFa7sOC8= X-Original-To: libc-alpha@sourceware.org Delivered-To: libc-alpha@sourceware.org Received: from mail-wm1-x330.google.com (mail-wm1-x330.google.com [IPv6:2a00:1450:4864:20::330]) by sourceware.org (Postfix) with ESMTPS id 78865399F00F for ; Fri, 5 Mar 2021 23:51:33 +0000 (GMT) DMARC-Filter: OpenDMARC Filter v1.3.2 sourceware.org 78865399F00F Received: by mail-wm1-x330.google.com with SMTP id d139-20020a1c1d910000b029010b895cb6f2so243854wmd.5 for ; Fri, 05 Mar 2021 15:51:33 -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=HhvuXCSbRnCi7UkA1cJpWv2boJvtS+wypg1tiYOyje8=; b=jR9gWKdKlLiyzrk4JGp6wg+BMTAdVJk3E+oDX4B0Pm39QtMehNXaxH6Tl3LSMCkZFQ dy/sXfOJcDZdhrSpN+crE7xqNQpEmgAF8zgVnBQoWTIfA3c+SDNZ5eGn9F5X1bmQUoO4 QFrBM6IK0wW6wNbsJHAjaTHmxzcCX4bhTIJcghtfBJU1DDog/u0B1Aa3wLax9UDzvnwr 53pXCu1QBqYLhiXjglxb2ptVupInnImiKqxzYL7D06PiU3Ua9mK8OIQyyAWSDL6u9j2F X23nHsD019aH8xCLQHYNcg+L/UvKNO3Sg5PE2LImMItO10Lf0JWxQGgMZni+XMjHK4eX PNlQ== X-Gm-Message-State: AOAM532uochJoVGPvLEbvWOQty4rL4sbwLoS5sO7yohQjyHbqhjJy20Q miKAuOTpo3YcWG9+/Ys+bNlDEejeIfgNDw== X-Google-Smtp-Source: ABdhPJyI8SAW6g80glEEoplZMLFES4asrKDGXzsQrrBUUHzQDaHaAQ1/3RLCLvohHzUd7tpy3Lg5Ew== X-Received: by 2002:a1c:a504:: with SMTP id o4mr10949087wme.174.1614988292707; Fri, 05 Mar 2021 15:51:32 -0800 (PST) Received: from localhost.localdomain ([170.253.51.130]) by smtp.googlemail.com with ESMTPSA id f7sm7219835wrm.36.2021.03.05.15.51.31 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Fri, 05 Mar 2021 15:51:32 -0800 (PST) To: mtk.manpages@gmail.com Subject: [PATCH 21/22] printf.3: SYNOPSIS: Use 'restrict' in prototypes; ffix too Date: Sat, 6 Mar 2021 00:51:05 +0100 Message-Id: <20210305235105.177359-22-alx.manpages@gmail.com> X-Mailer: git-send-email 2.30.1.721.g45526154a5 In-Reply-To: <20210305235105.177359-1-alx.manpages@gmail.com> References: <20210305235105.177359-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 printf(), fprintf(), dprintf(), sprintf(), snprintf(), vprintf(), vfprintf(), vdprintf(), vsprintf(), vsnprintf(). Let's use it here too. .../glibc$ grep_glibc_prototype printf libio/stdio.h:332: extern int printf (const char *__restrict __format, ...); .../glibc$ grep_glibc_prototype fprintf libio/stdio.h:326: extern int fprintf (FILE *__restrict __stream, const char *__restrict __format, ...); .../glibc$ grep_glibc_prototype dprintf libio/stdio.h:382: extern int dprintf (int __fd, const char *__restrict __fmt, ...) __attribute__ ((__format__ (__printf__, 2, 3))); .../glibc$ grep_glibc_prototype sprintf libio/stdio.h:334: extern int sprintf (char *__restrict __s, const char *__restrict __format, ...) __THROWNL; .../glibc$ grep_glibc_prototype snprintf libio/stdio.h:354: extern int snprintf (char *__restrict __s, size_t __maxlen, const char *__restrict __format, ...) __THROWNL __attribute__ ((__format__ (__printf__, 3, 4))); .../glibc$ grep_glibc_prototype vprintf libio/stdio.h:347: extern int vprintf (const char *__restrict __format, __gnuc_va_list __arg); .../glibc$ grep_glibc_prototype vfprintf libio/stdio.h:341: extern int vfprintf (FILE *__restrict __s, const char *__restrict __format, __gnuc_va_list __arg); .../glibc$ grep_glibc_prototype vdprintf libio/stdio.h:379: extern int vdprintf (int __fd, const char *__restrict __fmt, __gnuc_va_list __arg) __attribute__ ((__format__ (__printf__, 2, 0))); .../glibc$ grep_glibc_prototype vsprintf libio/stdio.h:349: extern int vsprintf (char *__restrict __s, const char *__restrict __format, __gnuc_va_list __arg) __THROWNL; .../glibc$ grep_glibc_prototype vsnprintf libio/stdio.h:358: extern int vsnprintf (char *__restrict __s, size_t __maxlen, const char *__restrict __format, __gnuc_va_list __arg) __THROWNL __attribute__ ((__format__ (__printf__, 3, 0))); .../glibc$ ffix: Align common parameters. Signed-off-by: Alejandro Colomar --- man3/printf.3 | 29 ++++++++++++++++++----------- 1 file changed, 18 insertions(+), 11 deletions(-) diff --git a/man3/printf.3 b/man3/printf.3 index 48bb9771d..fa6564426 100644 --- a/man3/printf.3 +++ b/man3/printf.3 @@ -39,20 +39,27 @@ vsprintf, vsnprintf \- formatted output conversion .nf .B #include .PP -.BI "int printf(const char *" format ", ...);" -.BI "int fprintf(FILE *" stream ", const char *" format ", ...);" -.BI "int dprintf(int " fd ", const char *" format ", ...);" -.BI "int sprintf(char *" str ", const char *" format ", ...);" -.BI "int snprintf(char *" str ", size_t " size ", const char *" format ", ...);" +.BI "int printf(const char *restrict " format ", ...);" +.BI "int fprintf(FILE *restrict " stream , +.BI " const char *restrict " format ", ...);" +.BI "int dprintf(int " fd , +.BI " const char *restrict " format ", ...);" +.BI "int sprintf(char *restrict " str , +.BI " const char *restrict " format ", ...);" +.BI "int snprintf(char *restrict " str ", size_t " size , +.BI " const char *restrict " format ", ...);" .PP .B #include .PP -.BI "int vprintf(const char *" format ", va_list " ap ); -.BI "int vfprintf(FILE *" stream ", const char *" format ", va_list " ap ); -.BI "int vdprintf(int " fd ", const char *" format ", va_list " ap ); -.BI "int vsprintf(char *" str ", const char *" format ", va_list " ap ); -.BI "int vsnprintf(char *" str ", size_t " size ", const char *" format \ -", va_list " ap ); +.BI "int vprintf(const char *restrict " format ", va_list " ap ); +.BI "int vfprintf(FILE *restrict " stream , +.BI " const char *restrict " format ", va_list " ap ); +.BI "int vdprintf(int " fd , +.BI " const char *restrict " format ", va_list " ap ); +.BI "int vsprintf(char *restrict " str , +.BI " const char *restrict " format ", va_list " ap ); +.BI "int vsnprintf(char *restrict " str ", size_t " size , +.BI " const char *restrict " format ", va_list " ap ); .fi .PP .RS -4 From patchwork Fri Mar 5 23:51:06 2021 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Alejandro Colomar X-Patchwork-Id: 1448317 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=gNuu079+; 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 4Dsl0j0BM3z9sVt for ; Sat, 6 Mar 2021 10:52:53 +1100 (AEDT) Received: from server2.sourceware.org (localhost [IPv6:::1]) by sourceware.org (Postfix) with ESMTP id 4EC0C399F024; Fri, 5 Mar 2021 23:51:38 +0000 (GMT) DKIM-Filter: OpenDKIM Filter v2.11.0 sourceware.org 4EC0C399F024 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=sourceware.org; s=default; t=1614988298; bh=kNrbVVsaOoZV8hT/c+Lam8I1mma4ycksLM7kHGce/Ls=; 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=gNuu079+4wpsLjAt0Iik7w02B/wW3uMgLE3UMl5Q5DtI3ZiBsvMVg9mFgC5srSjZh M7pr2CdeMo3hMsWUtQg//Ewvx3Yo/rM37xzKDr55vcdFZXBOCrq3ixarxUltbG7Hly k1F4RKWXXvtlO54zeckIdtl0bpzXXmRD23qGAJMI= X-Original-To: libc-alpha@sourceware.org Delivered-To: libc-alpha@sourceware.org Received: from mail-wm1-x32d.google.com (mail-wm1-x32d.google.com [IPv6:2a00:1450:4864:20::32d]) by sourceware.org (Postfix) with ESMTPS id 485AE399F01B for ; Fri, 5 Mar 2021 23:51:34 +0000 (GMT) DMARC-Filter: OpenDMARC Filter v1.3.2 sourceware.org 485AE399F01B Received: by mail-wm1-x32d.google.com with SMTP id j4-20020a05600c4104b029010c62bc1e20so242469wmi.3 for ; Fri, 05 Mar 2021 15:51:34 -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=kNrbVVsaOoZV8hT/c+Lam8I1mma4ycksLM7kHGce/Ls=; b=m74kETJEZRY7un/+0JKyKdLocHV68cvW3GUG2rbu+cnzxGVHs9m66sFIDtDZ5rQ7n/ h0UZ9X92TswhY0iu2iWFNj0IwAlhxMsLaMU5V/zf69tEVAB+AE30++HgHGk4bHoOgm8z Ij4YB13EsqCgL1T8ApoaoRALb8ensrWrBgguoSQNQBm13UhCw3Y9zzRZhV5MJqh2Tb59 ESTJ3fuWEJ4YdIFO2iidlZt0H/wSLoL41cAJs7OltCeBiaRPu5FLHl3zPTIUoD4DyXgv hMfBoyxqY3mp6f18kMhdzy5AJhuUgZk4YxGznyrjetiFRtxXeXZ9piS9s0a8iH6Pb9RD J5hw== X-Gm-Message-State: AOAM531riFXDLc6a8+d7k9vTxHbGqoQqdGVbxymRsprZUV29dZUE+9l5 2mTL34mp1DS3tLM76yb1PFlQVfYffu6AMg== X-Google-Smtp-Source: ABdhPJzChU4Z8uFyGavZgi4wLI9KcqDtFhOLrPTT9kmBNbQsR5E6Nw7AEWgZIkVk9bipG1ia6nKBEw== X-Received: by 2002:a7b:cdf7:: with SMTP id p23mr11135807wmj.26.1614988293498; Fri, 05 Mar 2021 15:51:33 -0800 (PST) Received: from localhost.localdomain ([170.253.51.130]) by smtp.googlemail.com with ESMTPSA id f7sm7219835wrm.36.2021.03.05.15.51.32 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Fri, 05 Mar 2021 15:51:33 -0800 (PST) To: mtk.manpages@gmail.com Subject: [PATCH 22/22] pthread_attr_setguardsize.3: SYNOPSIS: Use 'restrict' in prototypes Date: Sat, 6 Mar 2021 00:51:06 +0100 Message-Id: <20210305235105.177359-23-alx.manpages@gmail.com> X-Mailer: git-send-email 2.30.1.721.g45526154a5 In-Reply-To: <20210305235105.177359-1-alx.manpages@gmail.com> References: <20210305235105.177359-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 pthread_attr_getguardsize(). Let's use it here too. .../glibc$ grep_glibc_prototype pthread_attr_getguardsize sysdeps/htl/pthread.h:180: extern int pthread_attr_getguardsize (const pthread_attr_t *__restrict __attr, size_t *__restrict __guardsize) __THROW __nonnull ((1, 2)); sysdeps/nptl/pthread.h:283: extern int pthread_attr_getguardsize (const pthread_attr_t *__attr, size_t *__guardsize) __THROW __nonnull ((1, 2)); .../glibc$ Signed-off-by: Alejandro Colomar --- man3/pthread_attr_setguardsize.3 | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/man3/pthread_attr_setguardsize.3 b/man3/pthread_attr_setguardsize.3 index 94d900ef5..ca225d1e5 100644 --- a/man3/pthread_attr_setguardsize.3 +++ b/man3/pthread_attr_setguardsize.3 @@ -33,8 +33,8 @@ attribute in thread attributes object .PP .BI "int pthread_attr_setguardsize(pthread_attr_t *" attr \ ", size_t " guardsize ); -.BI "int pthread_attr_getguardsize(const pthread_attr_t *" attr , -.BI " size_t *" guardsize ); +.BI "int pthread_attr_getguardsize(const pthread_attr_t *restrict " attr , +.BI " size_t *restrict " guardsize ); .PP Compile and link with \fI\-pthread\fP. .fi