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 [thread overview]
Message-ID: <20250105055750.1668721-1-eggert@cs.ucla.edu> (raw)
In-Reply-To: <01207110-bd60-46ae-9c08-fb39c2011067@cs.ucla.edu>
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
next prev parent reply other threads:[~2025-01-05 5:58 UTC|newest]
Thread overview: 72+ messages / expand[flat|nested] mbox.gz Atom feed top
2025-01-02 17:42 [PATCH v2 0/4] mktime tm_isdst compatibility improvements Florian Weimer
2025-01-02 17:42 ` [PATCH v2 1/4] time: Use __tz_convert in mktime implementation Florian Weimer
2025-01-02 17:42 ` [PATCH v2 2/4] time: Push tzset lock into callers of time functions Florian Weimer
2025-01-02 17:42 ` [PATCH v2 3/4] time: Do not perform forced DST adjustment for DST-less zones Florian Weimer
2025-01-02 17:42 ` [PATCH v2 4/4] time: Implement the glibc.time.mktime_dst_adjustment tunable Florian Weimer
2025-01-05 2:58 ` [PATCH v2 0/4] mktime tm_isdst compatibility improvements Paul Eggert
2025-01-05 5:56 ` Paul Eggert [this message]
2025-01-06 14:30 ` [PATCH 00/59] time: sync mktime from Gnulib Carlos O'Donell
2025-01-06 21:34 ` Joseph Myers
2025-01-06 21:43 ` Paul Eggert
2025-01-05 5:56 ` [PATCH 01/59] Split intprops.h into two Paul Eggert
2025-01-05 5:56 ` [PATCH 02/59] Support stdckdint.h internally if older GCC Paul Eggert
2025-01-05 5:56 ` [PATCH 03/59] Fix mishandling of default DST rule Paul Eggert
2025-01-05 5:56 ` [PATCH 04/59] Don't worry about !TZDEFAULT Paul Eggert
2025-01-05 5:56 ` [PATCH 05/59] Support static_assert in pre-C23 C Paul Eggert
2025-01-05 5:56 ` [PATCH 06/59] Sync mktime.c from Gnulib 2024-10-04 Paul Eggert
2025-01-05 5:56 ` [PATCH 07/59] Document mktime out-of-range + tm_isdst Paul Eggert
2025-01-05 8:03 ` Florian Weimer
2025-01-05 14:03 ` Paul Eggert
2025-01-05 5:56 ` [PATCH 08/59] Push tzset lock into callers of time functions Paul Eggert
2025-01-05 5:56 ` [PATCH 09/59] Omit parse_offset unnecessary *tz == '\0' Paul Eggert
2025-01-05 5:56 ` [PATCH 10/59] Don’t assume TZif bloat is likely Paul Eggert
2025-01-05 5:56 ` [PATCH 11/59] tzset no longer calls ftello Paul Eggert
2025-01-05 5:56 ` [PATCH 12/59] Check TZif files more carefully Paul Eggert
2025-01-05 5:56 ` [PATCH 13/59] Remove alignment assumption from __tzfile_read Paul Eggert
2025-01-05 5:56 ` [PATCH 14/59] Treat oddball UTC offset strings as zero Paul Eggert
2025-01-05 5:56 ` [PATCH 15/59] Simplify __tz_compute Paul Eggert
2025-01-05 5:56 ` [PATCH 16/59] Improve performance in 2 BC Paul Eggert
2025-01-05 5:56 ` [PATCH 17/59] Don’t mishandle years < 1970 in compute_change Paul Eggert
2025-01-05 5:56 ` [PATCH 18/59] Match RFC 9636 names Paul Eggert
2025-01-05 5:56 ` [PATCH 19/59] Trivial tzset_internal speedup Paul Eggert
2025-01-05 5:56 ` [PATCH 20/59] Fix obscure bug when stdoffset == dstoffset Paul Eggert
2025-01-05 5:56 ` [PATCH 21/59] Document assumption that NO_DST == 0 Paul Eggert
2025-01-05 5:56 ` [PATCH 22/59] __use_tzfile is boolean Paul Eggert
2025-01-05 5:56 ` [PATCH 23/59] Minor tzfile.c clarity improvements Paul Eggert
2025-01-05 5:56 ` [PATCH 24/59] Stop using zic's -y option Paul Eggert
2025-01-05 5:57 ` [PATCH 25/59] Fix mishandling of default DST rule Paul Eggert
2025-01-05 5:57 ` [PATCH 26/59] Simplify treatment of missing and empty TZ Paul Eggert
2025-01-05 5:57 ` [PATCH 27/59] TZ="" always means UTC sans leap seconds Paul Eggert
2025-01-05 5:57 ` [PATCH 28/59] Prefer "UTC" for UTC Paul Eggert
2025-01-05 5:57 ` [PATCH 29/59] Simplify setting tz_rules to UTC Paul Eggert
2025-01-05 5:57 ` [PATCH 30/59] Update tzname etc. even if TZ is unchanged Paul Eggert
2025-01-05 5:57 ` [PATCH 31/59] "POSIX TZ" -> "proleptic TZ" Paul Eggert
2025-01-05 5:57 ` [PATCH 32/59] Reject invalid TZ strings in TZif files Paul Eggert
2025-01-05 5:57 ` [PATCH 33/59] Reject TZif files containing '\0' in TZ string Paul Eggert
2025-01-05 5:57 ` [PATCH 34/59] mktime should not consult 'daylight' Paul Eggert
2025-01-05 5:57 ` [PATCH 35/59] Remove __use_tzfile Paul Eggert
2025-01-05 5:57 ` [PATCH 36/59] Remove arbitrary limit on TZ, TZDIR lengths Paul Eggert
2025-01-05 5:57 ` [PATCH 37/59] Tighten setuid TZif file name check Paul Eggert
2025-01-05 5:57 ` [PATCH 38/59] Avoid a malloc in __tzfile_read Paul Eggert
2025-01-05 5:57 ` [PATCH 39/59] Free earlier " Paul Eggert
2025-01-05 5:57 ` [PATCH 40/59] Improve __tzfile_read TZ="" comment Paul Eggert
2025-01-05 5:57 ` [PATCH 41/59] Refactor enum tz_rule_type Paul Eggert
2025-01-05 5:57 ` [PATCH 42/59] __offtime now returns struct tm * Paul Eggert
2025-01-05 5:57 ` [PATCH 43/59] Fix overflow checking in offtime Paul Eggert
2025-01-05 5:57 ` [PATCH 44/59] Handle TZif time type 0 correctly Paul Eggert
2025-01-05 5:57 ` [PATCH 45/59] Remove invalid tzset tests from tst-bz29951.c Paul Eggert
2025-01-05 5:57 ` [PATCH 46/59] tzset, not localtime, now parses TZif TZ spec Paul Eggert
2025-01-05 5:57 ` [PATCH 47/59] Minor compute_change widening tweak Paul Eggert
2025-01-05 5:57 ` [PATCH 48/59] Minor SECSPERDAY " Paul Eggert
2025-01-05 5:57 ` [PATCH 49/59] Remove leap-second goto from __tzfile_compute Paul Eggert
2025-01-05 5:57 ` [PATCH 50/59] Remove use_last label " Paul Eggert
2025-01-05 5:57 ` [PATCH 51/59] Refactor ‘if’ in __tzfile_compute Paul Eggert
2025-01-05 5:57 ` [PATCH 52/59] Refactor localtime " Paul Eggert
2025-01-05 5:57 ` [PATCH 53/59] Refactor post-transition-table ‘if’ Paul Eggert
2025-01-05 5:57 ` [PATCH 54/59] Refactor __tzfile_compute to avoid two gotos Paul Eggert
2025-01-05 5:57 ` [PATCH 55/59] Refactor __tzfile_compute index local Paul Eggert
2025-01-05 5:57 ` [PATCH 56/59] mktime: prefer bool to int Paul Eggert
2025-01-05 5:57 ` [PATCH 57/59] mktime: port __mktime64 locking to Gnulib Paul Eggert
2025-01-05 5:57 ` [PATCH 58/59] mktime: improve tm_isdst heuristic Paul Eggert
2025-01-05 5:57 ` [PATCH 59/59] time: test DST adjustment for DST-less zones Paul Eggert
2025-01-07 8:59 ` [PATCH v2 0/4] mktime tm_isdst compatibility improvements Florian Weimer
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=20250105055750.1668721-1-eggert@cs.ucla.edu \
--to=eggert@cs.ucla.edu \
--cc=libc-alpha@sourceware.org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).