From b73f27fd164456fea9aba56163f5511355a03272 Mon Sep 17 00:00:00 2001 From: Tom Hughes Date: Wed, 8 Feb 2023 08:29:22 -0800 Subject: Fix _MSC_VER check Use "#if defined(_MSC_VER)" instead of "#if _MSC_VER" to be consistent with other usages in googletest and to work with the "-Wundef" warning. PiperOrigin-RevId: 508087630 Change-Id: I29c16fd2fa51a9dfecd55e10362a020318318956 --- googletest/test/gtest_unittest.cc | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/googletest/test/gtest_unittest.cc b/googletest/test/gtest_unittest.cc index 2199073..ecffa37 100644 --- a/googletest/test/gtest_unittest.cc +++ b/googletest/test/gtest_unittest.cc @@ -446,7 +446,7 @@ class FormatEpochTimeInMillisAsIso8601Test : public Test { // tzset() distinguishes between the TZ variable being present and empty // and not being present, so we have to consider the case of time_zone // being NULL. -#if _MSC_VER || GTEST_OS_WINDOWS_MINGW +#if defined(_MSC_VER) || GTEST_OS_WINDOWS_MINGW // ...Unless it's MSVC, whose standard library's _putenv doesn't // distinguish between an empty and a missing variable. const std::string env_var = -- cgit v0.12