diff options
author | monster <monster@ydb.tech> | 2022-07-07 14:41:37 +0300 |
---|---|---|
committer | monster <monster@ydb.tech> | 2022-07-07 14:41:37 +0300 |
commit | 06e5c21a835c0e923506c4ff27929f34e00761c2 (patch) | |
tree | 75efcbc6854ef9bd476eb8bf00cc5c900da436a2 /contrib/restricted/abseil-cpp/absl/strings | |
parent | 03f024c4412e3aa613bb543cf1660176320ba8f4 (diff) | |
download | ydb-06e5c21a835c0e923506c4ff27929f34e00761c2.tar.gz |
fix ya.make
Diffstat (limited to 'contrib/restricted/abseil-cpp/absl/strings')
27 files changed, 281 insertions, 1414 deletions
diff --git a/contrib/restricted/abseil-cpp/absl/strings/.yandex_meta/licenses.list.txt b/contrib/restricted/abseil-cpp/absl/strings/.yandex_meta/licenses.list.txt deleted file mode 100644 index 9d8552c68c..0000000000 --- a/contrib/restricted/abseil-cpp/absl/strings/.yandex_meta/licenses.list.txt +++ /dev/null @@ -1,46 +0,0 @@ -====================Apache-2.0==================== -// Licensed under the Apache License, Version 2.0 (the "License"); -// you may not use this file except in compliance with the License. -// You may obtain a copy of the License at -// -// https://www.apache.org/licenses/LICENSE-2.0 -// -// Unless required by applicable law or agreed to in writing, software -// distributed under the License is distributed on an "AS IS" BASIS, -// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -// See the License for the specific language governing permissions and -// limitations under the License. - - -====================Apache-2.0==================== -// Licensed under the Apache License, Version 2.0 (the "License"); -// you may not use this file except in compliance with the License. -// You may obtain a copy of the License at -// -// https://www.apache.org/licenses/LICENSE-2.0 -// -// Unless required by applicable law or agreed to in writing, software -// distributed under the License is distributed on an "AS IS" BASIS, -// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -// See the License for the specific language governing permissions and -// limitations under the License. - - -====================COPYRIGHT==================== -// Copyright 2017 The Abseil Authors. - - -====================COPYRIGHT==================== -// Copyright 2018 The Abseil Authors. - - -====================COPYRIGHT==================== -// Copyright 2019 The Abseil Authors. - - -====================COPYRIGHT==================== -// Copyright 2020 The Abseil Authors. - - -====================COPYRIGHT==================== -// Copyright 2021 The Abseil Authors. diff --git a/contrib/restricted/abseil-cpp/absl/strings/CMakeLists.linux.txt b/contrib/restricted/abseil-cpp/absl/strings/CMakeLists.linux.txt deleted file mode 100644 index 1c450b7de5..0000000000 --- a/contrib/restricted/abseil-cpp/absl/strings/CMakeLists.linux.txt +++ /dev/null @@ -1,42 +0,0 @@ - -# This file was gererated by the build system used internally in the Yandex monorepo. -# Only simple modifications are allowed (adding source-files to targets, adding simple properties -# like target_include_directories). These modifications will be ported to original -# ya.make files by maintainers. Any complex modifications which can't be ported back to the -# original buildsystem will not be accepted. - - - -add_library(abseil-cpp-absl-strings) -target_compile_options(abseil-cpp-absl-strings PRIVATE - -DNOMINMAX - -Wno-everything -) -target_include_directories(abseil-cpp-absl-strings PUBLIC - ${CMAKE_SOURCE_DIR}/contrib/restricted/abseil-cpp -) -target_link_libraries(abseil-cpp-absl-strings PUBLIC - contrib-libs-cxxsupp - abseil-cpp-absl-base - base-internal-raw_logging - base-internal-spinlock_wait - base-internal-throw_delegate - absl-base-log_severity - abseil-cpp-absl-numeric - strings-internal-absl_strings_internal -) -target_sources(abseil-cpp-absl-strings PRIVATE - ${CMAKE_SOURCE_DIR}/contrib/restricted/abseil-cpp/absl/strings/ascii.cc - ${CMAKE_SOURCE_DIR}/contrib/restricted/abseil-cpp/absl/strings/charconv.cc - ${CMAKE_SOURCE_DIR}/contrib/restricted/abseil-cpp/absl/strings/escaping.cc - ${CMAKE_SOURCE_DIR}/contrib/restricted/abseil-cpp/absl/strings/internal/charconv_bigint.cc - ${CMAKE_SOURCE_DIR}/contrib/restricted/abseil-cpp/absl/strings/internal/charconv_parse.cc - ${CMAKE_SOURCE_DIR}/contrib/restricted/abseil-cpp/absl/strings/internal/memutil.cc - ${CMAKE_SOURCE_DIR}/contrib/restricted/abseil-cpp/absl/strings/match.cc - ${CMAKE_SOURCE_DIR}/contrib/restricted/abseil-cpp/absl/strings/numbers.cc - ${CMAKE_SOURCE_DIR}/contrib/restricted/abseil-cpp/absl/strings/str_cat.cc - ${CMAKE_SOURCE_DIR}/contrib/restricted/abseil-cpp/absl/strings/str_replace.cc - ${CMAKE_SOURCE_DIR}/contrib/restricted/abseil-cpp/absl/strings/str_split.cc - ${CMAKE_SOURCE_DIR}/contrib/restricted/abseil-cpp/absl/strings/string_view.cc - ${CMAKE_SOURCE_DIR}/contrib/restricted/abseil-cpp/absl/strings/substitute.cc -) diff --git a/contrib/restricted/abseil-cpp/absl/strings/CMakeLists.txt b/contrib/restricted/abseil-cpp/absl/strings/CMakeLists.txt index e8c98bfd99..1c450b7de5 100644 --- a/contrib/restricted/abseil-cpp/absl/strings/CMakeLists.txt +++ b/contrib/restricted/abseil-cpp/absl/strings/CMakeLists.txt @@ -6,6 +6,37 @@ # original buildsystem will not be accepted. -if (UNIX AND NOT APPLE) - include(CMakeLists.linux.txt) -endif() + +add_library(abseil-cpp-absl-strings) +target_compile_options(abseil-cpp-absl-strings PRIVATE + -DNOMINMAX + -Wno-everything +) +target_include_directories(abseil-cpp-absl-strings PUBLIC + ${CMAKE_SOURCE_DIR}/contrib/restricted/abseil-cpp +) +target_link_libraries(abseil-cpp-absl-strings PUBLIC + contrib-libs-cxxsupp + abseil-cpp-absl-base + base-internal-raw_logging + base-internal-spinlock_wait + base-internal-throw_delegate + absl-base-log_severity + abseil-cpp-absl-numeric + strings-internal-absl_strings_internal +) +target_sources(abseil-cpp-absl-strings PRIVATE + ${CMAKE_SOURCE_DIR}/contrib/restricted/abseil-cpp/absl/strings/ascii.cc + ${CMAKE_SOURCE_DIR}/contrib/restricted/abseil-cpp/absl/strings/charconv.cc + ${CMAKE_SOURCE_DIR}/contrib/restricted/abseil-cpp/absl/strings/escaping.cc + ${CMAKE_SOURCE_DIR}/contrib/restricted/abseil-cpp/absl/strings/internal/charconv_bigint.cc + ${CMAKE_SOURCE_DIR}/contrib/restricted/abseil-cpp/absl/strings/internal/charconv_parse.cc + ${CMAKE_SOURCE_DIR}/contrib/restricted/abseil-cpp/absl/strings/internal/memutil.cc + ${CMAKE_SOURCE_DIR}/contrib/restricted/abseil-cpp/absl/strings/match.cc + ${CMAKE_SOURCE_DIR}/contrib/restricted/abseil-cpp/absl/strings/numbers.cc + ${CMAKE_SOURCE_DIR}/contrib/restricted/abseil-cpp/absl/strings/str_cat.cc + ${CMAKE_SOURCE_DIR}/contrib/restricted/abseil-cpp/absl/strings/str_replace.cc + ${CMAKE_SOURCE_DIR}/contrib/restricted/abseil-cpp/absl/strings/str_split.cc + ${CMAKE_SOURCE_DIR}/contrib/restricted/abseil-cpp/absl/strings/string_view.cc + ${CMAKE_SOURCE_DIR}/contrib/restricted/abseil-cpp/absl/strings/substitute.cc +) diff --git a/contrib/restricted/abseil-cpp/absl/strings/cord/CMakeLists.linux.txt b/contrib/restricted/abseil-cpp/absl/strings/cord/CMakeLists.linux.txt deleted file mode 100644 index 37171a4ccd..0000000000 --- a/contrib/restricted/abseil-cpp/absl/strings/cord/CMakeLists.linux.txt +++ /dev/null @@ -1,52 +0,0 @@ - -# This file was gererated by the build system used internally in the Yandex monorepo. -# Only simple modifications are allowed (adding source-files to targets, adding simple properties -# like target_include_directories). These modifications will be ported to original -# ya.make files by maintainers. Any complex modifications which can't be ported back to the -# original buildsystem will not be accepted. - - - -add_library(absl-strings-cord) -target_compile_options(absl-strings-cord PRIVATE - -DNOMINMAX - -Wno-everything -) -target_include_directories(absl-strings-cord PUBLIC - ${CMAKE_SOURCE_DIR}/contrib/restricted/abseil-cpp -) -target_link_libraries(absl-strings-cord PUBLIC - contrib-libs-cxxsupp - abseil-cpp-absl-algorithm - abseil-cpp-absl-base - base-internal-low_level_alloc - base-internal-raw_logging - base-internal-spinlock_wait - base-internal-throw_delegate - absl-base-log_severity - abseil-cpp-absl-container - abseil-cpp-absl-debugging - absl-debugging-stacktrace - absl-debugging-symbolize - abseil-cpp-absl-demangle - abseil-cpp-absl-functional - abseil-cpp-absl-numeric - profiling-internal-exponential_biased - abseil-cpp-absl-strings - strings-internal-absl_cord_internal - strings-internal-absl_strings_internal - strings-internal-cordz_functions - strings-internal-cordz_handle - strings-internal-cordz_info - abseil-cpp-absl-synchronization - absl-synchronization-internal - abseil-cpp-absl-time - absl-time-civil_time - absl-time-time_zone - abseil-cpp-absl-types - absl-types-bad_optional_access - abseil-cpp-absl-utility -) -target_sources(absl-strings-cord PRIVATE - ${CMAKE_SOURCE_DIR}/contrib/restricted/abseil-cpp/absl/strings/cord.cc -) diff --git a/contrib/restricted/abseil-cpp/absl/strings/cord/CMakeLists.txt b/contrib/restricted/abseil-cpp/absl/strings/cord/CMakeLists.txt index e8c98bfd99..37171a4ccd 100644 --- a/contrib/restricted/abseil-cpp/absl/strings/cord/CMakeLists.txt +++ b/contrib/restricted/abseil-cpp/absl/strings/cord/CMakeLists.txt @@ -6,6 +6,47 @@ # original buildsystem will not be accepted. -if (UNIX AND NOT APPLE) - include(CMakeLists.linux.txt) -endif() + +add_library(absl-strings-cord) +target_compile_options(absl-strings-cord PRIVATE + -DNOMINMAX + -Wno-everything +) +target_include_directories(absl-strings-cord PUBLIC + ${CMAKE_SOURCE_DIR}/contrib/restricted/abseil-cpp +) +target_link_libraries(absl-strings-cord PUBLIC + contrib-libs-cxxsupp + abseil-cpp-absl-algorithm + abseil-cpp-absl-base + base-internal-low_level_alloc + base-internal-raw_logging + base-internal-spinlock_wait + base-internal-throw_delegate + absl-base-log_severity + abseil-cpp-absl-container + abseil-cpp-absl-debugging + absl-debugging-stacktrace + absl-debugging-symbolize + abseil-cpp-absl-demangle + abseil-cpp-absl-functional + abseil-cpp-absl-numeric + profiling-internal-exponential_biased + abseil-cpp-absl-strings + strings-internal-absl_cord_internal + strings-internal-absl_strings_internal + strings-internal-cordz_functions + strings-internal-cordz_handle + strings-internal-cordz_info + abseil-cpp-absl-synchronization + absl-synchronization-internal + abseil-cpp-absl-time + absl-time-civil_time + absl-time-time_zone + abseil-cpp-absl-types + absl-types-bad_optional_access + abseil-cpp-absl-utility +) +target_sources(absl-strings-cord PRIVATE + ${CMAKE_SOURCE_DIR}/contrib/restricted/abseil-cpp/absl/strings/cord.cc +) diff --git a/contrib/restricted/abseil-cpp/absl/strings/cord_test_helpers.h b/contrib/restricted/abseil-cpp/absl/strings/cord_test_helpers.h deleted file mode 100644 index 31a1dc8980..0000000000 --- a/contrib/restricted/abseil-cpp/absl/strings/cord_test_helpers.h +++ /dev/null @@ -1,122 +0,0 @@ -// -// Copyright 2018 The Abseil Authors. -// -// Licensed under the Apache License, Version 2.0 (the "License"); -// you may not use this file except in compliance with the License. -// You may obtain a copy of the License at -// -// https://www.apache.org/licenses/LICENSE-2.0 -// -// Unless required by applicable law or agreed to in writing, software -// distributed under the License is distributed on an "AS IS" BASIS, -// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -// See the License for the specific language governing permissions and -// limitations under the License. -// - -#ifndef ABSL_STRINGS_CORD_TEST_HELPERS_H_ -#define ABSL_STRINGS_CORD_TEST_HELPERS_H_ - -#include <cstdint> -#include <iostream> -#include <string> - -#include "absl/base/config.h" -#include "absl/strings/cord.h" -#include "absl/strings/internal/cord_internal.h" -#include "absl/strings/string_view.h" - -namespace absl { -ABSL_NAMESPACE_BEGIN - -// Cord sizes relevant for testing -enum class TestCordSize { - // An empty value - kEmpty = 0, - - // An inlined string value - kInlined = cord_internal::kMaxInline / 2 + 1, - - // 'Well known' SSO lengths (excluding terminating zero). - // libstdcxx has a maximum SSO of 15, libc++ has a maximum SSO of 22. - kStringSso1 = 15, - kStringSso2 = 22, - - // A string value which is too large to fit in inlined data, but small enough - // such that Cord prefers copying the value if possible, i.e.: not stealing - // std::string inputs, or referencing existing CordReps on Append, etc. - kSmall = cord_internal::kMaxBytesToCopy / 2 + 1, - - // A string value large enough that Cord prefers to reference or steal from - // existing inputs rather than copying contents of the input. - kMedium = cord_internal::kMaxFlatLength / 2 + 1, - - // A string value large enough to cause it to be stored in mutliple flats. - kLarge = cord_internal::kMaxFlatLength * 4 -}; - -// To string helper -inline absl::string_view ToString(TestCordSize size) { - switch (size) { - case TestCordSize::kEmpty: - return "Empty"; - case TestCordSize::kInlined: - return "Inlined"; - case TestCordSize::kSmall: - return "Small"; - case TestCordSize::kStringSso1: - return "StringSso1"; - case TestCordSize::kStringSso2: - return "StringSso2"; - case TestCordSize::kMedium: - return "Medium"; - case TestCordSize::kLarge: - return "Large"; - } - return "???"; -} - -// Returns the length matching the specified size -inline size_t Length(TestCordSize size) { return static_cast<size_t>(size); } - -// Stream output helper -inline std::ostream& operator<<(std::ostream& stream, TestCordSize size) { - return stream << ToString(size); -} - -// Creates a multi-segment Cord from an iterable container of strings. The -// resulting Cord is guaranteed to have one segment for every string in the -// container. This allows code to be unit tested with multi-segment Cord -// inputs. -// -// Example: -// -// absl::Cord c = absl::MakeFragmentedCord({"A ", "fragmented ", "Cord"}); -// EXPECT_FALSE(c.GetFlat(&unused)); -// -// The mechanism by which this Cord is created is an implementation detail. Any -// implementation that produces a multi-segment Cord may produce a flat Cord in -// the future as new optimizations are added to the Cord class. -// MakeFragmentedCord will, however, always be updated to return a multi-segment -// Cord. -template <typename Container> -Cord MakeFragmentedCord(const Container& c) { - Cord result; - for (const auto& s : c) { - auto* external = new std::string(s); - Cord tmp = absl::MakeCordFromExternal( - *external, [external](absl::string_view) { delete external; }); - tmp.Prepend(result); - result = tmp; - } - return result; -} - -inline Cord MakeFragmentedCord(std::initializer_list<absl::string_view> list) { - return MakeFragmentedCord<std::initializer_list<absl::string_view>>(list); -} - -ABSL_NAMESPACE_END -} // namespace absl - -#endif // ABSL_STRINGS_CORD_TEST_HELPERS_H_ diff --git a/contrib/restricted/abseil-cpp/absl/strings/cordz_test_helpers.h b/contrib/restricted/abseil-cpp/absl/strings/cordz_test_helpers.h deleted file mode 100644 index e410eecf7f..0000000000 --- a/contrib/restricted/abseil-cpp/absl/strings/cordz_test_helpers.h +++ /dev/null @@ -1,151 +0,0 @@ -// Copyright 2021 The Abseil Authors -// -// Licensed under the Apache License, Version 2.0 (the "License"); -// you may not use this file except in compliance with the License. -// You may obtain a copy of the License at -// -// https://www.apache.org/licenses/LICENSE-2.0 -// -// Unless required by applicable law or agreed to in writing, software -// distributed under the License is distributed on an "AS IS" BASIS, -// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -// See the License for the specific language governing permissions and -// limitations under the License. - -#ifndef ABSL_STRINGS_CORDZ_TEST_HELPERS_H_ -#define ABSL_STRINGS_CORDZ_TEST_HELPERS_H_ - -#include <utility> - -#include "gmock/gmock.h" -#include "gtest/gtest.h" -#include "absl/base/config.h" -#include "absl/base/macros.h" -#include "absl/strings/cord.h" -#include "absl/strings/internal/cord_internal.h" -#include "absl/strings/internal/cordz_info.h" -#include "absl/strings/internal/cordz_sample_token.h" -#include "absl/strings/internal/cordz_statistics.h" -#include "absl/strings/internal/cordz_update_tracker.h" -#include "absl/strings/str_cat.h" - -namespace absl { -ABSL_NAMESPACE_BEGIN - -// Returns the CordzInfo for the cord, or nullptr if the cord is not sampled. -inline const cord_internal::CordzInfo* GetCordzInfoForTesting( - const Cord& cord) { - if (!cord.contents_.is_tree()) return nullptr; - return cord.contents_.cordz_info(); -} - -// Returns true if the provided cordz_info is in the list of sampled cords. -inline bool CordzInfoIsListed(const cord_internal::CordzInfo* cordz_info, - cord_internal::CordzSampleToken token = {}) { - for (const cord_internal::CordzInfo& info : token) { - if (cordz_info == &info) return true; - } - return false; -} - -// Matcher on Cord that verifies all of: -// - the cord is sampled -// - the CordzInfo of the cord is listed / discoverable. -// - the reported CordzStatistics match the cord's actual properties -// - the cord has an (initial) UpdateTracker count of 1 for `method` -MATCHER_P(HasValidCordzInfoOf, method, "CordzInfo matches cord") { - const cord_internal::CordzInfo* cord_info = GetCordzInfoForTesting(arg); - if (cord_info == nullptr) { - *result_listener << "cord is not sampled"; - return false; - } - if (!CordzInfoIsListed(cord_info)) { - *result_listener << "cord is sampled, but not listed"; - return false; - } - cord_internal::CordzStatistics stat = cord_info->GetCordzStatistics(); - if (stat.size != arg.size()) { - *result_listener << "cordz size " << stat.size - << " does not match cord size " << arg.size(); - return false; - } - if (stat.update_tracker.Value(method) != 1) { - *result_listener << "Expected method count 1 for " << method << ", found " - << stat.update_tracker.Value(method); - return false; - } - return true; -} - -// Matcher on Cord that verifies that the cord is sampled and that the CordzInfo -// update tracker has 'method' with a call count of 'n' -MATCHER_P2(CordzMethodCountEq, method, n, - absl::StrCat("CordzInfo method count equals ", n)) { - const cord_internal::CordzInfo* cord_info = GetCordzInfoForTesting(arg); - if (cord_info == nullptr) { - *result_listener << "cord is not sampled"; - return false; - } - cord_internal::CordzStatistics stat = cord_info->GetCordzStatistics(); - if (stat.update_tracker.Value(method) != n) { - *result_listener << "Expected method count " << n << " for " << method - << ", found " << stat.update_tracker.Value(method); - return false; - } - return true; -} - -// Cordz will only update with a new rate once the previously scheduled event -// has fired. When we disable Cordz, a long delay takes place where we won't -// consider profiling new Cords. CordzSampleIntervalHelper will burn through -// that interval and allow for testing that assumes that the average sampling -// interval is a particular value. -class CordzSamplingIntervalHelper { - public: - explicit CordzSamplingIntervalHelper(int32_t interval) - : orig_mean_interval_(absl::cord_internal::get_cordz_mean_interval()) { - absl::cord_internal::set_cordz_mean_interval(interval); - absl::cord_internal::cordz_set_next_sample_for_testing(interval); - } - - ~CordzSamplingIntervalHelper() { - absl::cord_internal::set_cordz_mean_interval(orig_mean_interval_); - absl::cord_internal::cordz_set_next_sample_for_testing(orig_mean_interval_); - } - - private: - int32_t orig_mean_interval_; -}; - -// Wrapper struct managing a small CordRep `rep` -struct TestCordRep { - cord_internal::CordRepFlat* rep; - - TestCordRep() { - rep = cord_internal::CordRepFlat::New(100); - rep->length = 100; - memset(rep->Data(), 1, 100); - } - ~TestCordRep() { cord_internal::CordRep::Unref(rep); } -}; - -// Wrapper struct managing a small CordRep `rep`, and -// an InlineData `data` initialized with that CordRep. -struct TestCordData { - TestCordRep rep; - cord_internal::InlineData data{rep.rep}; -}; - -// Creates a Cord that is not sampled -template <typename... Args> -Cord UnsampledCord(Args... args) { - CordzSamplingIntervalHelper never(9999); - Cord cord(std::forward<Args>(args)...); - ABSL_ASSERT(GetCordzInfoForTesting(cord) == nullptr); - return cord; -} - -ABSL_NAMESPACE_END -} // namespace absl - -#endif // ABSL_STRINGS_CORDZ_TEST_HELPERS_H_ diff --git a/contrib/restricted/abseil-cpp/absl/strings/internal/absl_cord_internal/CMakeLists.linux.txt b/contrib/restricted/abseil-cpp/absl/strings/internal/absl_cord_internal/CMakeLists.linux.txt deleted file mode 100644 index b9a5a970d7..0000000000 --- a/contrib/restricted/abseil-cpp/absl/strings/internal/absl_cord_internal/CMakeLists.linux.txt +++ /dev/null @@ -1,36 +0,0 @@ - -# This file was gererated by the build system used internally in the Yandex monorepo. -# Only simple modifications are allowed (adding source-files to targets, adding simple properties -# like target_include_directories). These modifications will be ported to original -# ya.make files by maintainers. Any complex modifications which can't be ported back to the -# original buildsystem will not be accepted. - - - -add_library(strings-internal-absl_cord_internal) -target_compile_options(strings-internal-absl_cord_internal PRIVATE - -DNOMINMAX - -Wno-everything -) -target_include_directories(strings-internal-absl_cord_internal PUBLIC - ${CMAKE_SOURCE_DIR}/contrib/restricted/abseil-cpp -) -target_link_libraries(strings-internal-absl_cord_internal PUBLIC - contrib-libs-cxxsupp - abseil-cpp-absl-base - base-internal-raw_logging - base-internal-spinlock_wait - base-internal-throw_delegate - absl-base-log_severity - abseil-cpp-absl-numeric - abseil-cpp-absl-strings - strings-internal-absl_strings_internal -) -target_sources(strings-internal-absl_cord_internal PRIVATE - ${CMAKE_SOURCE_DIR}/contrib/restricted/abseil-cpp/absl/strings/internal/cord_internal.cc - ${CMAKE_SOURCE_DIR}/contrib/restricted/abseil-cpp/absl/strings/internal/cord_rep_btree.cc - ${CMAKE_SOURCE_DIR}/contrib/restricted/abseil-cpp/absl/strings/internal/cord_rep_btree_navigator.cc - ${CMAKE_SOURCE_DIR}/contrib/restricted/abseil-cpp/absl/strings/internal/cord_rep_btree_reader.cc - ${CMAKE_SOURCE_DIR}/contrib/restricted/abseil-cpp/absl/strings/internal/cord_rep_consume.cc - ${CMAKE_SOURCE_DIR}/contrib/restricted/abseil-cpp/absl/strings/internal/cord_rep_ring.cc -) diff --git a/contrib/restricted/abseil-cpp/absl/strings/internal/absl_cord_internal/CMakeLists.txt b/contrib/restricted/abseil-cpp/absl/strings/internal/absl_cord_internal/CMakeLists.txt index e8c98bfd99..b9a5a970d7 100644 --- a/contrib/restricted/abseil-cpp/absl/strings/internal/absl_cord_internal/CMakeLists.txt +++ b/contrib/restricted/abseil-cpp/absl/strings/internal/absl_cord_internal/CMakeLists.txt @@ -6,6 +6,31 @@ # original buildsystem will not be accepted. -if (UNIX AND NOT APPLE) - include(CMakeLists.linux.txt) -endif() + +add_library(strings-internal-absl_cord_internal) +target_compile_options(strings-internal-absl_cord_internal PRIVATE + -DNOMINMAX + -Wno-everything +) +target_include_directories(strings-internal-absl_cord_internal PUBLIC + ${CMAKE_SOURCE_DIR}/contrib/restricted/abseil-cpp +) +target_link_libraries(strings-internal-absl_cord_internal PUBLIC + contrib-libs-cxxsupp + abseil-cpp-absl-base + base-internal-raw_logging + base-internal-spinlock_wait + base-internal-throw_delegate + absl-base-log_severity + abseil-cpp-absl-numeric + abseil-cpp-absl-strings + strings-internal-absl_strings_internal +) +target_sources(strings-internal-absl_cord_internal PRIVATE + ${CMAKE_SOURCE_DIR}/contrib/restricted/abseil-cpp/absl/strings/internal/cord_internal.cc + ${CMAKE_SOURCE_DIR}/contrib/restricted/abseil-cpp/absl/strings/internal/cord_rep_btree.cc + ${CMAKE_SOURCE_DIR}/contrib/restricted/abseil-cpp/absl/strings/internal/cord_rep_btree_navigator.cc + ${CMAKE_SOURCE_DIR}/contrib/restricted/abseil-cpp/absl/strings/internal/cord_rep_btree_reader.cc + ${CMAKE_SOURCE_DIR}/contrib/restricted/abseil-cpp/absl/strings/internal/cord_rep_consume.cc + ${CMAKE_SOURCE_DIR}/contrib/restricted/abseil-cpp/absl/strings/internal/cord_rep_ring.cc +) diff --git a/contrib/restricted/abseil-cpp/absl/strings/internal/absl_strings_internal/CMakeLists.linux.txt b/contrib/restricted/abseil-cpp/absl/strings/internal/absl_strings_internal/CMakeLists.linux.txt deleted file mode 100644 index e17dd7a0b9..0000000000 --- a/contrib/restricted/abseil-cpp/absl/strings/internal/absl_strings_internal/CMakeLists.linux.txt +++ /dev/null @@ -1,29 +0,0 @@ - -# This file was gererated by the build system used internally in the Yandex monorepo. -# Only simple modifications are allowed (adding source-files to targets, adding simple properties -# like target_include_directories). These modifications will be ported to original -# ya.make files by maintainers. Any complex modifications which can't be ported back to the -# original buildsystem will not be accepted. - - - -add_library(strings-internal-absl_strings_internal) -target_compile_options(strings-internal-absl_strings_internal PRIVATE - -DNOMINMAX - -Wno-everything -) -target_include_directories(strings-internal-absl_strings_internal PUBLIC - ${CMAKE_SOURCE_DIR}/contrib/restricted/abseil-cpp -) -target_link_libraries(strings-internal-absl_strings_internal PUBLIC - contrib-libs-cxxsupp - abseil-cpp-absl-base - base-internal-raw_logging - base-internal-spinlock_wait - absl-base-log_severity -) -target_sources(strings-internal-absl_strings_internal PRIVATE - ${CMAKE_SOURCE_DIR}/contrib/restricted/abseil-cpp/absl/strings/internal/escaping.cc - ${CMAKE_SOURCE_DIR}/contrib/restricted/abseil-cpp/absl/strings/internal/ostringstream.cc - ${CMAKE_SOURCE_DIR}/contrib/restricted/abseil-cpp/absl/strings/internal/utf8.cc -) diff --git a/contrib/restricted/abseil-cpp/absl/strings/internal/absl_strings_internal/CMakeLists.txt b/contrib/restricted/abseil-cpp/absl/strings/internal/absl_strings_internal/CMakeLists.txt index e8c98bfd99..e17dd7a0b9 100644 --- a/contrib/restricted/abseil-cpp/absl/strings/internal/absl_strings_internal/CMakeLists.txt +++ b/contrib/restricted/abseil-cpp/absl/strings/internal/absl_strings_internal/CMakeLists.txt @@ -6,6 +6,24 @@ # original buildsystem will not be accepted. -if (UNIX AND NOT APPLE) - include(CMakeLists.linux.txt) -endif() + +add_library(strings-internal-absl_strings_internal) +target_compile_options(strings-internal-absl_strings_internal PRIVATE + -DNOMINMAX + -Wno-everything +) +target_include_directories(strings-internal-absl_strings_internal PUBLIC + ${CMAKE_SOURCE_DIR}/contrib/restricted/abseil-cpp +) +target_link_libraries(strings-internal-absl_strings_internal PUBLIC + contrib-libs-cxxsupp + abseil-cpp-absl-base + base-internal-raw_logging + base-internal-spinlock_wait + absl-base-log_severity +) +target_sources(strings-internal-absl_strings_internal PRIVATE + ${CMAKE_SOURCE_DIR}/contrib/restricted/abseil-cpp/absl/strings/internal/escaping.cc + ${CMAKE_SOURCE_DIR}/contrib/restricted/abseil-cpp/absl/strings/internal/ostringstream.cc + ${CMAKE_SOURCE_DIR}/contrib/restricted/abseil-cpp/absl/strings/internal/utf8.cc +) diff --git a/contrib/restricted/abseil-cpp/absl/strings/internal/cord_rep_ring_reader.h b/contrib/restricted/abseil-cpp/absl/strings/internal/cord_rep_ring_reader.h deleted file mode 100644 index 7ceeaa000e..0000000000 --- a/contrib/restricted/abseil-cpp/absl/strings/internal/cord_rep_ring_reader.h +++ /dev/null @@ -1,118 +0,0 @@ -// Copyright 2021 The Abseil Authors -// -// Licensed under the Apache License, Version 2.0 (the "License"); -// you may not use this file except in compliance with the License. -// You may obtain a copy of the License at -// -// https://www.apache.org/licenses/LICENSE-2.0 -// -// Unless required by applicable law or agreed to in writing, software -// distributed under the License is distributed on an "AS IS" BASIS, -// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -// See the License for the specific language governing permissions and -// limitations under the License. - -#ifndef ABSL_STRINGS_INTERNAL_CORD_REP_RING_READER_H_ -#define ABSL_STRINGS_INTERNAL_CORD_REP_RING_READER_H_ - -#include <cassert> -#include <cstddef> -#include <cstdint> - -#include "absl/strings/internal/cord_internal.h" -#include "absl/strings/internal/cord_rep_ring.h" -#include "absl/strings/string_view.h" - -namespace absl { -ABSL_NAMESPACE_BEGIN -namespace cord_internal { - -// CordRepRingReader provides basic navigation over CordRepRing data. -class CordRepRingReader { - public: - // Returns true if this instance is not empty. - explicit operator bool() const { return ring_ != nullptr; } - - // Returns the ring buffer reference for this instance, or nullptr if empty. - CordRepRing* ring() const { return ring_; } - - // Returns the current node index inside the ring buffer for this instance. - // The returned value is undefined if this instance is empty. - CordRepRing::index_type index() const { return index_; } - - // Returns the current node inside the ring buffer for this instance. - // The returned value is undefined if this instance is empty. - CordRep* node() const { return ring_->entry_child(index_); } - - // Returns the length of the referenced ring buffer. - // Requires the current instance to be non empty. - size_t length() const { - assert(ring_); - return ring_->length; - } - - // Returns the end offset of the last navigated-to chunk, which represents the - // total bytes 'consumed' relative to the start of the ring. The returned - // value is never zero. For example, initializing a reader with a ring buffer - // with a first chunk of 19 bytes will return consumed() = 19. - // Requires the current instance to be non empty. - size_t consumed() const { - assert(ring_); - return ring_->entry_end_offset(index_); - } - - // Returns the number of bytes remaining beyond the last navigated-to chunk. - // Requires the current instance to be non empty. - size_t remaining() const { - assert(ring_); - return length() - consumed(); - } - - // Resets this instance to an empty value - void Reset() { ring_ = nullptr; } - - // Resets this instance to the start of `ring`. `ring` must not be null. - // Returns a reference into the first chunk of the provided ring. - absl::string_view Reset(CordRepRing* ring) { - assert(ring); - ring_ = ring; - index_ = ring_->head(); - return ring_->entry_data(index_); - } - - // Navigates to the next chunk inside the reference ring buffer. - // Returns a reference into the navigated-to chunk. - // Requires remaining() to be non zero. - absl::string_view Next() { - assert(remaining()); - index_ = ring_->advance(index_); - return ring_->entry_data(index_); - } - - // Navigates to the chunk at offset `offset`. - // Returns a reference into the navigated-to chunk, adjusted for the relative - // position of `offset` into that chunk. For example, calling Seek(13) on a - // ring buffer containing 2 chunks of 10 and 20 bytes respectively will return - // a string view into the second chunk starting at offset 3 with a size of 17. - // Requires `offset` to be less than `length()` - absl::string_view Seek(size_t offset) { - assert(offset < length()); - size_t current = ring_->entry_end_offset(index_); - CordRepRing::index_type hint = (offset >= current) ? index_ : ring_->head(); - const CordRepRing::Position head = ring_->Find(hint, offset); - index_ = head.index; - auto data = ring_->entry_data(head.index); - data.remove_prefix(head.offset); - return data; - } - - private: - CordRepRing* ring_ = nullptr; - CordRepRing::index_type index_; -}; - -} // namespace cord_internal -ABSL_NAMESPACE_END -} // namespace absl - -#endif // ABSL_STRINGS_INTERNAL_CORD_REP_RING_READER_H_ diff --git a/contrib/restricted/abseil-cpp/absl/strings/internal/cord_rep_test_util.h b/contrib/restricted/abseil-cpp/absl/strings/internal/cord_rep_test_util.h deleted file mode 100644 index ad828af2a5..0000000000 --- a/contrib/restricted/abseil-cpp/absl/strings/internal/cord_rep_test_util.h +++ /dev/null @@ -1,220 +0,0 @@ -// Copyright 2021 The Abseil Authors -// -// Licensed under the Apache License, Version 2.0 (the "License"); -// you may not use this file except in compliance with the License. -// You may obtain a copy of the License at -// -// https://www.apache.org/licenses/LICENSE-2.0 -// -// Unless required by applicable law or agreed to in writing, software -// distributed under the License is distributed on an "AS IS" BASIS, -// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -// See the License for the specific language governing permissions and -// limitations under the License. - -#ifndef ABSL_STRINGS_INTERNAL_CORD_REP_TEST_UTIL_H_ -#define ABSL_STRINGS_INTERNAL_CORD_REP_TEST_UTIL_H_ - -#include <cassert> -#include <memory> -#include <random> -#include <string> -#include <vector> - -#include "absl/base/config.h" -#include "absl/base/internal/raw_logging.h" -#include "absl/strings/internal/cord_internal.h" -#include "absl/strings/internal/cord_rep_btree.h" -#include "absl/strings/internal/cord_rep_flat.h" -#include "absl/strings/string_view.h" - -namespace absl { -ABSL_NAMESPACE_BEGIN -namespace cordrep_testing { - -inline cord_internal::CordRepSubstring* MakeSubstring( - size_t start, size_t len, cord_internal::CordRep* rep) { - auto* sub = new cord_internal::CordRepSubstring; - sub->tag = cord_internal::SUBSTRING; - sub->start = start; - sub->length = len <= 0 ? rep->length - start + len : len; - sub->child = rep; - return sub; -} - -inline cord_internal::CordRepConcat* MakeConcat(cord_internal::CordRep* left, - cord_internal::CordRep* right, - int depth = 0) { - auto* concat = new cord_internal::CordRepConcat; - concat->tag = cord_internal::CONCAT; - concat->length = left->length + right->length; - concat->left = left; - concat->right = right; - concat->set_depth(depth); - return concat; -} - -inline cord_internal::CordRepFlat* MakeFlat(absl::string_view value) { - assert(value.length() <= cord_internal::kMaxFlatLength); - auto* flat = cord_internal::CordRepFlat::New(value.length()); - flat->length = value.length(); - memcpy(flat->Data(), value.data(), value.length()); - return flat; -} - -// Creates an external node for testing -inline cord_internal::CordRepExternal* MakeExternal(absl::string_view s) { - struct Rep : public cord_internal::CordRepExternal { - std::string s; - explicit Rep(absl::string_view sv) : s(sv) { - this->tag = cord_internal::EXTERNAL; - this->base = s.data(); - this->length = s.length(); - this->releaser_invoker = [](cord_internal::CordRepExternal* self) { - delete static_cast<Rep*>(self); - }; - } - }; - return new Rep(s); -} - -inline std::string CreateRandomString(size_t n) { - absl::string_view data = - "abcdefghijklmnopqrstuvwxyz" - "ABCDEFGHIJKLMNOPQRSTUVWXYZ" - "0123456789~!@#$%^&*()_+=-<>?:\"{}[]|"; - std::minstd_rand rnd; - std::uniform_int_distribution<size_t> dist(0, data.size() - 1); - std::string s(n, ' '); - for (size_t i = 0; i < n; ++i) { - s[i] = data[dist(rnd)]; - } - return s; -} - -// Creates an array of flats from the provided string, chopping -// the provided string up into flats of size `chunk_size` characters -// resulting in roughly `data.size() / chunk_size` total flats. -inline std::vector<cord_internal::CordRep*> CreateFlatsFromString( - absl::string_view data, size_t chunk_size) { - assert(chunk_size > 0); - std::vector<cord_internal::CordRep*> flats; - for (absl::string_view s = data; !s.empty(); s.remove_prefix(chunk_size)) { - flats.push_back(MakeFlat(s.substr(0, chunk_size))); - } - return flats; -} - -inline cord_internal::CordRepBtree* CordRepBtreeFromFlats( - absl::Span<cord_internal::CordRep* const> flats) { - assert(!flats.empty()); - auto* node = cord_internal::CordRepBtree::Create(flats[0]); - for (size_t i = 1; i < flats.size(); ++i) { - node = cord_internal::CordRepBtree::Append(node, flats[i]); - } - return node; -} - -template <typename Fn> -inline void CordVisitReps(cord_internal::CordRep* rep, Fn&& fn) { - fn(rep); - while (rep->tag == cord_internal::SUBSTRING) { - rep = rep->substring()->child; - fn(rep); - } - if (rep->tag == cord_internal::BTREE) { - for (cord_internal::CordRep* edge : rep->btree()->Edges()) { - CordVisitReps(edge, fn); - } - } else if (rep->tag == cord_internal::CONCAT) { - CordVisitReps(rep->concat()->left, fn); - CordVisitReps(rep->concat()->right, fn); - } -} - -template <typename Predicate> -inline std::vector<cord_internal::CordRep*> CordCollectRepsIf( - Predicate&& predicate, cord_internal::CordRep* rep) { - std::vector<cord_internal::CordRep*> reps; - CordVisitReps(rep, [&reps, &predicate](cord_internal::CordRep* rep) { - if (predicate(rep)) reps.push_back(rep); - }); - return reps; -} - -inline std::vector<cord_internal::CordRep*> CordCollectReps( - cord_internal::CordRep* rep) { - std::vector<cord_internal::CordRep*> reps; - auto fn = [&reps](cord_internal::CordRep* rep) { reps.push_back(rep); }; - CordVisitReps(rep, fn); - return reps; -} - -inline void CordToString(cord_internal::CordRep* rep, std::string& s) { - size_t offset = 0; - size_t length = rep->length; - while (rep->tag == cord_internal::SUBSTRING) { - offset += rep->substring()->start; - rep = rep->substring()->child; - } - if (rep->tag == cord_internal::BTREE) { - for (cord_internal::CordRep* edge : rep->btree()->Edges()) { - CordToString(edge, s); - } - } else if (rep->tag >= cord_internal::FLAT) { - s.append(rep->flat()->Data() + offset, length); - } else if (rep->tag == cord_internal::EXTERNAL) { - s.append(rep->external()->base + offset, length); - } else { - ABSL_RAW_LOG(FATAL, "Unsupported tag %d", rep->tag); - } -} - -inline std::string CordToString(cord_internal::CordRep* rep) { - std::string s; - s.reserve(rep->length); - CordToString(rep, s); - return s; -} - -// RAII Helper class to automatically unref reps on destruction. -class AutoUnref { - public: - ~AutoUnref() { - for (CordRep* rep : unrefs_) CordRep::Unref(rep); - } - - // Adds `rep` to the list of reps to be unreffed at destruction. - template <typename CordRepType> - CordRepType* Add(CordRepType* rep) { - unrefs_.push_back(rep); - return rep; - } - - // Increments the reference count of `rep` by one, and adds it to - // the list of reps to be unreffed at destruction. - template <typename CordRepType> - CordRepType* Ref(CordRepType* rep) { - unrefs_.push_back(CordRep::Ref(rep)); - return rep; - } - - // Increments the reference count of `rep` by one if `condition` is true, - // and adds it to the list of reps to be unreffed at destruction. - template <typename CordRepType> - CordRepType* RefIf(bool condition, CordRepType* rep) { - if (condition) unrefs_.push_back(CordRep::Ref(rep)); - return rep; - } - - private: - using CordRep = absl::cord_internal::CordRep; - - std::vector<CordRep*> unrefs_; -}; - -} // namespace cordrep_testing -ABSL_NAMESPACE_END -} // namespace absl - -#endif // ABSL_STRINGS_INTERNAL_CORD_REP_TEST_UTIL_H_ diff --git a/contrib/restricted/abseil-cpp/absl/strings/internal/cordz_functions/CMakeLists.linux.txt b/contrib/restricted/abseil-cpp/absl/strings/internal/cordz_functions/CMakeLists.linux.txt deleted file mode 100644 index ce7b6e4dad..0000000000 --- a/contrib/restricted/abseil-cpp/absl/strings/internal/cordz_functions/CMakeLists.linux.txt +++ /dev/null @@ -1,26 +0,0 @@ - -# This file was gererated by the build system used internally in the Yandex monorepo. -# Only simple modifications are allowed (adding source-files to targets, adding simple properties -# like target_include_directories). These modifications will be ported to original -# ya.make files by maintainers. Any complex modifications which can't be ported back to the -# original buildsystem will not be accepted. - - - -add_library(strings-internal-cordz_functions) -target_compile_options(strings-internal-cordz_functions PRIVATE - -DNOMINMAX - -Wno-everything -) -target_include_directories(strings-internal-cordz_functions PUBLIC - ${CMAKE_SOURCE_DIR}/contrib/restricted/abseil-cpp -) -target_link_libraries(strings-internal-cordz_functions PUBLIC - contrib-libs-cxxsupp - base-internal-raw_logging - absl-base-log_severity - profiling-internal-exponential_biased -) -target_sources(strings-internal-cordz_functions PRIVATE - ${CMAKE_SOURCE_DIR}/contrib/restricted/abseil-cpp/absl/strings/internal/cordz_functions.cc -) diff --git a/contrib/restricted/abseil-cpp/absl/strings/internal/cordz_functions/CMakeLists.txt b/contrib/restricted/abseil-cpp/absl/strings/internal/cordz_functions/CMakeLists.txt index e8c98bfd99..ce7b6e4dad 100644 --- a/contrib/restricted/abseil-cpp/absl/strings/internal/cordz_functions/CMakeLists.txt +++ b/contrib/restricted/abseil-cpp/absl/strings/internal/cordz_functions/CMakeLists.txt @@ -6,6 +6,21 @@ # original buildsystem will not be accepted. -if (UNIX AND NOT APPLE) - include(CMakeLists.linux.txt) -endif() + +add_library(strings-internal-cordz_functions) +target_compile_options(strings-internal-cordz_functions PRIVATE + -DNOMINMAX + -Wno-everything +) +target_include_directories(strings-internal-cordz_functions PUBLIC + ${CMAKE_SOURCE_DIR}/contrib/restricted/abseil-cpp +) +target_link_libraries(strings-internal-cordz_functions PUBLIC + contrib-libs-cxxsupp + base-internal-raw_logging + absl-base-log_severity + profiling-internal-exponential_biased +) +target_sources(strings-internal-cordz_functions PRIVATE + ${CMAKE_SOURCE_DIR}/contrib/restricted/abseil-cpp/absl/strings/internal/cordz_functions.cc +) diff --git a/contrib/restricted/abseil-cpp/absl/strings/internal/cordz_handle/CMakeLists.linux.txt b/contrib/restricted/abseil-cpp/absl/strings/internal/cordz_handle/CMakeLists.linux.txt deleted file mode 100644 index fabe90c63b..0000000000 --- a/contrib/restricted/abseil-cpp/absl/strings/internal/cordz_handle/CMakeLists.linux.txt +++ /dev/null @@ -1,41 +0,0 @@ - -# This file was gererated by the build system used internally in the Yandex monorepo. -# Only simple modifications are allowed (adding source-files to targets, adding simple properties -# like target_include_directories). These modifications will be ported to original -# ya.make files by maintainers. Any complex modifications which can't be ported back to the -# original buildsystem will not be accepted. - - - -add_library(strings-internal-cordz_handle) -target_compile_options(strings-internal-cordz_handle PRIVATE - -DNOMINMAX - -Wno-everything -) -target_include_directories(strings-internal-cordz_handle PUBLIC - ${CMAKE_SOURCE_DIR}/contrib/restricted/abseil-cpp -) -target_link_libraries(strings-internal-cordz_handle PUBLIC - contrib-libs-cxxsupp - abseil-cpp-absl-base - base-internal-low_level_alloc - base-internal-raw_logging - base-internal-spinlock_wait - base-internal-throw_delegate - absl-base-log_severity - abseil-cpp-absl-debugging - absl-debugging-stacktrace - absl-debugging-symbolize - abseil-cpp-absl-demangle - abseil-cpp-absl-numeric - abseil-cpp-absl-strings - strings-internal-absl_strings_internal - abseil-cpp-absl-synchronization - absl-synchronization-internal - abseil-cpp-absl-time - absl-time-civil_time - absl-time-time_zone -) -target_sources(strings-internal-cordz_handle PRIVATE - ${CMAKE_SOURCE_DIR}/contrib/restricted/abseil-cpp/absl/strings/internal/cordz_handle.cc -) diff --git a/contrib/restricted/abseil-cpp/absl/strings/internal/cordz_handle/CMakeLists.txt b/contrib/restricted/abseil-cpp/absl/strings/internal/cordz_handle/CMakeLists.txt index e8c98bfd99..fabe90c63b 100644 --- a/contrib/restricted/abseil-cpp/absl/strings/internal/cordz_handle/CMakeLists.txt +++ b/contrib/restricted/abseil-cpp/absl/strings/internal/cordz_handle/CMakeLists.txt @@ -6,6 +6,36 @@ # original buildsystem will not be accepted. -if (UNIX AND NOT APPLE) - include(CMakeLists.linux.txt) -endif() + +add_library(strings-internal-cordz_handle) +target_compile_options(strings-internal-cordz_handle PRIVATE + -DNOMINMAX + -Wno-everything +) +target_include_directories(strings-internal-cordz_handle PUBLIC + ${CMAKE_SOURCE_DIR}/contrib/restricted/abseil-cpp +) +target_link_libraries(strings-internal-cordz_handle PUBLIC + contrib-libs-cxxsupp + abseil-cpp-absl-base + base-internal-low_level_alloc + base-internal-raw_logging + base-internal-spinlock_wait + base-internal-throw_delegate + absl-base-log_severity + abseil-cpp-absl-debugging + absl-debugging-stacktrace + absl-debugging-symbolize + abseil-cpp-absl-demangle + abseil-cpp-absl-numeric + abseil-cpp-absl-strings + strings-internal-absl_strings_internal + abseil-cpp-absl-synchronization + absl-synchronization-internal + abseil-cpp-absl-time + absl-time-civil_time + absl-time-time_zone +) +target_sources(strings-internal-cordz_handle PRIVATE + ${CMAKE_SOURCE_DIR}/contrib/restricted/abseil-cpp/absl/strings/internal/cordz_handle.cc +) diff --git a/contrib/restricted/abseil-cpp/absl/strings/internal/cordz_info/CMakeLists.linux.txt b/contrib/restricted/abseil-cpp/absl/strings/internal/cordz_info/CMakeLists.linux.txt deleted file mode 100644 index 83c3cf3379..0000000000 --- a/contrib/restricted/abseil-cpp/absl/strings/internal/cordz_info/CMakeLists.linux.txt +++ /dev/null @@ -1,45 +0,0 @@ - -# This file was gererated by the build system used internally in the Yandex monorepo. -# Only simple modifications are allowed (adding source-files to targets, adding simple properties -# like target_include_directories). These modifications will be ported to original -# ya.make files by maintainers. Any complex modifications which can't be ported back to the -# original buildsystem will not be accepted. - - - -add_library(strings-internal-cordz_info) -target_compile_options(strings-internal-cordz_info PRIVATE - -DNOMINMAX - -Wno-everything -) -target_include_directories(strings-internal-cordz_info PUBLIC - ${CMAKE_SOURCE_DIR}/contrib/restricted/abseil-cpp -) -target_link_libraries(strings-internal-cordz_info PUBLIC - contrib-libs-cxxsupp - abseil-cpp-absl-base - base-internal-low_level_alloc - base-internal-raw_logging - base-internal-spinlock_wait - base-internal-throw_delegate - absl-base-log_severity - abseil-cpp-absl-debugging - absl-debugging-stacktrace - absl-debugging-symbolize - abseil-cpp-absl-demangle - abseil-cpp-absl-numeric - profiling-internal-exponential_biased - abseil-cpp-absl-strings - strings-internal-absl_cord_internal - strings-internal-absl_strings_internal - strings-internal-cordz_functions - strings-internal-cordz_handle - abseil-cpp-absl-synchronization - absl-synchronization-internal - abseil-cpp-absl-time - absl-time-civil_time - absl-time-time_zone -) -target_sources(strings-internal-cordz_info PRIVATE - ${CMAKE_SOURCE_DIR}/contrib/restricted/abseil-cpp/absl/strings/internal/cordz_info.cc -) diff --git a/contrib/restricted/abseil-cpp/absl/strings/internal/cordz_info/CMakeLists.txt b/contrib/restricted/abseil-cpp/absl/strings/internal/cordz_info/CMakeLists.txt index e8c98bfd99..83c3cf3379 100644 --- a/contrib/restricted/abseil-cpp/absl/strings/internal/cordz_info/CMakeLists.txt +++ b/contrib/restricted/abseil-cpp/absl/strings/internal/cordz_info/CMakeLists.txt @@ -6,6 +6,40 @@ # original buildsystem will not be accepted. -if (UNIX AND NOT APPLE) - include(CMakeLists.linux.txt) -endif() + +add_library(strings-internal-cordz_info) +target_compile_options(strings-internal-cordz_info PRIVATE + -DNOMINMAX + -Wno-everything +) +target_include_directories(strings-internal-cordz_info PUBLIC + ${CMAKE_SOURCE_DIR}/contrib/restricted/abseil-cpp +) +target_link_libraries(strings-internal-cordz_info PUBLIC + contrib-libs-cxxsupp + abseil-cpp-absl-base + base-internal-low_level_alloc + base-internal-raw_logging + base-internal-spinlock_wait + base-internal-throw_delegate + absl-base-log_severity + abseil-cpp-absl-debugging + absl-debugging-stacktrace + absl-debugging-symbolize + abseil-cpp-absl-demangle + abseil-cpp-absl-numeric + profiling-internal-exponential_biased + abseil-cpp-absl-strings + strings-internal-absl_cord_internal + strings-internal-absl_strings_internal + strings-internal-cordz_functions + strings-internal-cordz_handle + abseil-cpp-absl-synchronization + absl-synchronization-internal + abseil-cpp-absl-time + absl-time-civil_time + absl-time-time_zone +) +target_sources(strings-internal-cordz_info PRIVATE + ${CMAKE_SOURCE_DIR}/contrib/restricted/abseil-cpp/absl/strings/internal/cordz_info.cc +) diff --git a/contrib/restricted/abseil-cpp/absl/strings/internal/cordz_sample_token/CMakeLists.linux.txt b/contrib/restricted/abseil-cpp/absl/strings/internal/cordz_sample_token/CMakeLists.linux.txt deleted file mode 100644 index c45e304001..0000000000 --- a/contrib/restricted/abseil-cpp/absl/strings/internal/cordz_sample_token/CMakeLists.linux.txt +++ /dev/null @@ -1,46 +0,0 @@ - -# This file was gererated by the build system used internally in the Yandex monorepo. -# Only simple modifications are allowed (adding source-files to targets, adding simple properties -# like target_include_directories). These modifications will be ported to original -# ya.make files by maintainers. Any complex modifications which can't be ported back to the -# original buildsystem will not be accepted. - - - -add_library(strings-internal-cordz_sample_token) -target_compile_options(strings-internal-cordz_sample_token PRIVATE - -DNOMINMAX - -Wno-everything -) -target_include_directories(strings-internal-cordz_sample_token PUBLIC - ${CMAKE_SOURCE_DIR}/contrib/restricted/abseil-cpp -) -target_link_libraries(strings-internal-cordz_sample_token PUBLIC - contrib-libs-cxxsupp - abseil-cpp-absl-base - base-internal-low_level_alloc - base-internal-raw_logging - base-internal-spinlock_wait - base-internal-throw_delegate - absl-base-log_severity - abseil-cpp-absl-debugging - absl-debugging-stacktrace - absl-debugging-symbolize - abseil-cpp-absl-demangle - abseil-cpp-absl-numeric - profiling-internal-exponential_biased - abseil-cpp-absl-strings - strings-internal-absl_cord_internal - strings-internal-absl_strings_internal - strings-internal-cordz_functions - strings-internal-cordz_handle - strings-internal-cordz_info - abseil-cpp-absl-synchronization - absl-synchronization-internal - abseil-cpp-absl-time - absl-time-civil_time - absl-time-time_zone -) -target_sources(strings-internal-cordz_sample_token PRIVATE - ${CMAKE_SOURCE_DIR}/contrib/restricted/abseil-cpp/absl/strings/internal/cordz_sample_token.cc -) diff --git a/contrib/restricted/abseil-cpp/absl/strings/internal/cordz_sample_token/CMakeLists.txt b/contrib/restricted/abseil-cpp/absl/strings/internal/cordz_sample_token/CMakeLists.txt index e8c98bfd99..c45e304001 100644 --- a/contrib/restricted/abseil-cpp/absl/strings/internal/cordz_sample_token/CMakeLists.txt +++ b/contrib/restricted/abseil-cpp/absl/strings/internal/cordz_sample_token/CMakeLists.txt @@ -6,6 +6,41 @@ # original buildsystem will not be accepted. -if (UNIX AND NOT APPLE) - include(CMakeLists.linux.txt) -endif() + +add_library(strings-internal-cordz_sample_token) +target_compile_options(strings-internal-cordz_sample_token PRIVATE + -DNOMINMAX + -Wno-everything +) +target_include_directories(strings-internal-cordz_sample_token PUBLIC + ${CMAKE_SOURCE_DIR}/contrib/restricted/abseil-cpp +) +target_link_libraries(strings-internal-cordz_sample_token PUBLIC + contrib-libs-cxxsupp + abseil-cpp-absl-base + base-internal-low_level_alloc + base-internal-raw_logging + base-internal-spinlock_wait + base-internal-throw_delegate + absl-base-log_severity + abseil-cpp-absl-debugging + absl-debugging-stacktrace + absl-debugging-symbolize + abseil-cpp-absl-demangle + abseil-cpp-absl-numeric + profiling-internal-exponential_biased + abseil-cpp-absl-strings + strings-internal-absl_cord_internal + strings-internal-absl_strings_internal + strings-internal-cordz_functions + strings-internal-cordz_handle + strings-internal-cordz_info + abseil-cpp-absl-synchronization + absl-synchronization-internal + abseil-cpp-absl-time + absl-time-civil_time + absl-time-time_zone +) +target_sources(strings-internal-cordz_sample_token PRIVATE + ${CMAKE_SOURCE_DIR}/contrib/restricted/abseil-cpp/absl/strings/internal/cordz_sample_token.cc +) diff --git a/contrib/restricted/abseil-cpp/absl/strings/internal/escaping_test_common.h b/contrib/restricted/abseil-cpp/absl/strings/internal/escaping_test_common.h deleted file mode 100644 index 7b18017a08..0000000000 --- a/contrib/restricted/abseil-cpp/absl/strings/internal/escaping_test_common.h +++ /dev/null @@ -1,133 +0,0 @@ -// Copyright 2017 The Abseil Authors. -// -// Licensed under the Apache License, Version 2.0 (the "License"); -// you may not use this file except in compliance with the License. -// You may obtain a copy of the License at -// -// https://www.apache.org/licenses/LICENSE-2.0 -// -// Unless required by applicable law or agreed to in writing, software -// distributed under the License is distributed on an "AS IS" BASIS, -// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -// See the License for the specific language governing permissions and -// limitations under the License. -// -// This test contains common things needed by both escaping_test.cc and -// escaping_benchmark.cc. - -#ifndef ABSL_STRINGS_INTERNAL_ESCAPING_TEST_COMMON_H_ -#define ABSL_STRINGS_INTERNAL_ESCAPING_TEST_COMMON_H_ - -#include <array> -#include "absl/strings/string_view.h" - -namespace absl { -ABSL_NAMESPACE_BEGIN -namespace strings_internal { - -struct base64_testcase { - absl::string_view plaintext; - absl::string_view cyphertext; -}; - -inline const std::array<base64_testcase, 5>& base64_strings() { - static const std::array<base64_testcase, 5> testcase{{ - // Some google quotes - // Cyphertext created with "uuencode (GNU sharutils) 4.6.3" - // (Note that we're testing the websafe encoding, though, so if - // you add messages, be sure to run "tr -- '+/' '-_'" on the output) - { "I was always good at math and science, and I never realized " - "that was unusual or somehow undesirable. So one of the things " - "I care a lot about is helping to remove that stigma, " - "to show girls that you can be feminine, you can like the things " - "that girls like, but you can also be really good at technology. " - "You can be really good at building things." - " - Marissa Meyer, Newsweek, 2010-12-22" "\n", - - "SSB3YXMgYWx3YXlzIGdvb2QgYXQgbWF0aCBhbmQgc2NpZW5jZSwgYW5kIEkg" - "bmV2ZXIgcmVhbGl6ZWQgdGhhdCB3YXMgdW51c3VhbCBvciBzb21laG93IHVu" - "ZGVzaXJhYmxlLiBTbyBvbmUgb2YgdGhlIHRoaW5ncyBJIGNhcmUgYSBsb3Qg" - "YWJvdXQgaXMgaGVscGluZyB0byByZW1vdmUgdGhhdCBzdGlnbWEsIHRvIHNo" - "b3cgZ2lybHMgdGhhdCB5b3UgY2FuIGJlIGZlbWluaW5lLCB5b3UgY2FuIGxp" - "a2UgdGhlIHRoaW5ncyB0aGF0IGdpcmxzIGxpa2UsIGJ1dCB5b3UgY2FuIGFs" - "c28gYmUgcmVhbGx5IGdvb2QgYXQgdGVjaG5vbG9neS4gWW91IGNhbiBiZSBy" - "ZWFsbHkgZ29vZCBhdCBidWlsZGluZyB0aGluZ3MuIC0gTWFyaXNzYSBNZXll" - "ciwgTmV3c3dlZWssIDIwMTAtMTItMjIK" }, - - { "Typical first year for a new cluster: " - "~0.5 overheating " - "~1 PDU failure " - "~1 rack-move " - "~1 network rewiring " - "~20 rack failures " - "~5 racks go wonky " - "~8 network maintenances " - "~12 router reloads " - "~3 router failures " - "~dozens of minor 30-second blips for dns " - "~1000 individual machine failures " - "~thousands of hard drive failures " - "slow disks, bad memory, misconfigured machines, flaky machines, etc." - " - Jeff Dean, The Joys of Real Hardware" "\n", - - "VHlwaWNhbCBmaXJzdCB5ZWFyIGZvciBhIG5ldyBjbHVzdGVyOiB-MC41IG92" - "ZXJoZWF0aW5nIH4xIFBEVSBmYWlsdXJlIH4xIHJhY2stbW92ZSB-MSBuZXR3" - "b3JrIHJld2lyaW5nIH4yMCByYWNrIGZhaWx1cmVzIH41IHJhY2tzIGdvIHdv" - "bmt5IH44IG5ldHdvcmsgbWFpbnRlbmFuY2VzIH4xMiByb3V0ZXIgcmVsb2Fk" - "cyB-MyByb3V0ZXIgZmFpbHVyZXMgfmRvemVucyBvZiBtaW5vciAzMC1zZWNv" - "bmQgYmxpcHMgZm9yIGRucyB-MTAwMCBpbmRpdmlkdWFsIG1hY2hpbmUgZmFp" - "bHVyZXMgfnRob3VzYW5kcyBvZiBoYXJkIGRyaXZlIGZhaWx1cmVzIHNsb3cg" - "ZGlza3MsIGJhZCBtZW1vcnksIG1pc2NvbmZpZ3VyZWQgbWFjaGluZXMsIGZs" - "YWt5IG1hY2hpbmVzLCBldGMuIC0gSmVmZiBEZWFuLCBUaGUgSm95cyBvZiBS" - "ZWFsIEhhcmR3YXJlCg" }, - - { "I'm the head of the webspam team at Google. " - "That means that if you type your name into Google and get porn back, " - "it's my fault. Unless you're a porn star, in which case porn is a " - "completely reasonable response." - " - Matt Cutts, Google Plus" "\n", - - "SSdtIHRoZSBoZWFkIG9mIHRoZSB3ZWJzcGFtIHRlYW0gYXQgR29vZ2xlLiAg" - "VGhhdCBtZWFucyB0aGF0IGlmIHlvdSB0eXBlIHlvdXIgbmFtZSBpbnRvIEdv" - "b2dsZSBhbmQgZ2V0IHBvcm4gYmFjaywgaXQncyBteSBmYXVsdC4gVW5sZXNz" - "IHlvdSdyZSBhIHBvcm4gc3RhciwgaW4gd2hpY2ggY2FzZSBwb3JuIGlzIGEg" - "Y29tcGxldGVseSByZWFzb25hYmxlIHJlc3BvbnNlLiAtIE1hdHQgQ3V0dHMs" - "IEdvb2dsZSBQbHVzCg" }, - - { "It will still be a long time before machines approach human " - "intelligence. " - "But luckily, machines don't actually have to be intelligent; " - "they just have to fake it. Access to a wealth of information, " - "combined with a rudimentary decision-making capacity, " - "can often be almost as useful. Of course, the results are better yet " - "when coupled with intelligence. A reference librarian with access to " - "a good search engine is a formidable tool." - " - Craig Silverstein, Siemens Pictures of the Future, Spring 2004" - "\n", - - "SXQgd2lsbCBzdGlsbCBiZSBhIGxvbmcgdGltZSBiZWZvcmUgbWFjaGluZXMg" - "YXBwcm9hY2ggaHVtYW4gaW50ZWxsaWdlbmNlLiBCdXQgbHVja2lseSwgbWFj" - "aGluZXMgZG9uJ3QgYWN0dWFsbHkgaGF2ZSB0byBiZSBpbnRlbGxpZ2VudDsg" - "dGhleSBqdXN0IGhhdmUgdG8gZmFrZSBpdC4gQWNjZXNzIHRvIGEgd2VhbHRo" - "IG9mIGluZm9ybWF0aW9uLCBjb21iaW5lZCB3aXRoIGEgcnVkaW1lbnRhcnkg" - "ZGVjaXNpb24tbWFraW5nIGNhcGFjaXR5LCBjYW4gb2Z0ZW4gYmUgYWxtb3N0" - "IGFzIHVzZWZ1bC4gT2YgY291cnNlLCB0aGUgcmVzdWx0cyBhcmUgYmV0dGVy" - "IHlldCB3aGVuIGNvdXBsZWQgd2l0aCBpbnRlbGxpZ2VuY2UuIEEgcmVmZXJl" - "bmNlIGxpYnJhcmlhbiB3aXRoIGFjY2VzcyB0byBhIGdvb2Qgc2VhcmNoIGVu" - "Z2luZSBpcyBhIGZvcm1pZGFibGUgdG9vbC4gLSBDcmFpZyBTaWx2ZXJzdGVp" - "biwgU2llbWVucyBQaWN0dXJlcyBvZiB0aGUgRnV0dXJlLCBTcHJpbmcgMjAw" - "NAo" }, - - // Degenerate edge case - { "", - "" }, - }}; - - return testcase; -} - -} // namespace strings_internal -ABSL_NAMESPACE_END -} // namespace absl - -#endif // ABSL_STRINGS_INTERNAL_ESCAPING_TEST_COMMON_H_ diff --git a/contrib/restricted/abseil-cpp/absl/strings/internal/numbers_test_common.h b/contrib/restricted/abseil-cpp/absl/strings/internal/numbers_test_common.h deleted file mode 100644 index eaa88a8897..0000000000 --- a/contrib/restricted/abseil-cpp/absl/strings/internal/numbers_test_common.h +++ /dev/null @@ -1,184 +0,0 @@ -// Copyright 2017 The Abseil Authors. -// -// Licensed under the Apache License, Version 2.0 (the "License"); -// you may not use this file except in compliance with the License. -// You may obtain a copy of the License at -// -// https://www.apache.org/licenses/LICENSE-2.0 -// -// Unless required by applicable law or agreed to in writing, software -// distributed under the License is distributed on an "AS IS" BASIS, -// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -// See the License for the specific language governing permissions and -// limitations under the License. -// -// This file contains common things needed by numbers_test.cc, -// numbers_legacy_test.cc and numbers_benchmark.cc. - -#ifndef ABSL_STRINGS_INTERNAL_NUMBERS_TEST_COMMON_H_ -#define ABSL_STRINGS_INTERNAL_NUMBERS_TEST_COMMON_H_ - -#include <array> -#include <cstdint> -#include <limits> -#include <string> - -#include "absl/base/config.h" - -namespace absl { -ABSL_NAMESPACE_BEGIN -namespace strings_internal { - -template <typename IntType> -inline bool Itoa(IntType value, int base, std::string* destination) { - destination->clear(); - if (base <= 1 || base > 36) { - return false; - } - - if (value == 0) { - destination->push_back('0'); - return true; - } - - bool negative = value < 0; - while (value != 0) { - const IntType next_value = value / base; - // Can't use std::abs here because of problems when IntType is unsigned. - int remainder = - static_cast<int>(value > next_value * base ? value - next_value * base - : next_value * base - value); - char c = remainder < 10 ? '0' + remainder : 'A' + remainder - 10; - destination->insert(0, 1, c); - value = next_value; - } - - if (negative) { - destination->insert(0, 1, '-'); - } - return true; -} - -struct uint32_test_case { - const char* str; - bool expect_ok; - int base; // base to pass to the conversion function - uint32_t expected; -}; - -inline const std::array<uint32_test_case, 27>& strtouint32_test_cases() { - static const std::array<uint32_test_case, 27> test_cases{{ - {"0xffffffff", true, 16, (std::numeric_limits<uint32_t>::max)()}, - {"0x34234324", true, 16, 0x34234324}, - {"34234324", true, 16, 0x34234324}, - {"0", true, 16, 0}, - {" \t\n 0xffffffff", true, 16, (std::numeric_limits<uint32_t>::max)()}, - {" \f\v 46", true, 10, 46}, // must accept weird whitespace - {" \t\n 72717222", true, 8, 072717222}, - {" \t\n 072717222", true, 8, 072717222}, - {" \t\n 072717228", false, 8, 07271722}, - {"0", true, 0, 0}, - - // Base-10 version. - {"34234324", true, 0, 34234324}, - {"4294967295", true, 0, (std::numeric_limits<uint32_t>::max)()}, - {"34234324 \n\t", true, 10, 34234324}, - - // Unusual base - {"0", true, 3, 0}, - {"2", true, 3, 2}, - {"11", true, 3, 4}, - - // Invalid uints. - {"", false, 0, 0}, - {" ", false, 0, 0}, - {"abc", false, 0, 0}, // would be valid hex, but prefix is missing - {"34234324a", false, 0, 34234324}, - {"34234.3", false, 0, 34234}, - {"-1", false, 0, 0}, - {" -123", false, 0, 0}, - {" \t\n -123", false, 0, 0}, - - // Out of bounds. - {"4294967296", false, 0, (std::numeric_limits<uint32_t>::max)()}, - {"0x100000000", false, 0, (std::numeric_limits<uint32_t>::max)()}, - {nullptr, false, 0, 0}, - }}; - return test_cases; -} - -struct uint64_test_case { - const char* str; - bool expect_ok; - int base; - uint64_t expected; -}; - -inline const std::array<uint64_test_case, 34>& strtouint64_test_cases() { - static const std::array<uint64_test_case, 34> test_cases{{ - {"0x3423432448783446", true, 16, int64_t{0x3423432448783446}}, - {"3423432448783446", true, 16, int64_t{0x3423432448783446}}, - - {"0", true, 16, 0}, - {"000", true, 0, 0}, - {"0", true, 0, 0}, - {" \t\n 0xffffffffffffffff", true, 16, - (std::numeric_limits<uint64_t>::max)()}, - - {"012345670123456701234", true, 8, int64_t{012345670123456701234}}, - {"12345670123456701234", true, 8, int64_t{012345670123456701234}}, - - {"12845670123456701234", false, 8, 0}, - - // Base-10 version. - {"34234324487834466", true, 0, int64_t{34234324487834466}}, - - {" \t\n 18446744073709551615", true, 0, - (std::numeric_limits<uint64_t>::max)()}, - - {"34234324487834466 \n\t ", true, 0, int64_t{34234324487834466}}, - - {" \f\v 46", true, 10, 46}, // must accept weird whitespace - - // Unusual base - {"0", true, 3, 0}, - {"2", true, 3, 2}, - {"11", true, 3, 4}, - - {"0", true, 0, 0}, - - // Invalid uints. - {"", false, 0, 0}, - {" ", false, 0, 0}, - {"abc", false, 0, 0}, - {"34234324487834466a", false, 0, 0}, - {"34234487834466.3", false, 0, 0}, - {"-1", false, 0, 0}, - {" -123", false, 0, 0}, - {" \t\n -123", false, 0, 0}, - - // Out of bounds. - {"18446744073709551616", false, 10, 0}, - {"18446744073709551616", false, 0, 0}, - {"0x10000000000000000", false, 16, - (std::numeric_limits<uint64_t>::max)()}, - {"0X10000000000000000", false, 16, - (std::numeric_limits<uint64_t>::max)()}, // 0X versus 0x. - {"0x10000000000000000", false, 0, (std::numeric_limits<uint64_t>::max)()}, - {"0X10000000000000000", false, 0, - (std::numeric_limits<uint64_t>::max)()}, // 0X versus 0x. - - {"0x1234", true, 16, 0x1234}, - - // Base-10 string version. - {"1234", true, 0, 1234}, - {nullptr, false, 0, 0}, - }}; - return test_cases; -} - -} // namespace strings_internal -ABSL_NAMESPACE_END -} // namespace absl - -#endif // ABSL_STRINGS_INTERNAL_NUMBERS_TEST_COMMON_H_ diff --git a/contrib/restricted/abseil-cpp/absl/strings/internal/pow10_helper.h b/contrib/restricted/abseil-cpp/absl/strings/internal/pow10_helper.h deleted file mode 100644 index c37c2c3ffe..0000000000 --- a/contrib/restricted/abseil-cpp/absl/strings/internal/pow10_helper.h +++ /dev/null @@ -1,40 +0,0 @@ -// -// Copyright 2018 The Abseil Authors. -// -// Licensed under the Apache License, Version 2.0 (the "License"); -// you may not use this file except in compliance with the License. -// You may obtain a copy of the License at -// -// https://www.apache.org/licenses/LICENSE-2.0 -// -// Unless required by applicable law or agreed to in writing, software -// distributed under the License is distributed on an "AS IS" BASIS, -// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -// See the License for the specific language governing permissions and -// limitations under the License. -// -// This test helper library contains a table of powers of 10, to guarantee -// precise values are computed across the full range of doubles. We can't rely -// on the pow() function, because not all standard libraries ship a version -// that is precise. -#ifndef ABSL_STRINGS_INTERNAL_POW10_HELPER_H_ -#define ABSL_STRINGS_INTERNAL_POW10_HELPER_H_ - -#include <vector> - -#include "absl/base/config.h" - -namespace absl { -ABSL_NAMESPACE_BEGIN -namespace strings_internal { - -// Computes the precise value of 10^exp. (I.e. the nearest representable -// double to the exact value, rounding to nearest-even in the (single) case of -// being exactly halfway between.) -double Pow10(int exp); - -} // namespace strings_internal -ABSL_NAMESPACE_END -} // namespace absl - -#endif // ABSL_STRINGS_INTERNAL_POW10_HELPER_H_ diff --git a/contrib/restricted/abseil-cpp/absl/strings/internal/str_format/.yandex_meta/licenses.list.txt b/contrib/restricted/abseil-cpp/absl/strings/internal/str_format/.yandex_meta/licenses.list.txt deleted file mode 100644 index 33d60b3d2b..0000000000 --- a/contrib/restricted/abseil-cpp/absl/strings/internal/str_format/.yandex_meta/licenses.list.txt +++ /dev/null @@ -1,20 +0,0 @@ -====================Apache-2.0==================== -// Licensed under the Apache License, Version 2.0 (the "License"); -// you may not use this file except in compliance with the License. -// You may obtain a copy of the License at -// -// https://www.apache.org/licenses/LICENSE-2.0 -// -// Unless required by applicable law or agreed to in writing, software -// distributed under the License is distributed on an "AS IS" BASIS, -// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -// See the License for the specific language governing permissions and -// limitations under the License. - - -====================COPYRIGHT==================== -// Copyright 2017 The Abseil Authors. - - -====================COPYRIGHT==================== -// Copyright 2020 The Abseil Authors. diff --git a/contrib/restricted/abseil-cpp/absl/strings/internal/str_format/CMakeLists.linux.txt b/contrib/restricted/abseil-cpp/absl/strings/internal/str_format/CMakeLists.linux.txt deleted file mode 100644 index b52e343b61..0000000000 --- a/contrib/restricted/abseil-cpp/absl/strings/internal/str_format/CMakeLists.linux.txt +++ /dev/null @@ -1,36 +0,0 @@ - -# This file was gererated by the build system used internally in the Yandex monorepo. -# Only simple modifications are allowed (adding source-files to targets, adding simple properties -# like target_include_directories). These modifications will be ported to original -# ya.make files by maintainers. Any complex modifications which can't be ported back to the -# original buildsystem will not be accepted. - - - -add_library(strings-internal-str_format) -target_compile_options(strings-internal-str_format PRIVATE - -DNOMINMAX - -Wno-everything -) -target_include_directories(strings-internal-str_format PUBLIC - ${CMAKE_SOURCE_DIR}/contrib/restricted/abseil-cpp -) -target_link_libraries(strings-internal-str_format PUBLIC - contrib-libs-cxxsupp - abseil-cpp-absl-base - base-internal-raw_logging - base-internal-spinlock_wait - base-internal-throw_delegate - absl-base-log_severity - abseil-cpp-absl-numeric - abseil-cpp-absl-strings - strings-internal-absl_strings_internal -) -target_sources(strings-internal-str_format PRIVATE - ${CMAKE_SOURCE_DIR}/contrib/restricted/abseil-cpp/absl/strings/internal/str_format/arg.cc - ${CMAKE_SOURCE_DIR}/contrib/restricted/abseil-cpp/absl/strings/internal/str_format/bind.cc - ${CMAKE_SOURCE_DIR}/contrib/restricted/abseil-cpp/absl/strings/internal/str_format/extension.cc - ${CMAKE_SOURCE_DIR}/contrib/restricted/abseil-cpp/absl/strings/internal/str_format/float_conversion.cc - ${CMAKE_SOURCE_DIR}/contrib/restricted/abseil-cpp/absl/strings/internal/str_format/output.cc - ${CMAKE_SOURCE_DIR}/contrib/restricted/abseil-cpp/absl/strings/internal/str_format/parser.cc -) diff --git a/contrib/restricted/abseil-cpp/absl/strings/internal/str_format/CMakeLists.txt b/contrib/restricted/abseil-cpp/absl/strings/internal/str_format/CMakeLists.txt index e8c98bfd99..b52e343b61 100644 --- a/contrib/restricted/abseil-cpp/absl/strings/internal/str_format/CMakeLists.txt +++ b/contrib/restricted/abseil-cpp/absl/strings/internal/str_format/CMakeLists.txt @@ -6,6 +6,31 @@ # original buildsystem will not be accepted. -if (UNIX AND NOT APPLE) - include(CMakeLists.linux.txt) -endif() + +add_library(strings-internal-str_format) +target_compile_options(strings-internal-str_format PRIVATE + -DNOMINMAX + -Wno-everything +) +target_include_directories(strings-internal-str_format PUBLIC + ${CMAKE_SOURCE_DIR}/contrib/restricted/abseil-cpp +) +target_link_libraries(strings-internal-str_format PUBLIC + contrib-libs-cxxsupp + abseil-cpp-absl-base + base-internal-raw_logging + base-internal-spinlock_wait + base-internal-throw_delegate + absl-base-log_severity + abseil-cpp-absl-numeric + abseil-cpp-absl-strings + strings-internal-absl_strings_internal +) +target_sources(strings-internal-str_format PRIVATE + ${CMAKE_SOURCE_DIR}/contrib/restricted/abseil-cpp/absl/strings/internal/str_format/arg.cc + ${CMAKE_SOURCE_DIR}/contrib/restricted/abseil-cpp/absl/strings/internal/str_format/bind.cc + ${CMAKE_SOURCE_DIR}/contrib/restricted/abseil-cpp/absl/strings/internal/str_format/extension.cc + ${CMAKE_SOURCE_DIR}/contrib/restricted/abseil-cpp/absl/strings/internal/str_format/float_conversion.cc + ${CMAKE_SOURCE_DIR}/contrib/restricted/abseil-cpp/absl/strings/internal/str_format/output.cc + ${CMAKE_SOURCE_DIR}/contrib/restricted/abseil-cpp/absl/strings/internal/str_format/parser.cc +) |