304
304
// GTEST_DISABLE_MSC_WARNINGS_PUSH_(4800 4385)
305
305
// /* code that triggers warnings C4800 and C4385 */
306
306
// GTEST_DISABLE_MSC_WARNINGS_POP_()
307
- #if _MSC_VER >= 1400
307
+ #if defined( _MSC_VER)
308
308
# define GTEST_DISABLE_MSC_WARNINGS_PUSH_ (warnings ) \
309
309
__pragma (warning(push)) \
310
310
__pragma(warning(disable: warnings))
311
311
# define GTEST_DISABLE_MSC_WARNINGS_POP_ () \
312
312
__pragma (warning(pop))
313
313
#else
314
- // Older versions of MSVC don't have __pragma.
314
+ // Not all compilers are MSVC
315
315
# define GTEST_DISABLE_MSC_WARNINGS_PUSH_ (warnings )
316
316
# define GTEST_DISABLE_MSC_WARNINGS_POP_ ()
317
317
#endif
@@ -602,15 +602,6 @@ typedef struct _RTL_CRITICAL_SECTION GTEST_CRITICAL_SECTION;
602
602
# include < time.h> // NOLINT
603
603
#endif
604
604
605
- // Determines if hash_map/hash_set are available.
606
- // Only used for testing against those containers.
607
- #if !defined(GTEST_HAS_HASH_MAP_)
608
- # if defined(_MSC_VER) && (_MSC_VER < 1900)
609
- # define GTEST_HAS_HASH_MAP_ 1 // Indicates that hash_map is available.
610
- # define GTEST_HAS_HASH_SET_ 1 // Indicates that hash_set is available.
611
- # endif // _MSC_VER
612
- #endif // !defined(GTEST_HAS_HASH_MAP_)
613
-
614
605
// Determines whether clone(2) is supported.
615
606
// Usually it will only be available on Linux, excluding
616
607
// Linux on the Itanium architecture.
@@ -653,12 +644,10 @@ typedef struct _RTL_CRITICAL_SECTION GTEST_CRITICAL_SECTION;
653
644
#endif // GTEST_HAS_STREAM_REDIRECTION
654
645
655
646
// Determines whether to support death tests.
656
- // Google Test does not support death tests for VC 7.1 and earlier as
657
- // abort() in a VC 7.1 application compiled as GUI in debug config
658
647
// pops up a dialog window that cannot be suppressed programmatically.
659
648
#if (GTEST_OS_LINUX || GTEST_OS_CYGWIN || GTEST_OS_SOLARIS || \
660
649
(GTEST_OS_MAC && !GTEST_OS_IOS) || \
661
- (GTEST_OS_WINDOWS_DESKTOP && _MSC_VER >= 1400 ) || \
650
+ (GTEST_OS_WINDOWS_DESKTOP && _MSC_VER) || \
662
651
GTEST_OS_WINDOWS_MINGW || GTEST_OS_AIX || GTEST_OS_HPUX || \
663
652
GTEST_OS_OPENBSD || GTEST_OS_QNX || GTEST_OS_FREEBSD || \
664
653
GTEST_OS_NETBSD || GTEST_OS_FUCHSIA)
@@ -669,7 +658,7 @@ typedef struct _RTL_CRITICAL_SECTION GTEST_CRITICAL_SECTION;
669
658
670
659
// Typed tests need <typeinfo> and variadic macros, which GCC, VC++ 8.0,
671
660
// Sun Pro CC, IBM Visual Age, and HP aCC support.
672
- #if defined(__GNUC__) || (_MSC_VER >= 1400 ) || defined(__SUNPRO_CC) || \
661
+ #if defined(__GNUC__) || defined (_MSC_VER) || defined(__SUNPRO_CC) || \
673
662
defined (__IBMCPP__) || defined(__HP_aCC)
674
663
# define GTEST_HAS_TYPED_TEST 1
675
664
# define GTEST_HAS_TYPED_TEST_P 1
@@ -2321,13 +2310,12 @@ GTEST_DISABLE_MSC_DEPRECATED_POP_()
2321
2310
// MSVC-based platforms. We map the GTEST_SNPRINTF_ macro to the appropriate
2322
2311
// function in order to achieve that. We use macro definition here because
2323
2312
// snprintf is a variadic function.
2324
- #if _MSC_VER >= 1400 && !GTEST_OS_WINDOWS_MOBILE
2313
+ #if _MSC_VER && !GTEST_OS_WINDOWS_MOBILE
2325
2314
// MSVC 2005 and above support variadic macros.
2326
2315
# define GTEST_SNPRINTF_ (buffer, size, format, ...) \
2327
2316
_snprintf_s (buffer, size, size, format, __VA_ARGS__)
2328
2317
#elif defined(_MSC_VER)
2329
- // Windows CE does not define _snprintf_s and MSVC prior to 2005 doesn't
2330
- // complain about _snprintf.
2318
+ // Windows CE does not define _snprintf_s
2331
2319
# define GTEST_SNPRINTF_ _snprintf
2332
2320
#else
2333
2321
# define GTEST_SNPRINTF_ snprintf
0 commit comments