Module Name: src Committed By: christos Date: Sat Oct 29 13:55:50 UTC 2022
Modified Files: src/lib/libc/time: Makefile NEWS localtime.c private.h theory.html version zdump.c zic.8 zic.c Log Message: Update to tzcode2022f Changes to code zic now supports links to links regardless of input line order. For example, if Australia/Sydney is a Zone, the lines Link Australia/Canberra Australia/ACT Link Australia/Sydney Australia/Canberra now work correctly, even though the shell commands ln Australia/Canberra Australia/ACT ln Australia/Sydney Australia/Canberra would fail because the first command attempts to use a link Australia/Canberra that does not exist until after the second command is executed. Previously, zic had unspecified behavior if a Link line's target was another link, and zic often misbehaved if a Link line's target was a later Link line. Fix line number in zic's diagnostic for a link to a link. Fix a bug that caused localtime to mishandle timestamps starting in the year 2438 when reading data generated by 'zic -b fat' when distant-future DST transitions occur at times given in standard time or in UT, not the usual case of local time. This occurs when the corresponding .zi Rule lines specify DST transitions with TO columns of 'max' and AT columns that end in 's' or 'u'. The number 2438 comes from the 32-bit limit in the year 2038, plus the 400-year Gregorian cycle. (Problem reported by Bradley White.) On glibc 2.34 and later, which optionally supports 64-bit time_t on platforms like x86 where time_t was traditionally 32 bits, default time_t to 64 instead of 32 bits. This lets functions like localtime support timestamps after the year 2038, and fixes year-2038 problems in zic when accessing files dated after 2038. To continue to limit time_t to 32 bits on these platforms, use "make CFLAGS='-D_TIME_BITS=32'". In C code, do not enable large-file support on platforms like AIX and macOS that no longer need it now that tzcode does not use off_t or related functions like 'stat'. Large-file support is still enabled by default on GNU/Linux, as it is needed for 64-bit time_t support. In C code, prefer C23 keywords to pre-C23 macros for alignof, bool, false, and true. Also, use the following C23 features if available: __has_include, unreachable. zic no longer works around Qt bug 53071, as the relevant Qt releases have been out of support since 2019. This change affects only fat TZif files, as thin files never had the workaround. zdump no longer modifies the environ vector when compiled on platforms lacking tm_zone or when compiled with -DUSE_LTZ=0. This avoid undefined behavior on POSIX platforms. To generate a diff of this commit: cvs rdiff -u -r1.52 -r1.53 src/lib/libc/time/Makefile cvs rdiff -u -r1.38 -r1.39 src/lib/libc/time/NEWS cvs rdiff -u -r1.134 -r1.135 src/lib/libc/time/localtime.c cvs rdiff -u -r1.60 -r1.61 src/lib/libc/time/private.h cvs rdiff -u -r1.15 -r1.16 src/lib/libc/time/theory.html cvs rdiff -u -r1.21 -r1.22 src/lib/libc/time/version cvs rdiff -u -r1.57 -r1.58 src/lib/libc/time/zdump.c cvs rdiff -u -r1.39 -r1.40 src/lib/libc/time/zic.8 cvs rdiff -u -r1.83 -r1.84 src/lib/libc/time/zic.c Please note that diffs are not public domain; they are subject to the copyright notices on the relevant files.