From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from mail-wr1-x432.google.com (mail-wr1-x432.google.com [IPv6:2a00:1450:4864:20::432]) by sourceware.org (Postfix) with ESMTPS id 19B383987C39 for ; Wed, 10 Mar 2021 18:32:21 +0000 (GMT) DMARC-Filter: OpenDMARC Filter v1.3.2 sourceware.org 19B383987C39 Received: by mail-wr1-x432.google.com with SMTP id b18so24439359wrn.6 for ; Wed, 10 Mar 2021 10:32:21 -0800 (PST) X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:from:to:cc:subject:date:message-id:in-reply-to :references:mime-version:content-transfer-encoding; bh=OIW+c88WNANR2uQfAZvZY9uKjc23gROJ0crLhYmg8zw=; b=io26F1FCyWdSXr4L01qE01UiXlGndDLrhyFPhy9u+EExjW/+vOSZhzsLuRj8iUlDU+ LOME7IwlLf95i6VrxJAfwdVPm4DiEaaRizgJCuX04HDFfqdg0EMjPnQzc4MWYW+81euk YqqUp0hSr4BmxpgdPdG3bD46uAMMjfc3W9DVnin66Vt93eV8rF1Rv1HMOapRmznNiLad 2J32C3v46d1HyAXKtT4yymfuowDNc89ZCtBP/1iubyh+or+Fc7Hk8OIgJZkT+Yt6zs3Y XIakDNIW5BGJaAZ+tYwwR8NC5V8IEsVmnipfKg53a8QYs59m4pGBufcaSNFth0S2tqhM eFyA== X-Gm-Message-State: AOAM533fSWY3yuBC55BuAGUduvdZga5DXdYX1/noBKkBX/+GQY2WE1rp b8dapzpyzaG3NPFqpdD2rH4= X-Google-Smtp-Source: ABdhPJwcUtE9k4dsy5jRJf5EehZCPVxcDSQ5c0N5aQalrxysQMZtttgH/EBp9li3rhc8KEOyUNm0pg== X-Received: by 2002:a5d:4203:: with SMTP id n3mr4799407wrq.116.1615401140218; Wed, 10 Mar 2021 10:32:20 -0800 (PST) Received: from localhost.localdomain ([170.253.51.130]) by smtp.googlemail.com with ESMTPSA id k11sm325374wmj.1.2021.03.10.10.32.19 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Wed, 10 Mar 2021 10:32:19 -0800 (PST) From: Alejandro Colomar To: mtk.manpages@gmail.com Cc: Alejandro Colomar , linux-man@vger.kernel.org, libc-alpha@sourceware.org, Ulrich Drepper Subject: [PATCH 17/24] strptime.3: SYNOPSIS: Use 'restrict' in prototypes Date: Wed, 10 Mar 2021 19:31:43 +0100 Message-Id: <20210310183149.194717-18-alx.manpages@gmail.com> X-Mailer: git-send-email 2.30.1.721.g45526154a5 In-Reply-To: <20210310183149.194717-1-alx.manpages@gmail.com> References: <20210310183149.194717-1-alx.manpages@gmail.com> MIME-Version: 1.0 Content-Transfer-Encoding: 8bit X-Spam-Status: No, score=-12.4 required=5.0 tests=BAYES_00, DKIM_SIGNED, DKIM_VALID, DKIM_VALID_AU, DKIM_VALID_EF, FREEMAIL_FROM, GIT_PATCH_0, RCVD_IN_DNSWL_NONE, SPF_HELO_NONE, SPF_PASS, TXREP autolearn=ham autolearn_force=no version=3.4.2 X-Spam-Checker-Version: SpamAssassin 3.4.2 (2018-09-13) on server2.sourceware.org X-BeenThere: libc-alpha@sourceware.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: Libc-alpha mailing list List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Wed, 10 Mar 2021 18:32:22 -0000 Both POSIX and glibc use 'restrict' in strptime(). However, glibc doesn't specify 'restrict' for the last parameter. Let's use the most restrictive form here (although I believe both to be equivalent). .../glibc$ grep_glibc_prototype strptime time/time.h:95: extern char *strptime (const char *__restrict __s, const char *__restrict __fmt, struct tm *__tp) __THROW; .../glibc$ Cc: Cc: Ulrich Drepper Signed-off-by: Alejandro Colomar --- man3/strptime.3 | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/man3/strptime.3 b/man3/strptime.3 index c1a66ffc0..30c6f59df 100644 --- a/man3/strptime.3 +++ b/man3/strptime.3 @@ -36,7 +36,8 @@ strptime \- convert a string representation of time to a time tm structure .BR "#define _XOPEN_SOURCE" " /* See feature_test_macros(7) */" .B #include .PP -.BI "char *strptime(const char *" s ", const char *" format ", struct tm *" tm ); +.BI "char *strptime(const char *restrict " s ", const char *restrict " format , +.BI " struct tm *restrict " tm ); .fi .SH DESCRIPTION The -- 2.30.1.721.g45526154a5