summaryrefslogtreecommitdiff
path: root/libtool-ldflags
diff options
context:
space:
mode:
authorJonathan Wakely <jwakely@redhat.com>2022-06-27 14:43:54 +0100
committerJonathan Wakely <jwakely@redhat.com>2022-08-03 14:38:30 +0100
commit3df2f035871e913b94a35d4b5c12d37828f313f7 (patch)
tree17d977d836e31654dffb4fc686b0f337e807b802 /libtool-ldflags
parent1a9681e60964c7f7ce0892e14745e6dcf6100157 (diff)
Currently the _Dir::open_subdir function decides whether to construct a _Dir_base with just a pathname, or a file descriptor and pathname. But that means it is tightly coupled to the implementation of _Dir_base::openat, which is what actually decides whether to use a file descriptor or not. If the derived class passes a file descriptor and filename, but the base class expects a full path and ignores the file descriptor, then recursive_directory_iterator cannot recurse. This change introduces a new type that provides the union of all the information available to the derived class (the full pathname, as well as a file descriptor for a directory and another pathname relative to that directory). This allows the derived class to be agnostic to how the base class will use that information. libstdc++-v3/ChangeLog: * src/c++17/fs_dir.cc (_Dir::dir_and_pathname):: Replace with current() returning _At_path. (_Dir::_Dir, _Dir::open_subdir, _Dir::do_unlink): Adjust. * src/filesystem/dir-common.h (_Dir_base::_At_path): New class. (_Dir_base::_Dir_Base, _Dir_base::openat): Use _At_path. * src/filesystem/dir.cc (_Dir::dir_and_pathname): Replace with current() returning _At_path. (_Dir::_Dir, _Dir::open_subdir): Adjust. (cherry picked from commit 198781144f33b0ef17dd2094580b5c77ad97d6e8)
Diffstat (limited to 'libtool-ldflags')
0 files changed, 0 insertions, 0 deletions