-
Notifications
You must be signed in to change notification settings - Fork 5
Open
Description
Another issue related to use of MSVC vs GCC/Clang.
On GCC the build fails due to the usage of gmtime_s
, which is not available on POSIX systems. Instead, gmtime_r
should be used.
Could you use a macro for something like this:
#include <ctime>
tm ImGui::Today() {
time_t currentTime = time(nullptr);
struct tm res;
#ifdef _WIN32
gmtime_s(&res, ¤tTime); // Windows (MSVC)
#else
gmtime_r(¤tTime, &res); // Linux/macOS (POSIX)
#endif
return res;
}
Thanks!
Metadata
Metadata
Assignees
Labels
No labels