mirror of
https://github.com/Kitware/CMake.git
synced 2026-02-18 05:01:50 -06:00
Merge topic 'mingw-strftime-crash' into release-3.22
992e6d7c5d mingw: fix calling convention for strftime()
Acked-by: Kitware Robot <kwrobot@kitware.com>
Merge-request: !6762
This commit is contained in:
@@ -197,7 +197,7 @@ std::string cmTimestamp::AddTimestampComponent(char flag,
|
||||
#ifdef __MINGW32__
|
||||
/* See a bug in MinGW: https://sourceforge.net/p/mingw-w64/bugs/793/. A work
|
||||
* around is to try to use strftime() from ucrtbase.dll. */
|
||||
using T = size_t(WINAPI*)(char*, size_t, const char*, const struct tm*);
|
||||
using T = size_t(__cdecl*)(char*, size_t, const char*, const struct tm*);
|
||||
auto loadUcrtStrftime = []() -> T {
|
||||
auto handle =
|
||||
LoadLibraryExA("ucrtbase.dll", nullptr, LOAD_LIBRARY_SEARCH_SYSTEM32);
|
||||
|
||||
Reference in New Issue
Block a user