public inbox for libstdc++-cvs@sourceware.org
help / color / mirror / Atom feed
From: Jonathan Wakely <redi@gcc.gnu.org>
To: gcc-cvs@gcc.gnu.org, libstdc++-cvs@gcc.gnu.org
Subject: [gcc r12-8611] libstdc++: check for openat with dirfd in std::filesystem
Date: Fri, 22 Jul 2022 17:44:27 +0000 (GMT)	[thread overview]
Message-ID: <20220722174427.F0FAE385800F@sourceware.org> (raw)

https://gcc.gnu.org/g:4eb15eceaac0bb900303986fc5164190d3692a0a

commit r12-8611-g4eb15eceaac0bb900303986fc5164190d3692a0a
Author: Alexandre Oliva <oliva@adacore.com>
Date:   Mon Jun 27 10:34:16 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.
    
    (cherry picked from commit 486893b1d325d22d54c1380937943913a7501f91)

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


                 reply	other threads:[~2022-07-22 17:44 UTC|newest]

Thread overview: [no followups] expand[flat|nested]  mbox.gz  Atom feed

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=20220722174427.F0FAE385800F@sourceware.org \
    --to=redi@gcc.gnu.org \
    --cc=gcc-cvs@gcc.gnu.org \
    --cc=libstdc++-cvs@gcc.gnu.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
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).