git/list[1] front-page[2] threads[3] people[4] search[5] about
 

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

From
Mike Hommey <mh@glandium.org>
Date
Oct 5, 2021, 08:35 UTC
Message-ID
<20211005083500.jd7byba4abupdub5@glandium.org>
In-Reply-To
<CAPUEspgLwLxavP3bC9OEJQTphoemQ+jxv+9Nkcvbf51uaBEpww@mail.gmail.com>
On Tue, Oct 05, 2021 at 12:12:12AM -0700, Carlo Arenas wrote:
Show 8 quoted lines
> On Mon, Oct 4, 2021 at 11:57 PM Mike Hommey <mh@glandium.org> wrote:
> > 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
Previous: Carlo ArenasNext: Mike Hommey
Message 3 of 11 in “Use mingw.h declarations for gmtime_r/localtime_r on msys2”
  1. Use mingw.h declarations for gmtime_r/localtime_r on msys2Mike Hommey, Oct 5, 2021
  2. Carlo ArenasOct 5, 2021
  3. Mike HommeyOct 5, 2021
  4. Mike HommeyNov 18, 2021
  5. Carlo ArenasNov 18, 2021
  6. Mike HommeyNov 18, 2021
  7. Carlo ArenasNov 18, 2021
  8. Mike HommeyNov 18, 2021
  9. Carlo ArenasNov 19, 2021
  10. Mike HommeyNov 19, 2021
  11. Carlo ArenasNov 19, 2021

Read the whole thread, see it on lore, or plain text.

$ cat FOOTERMessages come from the public archive at lore.kernel.org/git, fetched every hour. The front page is chosen and written each morning by an AI editor and can be wrong; the threads themselves are the record. About and API. For agents: an MCP server at https://gitlist.dev/mcp, and any thread, story or person page as Markdown by adding .md to its URL (or sending Accept: text/markdown). Details in /llms.txt.