From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from us-smtp-delivery-124.mimecast.com (us-smtp-delivery-124.mimecast.com [170.10.129.124]) by sourceware.org (Postfix) with ESMTPS id 4D7833858D34 for ; Thu, 4 Apr 2024 05:09:43 +0000 (GMT) DMARC-Filter: OpenDMARC Filter v1.4.2 sourceware.org 4D7833858D34 Authentication-Results: sourceware.org; dmarc=pass (p=none dis=none) header.from=redhat.com Authentication-Results: sourceware.org; spf=pass smtp.mailfrom=redhat.com ARC-Filter: OpenARC Filter v1.0.0 sourceware.org 4D7833858D34 Authentication-Results: server2.sourceware.org; arc=none smtp.remote-ip=170.10.129.124 ARC-Seal: i=1; a=rsa-sha256; d=sourceware.org; s=key; t=1712207385; cv=none; b=ZI0kF/7Cp+CkQLMYJMyHpF7YHnsWCeBywBWThZK7UPaCyilo8nJqyiw7kL9KoZj2KurMOGkZwN1zmL9B+eJoZl1e75T83nQJuhsmb2kuboUC3UtavhPmeogV0kKRHBEtJvvRaEf4dccXpoDdwhZLMl7b/pinFQUgH7BfBe/oO8Q= ARC-Message-Signature: i=1; a=rsa-sha256; d=sourceware.org; s=key; t=1712207385; c=relaxed/simple; bh=a9yYHD6ARECdiXThEY9OYDG6g/ZeirBbzpV4rPxoiXc=; h=DKIM-Signature:From:To:Subject:Date:Message-ID:MIME-Version; b=HK1IJXRqrpvwqU44dRI8urC/lRvQbL1QVmbD+jqspLlUC9lKXLOPR4ke0TOMSWaEprEL+8v5BlUP+TdrEvZ2BG5S8JqoZmOSTAInsIs9i9u5UxLB9uxvXcYOs5WBJ30PDLCfRSHu8ht/FoTPUgQm4E3VVOfDD+h1rv6LkGIWhpg= ARC-Authentication-Results: i=1; server2.sourceware.org DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=redhat.com; s=mimecast20190719; t=1712207382; 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: in-reply-to:in-reply-to:references:references; bh=GOoX7hTd8LP9muFr9CxfbIT5/U5VhNAFd45pdHn0cqI=; b=FP0vBbRrwFT6wslUFEiG3N7Bs33Gq35izA2kvqcuzHs2cKHG8C2tCc6k0cF13ZfIs7sCuo dddhsqpWLz+f/aTwlD06mekl0KA3j8lqEIhFdS4RSPRe59VyL38kpEEtMfPWKC6nhzuLQf nMA8tktuXYX1+zbIN0rYOi80NqzHWZ4= Received: from mimecast-mx02.redhat.com (mimecast-mx02.redhat.com [66.187.233.88]) by relay.mimecast.com with ESMTP with STARTTLS (version=TLSv1.3, cipher=TLS_AES_256_GCM_SHA384) id us-mta-611-sxSlbjhRPjSJBR9QDvXqkA-1; Thu, 04 Apr 2024 01:09:38 -0400 X-MC-Unique: sxSlbjhRPjSJBR9QDvXqkA-1 Received: from smtp.corp.redhat.com (int-mx02.intmail.prod.int.rdu2.redhat.com [10.11.54.2]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (2048 bits) server-digest SHA256) (No client certificate requested) by mimecast-mx02.redhat.com (Postfix) with ESMTPS id F206C80B1E0; Thu, 4 Apr 2024 05:09:37 +0000 (UTC) Received: from oldenburg.str.redhat.com (unknown [10.39.192.59]) by smtp.corp.redhat.com (Postfix) with ESMTPS id 4419340C6CBF; Thu, 4 Apr 2024 05:09:37 +0000 (UTC) From: Florian Weimer To: Paul Eggert Cc: libc-alpha@sourceware.org Subject: Re: [PATCH] login: Use unsigned 32-bit types for seconds-since-epoch In-Reply-To: <6289d40a-7989-4869-8f47-553263e4df7a@cs.ucla.edu> (Paul Eggert's message of "Wed, 3 Apr 2024 14:20:07 -0700") References: <87sf02guiz.fsf@oldenburg.str.redhat.com> <6289d40a-7989-4869-8f47-553263e4df7a@cs.ucla.edu> Date: Thu, 04 Apr 2024 07:09:15 +0200 Message-ID: <87jzld7lz8.fsf@oldenburg.str.redhat.com> User-Agent: Gnus/5.13 (Gnus v5.13) MIME-Version: 1.0 X-Scanned-By: MIMEDefang 3.4.1 on 10.11.54.2 X-Mimecast-Spam-Score: 0 X-Mimecast-Originator: redhat.com Content-Type: text/plain X-Spam-Status: No, score=-4.6 required=5.0 tests=BAYES_00,DKIMWL_WL_HIGH,DKIM_SIGNED,DKIM_VALID,DKIM_VALID_AU,DKIM_VALID_EF,RCVD_IN_DNSWL_NONE,RCVD_IN_MSPIKE_H4,RCVD_IN_MSPIKE_WL,SPF_HELO_NONE,SPF_NONE,TXREP autolearn=ham autolearn_force=no version=3.4.6 X-Spam-Checker-Version: SpamAssassin 3.4.6 (2021-04-09) on server2.sourceware.org List-Id: * Paul Eggert: > On 4/3/24 11:39, Florian Weimer wrote: >> For consistency, >> if there is a 64-bit architecture that is coinstallable, define >> __WORDSIZE_TIME64_COMPAT32 to 1 on the 32-bit architectyre as well. > > Could you explain the advantage of consistency here? User code almost > invariably assignes ut_tv.tv_sec to time_t (this is true of every > instance I found of ut_tv in Gnulib source code, for example). So > changing this field's type on platforms where time_t is 32 bits will > likely be ineffective in practice, and might cause more problems than > it cures. Few applications with a 32-bit time_t will work once there is a value in this field with the MSB set. So the relevant case is applications that were built with -D_TIME_BITS=64, and there the consistent behavior with the 64-bit architecture helps. > Since the _TIME_BITS==32 world is going away anyway by 2038, it might > be better to leave the field types unchanged in that world, to lessen > compatibility glitches before that world gives up its ghost. This is an on-disk format that doesn't change with -D_TIME_BITS=64. Thanks, Florian