diff options
| author | Junio C Hamano <gitster@pobox.com> | 2026-04-03 15:24:44 -0700 |
|---|---|---|
| committer | Junio C Hamano <gitster@pobox.com> | 2026-04-03 15:24:44 -0700 |
| commit | e1bfba5ff09c08a12dda2fd0cd3c3bdf8315e690 (patch) | |
| tree | 6f724c87431e0c9df5311c51c88b30c318c70f9b /compat/mingw.c | |
| parent | 8de2f1b07a8053d7f1aad70dc1131d6afcf5a28a (diff) | |
| parent | c664ee2001a1ea0ecbc6448b24303687e6caf1cb (diff) | |
| download | git-e1bfba5ff09c08a12dda2fd0cd3c3bdf8315e690.tar.xz | |
Merge branch 'js/mingw-use-strftime-directly-in-ucrt-build'
MinGW build updates.
* js/mingw-use-strftime-directly-in-ucrt-build:
mingw: use strftime() directly in UCRT builds
Diffstat (limited to 'compat/mingw.c')
| -rw-r--r-- | compat/mingw.c | 4 |
1 files changed, 4 insertions, 0 deletions
diff --git a/compat/mingw.c b/compat/mingw.c index c667a2dcda..338ec3535e 100644 --- a/compat/mingw.c +++ b/compat/mingw.c @@ -1394,6 +1394,9 @@ revert_attrs: size_t mingw_strftime(char *s, size_t max, const char *format, const struct tm *tm) { +#ifdef _UCRT + size_t ret = strftime(s, max, format, tm); +#else /* a pointer to the original strftime in case we can't find the UCRT version */ static size_t (*fallback)(char *, size_t, const char *, const struct tm *) = strftime; size_t ret; @@ -1404,6 +1407,7 @@ size_t mingw_strftime(char *s, size_t max, ret = strftime(s, max, format, tm); else ret = fallback(s, max, format, tm); +#endif if (!ret && errno == EINVAL) die("invalid strftime format: '%s'", format); |
