Merge eed0985f87ee5c84780c4518fc28b242fa557dae into a0f06a70e3da7afa88da9527c43951bca1f7cef2

This commit is contained in:
Manikandan K S 2026-07-29 15:06:03 -04:00 committed by GitHub
commit e3c2f689ca
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