Re: [PATCH] Use mingw.h declarations for gmtime_r/localtime_r on msys2

From
Mike Hommey <hidden>
Date
2021-10-05 08:35:17
Reply to
Carlo Arenas, 2021-10-05
On Tue, Oct 05, 2021 at 12:12:12AM -0700, Carlo Arenas wrote:
On Mon, Oct 4, 2021 at 11:57 PM Mike Hommey [off-list ref] wrote:
quoted
A possible alternative fix would be to e.g. add `#define _POSIX_C_SOURCE
200112L` to git-compat-util.h and add `ifndef __MINGW64_VERSION_MAJOR`
around the definitions of `gmtime_r` and `localtime_r` in
compat/mingw.c, since, after all, they are available there.
something like that was merged to "main"[1] a few months ago, would
that work for you?
This seems very close to what I was suggesting, so I would guess so :)
I'm wondering if there's a reason not to set _POSIX_C_SOURCE everywhere,
along the other _*_SOURCE's.

Mike
Thread (11 messages) 11 messages, 2 authors, last reply 2021-11-19
Keyboard shortcuts
hback out one level
jnext message in thread / next series-diff position
kprevious message in thread / previous series-diff position
ldrill in
Escclose help / fold thread tree
?toggle this help