mirror of
https://git.suyu.dev/suyu/breakpad.git
synced 2025-12-28 10:15:10 +01:00
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:
parent
fd00ae5f55
commit
c77fc8a32c
4 changed files with 29 additions and 5 deletions
|
|
@ -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);
|
||||
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue