Merge eed0985f87ee5c84780c4518fc28b242fa557dae into 3ff51c3e80f2c2eb105d43ecb9acab9a62e01600

This commit is contained in:
Manikandan K S 2026-07-28 16:28:53 -04:00 committed by GitHub
commit ca6cb4a7dd
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194

View File

@ -443,7 +443,17 @@ typedef struct _RTL_CRITICAL_SECTION GTEST_CRITICAL_SECTION;
#define GTEST_USES_RE2 1
#elif GTEST_HAS_POSIX_RE
#include <regex.h> // NOLINT
// If the POSIX regex functions have been redefined as macros (e.g., by
// MinGW headers leaking into the include path on non-Windows systems),
// the POSIX regex implementation cannot be used reliably. Fall back to
// the simple regex implementation instead.
#if defined(regcomp) || defined(regexec) || defined(regfree)
#undef GTEST_USES_POSIX_RE
#define GTEST_USES_SIMPLE_RE 1
#else
#define GTEST_USES_POSIX_RE 1
#endif // defined(regcomp) || defined(regexec) || defined(regfree)
#else
// Use our own simple regex implementation.
#define GTEST_USES_SIMPLE_RE 1