From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from esa2.mentor.iphmx.com (esa2.mentor.iphmx.com [68.232.141.98]) by sourceware.org (Postfix) with ESMTPS id C188E3858D3C for ; Wed, 8 Dec 2021 21:41:40 +0000 (GMT) DMARC-Filter: OpenDMARC Filter v1.4.1 sourceware.org C188E3858D3C Authentication-Results: sourceware.org; dmarc=none (p=none dis=none) header.from=codesourcery.com Authentication-Results: sourceware.org; spf=pass smtp.mailfrom=mentor.com IronPort-SDR: z7INkhbkNMf8YwoV84K10D3cm9UhwDgPIArzvz0TxPpCcvYVRyaYeoQ61mkJ3OGEjK/JQAH5ID o+cp46eheR/4imEHa7ibiVAA8PyJAar8cNtyiRMbqDqDaiQOlXosvcQWO6X2Z55HXFriWhpZTZ D2jWTfRupiRbj7GVpKoRY4LD8fDv0Va5II6AAhtwuzXEsmLIJo5F7uM0k+nZ9nSjMS4kGfkl3Q 41+EfqWe5OxgEFiyaBUqwWaKY+1FyHJv4T/AOWk+pt6TxACwJw1Ux3mMhYfrTAlDkdOlO6Es9l pyrQ52FM5tHE9VQ4dK8QJSUk X-IronPort-AV: E=Sophos;i="5.88,190,1635235200"; d="scan'208";a="69456054" Received: from orw-gwy-02-in.mentorg.com ([192.94.38.167]) by esa2.mentor.iphmx.com with ESMTP; 08 Dec 2021 13:41:38 -0800 IronPort-SDR: mUeRBXCtZVXG2+U0dYYT+vxcSO7DSrLqfZuio6MM5MvBsG+FJrsiTncaSeBa/R1bZigVn3hwPZ ByaE4UiwFxPMGF0uUW5HOMrl8Kj24zPNFUOP2Ekl/dZ5XXDJnS0IUwUzUp6fFBJyw69EgKUwMr j2etXYz934JG2ErRiIanel0wcgigLnhT4eIn2Pw4S3RM0SBX4nbD1Ntl2NHKMoiBf9VlIXh0nY JRYJETHfFgVwBoEiy4USU0jVBKkkLBCBnIBng/MLsGCHsfBtuYhZgNoo3x6mQVBtH8urRSjM3V Czs= Date: Wed, 8 Dec 2021 21:41:33 +0000 From: Joseph Myers X-X-Sender: jsm28@digraph.polyomino.org.uk To: Zack Weinberg CC: Rich Felker , "'Alejandro Colomar (man-pages)'" , Stefan Puiu , Michael Kerrisk , =?KOI8-R?B?zsHC?= , Jakub Wilk , Subject: Re: [RFC v2 1/2] sys/types.h: Define new type: snseconds_t In-Reply-To: Message-ID: References: <20211207111957.8087-1-alx.manpages@gmail.com> <20211207214814.18553-1-alx.manpages@gmail.com> <20211208002911.GR7074@brightrain.aerifal.cx> <90c79268-f5a1-4990-84a5-fd0a508046d2@www.fastmail.com> <20211208030558.GS7074@brightrain.aerifal.cx> User-Agent: Alpine 2.22 (DEB 394 2020-01-19) MIME-Version: 1.0 Content-Type: text/plain; charset="US-ASCII" X-Originating-IP: [137.202.0.90] X-ClientProxiedBy: svr-ies-mbx-10.mgc.mentorg.com (139.181.222.10) To svr-ies-mbx-01.mgc.mentorg.com (139.181.222.1) X-Spam-Status: No, score=-3116.4 required=5.0 tests=BAYES_00, HEADER_FROM_DIFFERENT_DOMAINS, KAM_DMARC_STATUS, SPF_HELO_PASS, SPF_PASS, TXREP autolearn=no autolearn_force=no version=3.4.4 X-Spam-Checker-Version: SpamAssassin 3.4.4 (2020-01-24) 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, 08 Dec 2021 21:41:42 -0000 On Wed, 8 Dec 2021, Zack Weinberg via Libc-alpha wrote: > On Tue, Dec 7, 2021, at 10:05 PM, Rich Felker wrote: > > On Tue, Dec 07, 2021 at 09:26:59PM -0500, Zack Weinberg wrote: > >> On Tue, Dec 7, 2021, at 7:29 PM, Rich Felker wrote: > >> > > >> > This is a non-starter because the relevant standards already require > >> > the tv_nsec member to have type long. > >> > >> That requirement is a defect in the standards, and I see no reason > >> why this particular defect should be granted 'we're stuck with this' > >> status. > > > > When the standard codifies existing *universal* practice without > > introducing a gratuitous typedef > > Universal practice is not necessarily correct. It was an error to > define a structure type that's passed across the user/kernel boundary, "user/kernel boundary" is not a concept relevant to the standards; the standards deal with the *implementation* as a whole, all parts of which are expected to work together to implement features. It was a defect when older XPG standards specified "long" for some fields in struct stat, because having st_blocks (for example) outside the range of 32-bit long is useful. In the case of tv_nsec, all valid values fit within the range of 32-bit long and so that argument does not apply. -- Joseph S. Myers joseph@codesourcery.com