From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org X-Spam-Level: X-Spam-Status: No, score=-16.3 required=3.0 tests=BAYES_00,DKIMWL_WL_HIGH, DKIM_SIGNED,DKIM_VALID,DKIM_VALID_AU,HEADER_FROM_DIFFERENT_DOMAINS, INCLUDES_CR_TRAILER,INCLUDES_PATCH,MAILING_LIST_MULTI,SPF_HELO_NONE,SPF_PASS autolearn=ham autolearn_force=no version=3.4.0 Received: from mail.kernel.org (mail.kernel.org [198.145.29.99]) by smtp.lore.kernel.org (Postfix) with ESMTP id A5C61C433DB for ; Tue, 9 Feb 2021 11:57:04 +0000 (UTC) Received: from vger.kernel.org (vger.kernel.org [23.128.96.18]) by mail.kernel.org (Postfix) with ESMTP id 569D264E6F for ; Tue, 9 Feb 2021 11:57:04 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S229788AbhBIL5D (ORCPT ); Tue, 9 Feb 2021 06:57:03 -0500 Received: from us-smtp-delivery-124.mimecast.com ([63.128.21.124]:28970 "EHLO us-smtp-delivery-124.mimecast.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S229743AbhBILzy (ORCPT ); Tue, 9 Feb 2021 06:55:54 -0500 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=redhat.com; s=mimecast20190719; t=1612871619; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding: in-reply-to:in-reply-to:references:references; bh=HaBixZSCGlwnMlhanlj5i2rdbpYKS01VGHEpbDn2fsY=; b=Xgcdxqs4ZEEzdYsgOJ0vF5gy0V3yD5r3/FI5PmvHl8jkozz09Mz2HxvqaCeUcoE554isTE qDo615hZ6vEBM96sPDZhFuP2j/aR7pj+pgnsOy4QIpCjPR2sTIs2H1gitS83/bKuZtUB7L fO4se0L4uSr29rWGZd7mRY718L+5BXo= Received: from mimecast-mx01.redhat.com (mimecast-mx01.redhat.com [209.132.183.4]) (Using TLS) by relay.mimecast.com with ESMTP id us-mta-540-xUSbMu8KPSCuRjDgByLuGw-1; Tue, 09 Feb 2021 06:53:37 -0500 X-MC-Unique: xUSbMu8KPSCuRjDgByLuGw-1 Received: from smtp.corp.redhat.com (int-mx01.intmail.prod.int.phx2.redhat.com [10.5.11.11]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by mimecast-mx01.redhat.com (Postfix) with ESMTPS id 825C7193411C; Tue, 9 Feb 2021 11:53:36 +0000 (UTC) Received: from localhost (unknown [10.33.36.155]) by smtp.corp.redhat.com (Postfix) with ESMTP id 1EE9F19CAC; Tue, 9 Feb 2021 11:53:35 +0000 (UTC) Date: Tue, 9 Feb 2021 11:53:35 +0000 From: Jonathan Wakely To: "Alejandro Colomar (man-pages)" Cc: linux-man@vger.kernel.org, Michael Kerrisk Subject: Re: Why does stat(2) say is needed? Message-ID: <20210209115335.GB3008@redhat.com> References: <20210209110912.GX3008@redhat.com> <6d13f96f-d42b-7748-21f2-da5e7c88345d@gmail.com> MIME-Version: 1.0 Content-Type: multipart/mixed; boundary="5vNYLRcllDrimb99" Content-Disposition: inline Content-Transfer-Encoding: 8bit In-Reply-To: <6d13f96f-d42b-7748-21f2-da5e7c88345d@gmail.com> X-Clacks-Overhead: GNU Terry Pratchett X-Scanned-By: MIMEDefang 2.79 on 10.5.11.11 Precedence: bulk List-ID: X-Mailing-List: linux-man@vger.kernel.org --5vNYLRcllDrimb99 Content-Type: text/plain; charset=iso-8859-1; format=flowed Content-Disposition: inline Content-Transfer-Encoding: 8bit On 09/02/21 12:27 +0100, Alejandro Colomar (man-pages) wrote: >Hello Jonathan, > >On 2/9/21 12:09 PM, Jonathan Wakely wrote: >>The stat(2) man page says: >> >>SYNOPSIS >>        #include >>        #include >>        #include >> >>        int stat(const char *pathname, struct stat *statbuf); >>        int fstat(int fd, struct stat *statbuf); >>        int lstat(const char *pathname, struct stat *statbuf); >> >>But I don't see anything there that would require . POSIX >>doesn't require it (and since POSIX.1-2001 no longer requires >>, saying "Although was required for >>conforming implementations of previous POSIX specifications, it was >>not required for UNIX applications.") >> >>Is the inclusion of there a mistake? >> >>I've been trying to track down why a libstdc++ header includes >> for no apparent reason, and my best guess is that it's a >>result of this man page saying to do it. >> >As far as we can tell, there's no reason to include it. See . > >We haven't fixed it yet, because I'd like to fix all of the pages, and >that's likely to take months (reading through every manual page in >senctions 2 & 3, reading thorugh every included header, checking POSIX >requirements, asking Michael if there may be historical reasons for a >specific case, ...), but I'll do it some day. > >For now, if you submit a patch, I'll merge it. Attached, thanks. --5vNYLRcllDrimb99 Content-Type: text/plain; charset=us-ascii Content-Disposition: attachment; filename="0001-stat.2-Remove-unistd.h-from-synopsis.patch" >From d5b66a6b83302bd4070e3c83fb1dab341b76b728 Mon Sep 17 00:00:00 2001 From: Jonathan Wakely Date: Tue, 9 Feb 2021 11:46:02 +0000 Subject: [PATCH] stat.2: Remove from synopsis There seems to be no reason is shown here, so remove it. Signed-off-by: Jonathan Wakely --- man2/stat.2 | 1 - 1 file changed, 1 deletion(-) diff --git a/man2/stat.2 b/man2/stat.2 index 734c74b04..fed926715 100644 --- a/man2/stat.2 +++ b/man2/stat.2 @@ -43,7 +43,6 @@ stat, fstat, lstat, fstatat \- get file status .nf .B #include .B #include -.B #include .PP .BI "int stat(const char *" pathname ", struct stat *" statbuf ); .BI "int fstat(int " fd ", struct stat *" statbuf ); -- 2.29.2 --5vNYLRcllDrimb99--