aboutsummaryrefslogtreecommitdiffstats
path: root/src
diff options
context:
space:
mode:
Diffstat (limited to 'src')
-rw-r--r--src/gtest-port.cc6
-rw-r--r--src/gtest.cc6
2 files changed, 6 insertions, 6 deletions
diff --git a/src/gtest-port.cc b/src/gtest-port.cc
index ef213892..166ff414 100644
--- a/src/gtest-port.cc
+++ b/src/gtest-port.cc
@@ -62,12 +62,12 @@
namespace testing {
namespace internal {
-#if GTEST_OS_WINDOWS
-// Microsoft does not provide a definition of STDERR_FILENO.
+#ifdef _MSC_VER
+// MSVC does not provide a definition of STDERR_FILENO.
const int kStdErrFileno = 2;
#else
const int kStdErrFileno = STDERR_FILENO;
-#endif // GTEST_OS_WINDOWS
+#endif // _MSC_VER
#if GTEST_USES_POSIX_RE
diff --git a/src/gtest.cc b/src/gtest.cc
index e98f63fa..ac5ed9d5 100644
--- a/src/gtest.cc
+++ b/src/gtest.cc
@@ -1710,16 +1710,16 @@ String String::Format(const char * format, ...) {
char buffer[4096];
// MSVC 8 deprecates vsnprintf(), so we want to suppress warning
// 4996 (deprecated function) there.
-#if GTEST_OS_WINDOWS // We are on Windows.
+#ifdef _MSC_VER // We are using MSVC.
#pragma warning(push) // Saves the current warning state.
#pragma warning(disable:4996) // Temporarily disables warning 4996.
const int size =
vsnprintf(buffer, sizeof(buffer)/sizeof(buffer[0]) - 1, format, args);
#pragma warning(pop) // Restores the warning state.
-#else // We are on Linux or Mac OS.
+#else // We are not using MSVC.
const int size =
vsnprintf(buffer, sizeof(buffer)/sizeof(buffer[0]) - 1, format, args);
-#endif // GTEST_OS_WINDOWS
+#endif // _MSC_VER
va_end(args);
return String(size >= 0 ? buffer : "<buffer exceeded>");