Commit aac93c52 authored by Martin Marinov's avatar Martin Marinov

Merged the research branch into ReForm. No behaviour changes.

[git-p4: depot-paths = "//ReForm/ReForm/main/Base/": change = 13190]
parent af998d8d
......@@ -23,6 +23,12 @@
#include <list>
#include <map>
#include <sstream>
#include <cstring>
#include <time.h>
#ifndef WIN32
#define sprintf_s snprintf
#endif
namespace { // LOCAL_PROC
bool is_html_filename(const char* const str)
......@@ -515,7 +521,8 @@ public:
time_t rawtime;
time(&rawtime);
struct tm timeinfo;
errno_t err = localtime_s(&timeinfo, &rawtime);
#ifdef WIN32
int err = localtime_s(&timeinfo, &rawtime);
if (err == 0)
{
char buffer[256];
......@@ -526,6 +533,12 @@ public:
return true;
}
}
#else//WIN32
//TODO: Implement a secure version of this code for Linux, OSX
//timeinfo = *localtime(&rawtime);
//char* buffer = asctime(&timeinfo);
str.append("TODO: add_time()");
#endif//WIN32
return false;
}
......
......@@ -66,7 +66,7 @@ namespace Base {
class StopWatch::Impl
{
public:
StopWatch()
Impl()
{
starttime_.tv_sec = starttime_.tv_usec = 0;
endtime_.tv_sec = endtime_.tv_usec = 0;
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment