collection_resolver progress
This commit is contained in:
@@ -1,10 +1,12 @@
|
||||
#include "matador/utils/os.hpp"
|
||||
|
||||
#include <sys/stat.h>
|
||||
#include <cstring>
|
||||
#include <vector>
|
||||
#include <stdexcept>
|
||||
#include <ctime>
|
||||
|
||||
#include <algorithm>
|
||||
#include <cstring>
|
||||
#include <stdexcept>
|
||||
#include <vector>
|
||||
|
||||
#ifdef _WIN32
|
||||
#include <io.h>
|
||||
@@ -357,4 +359,16 @@ char* strerror(int err, char* errbuf, size_t bufsize)
|
||||
#endif
|
||||
}
|
||||
|
||||
void localtime(const time_t &in, struct tm &out) {
|
||||
#if defined(__unix__)
|
||||
localtime_r(&in, &out);
|
||||
#elif defined(_MSC_VER)
|
||||
errno_t err = localtime_s(&out, &in);
|
||||
#else
|
||||
static std::mutex mtx;
|
||||
std::lock_guard<std::mutex> lock(mtx);
|
||||
out = *std::localtime(&in);
|
||||
#endif
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user