[gtest] Disable new posix::FOpen Windows implementation for now

The new implementation was brought in with the gtest update in
a866ce789e, but it crashes when
building with rpmalloc, see
https://github.com/llvm/llvm-project/pull/65823#issuecomment-1739820534

Comment out the new implementation basically gives us the code
before the gtest update.
This commit is contained in:
Hans Wennborg 2023-09-28 20:51:20 +02:00
parent 82001e0d01
commit 9625b74cdb

View File

@ -2087,7 +2087,10 @@ GTEST_DISABLE_MSC_DEPRECATED_PUSH_()
inline int ChDir(const char* dir) { return chdir(dir); }
#endif
inline FILE* FOpen(const char* path, const char* mode) {
#if defined(GTEST_OS_WINDOWS) && !defined(GTEST_OS_WINDOWS_MINGW)
// FIXME: This doesn't work when building with rpmalloc, see
// https://github.com/llvm/llvm-project/pull/65823#issuecomment-1739820534
// so hacking it out for now.
#if defined(GTEST_OS_WINDOWS) && !defined(GTEST_OS_WINDOWS_MINGW) && 0
struct wchar_codecvt : public std::codecvt<wchar_t, char, std::mbstate_t> {};
std::wstring_convert<wchar_codecvt> converter;
std::wstring wide_path = converter.from_bytes(path);