From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from out4-smtp.messagingengine.com (out4-smtp.messagingengine.com [66.111.4.28]) by sourceware.org (Postfix) with ESMTPS id D9B7D3858D28 for ; Wed, 8 Dec 2021 02:27:28 +0000 (GMT) DMARC-Filter: OpenDMARC Filter v1.4.1 sourceware.org D9B7D3858D28 Received: from compute5.internal (compute5.nyi.internal [10.202.2.45]) by mailout.nyi.internal (Postfix) with ESMTP id F03B95C00C3; Tue, 7 Dec 2021 21:27:26 -0500 (EST) Received: from imap45 ([10.202.2.95]) by compute5.internal (MEProxy); Tue, 07 Dec 2021 21:27:26 -0500 X-ME-Sender: X-ME-Proxy-Cause: gggruggvucftvghtrhhoucdtuddrgedvuddrjeejgddvgecutefuodetggdotefrodftvf curfhrohhfihhlvgemucfhrghsthforghilhdpqfgfvfdpuffrtefokffrpgfnqfghnecu uegrihhlohhuthemuceftddtnecusecvtfgvtghiphhivghnthhsucdlqddutddtmdenuc fjughrpefofgggkfgjfhffhffvufgtsehttdertderredtnecuhfhrohhmpedfkggrtghk ucghvghinhgsvghrghdfuceoiigrtghksehofihlfhholhhiohdrohhrgheqnecuggftrf grthhtvghrnhephfeuhfevueffteffgfejtefgkeekheeftdeflefgheffffevheekleef gfehffdunecuvehluhhsthgvrhfuihiivgeptdenucfrrghrrghmpehmrghilhhfrhhomh epiigrtghksehofihlfhholhhiohdrohhrgh X-ME-Proxy: Received: by mailuser.nyi.internal (Postfix, from userid 501) id 50E1324A0074; Tue, 7 Dec 2021 21:27:26 -0500 (EST) X-Mailer: MessagingEngine.com Webmail Interface User-Agent: Cyrus-JMAP/3.5.0-alpha0-4492-g121c2470aa-fm-20211206.001-g121c2470 Mime-Version: 1.0 Message-Id: <90c79268-f5a1-4990-84a5-fd0a508046d2@www.fastmail.com> In-Reply-To: <20211208002911.GR7074@brightrain.aerifal.cx> References: <20211207111957.8087-1-alx.manpages@gmail.com> <20211207214814.18553-1-alx.manpages@gmail.com> <20211208002911.GR7074@brightrain.aerifal.cx> Date: Tue, 07 Dec 2021 21:26:59 -0500 From: "Zack Weinberg" To: "Rich Felker" , "'Alejandro Colomar (man-pages)'" Cc: libc-alpha@sourceware.org, =?UTF-8?Q?=D0=BD=D0=B0=D0=B1?= , "Jakub Wilk" , "Stefan Puiu" , "Michael Kerrisk" , "H . J . Lu" , "Joseph Myers" Subject: Re: [RFC v2 1/2] sys/types.h: Define new type: snseconds_t Content-Type: text/plain X-Spam-Status: No, score=-3.1 required=5.0 tests=BAYES_00, DKIM_SIGNED, DKIM_VALID, DKIM_VALID_AU, DKIM_VALID_EF, JMQ_SPF_NEUTRAL, RCVD_IN_DNSWL_LOW, RCVD_IN_MSPIKE_H3, RCVD_IN_MSPIKE_WL, SPF_HELO_PASS, SPF_PASS, TXREP autolearn=ham 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 02:27:31 -0000 On Tue, Dec 7, 2021, at 7:29 PM, Rich Felker wrote: > On Tue, Dec 07, 2021 at 10:48:14PM +0100, Alejandro Colomar wrote: >> Based on the existing suseconds_t type. >> >> The timespec(3) structure uses long for tv_nsec, >> except if __x86_64__ && __ILP32__, >> in which case it uses long long. >> Let's define a stable type that can be relied upon by users, >> for example for creating pointers. > > 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. > x32 just needs to be fixed to match the requirement. This doesn't just affect x32, it affects every ABI with 32-bit long and 64-bit time_t. Look at the ifdef mess in glibc bits/types/struct_timespec.h if you don't believe me. zw