diff options
author | Emanuele Torre <torreemanuele6@gmail.com> | 2024-03-18 17:22:59 +0100 |
---|---|---|
committer | GitHub <noreply@github.com> | 2024-03-18 17:22:59 +0100 |
commit | d777b6570c5225cdd946894fb99b6746df6dfa85 (patch) | |
tree | 22e40a0e3e2be9e9e84ba15df74b68c8f90f56ec /build | |
parent | 1411ce63d5314ad8771d2bae01d0a4144b30049c (diff) |
util.c: fix _WIN32 port of strptime (#3071)
In windows, time_t is a signed 32-bit integer type, so TIME_MAX needs to
be declared as INT32_MAX instead of INT64_MAX.
Also bump NetBSD's strptime to revision 1.65 from 1.63 to fix undefined
behaviour (signed integer overflow) bugs.
Related NetBSD problem report:
https://gnats.netbsd.org/cgi-bin/query-pr-single.pl?number=58041
Noticed thanks to a compiler warning in the windows build CI.
I declared the d variable as time_t instead of as unsigned to ensure
that the signedness/size of TIME_MAX-d in the sse > TIME_MAX-d check
is always correct, and to prevent -Wsign-compare warnings from
triggering in the windows build.
Diffstat (limited to 'build')
0 files changed, 0 insertions, 0 deletions