public inbox for libstdc++-cvs@sourceware.org
help / color / mirror / Atom feed
* [gcc(refs/users/aoliva/heads/testme)] libstdc++: check for openat with dirfd in std::filesystem
@ 2022-06-27  9:33 Alexandre Oliva
  0 siblings, 0 replies; only message in thread
From: Alexandre Oliva @ 2022-06-27  9:33 UTC (permalink / raw)
  To: gcc-cvs, libstdc++-cvs

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

commit e7f27b5e6b1d44122898b0ac312f1c462dbfa725
Author: Alexandre Oliva <oliva@adacore.com>
Date:   Mon Jun 27 05:30:57 2022 -0300

    libstdc++: check for openat with dirfd in std::filesystem
    
    In the recent patch to check for openat, I missed an occurrence of
    dirfd in std::filesystem.
    
    
    for  libstdc++-v3/ChangeLog
    
            * src/c++17/fs_dir.cc (dir_and_pathname): Use dirfd if
            _GLIBCXX_HAVE_OPENAT.

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

diff --git a/libstdc++-v3/src/c++17/fs_dir.cc b/libstdc++-v3/src/c++17/fs_dir.cc
index c67fe76bc14..25b33baa875 100644
--- a/libstdc++-v3/src/c++17/fs_dir.cc
+++ b/libstdc++-v3/src/c++17/fs_dir.cc
@@ -124,7 +124,7 @@ struct fs::_Dir : _Dir_base
   dir_and_pathname() const noexcept
   {
     const fs::path& p = entry.path();
-#if _GLIBCXX_HAVE_DIRFD
+#if _GLIBCXX_HAVE_DIRFD && _GLIBCXX_HAVE_OPENAT
     if (!p.empty())
       return {::dirfd(this->dirp), std::prev(p.end())->c_str()};
 #endif


^ permalink raw reply	[flat|nested] only message in thread

only message in thread, other threads:[~2022-06-27  9:33 UTC | newest]

Thread overview: (only message) (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2022-06-27  9:33 [gcc(refs/users/aoliva/heads/testme)] libstdc++: check for openat with dirfd in std::filesystem Alexandre Oliva

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).