public inbox for libstdc++@gcc.gnu.org
 help / color / mirror / Atom feed
* [committed] libstdc++: Re-enable workaround for _wstat64 bug [PR 88881]
@ 2021-02-10 16:58 Jonathan Wakely
  2021-02-12 15:51 ` Jonathan Wakely
  0 siblings, 1 reply; 2+ messages in thread
From: Jonathan Wakely @ 2021-02-10 16:58 UTC (permalink / raw)
  To: libstdc++, gcc-patches

[-- Attachment #1: Type: text/plain, Size: 228 bytes --]

This wasn't fixed upstream for mingw-w64 so we still need the
workaround.

libstdc++-v3/ChangeLog:

	PR libstdc++/88881
	* src/c++17/fs_ops.cc (fs::status): Re-enable workaround.

Tested x86_64-w64-mingw32. Committed to trunk.


[-- Attachment #2: patch.txt --]
[-- Type: text/plain, Size: 1094 bytes --]

commit 3df5b249b3c81e95cdcb293a388155ae5b168f9e
Author: Jonathan Wakely <jwakely@redhat.com>
Date:   Wed Feb 10 16:51:34 2021

    libstdc++: Re-enable workaround for _wstat64 bug [PR 88881]
    
    This wasn't fixed upstream for mingw-w64 so we still need the
    workaround.
    
    libstdc++-v3/ChangeLog:
    
            PR libstdc++/88881
            * src/c++17/fs_ops.cc (fs::status): Re-enable workaround.

diff --git a/libstdc++-v3/src/c++17/fs_ops.cc b/libstdc++-v3/src/c++17/fs_ops.cc
index 7deb4c33447..3817655471c 100644
--- a/libstdc++-v3/src/c++17/fs_ops.cc
+++ b/libstdc++-v3/src/c++17/fs_ops.cc
@@ -1462,7 +1462,6 @@ fs::status(const fs::path& p, 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())
@@ -1479,7 +1478,6 @@ fs::status(const fs::path& p, error_code& ec) noexcept
 	}
       str = p2.c_str();
     }
-#endif
 #endif
 
   stat_type st;

^ permalink raw reply	[flat|nested] 2+ messages in thread

* Re: [committed] libstdc++: Re-enable workaround for _wstat64 bug [PR 88881]
  2021-02-10 16:58 [committed] libstdc++: Re-enable workaround for _wstat64 bug [PR 88881] Jonathan Wakely
@ 2021-02-12 15:51 ` Jonathan Wakely
  0 siblings, 0 replies; 2+ messages in thread
From: Jonathan Wakely @ 2021-02-12 15:51 UTC (permalink / raw)
  To: libstdc++, gcc-patches

[-- Attachment #1: Type: text/plain, Size: 345 bytes --]

On 10/02/21 16:58 +0000, Jonathan Wakely wrote:
>This wasn't fixed upstream for mingw-w64 so we still need the
>workaround.
>
>libstdc++-v3/ChangeLog:
>
>	PR libstdc++/88881
>	* src/c++17/fs_ops.cc (fs::status): Re-enable workaround.

Oops, the same change is needed in symlink_status as well. 

Tested x86_64-w64-mingw32. Committed to trunk.



[-- Attachment #2: patch.txt --]
[-- Type: text/x-patch, Size: 1192 bytes --]

commit b7210405ed8eb5fd723b2c99960dcc5f0aec89b4
Author: Jonathan Wakely <jwakely@redhat.com>
Date:   Wed Feb 10 16:51:34 2021

    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 --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;

^ permalink raw reply	[flat|nested] 2+ messages in thread

end of thread, other threads:[~2021-02-12 15:51 UTC | newest]

Thread overview: 2+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2021-02-10 16:58 [committed] libstdc++: Re-enable workaround for _wstat64 bug [PR 88881] Jonathan Wakely
2021-02-12 15:51 ` Jonathan Wakely

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).