aboutsummaryrefslogtreecommitdiff
path: root/newlib/libc/stdio/vasniprintf.c
diff options
context:
space:
mode:
authorCorinna Vinschen <corinna@vinschen.de>2025-07-18 14:06:16 +0200
committerCorinna Vinschen <corinna@vinschen.de>2025-07-18 14:06:16 +0200
commita0634931f181e9b46818f6fda15d6c28583dccbb (patch)
tree73756a34dfe987841b8fb899193840dd66c753a6 /newlib/libc/stdio/vasniprintf.c
parent73600d68227e125af24b7de7c3fccbd4eb66ee03 (diff)
downloadnewlib-a0634931f181e9b46818f6fda15d6c28583dccbb.zip
newlib-a0634931f181e9b46818f6fda15d6c28583dccbb.tar.gz
newlib-a0634931f181e9b46818f6fda15d6c28583dccbb.tar.bz2
Cygwin: clocks: read leap secs from /etc/leapsecs on older systems
Systems prior to W10 1803 don't have the leapsecs registry key HKLM\SYSTEM\CurrentControlSet\Control\LeapSecondInformation and don't handle leap seconds at all. Given that new leap seconds are a rather seldom, irregular event, drop reading from /usr/share/zoneinfo/leapseconds. Just read the same leap second records from a file /etc/leapsecs as stored in the LeapSeconds registry value on newer systems instead. As a sidenote, the code reading from /usr/share/zoneinfo/leapseconds was wrong anyway, because it didn't take the timestamps into account. Given IERS publishes new leap seconds about 6 months before they occur, CLOCK_TAI would have been one second off for up to 6 months. /etc/leapsecs doesn't exist yet, so we just default to 37 secs. If new leap seconds get provided for newer systems, make sure to provide the /etc/leapsecs file as part of the Cygwin distro with identical entries. Fixes: 2abb929f0ad2 ("Cygwin: clocks: Implement CLOCK_TAI") Signed-off-by: Corinna Vinschen <corinna@vinschen.de>
Diffstat (limited to 'newlib/libc/stdio/vasniprintf.c')
0 files changed, 0 insertions, 0 deletions