From patchwork Wed Mar 10 18:31:31 2021 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Alejandro Colomar X-Patchwork-Id: 1450721 Return-Path: X-Original-To: incoming@patchwork.ozlabs.org Delivered-To: patchwork-incoming@bilbo.ozlabs.org Authentication-Results: ozlabs.org; spf=pass (sender SPF authorized) smtp.mailfrom=sourceware.org (client-ip=2620:52:3:1:0:246e:9693:128c; helo=sourceware.org; envelope-from=libc-alpha-bounces@sourceware.org; receiver=) Authentication-Results: ozlabs.org; dkim=pass (1024-bit key; secure) header.d=sourceware.org header.i=@sourceware.org header.a=rsa-sha256 header.s=default header.b=mH6eqoyJ; dkim-atps=neutral Received: from sourceware.org (server2.sourceware.org [IPv6:2620:52:3:1:0:246e:9693:128c]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256) (No client certificate requested) by ozlabs.org (Postfix) with ESMTPS id 4Dwgfq1txFz9sS8 for ; Thu, 11 Mar 2021 05:32:35 +1100 (AEDT) Received: from server2.sourceware.org (localhost [IPv6:::1]) by sourceware.org (Postfix) with ESMTP id 334E33987C0C; Wed, 10 Mar 2021 18:32:15 +0000 (GMT) DKIM-Filter: OpenDKIM Filter v2.11.0 sourceware.org 334E33987C0C DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=sourceware.org; s=default; t=1615401135; bh=TTdSfDoRiVb1tuE+92dsswKwFjc3WvqJM2t894HwE+0=; h=To:Subject:Date:In-Reply-To:References:List-Id:List-Unsubscribe: List-Archive:List-Post:List-Help:List-Subscribe:From:Reply-To:Cc: From; b=mH6eqoyJM+Z/GJpPpVC9q/2rhFvmMLOcM/oaMC6Cm3XZfjJrorqWYMs1Qu6nhl/Sr jWcOa10c1BmARGRm6MIciKIGcM3to0OF+uwh05NbeLoGASwc/QGGG3vzCU/nEcxggJ B8va7Ve3ORo9RFf0a248dF8wzHOFc36MjLRf2yD8= X-Original-To: libc-alpha@sourceware.org Delivered-To: libc-alpha@sourceware.org Received: from mail-wm1-x332.google.com (mail-wm1-x332.google.com [IPv6:2a00:1450:4864:20::332]) by sourceware.org (Postfix) with ESMTPS id 53C06396E475 for ; Wed, 10 Mar 2021 18:32:11 +0000 (GMT) DMARC-Filter: OpenDMARC Filter v1.3.2 sourceware.org 53C06396E475 Received: by mail-wm1-x332.google.com with SMTP id i9so7745828wml.0 for ; Wed, 10 Mar 2021 10:32:11 -0800 (PST) X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:from:to:cc:subject:date:message-id:in-reply-to :references:mime-version:content-transfer-encoding; bh=TTdSfDoRiVb1tuE+92dsswKwFjc3WvqJM2t894HwE+0=; b=MzRJl27VKvgfSujWyPVK5wEv+/WnIKojzHldh199m4gQ3DQoI7EE/fIfKVYitYzNxC PauEtYU0qI+5ZxuOh57R1ObgNJ67KEsMoVRH+s93IPCRlsaIMrevWWVEENwRoi8A40zB WObsvSv0rhpa6rdc5T0KYpVUuPGXiIkczlAmMLoQ2AHMMhIJKZhfl3k7LlOP5/wfN602 8WGeoDJaAAXb1nNap08RvEjT0PAz0Mkn+RCJRxQgyGbGd3YCLJS7vBp5alJrmhXank4f WRJyvRrTtRyZtGZzMXK97eHcS/ZtJyLuVCNgZ3fCaEcMHJbE5qkEIiRJc42lMqJCQDc4 tsQQ== X-Gm-Message-State: AOAM5339A8Pw3HLQqZIwTvH9zbEqIueyzjUSCnLWWHvp4nQl7W2OSqxo Vzd1D1ixOoK1LBrfffWn33s= X-Google-Smtp-Source: ABdhPJyPjNiZoNtH9EE7CB3RWZiEjP57WGXFB2E9xeBOAgbxHH43Fkh1RqdfZSIoC2J5qrDhpEbgow== X-Received: by 2002:a1c:6543:: with SMTP id z64mr4706350wmb.50.1615401130522; Wed, 10 Mar 2021 10:32:10 -0800 (PST) Received: from localhost.localdomain ([170.253.51.130]) by smtp.googlemail.com with ESMTPSA id k11sm325374wmj.1.2021.03.10.10.32.09 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Wed, 10 Mar 2021 10:32:10 -0800 (PST) To: mtk.manpages@gmail.com Subject: [PATCH 05/24] setbuf.3: SYNOPSIS: Use 'restrict' in prototypes Date: Wed, 10 Mar 2021 19:31:31 +0100 Message-Id: <20210310183149.194717-6-alx.manpages@gmail.com> X-Mailer: git-send-email 2.30.1.721.g45526154a5 In-Reply-To: <20210310183149.194717-1-alx.manpages@gmail.com> References: <20210310183149.194717-1-alx.manpages@gmail.com> MIME-Version: 1.0 X-Spam-Status: No, score=-12.3 required=5.0 tests=BAYES_00, DKIM_SIGNED, DKIM_VALID, DKIM_VALID_AU, DKIM_VALID_EF, FREEMAIL_FROM, GIT_PATCH_0, RCVD_IN_DNSWL_NONE, SPF_HELO_NONE, SPF_PASS, TXREP autolearn=ham autolearn_force=no version=3.4.2 X-Spam-Checker-Version: SpamAssassin 3.4.2 (2018-09-13) on server2.sourceware.org X-BeenThere: libc-alpha@sourceware.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: Libc-alpha mailing list List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-Patchwork-Original-From: Alejandro Colomar via Libc-alpha From: Alejandro Colomar Reply-To: Alejandro Colomar Cc: Alejandro Colomar , linux-man@vger.kernel.org, libc-alpha@sourceware.org Errors-To: libc-alpha-bounces@sourceware.org Sender: "Libc-alpha" Both POSIX and glibc use 'restrict' in setvbuf(), setbuf(). Let's use it here too. .../glibc$ grep_glibc_prototype setvbuf libio/stdio.h:308: extern int setvbuf (FILE *__restrict __stream, char *__restrict __buf, int __modes, size_t __n) __THROW; .../glibc$ grep_glibc_prototype setbuf libio/stdio.h:304: extern void setbuf (FILE *__restrict __stream, char *__restrict __buf) __THROW; .../glibc$ Signed-off-by: Alejandro Colomar --- man3/setbuf.3 | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/man3/setbuf.3 b/man3/setbuf.3 index ac73bb06e..708e5c5aa 100644 --- a/man3/setbuf.3 +++ b/man3/setbuf.3 @@ -52,10 +52,10 @@ setbuf, setbuffer, setlinebuf, setvbuf \- stream buffering operations .nf .B #include .PP -.BI "int setvbuf(FILE *" stream ", char *" buf ", int " mode \ -", size_t " size ); +.BI "int setvbuf(FILE *restrict " stream ", char *restrict " buf , +.BI " int " mode ", size_t " size ); .PP -.BI "void setbuf(FILE *" stream ", char *" buf ); +.BI "void setbuf(FILE *restrict " stream ", char *restrict " buf ); .BI "void setbuffer(FILE *restrict " stream ", char *restrict " buf , .BI " size_t " size ); .BI "void setlinebuf(FILE *" stream );