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
Nov 18, 2021, 09:05 UTC
Message-ID
<20211118090542.rcaggue6zpd7r3ht@glandium.org>
In-Reply-To
<CAPUEsphf0d90HGg64j=jZnt-Xuhs_bwmeOyoUnmzesp_k2c4JA@mail.gmail.com>
On Wed, Nov 17, 2021 at 11:58:00PM -0800, Carlo Arenas wrote:
Show 21 quoted lines
> On Wed, Nov 17, 2021 at 9:34 PM Mike Hommey <mh@glandium.org> wrote:
> > On Wed, Nov 17, 2021 at 08:51:06PM -0800, Carlo Arenas wrote:
> > > It is not in 2.34; only in the git for windows fork, but agree is
> > > needed if you are building master with a newish mingw
> >
> > Err, I did mean 2.34.0.windows.1. My working workaround is to build with
> > -D_POSIX_THREAD_SAFE_FUNCTIONS=200112L.
> 
> that is strange, building main/2.34.0.windows.1 works for me both in a
> mingw64 shell and the git for windows sdk, and the PR[1] worked as
> well when applied to 2.34/master that uses a git for windows sdk for
> building it and that would had failed without it as you reported.
> 
> what version `pacman -q | grep pthread` of the winpthreads library do
> you have?, anything else peculiar about your build environment that
> you could think of?
> 
> that define and the setting in git-compat-util.h should have
> equivalent effect in your mingw headers; what does the relevant
> (almost at the bottom, where the problematic functions are defined)
> part of /mingw64/x86_64-w64-mingw32/include/time.h say?

Oh my bad, I overlooked an important part of the build log: it was a mingw32 build, not minwg64. Mingw64 builds fine without -D_POSIX_THREAD_SAFE_FUNCTIONS=200112L. Mingw32 requires it (because the ifdefs are for mingw64)

Mike
Previous: Carlo ArenasNext: Carlo Arenas
Message 8 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.