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
Carlo Arenas <carenas@gmail.com>
Date
Nov 19, 2021, 09:36 UTC
Message-ID
<CAPUEspic-qgLWGgcJeO52A1XeUh7p+F_WKfH0NLYMmMRWL7Cnw@mail.gmail.com>
In-Reply-To
<20211119072357.oxl5caye742blz5j@glandium.org>
On Thu, Nov 18, 2021 at 11:24 PM Mike Hommey <mh@glandium.org> wrote:
Show 5 quoted lines
>
> The ifdef around gmtime_r and localtime_r in mingw.h is for __MINGW64_VERSION_MAJOR.
> The ifdef around _POSIX_C_SOURCE in git-compat-util.h is for
> __MINGW64__.
> I'd imagine that plays a role.

Must be, and indeed you are right that my 32-bit compiler doesn't set __MINGW64__ (only __MINGW32__) and I am not hitting that codepath, but I have no problem building and it seems it is because _POSIX_THREAD_SAFE_FUNCTIONS it is defined unconditionally at the end of pthread_unistd.h, unlike what is done for x86_64.

somehow your version of headers might had that removed in both, and that was "fixed" later. I have 6346 in i386 and 6306 in x86_64.

Carlo
Previous: Mike Hommey
Message 11 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.