Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(63)

Unified Diff: src/common/stdio.h

Issue 1602563003: Fix usage of snprintf for MSVC (Closed) Base URL: https://chromium.googlesource.com/breakpad/breakpad@master
Patch Set: Created 4 years, 11 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View side-by-side diff with in-line comments
Download patch
« no previous file with comments | « no previous file | src/processor/dump_context.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: src/common/stdio.h
diff --git a/src/processor/dump_object.cc b/src/common/stdio.h
similarity index 83%
copy from src/processor/dump_object.cc
copy to src/common/stdio.h
index 2c82b200b874d943a8fae20e607d7eca1e4a5fab..1eec8a00867b0cf0fc6f5774eb373407d5d5568b 100644
--- a/src/processor/dump_object.cc
+++ b/src/common/stdio.h
@@ -1,4 +1,4 @@
-// Copyright (c) 2010 Google Inc.
+// Copyright (c) 2016, Google Inc.
// All rights reserved.
//
// Redistribution and use in source and binary forms, with or without
@@ -27,13 +27,17 @@
// (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE
// OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
-// dump_object.cc: A base class for all mini/micro dump object.
+#ifndef GOOGLE_BREAKPAD_COMMON_STDIO_H
+#define GOOGLE_BREAKPAD_COMMON_STDIO_H
-#include "google_breakpad/processor/dump_object.h"
+#include <stdio.h>
-namespace google_breakpad {
+#if defined(_MSC_VER) && MSC_VER < 1900
+#include <basetsd.h>
-DumpObject::DumpObject() : valid_(false) {
-}
+#define snprintf _snprintf
brucedawson 2016/01/20 21:29:16 It's slightly terrifying that we're doing this map
+typedef SSIZE_T ssize_t;
+#endif
-} // namespace google_breakpad
+
+#endif // GOOGLE_BREAKPAD_COMMON_STDIO_H
« no previous file with comments | « no previous file | src/processor/dump_context.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698