summaryrefslogtreecommitdiffstats
path: root/testing/gmock/src/gmock-printers.cc
diff options
context:
space:
mode:
Diffstat (limited to 'testing/gmock/src/gmock-printers.cc')
-rw-r--r--testing/gmock/src/gmock-printers.cc8
1 files changed, 5 insertions, 3 deletions
diff --git a/testing/gmock/src/gmock-printers.cc b/testing/gmock/src/gmock-printers.cc
index 922a7b2..8efba78 100644
--- a/testing/gmock/src/gmock-printers.cc
+++ b/testing/gmock/src/gmock-printers.cc
@@ -55,11 +55,13 @@ namespace {
using ::std::ostream;
-#ifdef _WIN32_WCE
+#if GTEST_OS_WINDOWS_MOBILE // Windows CE does not define _snprintf_s.
#define snprintf _snprintf
-#elif GTEST_OS_WINDOWS
+#elif _MSC_VER >= 1400 // VC 8.0 and later deprecate snprintf and _snprintf.
#define snprintf _snprintf_s
-#endif
+#elif _MSC_VER
+#define snprintf _snprintf
+#endif // GTEST_OS_WINDOWS_MOBILE
// Prints a segment of bytes in the given object.
void PrintByteSegmentInObjectTo(const unsigned char* obj_bytes, size_t start,