From: Jonathan Wakely <jwakely@redhat.com>
To: Alexandre Oliva <oliva@adacore.com>
Cc: gcc Patches <gcc-patches@gcc.gnu.org>,
"libstdc++" <libstdc++@gcc.gnu.org>
Subject: Re: [PATCH] libstdc++-v3: check for openat
Date: Mon, 27 Jun 2022 10:52:10 +0100 [thread overview]
Message-ID: <CACb0b4=o+1RQHi1h_d5qN2cScVudVSHv7m9vEH6cHSf+tfAzXg@mail.gmail.com> (raw)
In-Reply-To: <orilomzbak.fsf@lxoliva.fsfla.org>
On Mon, 27 Jun 2022 at 10:49, Alexandre Oliva <oliva@adacore.com> wrote:
>
> On Jun 24, 2022, Jonathan Wakely <jwakely@redhat.com> wrote:
>
> > Ah, but this patch only added the HAVE_OPENAT check to
> > src/filesystem/dir.cc not the similar code in src/c++17/fs_dir.cc
>
> Doh! It was such a long and goof-ful day :-(
>
> Thanks for catching it.
>
> Unless you ask me not to, I'd like to install this to complete the
> earlier patch.
OK, although I'll just remove it again as part of the _At_path patch
that makes this extra check unnecessary. But this part would be a
candidate for backporting.
> I've given it some testing, along with your _At_path
> patch, and results are looking promising. There are still a few
> remaining fails.
>
>
> libstdc++: check for openat with dirfd in std::filesystem
>
> From: Alexandre Oliva <oliva@adacore.com>
>
> 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.
> ---
> 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 c67fe76bc14f8..25b33baa875fb 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
>
>
> --
> Alexandre Oliva, happy hacker https://FSFLA.org/blogs/lxo/
> Free Software Activist GNU Toolchain Engineer
> Disinformation flourishes because many people care deeply about injustice
> but very few check the facts. Ask me about <https://stallmansupport.org>
>
next prev parent reply other threads:[~2022-06-27 9:52 UTC|newest]
Thread overview: 21+ messages / expand[flat|nested] mbox.gz Atom feed top
2022-06-22 6:41 Alexandre Oliva
2022-06-22 10:36 ` Jonathan Wakely
2022-06-23 4:41 ` Alexandre Oliva
2022-06-23 9:29 ` Jonathan Wakely
2022-06-23 11:08 ` Alexandre Oliva
2022-06-23 11:37 ` Jonathan Wakely
2022-06-23 14:05 ` Alexandre Oliva
2022-06-23 17:47 ` Jonathan Wakely
2022-06-27 12:00 ` Alexandre Oliva
2022-06-27 13:05 ` Alexandre Oliva
2022-06-27 13:32 ` Jonathan Wakely
2022-06-27 14:00 ` Jonathan Wakely
2022-06-27 15:56 ` Jonathan Wakely
2022-06-27 22:03 ` Alexandre Oliva
2022-06-28 8:36 ` Jonathan Wakely
2022-06-28 12:04 ` Alexandre Oliva
2022-06-28 13:12 ` Jonathan Wakely
2022-06-24 11:03 ` Jonathan Wakely
2022-06-27 9:49 ` Alexandre Oliva
2022-06-27 9:52 ` Jonathan Wakely [this message]
2022-06-24 2:34 ` Alexandre Oliva
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='CACb0b4=o+1RQHi1h_d5qN2cScVudVSHv7m9vEH6cHSf+tfAzXg@mail.gmail.com' \
--to=jwakely@redhat.com \
--cc=gcc-patches@gcc.gnu.org \
--cc=libstdc++@gcc.gnu.org \
--cc=oliva@adacore.com \
/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).