diff options
author | mikhnenko <[email protected]> | 2025-04-19 17:15:47 +0300 |
---|---|---|
committer | mikhnenko <[email protected]> | 2025-04-19 17:32:41 +0300 |
commit | 8a4ae1910b2babbc014f5d5ff97c2245803d6d1a (patch) | |
tree | 9c8728b4ad4226ef084d46a6d6cde7b5ae46e4d5 /contrib/libs/cxxsupp/libcxx/src/filesystem | |
parent | 605a8a3075d2116bf0c742d7ae889ba14b801a8e (diff) |
Update libcxx to 20 Sep 2024
TRIVIAL
commit_hash:04d8ae0a53854a1ed8cdea2e191c8dfa1248c023
Diffstat (limited to 'contrib/libs/cxxsupp/libcxx/src/filesystem')
8 files changed, 13 insertions, 11 deletions
diff --git a/contrib/libs/cxxsupp/libcxx/src/filesystem/error.h b/contrib/libs/cxxsupp/libcxx/src/filesystem/error.h index 572cc73292a..09020fbede9 100644 --- a/contrib/libs/cxxsupp/libcxx/src/filesystem/error.h +++ b/contrib/libs/cxxsupp/libcxx/src/filesystem/error.h @@ -225,7 +225,7 @@ private: ErrorHandler& operator=(ErrorHandler const&) = delete; }; -} // end namespace detail +} // namespace detail _LIBCPP_END_NAMESPACE_FILESYSTEM diff --git a/contrib/libs/cxxsupp/libcxx/src/filesystem/file_descriptor.h b/contrib/libs/cxxsupp/libcxx/src/filesystem/file_descriptor.h index 2c9e0d7f477..db66ad55bd4 100644 --- a/contrib/libs/cxxsupp/libcxx/src/filesystem/file_descriptor.h +++ b/contrib/libs/cxxsupp/libcxx/src/filesystem/file_descriptor.h @@ -291,7 +291,7 @@ inline file_status FileDescriptor::refresh_status(error_code& ec) { return m_status; } -} // end namespace detail +} // namespace detail _LIBCPP_END_NAMESPACE_FILESYSTEM diff --git a/contrib/libs/cxxsupp/libcxx/src/filesystem/filesystem_clock.cpp b/contrib/libs/cxxsupp/libcxx/src/filesystem/filesystem_clock.cpp index e13b2853e36..473a54a00f0 100644 --- a/contrib/libs/cxxsupp/libcxx/src/filesystem/filesystem_clock.cpp +++ b/contrib/libs/cxxsupp/libcxx/src/filesystem/filesystem_clock.cpp @@ -29,7 +29,8 @@ # include <sys/time.h> // for gettimeofday and timeval #endif -#if defined(__APPLE__) || defined(__gnu_hurd__) || (defined(_POSIX_TIMERS) && _POSIX_TIMERS > 0) +#if defined(__APPLE__) || defined(__gnu_hurd__) || defined(__AMDGPU__) || defined(__NVPTX__) || \ + (defined(_POSIX_TIMERS) && _POSIX_TIMERS > 0) # define _LIBCPP_HAS_CLOCK_GETTIME #endif diff --git a/contrib/libs/cxxsupp/libcxx/src/filesystem/format_string.h b/contrib/libs/cxxsupp/libcxx/src/filesystem/format_string.h index a44def86f53..81c5a95ae31 100644 --- a/contrib/libs/cxxsupp/libcxx/src/filesystem/format_string.h +++ b/contrib/libs/cxxsupp/libcxx/src/filesystem/format_string.h @@ -70,7 +70,7 @@ inline _LIBCPP_ATTRIBUTE_FORMAT(__printf__, 1, 2) string format_string(const cha return ret; } -} // end namespace detail +} // namespace detail _LIBCPP_END_NAMESPACE_FILESYSTEM diff --git a/contrib/libs/cxxsupp/libcxx/src/filesystem/operations.cpp b/contrib/libs/cxxsupp/libcxx/src/filesystem/operations.cpp index fd770e1a4e4..074f10b733c 100644 --- a/contrib/libs/cxxsupp/libcxx/src/filesystem/operations.cpp +++ b/contrib/libs/cxxsupp/libcxx/src/filesystem/operations.cpp @@ -254,7 +254,7 @@ bool copy_file_impl(FileDescriptor& read_fd, FileDescriptor& write_fd, error_cod #endif // copy_file_impl implementation } // end anonymous namespace -} // end namespace detail +} // namespace detail bool __copy_file(const path& from, const path& to, copy_options options, error_code* ec) { using detail::FileDescriptor; @@ -732,7 +732,7 @@ uintmax_t remove_all_impl(path const& p, error_code& ec) { return count; } -} // end namespace +} // namespace uintmax_t __remove_all(const path& p, error_code* ec) { ErrorHandler<uintmax_t> err("remove_all", ec, &p); @@ -827,7 +827,7 @@ uintmax_t remove_all_impl(int parent_directory, const path& p, error_code& ec) { return 0; } -} // end namespace +} // namespace uintmax_t __remove_all(const path& p, error_code* ec) { ErrorHandler<uintmax_t> err("remove_all", ec, &p); diff --git a/contrib/libs/cxxsupp/libcxx/src/filesystem/path.cpp b/contrib/libs/cxxsupp/libcxx/src/filesystem/path.cpp index b2019521377..58742442bae 100644 --- a/contrib/libs/cxxsupp/libcxx/src/filesystem/path.cpp +++ b/contrib/libs/cxxsupp/libcxx/src/filesystem/path.cpp @@ -267,7 +267,7 @@ path path::lexically_relative(const path& base) const { // Find the first mismatching element auto PP = PathParser::CreateBegin(__pn_); auto PPBase = PathParser::CreateBegin(base.__pn_); - while (PP && PPBase && PP.State_ == PPBase.State_ && *PP == *PPBase) { + while (PP && PPBase && PP.State_ == PPBase.State_ && (*PP == *PPBase || PP.inRootDir())) { ++PP; ++PPBase; } @@ -368,7 +368,8 @@ size_t hash_value(const path& __p) noexcept { size_t hash_value = 0; hash<string_view_t> hasher; while (PP) { - hash_value = __hash_combine(hash_value, hasher(*PP)); + string_view_t Part = PP.inRootDir() ? PATHSTR("/") : *PP; + hash_value = __hash_combine(hash_value, hasher(Part)); ++PP; } return hash_value; diff --git a/contrib/libs/cxxsupp/libcxx/src/filesystem/posix_compat.h b/contrib/libs/cxxsupp/libcxx/src/filesystem/posix_compat.h index 760cdb65dae..b41c004341a 100644 --- a/contrib/libs/cxxsupp/libcxx/src/filesystem/posix_compat.h +++ b/contrib/libs/cxxsupp/libcxx/src/filesystem/posix_compat.h @@ -490,7 +490,7 @@ using SSizeT = ::ssize_t; #endif -} // end namespace detail +} // namespace detail _LIBCPP_END_NAMESPACE_FILESYSTEM diff --git a/contrib/libs/cxxsupp/libcxx/src/filesystem/time_utils.h b/contrib/libs/cxxsupp/libcxx/src/filesystem/time_utils.h index e05f252868f..13f0d6f3b72 100644 --- a/contrib/libs/cxxsupp/libcxx/src/filesystem/time_utils.h +++ b/contrib/libs/cxxsupp/libcxx/src/filesystem/time_utils.h @@ -344,7 +344,7 @@ inline file_time_type __extract_last_write_time(const path& p, const StatT& st, #endif // !_LIBCPP_HAS_NO_FILESYSTEM -} // end namespace detail +} // namespace detail _LIBCPP_END_NAMESPACE_FILESYSTEM |