From d73863751bf0570fc82f1b49246f909cea61083b Mon Sep 17 00:00:00 2001 From: Andrey Semashev Date: Sun, 28 Jun 2026 19:43:35 +0300 Subject: [PATCH] Remove the check for Cygwin from Windows-only branch of fopen. Cygwin is now handled by the POSIX branch of the code. --- include/boost/filesystem/cstdio.hpp | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/include/boost/filesystem/cstdio.hpp b/include/boost/filesystem/cstdio.hpp index 66be390..d5723b8 100644 --- a/include/boost/filesystem/cstdio.hpp +++ b/include/boost/filesystem/cstdio.hpp @@ -31,8 +31,8 @@ namespace filesystem { inline std::FILE* fopen(filesystem::path const& p, const char* mode) { -#if defined(__CYGWIN__) || (defined(__MINGW32__) && !defined(__MINGW64_VERSION_MAJOR) && defined(__STRICT_ANSI__)) - // Cygwin and MinGW32 in strict ANSI mode do not declare _wfopen +#if defined(__MINGW32__) && !defined(__MINGW64_VERSION_MAJOR) && defined(__STRICT_ANSI__) + // MinGW32 in strict ANSI mode does not declare _wfopen return std::fopen(p.string().c_str(), mode); #else // mode should only contain ASCII characters and is likely short