Message ID | 20250105055750.1668721-1-eggert@cs.ucla.edu (mailing list archive) |
---|---|
Headers |
Return-Path: <libc-alpha-bounces~patchwork=sourceware.org@sourceware.org> X-Original-To: patchwork@sourceware.org Delivered-To: patchwork@sourceware.org Received: from server2.sourceware.org (localhost [IPv6:::1]) by sourceware.org (Postfix) with ESMTP id 1E7A03858415 for <patchwork@sourceware.org>; Sun, 5 Jan 2025 05:59:32 +0000 (GMT) DKIM-Filter: OpenDKIM Filter v2.11.0 sourceware.org 1E7A03858415 Authentication-Results: sourceware.org; dkim=pass (2048-bit key, unprotected) header.d=cs.ucla.edu header.i=@cs.ucla.edu header.a=rsa-sha256 header.s=9D0B346E-2AEB-11ED-9476-E14B719DCE6C header.b=c78Z531T X-Original-To: libc-alpha@sourceware.org Delivered-To: libc-alpha@sourceware.org Received: from mail.cs.ucla.edu (mail.cs.ucla.edu [131.179.128.66]) by sourceware.org (Postfix) with ESMTPS id 8814D3858D21 for <libc-alpha@sourceware.org>; Sun, 5 Jan 2025 05:58:07 +0000 (GMT) DMARC-Filter: OpenDMARC Filter v1.4.2 sourceware.org 8814D3858D21 Authentication-Results: sourceware.org; dmarc=pass (p=none dis=none) header.from=cs.ucla.edu Authentication-Results: sourceware.org; spf=pass smtp.mailfrom=cs.ucla.edu ARC-Filter: OpenARC Filter v1.0.0 sourceware.org 8814D3858D21 Authentication-Results: server2.sourceware.org; arc=none smtp.remote-ip=131.179.128.66 ARC-Seal: i=1; a=rsa-sha256; d=sourceware.org; s=key; t=1736056687; cv=none; b=fifDjODMTH/6YmtDF9SeQmNv2jKBdhu08Xpr2HQ75x+jEo544XxbY3wsRQrBeFlGt0fHIOSFqwOi03s+5OC91ND4pZQNTzy+CufwWCfU+gmTKhq+3ExC2Pt7vo9zsicQtIS+L8dy+1R2TCLe9Ot1UkM58AUM1JHvuKrm+PwSFNw= ARC-Message-Signature: i=1; a=rsa-sha256; d=sourceware.org; s=key; t=1736056687; c=relaxed/simple; bh=/eJWCcbnrsyRBOXQJNQoRLFDOSxsHgF70P1dhn/P4rs=; h=DKIM-Signature:From:To:Subject:Date:Message-ID:MIME-Version; b=BPzolM6YN91ksZdA1H6AcMe5rxfxvO9NzZ75vAtKJup2r0slp143DDiO41/LBHazy8R2eJAq8ygHUpn3W8ZYVLNngmMQYJUNSfLj7q7MnW3SOk8BBwXg81vkpZv84NcOPybtdhZ86nthVb9L0EN3uWPEmGFyPNru8UvHE6xCT2M= ARC-Authentication-Results: i=1; server2.sourceware.org DKIM-Filter: OpenDKIM Filter v2.11.0 sourceware.org 8814D3858D21 Received: from localhost (localhost [127.0.0.1]) by mail.cs.ucla.edu (Postfix) with ESMTP id 01E513C123844 for <libc-alpha@sourceware.org>; Sat, 4 Jan 2025 21:58:07 -0800 (PST) Received: from mail.cs.ucla.edu ([127.0.0.1]) by localhost (mail.cs.ucla.edu [127.0.0.1]) (amavis, port 10032) with ESMTP id DzIF5J5xb3Ru; Sat, 4 Jan 2025 21:58:06 -0800 (PST) Received: from localhost (localhost [127.0.0.1]) by mail.cs.ucla.edu (Postfix) with ESMTP id 863503C123843; Sat, 4 Jan 2025 21:58:06 -0800 (PST) DKIM-Filter: OpenDKIM Filter v2.10.3 mail.cs.ucla.edu 863503C123843 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=cs.ucla.edu; s=9D0B346E-2AEB-11ED-9476-E14B719DCE6C; t=1736056686; bh=rRSRKRCTxQQDChcYtqERFSwYUNElG4T0hJtkCZvJsgE=; h=From:To:Date:Message-ID:MIME-Version; b=c78Z531Tt2e3kheayc4vjyYDpg0TU79SWcGBa30o+ooC+0JSJ9xR1BZHu1AHksIGN vqEvfPrkAH8TH4yWNuKot8h7QOTbLVtf5wnue0mtdfEDuOPmaNxtjWPwyNftSQW1nB pCvXfPVaAEp4SbyrX9x+R7CmpKx965xvDhHy4JpnyzEtIZkVAe4UGPgfuJyHNrz4+s 5RzOI9EJD/QyYQBNVPBKPKtc4MsJtyuAMO9UD6HciDxathNR4E23Y7PdnRemfeGHWQ WgGZCQDvnnce2C5yePl8p8NIqkRs7SmoP2gZI1bQyc2pnYwW+rqnutwW3WeXKUlYXN LpNa5kO1j75Yw== X-Virus-Scanned: amavis at mail.cs.ucla.edu Received: from mail.cs.ucla.edu ([127.0.0.1]) by localhost (mail.cs.ucla.edu [127.0.0.1]) (amavis, port 10026) with ESMTP id 9oFC1PeGoYa1; Sat, 4 Jan 2025 21:58:06 -0800 (PST) Received: from wing.home (unknown [47.154.28.214]) by mail.cs.ucla.edu (Postfix) with ESMTPSA id 640FA3C082EB9; Sat, 4 Jan 2025 21:58:06 -0800 (PST) From: Paul Eggert <eggert@cs.ucla.edu> To: libc-alpha@sourceware.org Cc: Paul Eggert <eggert@cs.ucla.edu> Subject: [PATCH 00/59] time: sync mktime from Gnulib Date: Sat, 4 Jan 2025 21:56:35 -0800 Message-ID: <20250105055750.1668721-1-eggert@cs.ucla.edu> X-Mailer: git-send-email 2.45.2 In-Reply-To: <01207110-bd60-46ae-9c08-fb39c2011067@cs.ucla.edu> References: <01207110-bd60-46ae-9c08-fb39c2011067@cs.ucla.edu> MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: quoted-printable X-Spam-Status: No, score=-2.7 required=5.0 tests=BAYES_00, DKIM_SIGNED, DKIM_VALID, DKIM_VALID_AU, SPF_HELO_NONE, SPF_PASS, 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 X-BeenThere: libc-alpha@sourceware.org X-Mailman-Version: 2.1.30 Precedence: list List-Id: Libc-alpha mailing list <libc-alpha.sourceware.org> List-Unsubscribe: <https://sourceware.org/mailman/options/libc-alpha>, <mailto:libc-alpha-request@sourceware.org?subject=unsubscribe> List-Archive: <https://sourceware.org/pipermail/libc-alpha/> List-Post: <mailto:libc-alpha@sourceware.org> List-Help: <mailto:libc-alpha-request@sourceware.org?subject=help> List-Subscribe: <https://sourceware.org/mailman/listinfo/libc-alpha>, <mailto:libc-alpha-request@sourceware.org?subject=subscribe> Errors-To: libc-alpha-bounces~patchwork=sourceware.org@sourceware.org |
Series |
time: sync mktime from Gnulib
|
|
Message
Paul Eggert
Jan. 5, 2025, 5:56 a.m. UTC
This patch series syncs mktime from Gnulib. Among the issues it fixes is the problem reported by Florian a couple of days ago in "mktime tm_isdst compatibility improvements" <https://sourceware.org/pipermail/libc-alpha/2025-January/163342.html>. This patch series fixes that problem differently from Florian's proposal, without introducing a new glibc tunable. Florian Weimer (1): time: test DST adjustment for DST-less zones Paul Eggert (58): Split intprops.h into two Support stdckdint.h internally if older GCC Fix mishandling of default DST rule Don't worry about !TZDEFAULT Support static_assert in pre-C23 C Sync mktime.c from Gnulib 2024-10-04 Document mktime out-of-range + tm_isdst Push tzset lock into callers of time functions Omit parse_offset unnecessary *tz == '\0' Don’t assume TZif bloat is likely tzset no longer calls ftello Check TZif files more carefully Remove alignment assumption from __tzfile_read Treat oddball UTC offset strings as zero Simplify __tz_compute Improve performance in 2 BC Don’t mishandle years < 1970 in compute_change Match RFC 9636 names Trivial tzset_internal speedup Fix obscure bug when stdoffset == dstoffset Document assumption that NO_DST == 0 __use_tzfile is boolean Minor tzfile.c clarity improvements Stop using zic's -y option Fix mishandling of default DST rule Simplify treatment of missing and empty TZ TZ="" always means UTC sans leap seconds Prefer "UTC" for UTC Simplify setting tz_rules to UTC Update tzname etc. even if TZ is unchanged "POSIX TZ" -> "proleptic TZ" Reject invalid TZ strings in TZif files Reject TZif files containing '\0' in TZ string mktime should not consult 'daylight' Remove __use_tzfile Remove arbitrary limit on TZ, TZDIR lengths Tighten setuid TZif file name check Avoid a malloc in __tzfile_read Free earlier in __tzfile_read Improve __tzfile_read TZ="" comment Refactor enum tz_rule_type __offtime now returns struct tm * Fix overflow checking in offtime Handle TZif time type 0 correctly Remove invalid tzset tests from tst-bz29951.c tzset, not localtime, now parses TZif TZ spec Minor compute_change widening tweak Minor SECSPERDAY widening tweak Remove leap-second goto from __tzfile_compute Remove use_last label from __tzfile_compute Refactor ‘if’ in __tzfile_compute Refactor localtime ‘if’ in __tzfile_compute Refactor post-transition-table ‘if’ Refactor __tzfile_compute to avoid two gotos Refactor __tzfile_compute index local mktime: prefer bool to int mktime: port __mktime64 locking to Gnulib mktime: improve tm_isdst heuristic CONTRIBUTED-BY | 9 + Makeconfig | 16 +- NEWS | 18 + SHARED-FILES | 6 +- include/intprops-internal.h | 400 ++++++++++++ include/intprops.h | 356 +---------- include/stdckdint.h | 6 + include/stdckdint.in.h | 35 + include/sys/cdefs.h | 8 + include/time.h | 37 +- manual/time.texi | 69 +- resolv/ns_date.c | 2 +- sysdeps/generic/netinet/in_systm.h | 2 +- sysdeps/nptl/pthread.h | 2 +- time/Makefile | 1 + time/bits/types/struct_timeb.h | 2 +- time/gmtime.c | 8 +- time/localtime.c | 8 +- time/mktime-internal.h | 14 +- time/mktime.c | 172 ++--- time/offtime.c | 70 +- time/strftime_l.c | 3 +- time/sys/time.h | 2 +- time/timegm.c | 10 +- time/tst-mktime-dst-adjust.c | 156 +++++ time/tst-mktime2.c | 4 +- time/tst-posixtz.c | 65 +- time/tst-tzname.c | 110 +++- time/tzfile.c | 983 +++++++++++++---------------- time/tzset.c | 510 ++++++++------- time/tzset.h | 29 + timezone/Makefile | 5 +- timezone/private.h | 2 +- timezone/test-tz.c | 1 + timezone/testdata/IST | Bin 0 -> 285 bytes timezone/tst-bz29951.c | 8 - timezone/tst-timezone.c | 64 +- timezone/version | 2 +- 38 files changed, 1865 insertions(+), 1330 deletions(-) create mode 100644 include/intprops-internal.h create mode 100644 include/stdckdint.h create mode 100644 include/stdckdint.in.h create mode 100644 time/tst-mktime-dst-adjust.c create mode 100644 time/tzset.h create mode 100644 timezone/testdata/IST -- 2.45.2
Comments
On 1/5/25 12:56 AM, Paul Eggert wrote: > This patch series syncs mktime from Gnulib. Among the issues it fixes > is the problem reported by Florian a couple of days ago > in "mktime tm_isdst compatibility improvements" > <https://sourceware.org/pipermail/libc-alpha/2025-January/163342.html>. > This patch series fixes that problem differently from Florian's proposal, > without introducing a new glibc tunable. Please do not push this while we are preparing for glibc 2.41 to go out on February 1st (I see you mention this in your other email, but I'll note the version and date here). Please note that pre-commit CI has failed for this series and the patches introduce link namespace failures. Link namespace failures can be seen here: https://patchwork.sourceware.org/project/glibc/patch/20250105055750.1668721-60-eggert@cs.ucla.edu/
On Mon, 6 Jan 2025, Carlos O'Donell wrote: > On 1/5/25 12:56 AM, Paul Eggert wrote: > > This patch series syncs mktime from Gnulib. Among the issues it fixes > > is the problem reported by Florian a couple of days ago > > in "mktime tm_isdst compatibility improvements" > > <https://sourceware.org/pipermail/libc-alpha/2025-January/163342.html>. > > This patch series fixes that problem differently from Florian's proposal, > > without introducing a new glibc tunable. > > Please do not push this while we are preparing for glibc 2.41 to go out > on February 1st (I see you mention this in your other email, but I'll note > the version and date here). > > Please note that pre-commit CI has failed for this series and the patches > introduce link namespace failures. > > Link namespace failures can be seen here: > https://patchwork.sourceware.org/project/glibc/patch/20250105055750.1668721-60-eggert@cs.ucla.edu/ Those look like conform (compile-time) namespace failures, not link namespace. Concretely, in patch 5, the static_assert definition in the sys/cdefs.h wrapper needs to be under a !_ISOMAC conditional.
On 1/6/25 13:34, Joseph Myers wrote: > in patch 5, the static_assert definition in the > sys/cdefs.h wrapper needs to be under a !_ISOMAC conditional Thanks for diagnosing that. I'll put that into v2 (no rush since the patchset won't be committed before the next release). The static_assert stuff is because Gnulib arranges for C23-style single-argument static_assert to work regardless of what standard files are included, whereas glibc code doesn't assume C23 yet.