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
This commit is contained in:
ted.mielczarek 2011-01-11 20:27:29 +00:00
parent fd00ae5f55
commit c77fc8a32c
4 changed files with 29 additions and 5 deletions

View file

@ -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);