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.133.124]) by sourceware.org (Postfix) with ESMTPS id 645683858D20 for ; Tue, 2 Apr 2024 02:57:16 +0000 (GMT) DMARC-Filter: OpenDMARC Filter v1.4.2 sourceware.org 645683858D20 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 645683858D20 Authentication-Results: server2.sourceware.org; arc=none smtp.remote-ip=170.10.133.124 ARC-Seal: i=1; a=rsa-sha256; d=sourceware.org; s=key; t=1712026638; cv=none; b=RjYENhKk1CsPNLr6sr9w3uIa6vWkRevDdQ6vkGRPwxbaZ9j5PvtWaMho7x+dPKvIgKStyb8on9NEo0QRd8YwamAJsyJvPYRWPyeguNDWe89POS2lJfIqKeacwTET6pzmzBuXa/EwtpPGqKsZH4Shtz8sngt3xoq3alys4rHDRr0= ARC-Message-Signature: i=1; a=rsa-sha256; d=sourceware.org; s=key; t=1712026638; c=relaxed/simple; bh=oH8x1yQRedtQsR+g1na1kjIVoqn2qfs+bYIKaApEKbk=; h=DKIM-Signature:From:To:Subject:Date:Message-ID:MIME-Version; b=OIY+1xAhNU0tzHUUe1k/xyik6XAY6Cp6klNmvhcg3CoWdBdguD/Ka80vCQIWL+OZG7N6yr/mpSlVFvE3guH+TjaCfalH1dDexGs6GAbSpCgX1h4kn+0CTp/4L/aPI4okXBsW+MCD4IV6PR9Gouo/ihyydIdE4eacpQmLO3GQHRA= ARC-Authentication-Results: i=1; server2.sourceware.org DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=redhat.com; s=mimecast20190719; t=1712026636; 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; bh=S6NHTwrewsB4RVucpD6wwnmOQcuXKfvsAeV2n1AmPfQ=; b=brBeKi37dkx+nd8lwt6IO0kCC/BbTp1Thmc9kwpuQSjyz55C36l1+g0VnOwj2J4AAouG54 XzmOPXgRPuUOWhKxB9Eb0ROOq+4w1/XrZeOM+HOkV2XjshVaqN+ITB2Weur35Qg4VP6MKK J2g2ES+BwjYbsAdVH1V4zWKJJcXQAAQ= Received: from mimecast-mx02.redhat.com (mx-ext.redhat.com [66.187.233.73]) by relay.mimecast.com with ESMTP with STARTTLS (version=TLSv1.3, cipher=TLS_AES_256_GCM_SHA384) id us-mta-522-O5pzJ7I0Nzmz8qKTd1PjSA-1; Mon, 01 Apr 2024 22:57:12 -0400 X-MC-Unique: O5pzJ7I0Nzmz8qKTd1PjSA-1 Received: from smtp.corp.redhat.com (int-mx09.intmail.prod.int.rdu2.redhat.com [10.11.54.9]) (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 51A2729AC023; Tue, 2 Apr 2024 02:57:12 +0000 (UTC) Received: from greed.delorie.com (unknown [10.22.8.10]) by smtp.corp.redhat.com (Postfix) with ESMTPS id 3B57C492BC9; Tue, 2 Apr 2024 02:57:11 +0000 (UTC) Received: from greed.delorie.com.redhat.com (localhost [127.0.0.1]) by greed.delorie.com (8.16.1/8.16.1) with ESMTP id 4322vAXB2939823; Mon, 1 Apr 2024 22:57:10 -0400 From: DJ Delorie To: Adhemerval Zanella Cc: libc-alpha@sourceware.org Subject: Re: [PATCH v6] Always define __USE_TIME_BITS64 when 64 bit time_t is used In-Reply-To: <20240318122148.196392-1-adhemerval.zanella@linaro.org> (message from Adhemerval Zanella on Mon, 18 Mar 2024 09:21:48 -0300) Date: Mon, 01 Apr 2024 22:57:10 -0400 Message-ID: MIME-Version: 1.0 X-Scanned-By: MIMEDefang 3.4.1 on 10.11.54.9 X-Mimecast-Spam-Score: 0 X-Mimecast-Originator: redhat.com Content-Type: text/plain X-Spam-Status: No, score=-10.6 required=5.0 tests=BAYES_00,DKIMWL_WL_HIGH,DKIM_SIGNED,DKIM_VALID,DKIM_VALID_AU,DKIM_VALID_EF,GIT_PATCH_0,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: Looks good to me with the exception of the one doc change Andreas pointed out. Ok with the proposed change. Reviewed-by: DJ Delorie Adhemerval Zanella writes: > Changes from v5: > * Removed sysdeps/generic/features-time64.h. > * Fixes documentation wording. Confirmed. > Changes from v4: > * Move the __USE_TIME64_REDIRECTS documentation to creature.texi. > * Do not define __USE_TIME64_REDIRECTS for generic case. Confirmed. > diff --git a/manual/creature.texi b/manual/creature.texi > index 3fc53619ea..be0a5ac7e6 100644 > --- a/manual/creature.texi > +++ b/manual/creature.texi > @@ -192,6 +192,12 @@ Linux kernel version on which the system is running. For Linux kernel > version above @b{5.1} syscalls supporting 64-bit time are used. Otherwise, > a fallback code is used with legacy (i.e. 32-bit) syscalls. > > +On such platforms, @theglibc{} will also define @code{__USE_TIME64_REDIRECTS} > +to indicate whether the declarations are expanded to different ones > +(either by redefiniding the symbol name or using symbol aliais). > +For instance, if the symbol @code{clock_gettime} expands to > +@code{__glock_gettime64}. Ok. > diff --git a/manual/maint.texi b/manual/maint.texi > index 89da704f45..d08f30a6e0 100644 > --- a/manual/maint.texi > +++ b/manual/maint.texi > @@ -491,6 +491,10 @@ derived as in the dual-time configuration case, and which expands to > the symbol's name. For instance, the macro @code{__clock_gettime64} > expands to @code{clock_gettime}. > > +When @code{__TIMESIZE == 64} is set to 64, @theglibc{} will also define As Andreas noted, needs fixing. > +the@code{__USE_TIME_BITS64} macro. It is used by the Linux kernel ABI > +to set the expected @code{time_t} size used on some syscalls. Ok. > diff --git a/sysdeps/generic/features-time64.h b/sysdeps/generic/features-time64.h > deleted file mode 100644 Ok. > diff --git a/sysdeps/unix/sysv/linux/features-time64.h b/sysdeps/unix/sysv/linux/features-time64.h > index dd3442c2ea..8d573cd23e 100644 > --- a/sysdeps/unix/sysv/linux/features-time64.h > +++ b/sysdeps/unix/sysv/linux/features-time64.h > @@ -24,9 +24,8 @@ > # if _TIME_BITS == 64 > # if ! defined (_FILE_OFFSET_BITS) || _FILE_OFFSET_BITS != 64 > # error "_TIME_BITS=64 is allowed only with _FILE_OFFSET_BITS=64" > -# elif __TIMESIZE == 32 > -# define __USE_TIME_BITS64 1 > # endif > +# define __USE_TIME_BITS64 1 > # elif _TIME_BITS == 32 > # if __TIMESIZE > 32 > # error "_TIME_BITS=32 is not compatible with __TIMESIZE > 32" Ok. > @@ -34,4 +33,10 @@ > # else > # error Invalid _TIME_BITS value (can only be 32 or 64-bit) > # endif > +#elif __TIMESIZE == 64 > +# define __USE_TIME_BITS64 1 > +#endif > + > +#if defined __USE_TIME_BITS64 && __TIMESIZE == 32 > +# define __USE_TIME64_REDIRECTS 1 > #endif Ok. Mechanical change follows... > diff --git a/io/bits/poll2.h b/io/bits/poll2.h . . . Ok.