From 8b653cd50cb707a3249b77ba5ff768485df9c14b Mon Sep 17 00:00:00 2001 From: Tyler Yankee Date: Wed, 22 Jul 2026 09:30:00 -0400 Subject: [PATCH] cmGccDepfileLexerHelper: Use fopen from SystemTools Delegate to SystemTools for portability and consistency with the rest of the code base. --- Source/cmGccDepfileLexerHelper.cxx | 10 ++-------- 1 file changed, 2 insertions(+), 8 deletions(-) diff --git a/Source/cmGccDepfileLexerHelper.cxx b/Source/cmGccDepfileLexerHelper.cxx index 478a93d393..99fdaee733 100644 --- a/Source/cmGccDepfileLexerHelper.cxx +++ b/Source/cmGccDepfileLexerHelper.cxx @@ -8,23 +8,17 @@ #include #include "cmGccDepfileReaderTypes.h" +#include "cmSystemTools.h" #include "LexerParser/cmGccDepfileLexer.h" #ifdef _WIN32 -# include "cmsys/Encoding.h" # include "cmsys/String.h" #endif bool cmGccDepfileLexerHelper::readFile(char const* filePath) { -#ifdef _WIN32 - wchar_t* wpath = cmsysEncoding_DupToWide(filePath); - FILE* file = _wfopen(wpath, L"rb"); - free(wpath); -#else - FILE* file = fopen(filePath, "r"); -#endif + FILE* file = cmsys::SystemTools::Fopen(filePath, "rb"); if (!file) { return false; }