git/compat
Johannes Schindelin ee69d97fa3 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>
2026-06-22 06:00:30 -07:00
..
darwin trace2: add macOS process ancestry tracing 2026-02-13 12:18:31 -08:00
fsmonitor fsmonitor: implement filesystem change listener for Linux 2026-04-15 08:44:33 -07:00
linux
poll unify and bump _WIN32_WINNT definition to Windows 8.1 2026-04-06 10:06:20 -07:00
regex
simple-ipc git-compat-util: introduce MEMZERO_ARRAY() macro 2025-12-11 14:44:43 +09:00
stub
vcbuild
win32 Merge branch 'js/win-kill-child-more-gently' 2026-06-16 09:01:02 -07:00
.gitattributes
access.c
apple-common-crypto.h
basename.c
bswap.h
compiler.h
disk.h
fileno.c
fopen.c
hstrerror.c
inet_ntop.c
inet_pton.c
memmem.c
mingw-posix.h mingw: implement basic `symlink()` functionality (file symlinks only) 2026-01-09 18:32:55 -08:00
mingw.c mingw: really handle SIGINT 2026-06-05 22:39:57 +09:00
mingw.h
mkdir.c
mmap.c compat/mmap: mark unused argument in git_munmap() 2025-11-18 09:36:05 -08:00
msvc-posix.h compat/msvc: use _chsize_s for ftruncate 2026-06-15 07:45:40 -07:00
msvc.c
msvc.h
nonblock.c
nonblock.h
obstack.c
obstack.h
open.c
posix.h win32: ensure that `localtime_r()` is declared even in i686 builds 2026-06-22 06:00:30 -07:00
pread.c
precompose_utf8.c Merge branch 'ak/typofixes' 2026-06-15 07:42:00 -07:00
precompose_utf8.h
qsort_s.c
regcomp_enhanced.c regexp: leave a pointer to resurrect workaround for Homebrew 2026-03-25 15:04:30 -07:00
setenv.c
sha1-chunked.c
sha1-chunked.h
snprintf.c
stat.c
strcasestr.c
strdup.c
strlcpy.c
strtoimax.c
strtoumax.c
terminal.c
terminal.h
unsetenv.c
win32.h mingw: teach dirent about symlinks 2026-01-09 18:32:55 -08:00
win32mmap.c
winansi.c compat/winansi: drop pre-Vista workaround 2026-04-06 10:06:22 -07:00
zlib-compat.h test-tool: add a helper to synthesize large packfiles 2026-05-09 11:25:32 +09:00