Message ID | 20210310183149.194717-18-alx.manpages@gmail.com |
---|---|
State | New |
Headers | show
Return-Path: <libc-alpha-bounces@sourceware.org> 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=<UNKNOWN>) Authentication-Results: ozlabs.org; dkim=pass (1024-bit key; secure) header.d=sourceware.org header.i=@sourceware.org header.a=rsa-sha256 header.s=default header.b=N58mycI5; dkim-atps=neutral Received: from sourceware.org (unknown [8.43.85.97]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256) (No client certificate requested) by ozlabs.org (Postfix) with ESMTPS id 4Dwggp3tsLz9sS8 for <incoming@patchwork.ozlabs.org>; Thu, 11 Mar 2021 05:33:26 +1100 (AEDT) Received: from server2.sourceware.org (localhost [IPv6:::1]) by sourceware.org (Postfix) with ESMTP id 5144E3987C1B; Wed, 10 Mar 2021 18:32:25 +0000 (GMT) DKIM-Filter: OpenDKIM Filter v2.11.0 sourceware.org 5144E3987C1B DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=sourceware.org; s=default; t=1615401145; bh=OIW+c88WNANR2uQfAZvZY9uKjc23gROJ0crLhYmg8zw=; h=To:Subject:Date:In-Reply-To:References:List-Id:List-Unsubscribe: List-Archive:List-Post:List-Help:List-Subscribe:From:Reply-To:Cc: From; b=N58mycI5uMjLAUfauG9nexFsy1HVJ6nKCleZP4b2XnRSgm13EzcVU8r7a72RGK5R8 1yaZPAkHGvPGmoKYbyHYjF/OQEhl6Dd/jDE78lZ9f+Jg1u/XC3CJGSOtI0q48lBUPz A+gPMsBUrZgA/E5IxN7jsshzrlS36O3f9vKGd5cA= X-Original-To: libc-alpha@sourceware.org Delivered-To: libc-alpha@sourceware.org Received: from mail-wr1-x432.google.com (mail-wr1-x432.google.com [IPv6:2a00:1450:4864:20::432]) by sourceware.org (Postfix) with ESMTPS id 19B383987C39 for <libc-alpha@sourceware.org>; 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 <libc-alpha@sourceware.org>; Wed, 10 Mar 2021 10:32:21 -0800 (PST) X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:from:to:cc:subject:date:message-id:in-reply-to :references:mime-version:content-transfer-encoding; bh=OIW+c88WNANR2uQfAZvZY9uKjc23gROJ0crLhYmg8zw=; b=io26F1FCyWdSXr4L01qE01UiXlGndDLrhyFPhy9u+EExjW/+vOSZhzsLuRj8iUlDU+ LOME7IwlLf95i6VrxJAfwdVPm4DiEaaRizgJCuX04HDFfqdg0EMjPnQzc4MWYW+81euk YqqUp0hSr4BmxpgdPdG3bD46uAMMjfc3W9DVnin66Vt93eV8rF1Rv1HMOapRmznNiLad 2J32C3v46d1HyAXKtT4yymfuowDNc89ZCtBP/1iubyh+or+Fc7Hk8OIgJZkT+Yt6zs3Y XIakDNIW5BGJaAZ+tYwwR8NC5V8IEsVmnipfKg53a8QYs59m4pGBufcaSNFth0S2tqhM eFyA== X-Gm-Message-State: AOAM533fSWY3yuBC55BuAGUduvdZga5DXdYX1/noBKkBX/+GQY2WE1rp b8dapzpyzaG3NPFqpdD2rH4= X-Google-Smtp-Source: ABdhPJwcUtE9k4dsy5jRJf5EehZCPVxcDSQ5c0N5aQalrxysQMZtttgH/EBp9li3rhc8KEOyUNm0pg== X-Received: by 2002:a5d:4203:: with SMTP id n3mr4799407wrq.116.1615401140218; Wed, 10 Mar 2021 10:32:20 -0800 (PST) Received: from localhost.localdomain ([170.253.51.130]) by smtp.googlemail.com with ESMTPSA id k11sm325374wmj.1.2021.03.10.10.32.19 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Wed, 10 Mar 2021 10:32:19 -0800 (PST) To: mtk.manpages@gmail.com Subject: [PATCH 17/24] strptime.3: SYNOPSIS: Use 'restrict' in prototypes Date: Wed, 10 Mar 2021 19:31:43 +0100 Message-Id: <20210310183149.194717-18-alx.manpages@gmail.com> X-Mailer: git-send-email 2.30.1.721.g45526154a5 In-Reply-To: <20210310183149.194717-1-alx.manpages@gmail.com> References: <20210310183149.194717-1-alx.manpages@gmail.com> MIME-Version: 1.0 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 <libc-alpha.sourceware.org> List-Unsubscribe: <https://sourceware.org/mailman/options/libc-alpha>, <mailto:libc-alpha-request@sourceware.org?subject=unsubscribe> List-Archive: <https://sourceware.org/pipermail/libc-alpha/> List-Post: <mailto:libc-alpha@sourceware.org> List-Help: <mailto:libc-alpha-request@sourceware.org?subject=help> List-Subscribe: <https://sourceware.org/mailman/listinfo/libc-alpha>, <mailto:libc-alpha-request@sourceware.org?subject=subscribe> From: Alejandro Colomar via Libc-alpha <libc-alpha@sourceware.org> Reply-To: Alejandro Colomar <alx.manpages@gmail.com> Cc: Alejandro Colomar <alx.manpages@gmail.com>, linux-man@vger.kernel.org, libc-alpha@sourceware.org, Ulrich Drepper <drepper@redhat.com> Errors-To: libc-alpha-bounces@sourceware.org Sender: "Libc-alpha" <libc-alpha-bounces@sourceware.org> |
Series |
man3: SYNOPSIS: Use 'restrict' in prototypes (batch 5)
|
expand
|
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 <time.h> .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
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: <libc-alpha@sourceware.org> Cc: Ulrich Drepper <drepper@redhat.com> Signed-off-by: Alejandro Colomar <alx.manpages@gmail.com> --- man3/strptime.3 | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-)