diff options
Diffstat (limited to 'src/processor/logging.cc')
-rw-r--r-- | src/processor/logging.cc | 8 |
1 files changed, 8 insertions, 0 deletions
diff --git a/src/processor/logging.cc b/src/processor/logging.cc index 8842df35..c58fb8dd 100644 --- a/src/processor/logging.cc +++ b/src/processor/logging.cc @@ -44,13 +44,21 @@ namespace google_breakpad { +#ifdef _WIN32 +#define snprintf _snprintf +#endif + LogStream::LogStream(std::ostream &stream, Severity severity, const char *file, int line) : stream_(stream) { time_t clock; time(&clock); struct tm tm_struct; +#ifdef _WIN32 + localtime_s(&tm_struct, &clock); +#else localtime_r(&clock, &tm_struct); +#endif char time_string[20]; strftime(time_string, sizeof(time_string), "%Y-%m-%d %H:%M:%S", &tm_struct); |