Windows build fixes

This commit is contained in:
Jack Andersen
2018-08-25 21:58:04 -10:00
parent 19c5443e9e
commit 33d2cc9ef1
3 changed files with 266 additions and 259 deletions

View File

@@ -307,10 +307,17 @@ std::string AudioGroupDatabase::exportCHeader(std::string_view projectName, std:
ret += "\n"
" * Date: "sv;
time_t curTime = time(nullptr);
#ifndef _WIN32
struct tm curTm;
localtime_r(&curTime, &curTm);
char curTmStr[26];
asctime_r(&curTm, curTmStr);
#else
struct tm curTm;
localtime_s(&curTm, &curTime);
char curTmStr[26];
asctime_s(curTmStr, &curTm);
#endif
ret += curTmStr;
ret += "\n"
" */\n\n\n"sv;