diff options
author | robot-contrib <[email protected]> | 2025-08-27 02:12:23 +0300 |
---|---|---|
committer | robot-contrib <[email protected]> | 2025-08-27 02:50:21 +0300 |
commit | 4c570df9c384e9bf78316bcf71cf7a5817138169 (patch) | |
tree | 2152540bbc70be9984e93f8c26f5d6d9ce41631f | |
parent | cbc03c03d6427448f2db38945cce81f2996fc05a (diff) |
Update contrib/restricted/boost/filesystem to 1.89.0
commit_hash:40ce6b491c5ad6b452e578e1313e01e232d0947d
7 files changed, 59 insertions, 46 deletions
diff --git a/contrib/restricted/boost/filesystem/.yandex_meta/default.nix b/contrib/restricted/boost/filesystem/.yandex_meta/default.nix index ac3d1021798..8fb756fdf7e 100644 --- a/contrib/restricted/boost/filesystem/.yandex_meta/default.nix +++ b/contrib/restricted/boost/filesystem/.yandex_meta/default.nix @@ -1,13 +1,13 @@ self: super: with self; { boost_filesystem = stdenv.mkDerivation rec { pname = "boost_filesystem"; - version = "1.88.0"; + version = "1.89.0"; src = fetchFromGitHub { owner = "boostorg"; repo = "filesystem"; rev = "boost-${version}"; - hash = "sha256-D2UOc/SuQ1wI7D82XxaSCaGgivb0Rgyy4i5/KmSpdRA="; + hash = "sha256-knhjAm7vz2gEIpIX7uxboIqIy6/2O/tXsxXD8uwR6yI="; }; }; } diff --git a/contrib/restricted/boost/filesystem/.yandex_meta/devtools.copyrights.report b/contrib/restricted/boost/filesystem/.yandex_meta/devtools.copyrights.report index 9491a2d6aa3..97ac9465693 100644 --- a/contrib/restricted/boost/filesystem/.yandex_meta/devtools.copyrights.report +++ b/contrib/restricted/boost/filesystem/.yandex_meta/devtools.copyrights.report @@ -216,21 +216,6 @@ BELONGS ya.make Files with this license: src/windows_tools.hpp [3:5] -KEEP COPYRIGHT_SERVICE_LABEL 6d59e81fdd72b00433694c8efadc38af -BELONGS ya.make - License text: - // Copyright Beman Dawes 2002-2009 - // Copyright Jan Langer 2002 - // Copyright Dietmar Kuehl 2001 - // Copyright Vladimir Prus 2002 - // Copyright Andrey Semashev 2019, 2022 - Scancode info: - Original SPDX id: COPYRIGHT_SERVICE_LABEL - Score : 100.00 - Match type : COPYRIGHT - Files with this license: - include/boost/filesystem/directory.hpp [3:7] - KEEP COPYRIGHT_SERVICE_LABEL 7594bc6afcdef4c27932b42df772d631 BELONGS ya.make License text: @@ -427,7 +412,7 @@ BELONGS ya.make // Copyright Jan Langer 2002 // Copyright Dietmar Kuehl 2001 // Copyright Vladimir Prus 2002 - // Copyright Andrey Semashev 2019, 2022 + // Copyright Andrey Semashev 2019-2025 Scancode info: Original SPDX id: COPYRIGHT_SERVICE_LABEL Score : 100.00 @@ -445,7 +430,7 @@ BELONGS ya.make // Copyright Jan Langer 2002 // Copyright Dietmar Kuehl 2001 // Copyright Vladimir Prus 2002 - // Copyright Andrey Semashev 2019, 2022 + // Copyright Andrey Semashev 2019-2025 Scancode info: Original SPDX id: COPYRIGHT_SERVICE_LABEL Score : 100.00 @@ -462,7 +447,7 @@ BELONGS ya.make // Copyright Jan Langer 2002 // Copyright Dietmar Kuehl 2001 // Copyright Vladimir Prus 2002 - // Copyright Andrey Semashev 2019, 2022 + // Copyright Andrey Semashev 2019-2025 Scancode info: Original SPDX id: COPYRIGHT_SERVICE_LABEL Score : 100.00 @@ -472,6 +457,21 @@ BELONGS ya.make include/boost/filesystem/file_status.hpp [3:7] include/boost/filesystem/operations.hpp [3:7] +KEEP COPYRIGHT_SERVICE_LABEL e6e42ce85ae6ae4da4c52a160cd6b31c +BELONGS ya.make + License text: + // Copyright Beman Dawes 2002-2009 + // Copyright Jan Langer 2002 + // Copyright Dietmar Kuehl 2001 + // Copyright Vladimir Prus 2002 + // Copyright Andrey Semashev 2019-2025 + Scancode info: + Original SPDX id: COPYRIGHT_SERVICE_LABEL + Score : 100.00 + Match type : COPYRIGHT + Files with this license: + include/boost/filesystem/directory.hpp [3:7] + KEEP COPYRIGHT_SERVICE_LABEL eb3a0ca480ae49d67ca93db4d779aa0f BELONGS ya.make License text: @@ -492,7 +492,7 @@ BELONGS ya.make // Copyright Jan Langer 2002 // Copyright Dietmar Kuehl 2001 // Copyright Vladimir Prus 2002 - // Copyright Andrey Semashev 2019, 2022 + // Copyright Andrey Semashev 2019-2025 Scancode info: Original SPDX id: COPYRIGHT_SERVICE_LABEL Score : 100.00 diff --git a/contrib/restricted/boost/filesystem/.yandex_meta/licenses.list.txt b/contrib/restricted/boost/filesystem/.yandex_meta/licenses.list.txt index 74373194734..fec5642655a 100644 --- a/contrib/restricted/boost/filesystem/.yandex_meta/licenses.list.txt +++ b/contrib/restricted/boost/filesystem/.yandex_meta/licenses.list.txt @@ -114,7 +114,7 @@ Distributed under the [Boost Software License, Version 1.0](https://www.boost.or // Copyright Jan Langer 2002 // Copyright Dietmar Kuehl 2001 // Copyright Vladimir Prus 2002 -// Copyright Andrey Semashev 2019, 2022 +// Copyright Andrey Semashev 2019-2025 ====================COPYRIGHT==================== diff --git a/contrib/restricted/boost/filesystem/include/boost/filesystem/directory.hpp b/contrib/restricted/boost/filesystem/include/boost/filesystem/directory.hpp index 821b1a97bbd..ff02105cc01 100644 --- a/contrib/restricted/boost/filesystem/include/boost/filesystem/directory.hpp +++ b/contrib/restricted/boost/filesystem/include/boost/filesystem/directory.hpp @@ -4,7 +4,7 @@ // Copyright Jan Langer 2002 // Copyright Dietmar Kuehl 2001 // Copyright Vladimir Prus 2002 -// Copyright Andrey Semashev 2019, 2022 +// Copyright Andrey Semashev 2019-2025 // Distributed under the Boost Software License, Version 1.0. // See http://www.boost.org/LICENSE_1_0.txt @@ -35,6 +35,13 @@ #include <boost/filesystem/detail/header.hpp> // must be the last #include +#if defined(BOOST_GCC) && (__GNUC__ == 12) +#pragma GCC diagnostic push +// 'function' redeclared without dllimport attribute: previous dllimport ignored +// gcc bug on MinGW-w64 and Cygwin: https://gcc.gnu.org/bugzilla/show_bug.cgi?id=106395 +#pragma GCC diagnostic ignored "-Wattributes" +#endif + //--------------------------------------------------------------------------------------// namespace boost { @@ -1034,6 +1041,10 @@ struct range_const_iterator< boost::filesystem::recursive_directory_iterator, vo } // namespace boost +#if defined(BOOST_GCC) && (__GNUC__ == 12) +#pragma GCC diagnostic pop +#endif + #include <boost/filesystem/detail/footer.hpp> #endif // BOOST_FILESYSTEM_DIRECTORY_HPP diff --git a/contrib/restricted/boost/filesystem/src/operations.cpp b/contrib/restricted/boost/filesystem/src/operations.cpp index cb31c50c68c..4f69b5565b2 100644 --- a/contrib/restricted/boost/filesystem/src/operations.cpp +++ b/contrib/restricted/boost/filesystem/src/operations.cpp @@ -252,14 +252,14 @@ void init_fill_random_impl(unsigned int major_ver, unsigned int minor_ver, unsig void init_directory_iterator_impl() noexcept; #endif // defined(BOOST_WINDOWS_API) +namespace { + //--------------------------------------------------------------------------------------// // // // helpers (all operating systems) // // // //--------------------------------------------------------------------------------------// -namespace { - // The number of retries remove_all should make if it detects that the directory it is about to enter has been replaced with a symlink or a regular file BOOST_CONSTEXPR_OR_CONST unsigned int remove_all_directory_replaced_retry_count = 5u; @@ -268,6 +268,12 @@ BOOST_CONSTEXPR_OR_CONST std::size_t small_path_size = 1024u; #if defined(BOOST_POSIX_API) +//--------------------------------------------------------------------------------------// +// // +// POSIX-specific helpers // +// // +//--------------------------------------------------------------------------------------// + // Absolute maximum path length, in character code units, that we're willing to accept from various system calls. // This value is arbitrary, it is supposed to be a hard limit to avoid memory exhaustion // in some of the algorithms below in case of some corrupted or maliciously broken filesystem. @@ -278,8 +284,6 @@ BOOST_CONSTEXPR_OR_CONST std::size_t small_path_size = 1024u; // - GNU/Hurd: no hard limit BOOST_CONSTEXPR_OR_CONST std::size_t absolute_path_max = 32u * 1024u; -#endif // defined(BOOST_POSIX_API) - // Maximum number of resolved symlinks before we register a loop BOOST_CONSTEXPR_OR_CONST unsigned int symloop_max = #if defined(SYMLOOP_MAX) @@ -289,16 +293,6 @@ BOOST_CONSTEXPR_OR_CONST unsigned int symloop_max = #endif ; -// general helpers -----------------------------------------------------------------// - -#ifdef BOOST_POSIX_API - -//--------------------------------------------------------------------------------------// -// // -// POSIX-specific helpers // -// // -//--------------------------------------------------------------------------------------// - inline bool not_found_error(int errval) noexcept { return errval == ENOENT || errval == ENOTDIR; diff --git a/contrib/restricted/boost/filesystem/src/path.cpp b/contrib/restricted/boost/filesystem/src/path.cpp index 82b2c7d5204..2ce3c4c423b 100644 --- a/contrib/restricted/boost/filesystem/src/path.cpp +++ b/contrib/restricted/boost/filesystem/src/path.cpp @@ -15,6 +15,7 @@ #include <boost/filesystem/detail/path_traits.hpp> // codecvt_error_category() #include <boost/system/error_category.hpp> // for BOOST_SYSTEM_HAS_CONSTEXPR #include <boost/assert.hpp> +#include <functional> #include <algorithm> #include <iterator> #include <utility> @@ -139,6 +140,13 @@ inline void first_element(string_type const& src, size_type& element_pos, size_t first_element(src, element_pos, element_size, src.size()); } +// Checks if the second string overlaps in memory with the first string +inline bool is_overlapping(string_type const& str, const value_type* arg) +{ + std::less< const value_type* > ptr_less{}; + return !(ptr_less(arg, str.data()) || ptr_less(str.data() + str.size(), arg)); +} + } // unnamed namespace //--------------------------------------------------------------------------------------// @@ -478,7 +486,7 @@ BOOST_FILESYSTEM_DECL void path_algorithms::append_v3(path& p, const value_type* { if (begin != end) { - if (BOOST_LIKELY(begin < p.m_pathname.data() || begin >= (p.m_pathname.data() + p.m_pathname.size()))) + if (BOOST_LIKELY(!is_overlapping(p.m_pathname, begin))) { if (!detail::is_directory_separator(*begin)) path_algorithms::append_separator_if_needed(p); @@ -497,7 +505,7 @@ BOOST_FILESYSTEM_DECL void path_algorithms::append_v4(path& p, const value_type* { if (begin != end) { - if (BOOST_LIKELY(begin < p.m_pathname.data() || begin >= (p.m_pathname.data() + p.m_pathname.size()))) + if (BOOST_LIKELY(!is_overlapping(p.m_pathname, begin))) { const size_type that_size = end - begin; size_type that_root_name_size = 0; @@ -611,15 +619,15 @@ BOOST_FILESYSTEM_DECL int path_algorithms::compare_v4(path const& left, path con BOOST_FILESYSTEM_DECL path_algorithms::string_type::size_type path_algorithms::append_separator_if_needed(path& p) { - if (!p.m_pathname.empty() && + string_type::size_type size(p.m_pathname.size()); + if (size > static_cast< string_type::size_type >(0) && #ifdef BOOST_WINDOWS_API - *(p.m_pathname.end() - 1) != colon && + p.m_pathname[size - 1] != colon && #endif - !detail::is_directory_separator(*(p.m_pathname.end() - 1))) + !detail::is_directory_separator(p.m_pathname[size - 1])) { - string_type::size_type tmp(p.m_pathname.size()); p.m_pathname.push_back(path::preferred_separator); - return tmp; + return size; } return 0; } diff --git a/contrib/restricted/boost/filesystem/ya.make b/contrib/restricted/boost/filesystem/ya.make index 429211c61c6..b96fa49ce3e 100644 --- a/contrib/restricted/boost/filesystem/ya.make +++ b/contrib/restricted/boost/filesystem/ya.make @@ -6,9 +6,9 @@ LICENSE(BSL-1.0) LICENSE_TEXTS(.yandex_meta/licenses.list.txt) -VERSION(1.88.0) +VERSION(1.89.0) -ORIGINAL_SOURCE(https://github.com/boostorg/filesystem/archive/boost-1.88.0.tar.gz) +ORIGINAL_SOURCE(https://github.com/boostorg/filesystem/archive/boost-1.89.0.tar.gz) PEERDIR( contrib/restricted/boost/assert |