aboutsummaryrefslogtreecommitdiff
path: root/src/processor/logging.cc
diff options
context:
space:
mode:
authorted.mielczarek <ted.mielczarek@4c0a9323-5329-0410-9bdc-e9ce6186880e>2011-01-11 20:27:29 +0000
committerted.mielczarek <ted.mielczarek@4c0a9323-5329-0410-9bdc-e9ce6186880e>2011-01-11 20:27:29 +0000
commitc77fc8a32c8af421c7e0d5fe81eccfb62329dff2 (patch)
treecb97edae79228538089afc1e04c9aaa207898e35 /src/processor/logging.cc
parentFixing typos that will soon be gyp errors. (diff)
downloadbreakpad-c77fc8a32c8af421c7e0d5fe81eccfb62329dff2.tar.xz
Make some parts of the processor compile on Win32/MSVC
R=mark at http://breakpad.appspot.com/250001 git-svn-id: http://google-breakpad.googlecode.com/svn/trunk@751 4c0a9323-5329-0410-9bdc-e9ce6186880e
Diffstat (limited to 'src/processor/logging.cc')
-rw-r--r--src/processor/logging.cc8
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);