1
0
mirror of https://github.com/mariadb-corporation/mariadb-columnstore-engine.git synced 2025-08-01 06:46:55 +03:00

Remove windows ifdefs

This commit is contained in:
Leonid Fedorov
2023-03-02 15:59:42 +00:00
parent 123c345b40
commit 56f2346083
328 changed files with 9 additions and 19602 deletions

View File

@ -51,26 +51,8 @@ const string JSTimeStamp::format(const struct timeval& tvbuf)
string res;
char timeString[50];
struct tm tmbuf;
#ifdef _MSC_VER
errno_t p = 0;
time_t t = tvbuf.tv_sec;
p = localtime_s(&tmbuf, &t);
if (p != 0)
{
memset(&tmbuf, 0, sizeof(tmbuf));
strcpy(timeString, "UNKNOWN");
}
else
{
if (strftime(timeString, 50, "%Y-%m-%d %H:%M:%S", &tmbuf) == 0)
strcpy(timeString, "UNKNOWN");
}
#else
localtime_r(&tvbuf.tv_sec, &tmbuf);
strftime(timeString, 50, "%F %T", &tmbuf);
#endif
const int len = strlen(timeString);
snprintf(&timeString[len], (50 - len), ".%06lu", tvbuf.tv_usec);
res = timeString;