[gcc r11-7222] libstdc++: Re-enable workaround for _wstat64 bug, again [PR 88881]

Jonathan Wakely redi@gcc.gnu.org
Fri Feb 12 15:50:00 GMT 2021


https://gcc.gnu.org/g:b7210405ed8eb5fd723b2c99960dcc5f0aec89b4

commit r11-7222-gb7210405ed8eb5fd723b2c99960dcc5f0aec89b4
Author: Jonathan Wakely <jwakely@redhat.com>
Date:   Wed Feb 10 16:51:34 2021 +0000

    libstdc++: Re-enable workaround for _wstat64 bug, again [PR 88881]
    
    I forgot that the workaround is present in both filesystem::status and
    filesystem::symlink_status. This restores it in the latter.
    
    libstdc++-v3/ChangeLog:
    
            PR libstdc++/88881
            * src/c++17/fs_ops.cc (fs::symlink_status): Re-enable workaround.

Diff:
---
 libstdc++-v3/src/c++17/fs_ops.cc | 2 --
 1 file changed, 2 deletions(-)

diff --git a/libstdc++-v3/src/c++17/fs_ops.cc b/libstdc++-v3/src/c++17/fs_ops.cc
index 3e1671e611e..66207ae5e44 100644
--- a/libstdc++-v3/src/c++17/fs_ops.cc
+++ b/libstdc++-v3/src/c++17/fs_ops.cc
@@ -1537,7 +1537,6 @@ fs::symlink_status(const fs::path& p, std::error_code& ec) noexcept
   auto str = p.c_str();
 
 #if _GLIBCXX_FILESYSTEM_IS_WINDOWS
-#if ! defined __MINGW64_VERSION_MAJOR || __MINGW64_VERSION_MAJOR < 6
   // stat() fails if there's a trailing slash (PR 88881)
   path p2;
   if (p.has_relative_path() && !p.has_filename())
@@ -1554,7 +1553,6 @@ fs::symlink_status(const fs::path& p, std::error_code& ec) noexcept
 	}
       str = p2.c_str();
     }
-#endif
 #endif
 
   stat_type st;


More information about the Libstdc++-cvs mailing list