diff options
| author | Johannes Schindelin <johannes.schindelin@gmx.de> | 2026-06-22 08:44:06 +0000 |
|---|---|---|
| committer | Junio C Hamano <gitster@pobox.com> | 2026-06-22 06:00:30 -0700 |
| commit | ee69d97fa33b620f0fad9d82c87a7e57628a1b0e (patch) | |
| tree | 4729d7e4522fd6c13a9bb256c8d4485e93370376 /t/t4013/diff.diff_initial..side | |
| parent | 26d8d94e94df5535eecd036f16627493506a0614 (diff) | |
win32: ensure that `localtime_r()` is declared even in i686 builds
The `__MINGW64__` constant is defined, surprise, surprise, only when
building for a 64-bit CPU architecture.
Therefore using it as a guard to define `_POSIX_C_SOURCE` (so that
`localtime_r()` is declared, among other functions) is not enough, we
also need to check `__MINGW32__`.
Technically, the latter constant is defined even for 64-bit builds. But
let's make things a bit easier to understand by testing for both
constants.
Making it so fixes this compile warning (turned error in GCC v14.1):
archive-zip.c: In function 'dos_time':
archive-zip.c:612:9: error: implicit declaration of function 'localtime_r';
did you mean 'localtime_s'? [-Wimplicit-function-declaration]
612 | localtime_r(&time, &tm);
| ^~~~~~~~~~~
| localtime_s
Signed-off-by: Johannes Schindelin <johannes.schindelin@gmx.de>
Signed-off-by: Junio C Hamano <gitster@pobox.com>
Diffstat (limited to 't/t4013/diff.diff_initial..side')
0 files changed, 0 insertions, 0 deletions
