Fix usage of snprintf for MSVC

Older versions of MSVC don't have a snprintf functions. Some files
were already working around that, but not all of them. Instead of
copying the logic into every file, I centralize it into a new
stdio.h wrapper file and make other files include that.

BUG=
R=mark@chromium.org

Review URL: https://codereview.chromium.org/1602563003 .

Patch from Pavel Labath <labath@google.com>.
This commit is contained in:
Pavel Labath
2016-01-19 21:28:44 -05:00
committed by Mark Mentovai
parent 126a938fef
commit 48673cdb8c
7 changed files with 50 additions and 17 deletions

View File

@@ -35,20 +35,16 @@
#include <assert.h>
#include <errno.h>
#include <stdio.h>
#include <string.h>
#include <time.h>
#include <string>
#include "common/stdio.h"
#include "common/using_std_string.h"
#include "processor/logging.h"
#include "processor/pathname_stripper.h"
#ifdef _WIN32
#define snprintf _snprintf
#endif
namespace google_breakpad {
LogStream::LogStream(std::ostream &stream, Severity severity,