diff options
author | bugaevskiy <bugaevskiy@yandex-team.com> | 2022-08-10 20:01:04 +0300 |
---|---|---|
committer | bugaevskiy <bugaevskiy@yandex-team.com> | 2022-08-10 20:01:04 +0300 |
commit | 8766c8a0c9eff15893c1963e5f83f294a6dce1eb (patch) | |
tree | 49f61f0b17ec9573f3881c3c8f9f0623182ce7f8 | |
parent | ce5d59c112f47f3e9322f2cc54ac0398f59275ac (diff) | |
download | ydb-8766c8a0c9eff15893c1963e5f83f294a6dce1eb.tar.gz |
Reimport boost/any as a separate project
-rw-r--r-- | CMakeLists.darwin.txt | 11 | ||||
-rw-r--r-- | CMakeLists.linux.txt | 11 | ||||
-rw-r--r-- | contrib/restricted/boost/CMakeLists.txt | 1 | ||||
-rw-r--r-- | contrib/restricted/boost/any/CMakeLists.txt | 24 | ||||
-rw-r--r-- | contrib/restricted/boost/any/README.md | 16 | ||||
-rw-r--r-- | contrib/restricted/boost/any/include/boost/any.hpp (renamed from contrib/restricted/boost/boost/any.hpp) | 0 | ||||
-rw-r--r-- | library/cpp/netliba/v6/ib_cs.cpp | 2 | ||||
-rw-r--r-- | library/cpp/netliba/v6/ib_low.h | 8 | ||||
-rw-r--r-- | library/cpp/netliba/v6/ib_mem.h | 2 |
9 files changed, 59 insertions, 16 deletions
diff --git a/CMakeLists.darwin.txt b/CMakeLists.darwin.txt index 274b3f3c73..a490a31e04 100644 --- a/CMakeLists.darwin.txt +++ b/CMakeLists.darwin.txt @@ -358,20 +358,22 @@ add_subdirectory(contrib/restricted/boost/config) add_subdirectory(contrib/restricted/boost/core) add_subdirectory(contrib/restricted/boost/static_assert) add_subdirectory(contrib/restricted/boost/throw_exception) -add_subdirectory(contrib/restricted/boost/array) -add_subdirectory(contrib/restricted/boost/bind) -add_subdirectory(contrib/restricted/boost/concept_check) +add_subdirectory(contrib/restricted/boost/any) add_subdirectory(contrib/restricted/boost/mpl) add_subdirectory(contrib/restricted/boost/predef) add_subdirectory(contrib/restricted/boost/preprocessor) add_subdirectory(contrib/restricted/boost/type_traits) add_subdirectory(contrib/restricted/boost/utility) +add_subdirectory(contrib/restricted/boost/type_index) add_subdirectory(contrib/restricted/boost/container_hash) add_subdirectory(contrib/restricted/boost/detail) add_subdirectory(contrib/restricted/boost/integer) -add_subdirectory(contrib/restricted/boost/conversion) add_subdirectory(contrib/restricted/boost/smart_ptr) add_subdirectory(contrib/restricted/boost/move) +add_subdirectory(contrib/restricted/boost/array) +add_subdirectory(contrib/restricted/boost/bind) +add_subdirectory(contrib/restricted/boost/concept_check) +add_subdirectory(contrib/restricted/boost/conversion) add_subdirectory(contrib/restricted/boost/typeof) add_subdirectory(contrib/restricted/boost/endian) add_subdirectory(contrib/restricted/boost/system) @@ -392,7 +394,6 @@ add_subdirectory(contrib/restricted/boost/polygon) add_subdirectory(contrib/restricted/boost/qvm) add_subdirectory(contrib/restricted/boost/rational) add_subdirectory(contrib/restricted/boost/tti) -add_subdirectory(contrib/restricted/boost/type_index) add_subdirectory(contrib/restricted/boost/vmd) add_subdirectory(contrib/restricted/fast_float) add_subdirectory(contrib/restricted/thrift) diff --git a/CMakeLists.linux.txt b/CMakeLists.linux.txt index 73ee27dafa..2aaa6d4447 100644 --- a/CMakeLists.linux.txt +++ b/CMakeLists.linux.txt @@ -361,20 +361,22 @@ add_subdirectory(contrib/restricted/boost/config) add_subdirectory(contrib/restricted/boost/core) add_subdirectory(contrib/restricted/boost/static_assert) add_subdirectory(contrib/restricted/boost/throw_exception) -add_subdirectory(contrib/restricted/boost/array) -add_subdirectory(contrib/restricted/boost/bind) -add_subdirectory(contrib/restricted/boost/concept_check) +add_subdirectory(contrib/restricted/boost/any) add_subdirectory(contrib/restricted/boost/mpl) add_subdirectory(contrib/restricted/boost/predef) add_subdirectory(contrib/restricted/boost/preprocessor) add_subdirectory(contrib/restricted/boost/type_traits) add_subdirectory(contrib/restricted/boost/utility) +add_subdirectory(contrib/restricted/boost/type_index) add_subdirectory(contrib/restricted/boost/container_hash) add_subdirectory(contrib/restricted/boost/detail) add_subdirectory(contrib/restricted/boost/integer) -add_subdirectory(contrib/restricted/boost/conversion) add_subdirectory(contrib/restricted/boost/smart_ptr) add_subdirectory(contrib/restricted/boost/move) +add_subdirectory(contrib/restricted/boost/array) +add_subdirectory(contrib/restricted/boost/bind) +add_subdirectory(contrib/restricted/boost/concept_check) +add_subdirectory(contrib/restricted/boost/conversion) add_subdirectory(contrib/restricted/boost/typeof) add_subdirectory(contrib/restricted/boost/endian) add_subdirectory(contrib/restricted/boost/system) @@ -395,7 +397,6 @@ add_subdirectory(contrib/restricted/boost/polygon) add_subdirectory(contrib/restricted/boost/qvm) add_subdirectory(contrib/restricted/boost/rational) add_subdirectory(contrib/restricted/boost/tti) -add_subdirectory(contrib/restricted/boost/type_index) add_subdirectory(contrib/restricted/boost/vmd) add_subdirectory(contrib/restricted/fast_float) add_subdirectory(contrib/restricted/thrift) diff --git a/contrib/restricted/boost/CMakeLists.txt b/contrib/restricted/boost/CMakeLists.txt index e0732ed63d..15878e2f73 100644 --- a/contrib/restricted/boost/CMakeLists.txt +++ b/contrib/restricted/boost/CMakeLists.txt @@ -14,6 +14,7 @@ target_include_directories(contrib-restricted-boost INTERFACE target_link_libraries(contrib-restricted-boost INTERFACE contrib-libs-cxxsupp restricted-boost-align + restricted-boost-any restricted-boost-array restricted-boost-assert restricted-boost-bind diff --git a/contrib/restricted/boost/any/CMakeLists.txt b/contrib/restricted/boost/any/CMakeLists.txt new file mode 100644 index 0000000000..c6a1c3a483 --- /dev/null +++ b/contrib/restricted/boost/any/CMakeLists.txt @@ -0,0 +1,24 @@ + +# 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(restricted-boost-any INTERFACE) +target_include_directories(restricted-boost-any INTERFACE + ${CMAKE_SOURCE_DIR}/contrib/restricted/boost/any/include +) +target_link_libraries(restricted-boost-any INTERFACE + contrib-libs-cxxsupp + yutil + restricted-boost-config + restricted-boost-core + restricted-boost-mpl + restricted-boost-static_assert + restricted-boost-throw_exception + restricted-boost-type_index + restricted-boost-type_traits +) diff --git a/contrib/restricted/boost/any/README.md b/contrib/restricted/boost/any/README.md new file mode 100644 index 0000000000..2da4bdcd39 --- /dev/null +++ b/contrib/restricted/boost/any/README.md @@ -0,0 +1,16 @@ +# [Boost.Any](http://boost.org/libs/any) +Boost.Any is a part of the [Boost C++ Libraries](http://github.com/boostorg). It is a safe, generic container for single values of different value types. + +### Test results + +@ | Build | Tests coverage | More info +----------------|-------------- | -------------- |----------- +Develop branch: | [![Build Status](https://travis-ci.org/apolukhin/any.svg?branch=develop)](https://travis-ci.org/apolukhin/any) [![Build status](https://ci.appveyor.com/api/projects/status/dmugl75nfhjnx7ot/branch/develop?svg=true)](https://ci.appveyor.com/project/apolukhin/any/branch/develop) | [![Coverage Status](https://coveralls.io/repos/apolukhin/any/badge.png?branch=develop)](https://coveralls.io/r/apolukhin/any?branch=develop) | [details...](http://www.boost.org/development/tests/develop/developer/any.html) +Master branch: | [![Build Status](https://travis-ci.org/apolukhin/any.svg?branch=master)](https://travis-ci.org/apolukhin/any) [![Build status](https://ci.appveyor.com/api/projects/status/dmugl75nfhjnx7ot/branch/master?svg=true)](https://ci.appveyor.com/project/apolukhin/any/branch/master) | [![Coverage Status](https://coveralls.io/repos/apolukhin/any/badge.png?branch=master)](https://coveralls.io/r/apolukhin/any?branch=master) | [details...](http://www.boost.org/development/tests/master/developer/any.html) + + +[Open Issues](https://svn.boost.org/trac/boost/query?status=!closed&component=any) + +### License + +Distributed under the [Boost Software License, Version 1.0](http://boost.org/LICENSE_1_0.txt). diff --git a/contrib/restricted/boost/boost/any.hpp b/contrib/restricted/boost/any/include/boost/any.hpp index 9f6b313274..9f6b313274 100644 --- a/contrib/restricted/boost/boost/any.hpp +++ b/contrib/restricted/boost/any/include/boost/any.hpp diff --git a/library/cpp/netliba/v6/ib_cs.cpp b/library/cpp/netliba/v6/ib_cs.cpp index 6dbe7bb0e5..1b904e3358 100644 --- a/library/cpp/netliba/v6/ib_cs.cpp +++ b/library/cpp/netliba/v6/ib_cs.cpp @@ -420,7 +420,7 @@ namespace NNetliba { TCmdBufferReady ready; ready.Command = CMD_BUFFER_READY; ready.PacketGuid = data.PacketGuid; - ready.RemoteAddr = blk->GetData() - (char*)nullptr; + ready.RemoteAddr = reinterpret_cast<ui64>(blk->GetData()) / sizeof(char); ready.RemoteKey = blk->GetMemRegion()->GetRKey(); peer->PostSend(BP, &ready, sizeof(ready), TCompleteInfo::CI_IGNORE, 0); diff --git a/library/cpp/netliba/v6/ib_low.h b/library/cpp/netliba/v6/ib_low.h index b2a3e341d2..04f4a08d3c 100644 --- a/library/cpp/netliba/v6/ib_low.h +++ b/library/cpp/netliba/v6/ib_low.h @@ -227,8 +227,8 @@ namespace NNetliba { return MR ? (char*)MR->addr : nullptr; } bool IsCovered(const void* data, size_t len) const { - size_t dataAddr = (const char*)data - (const char*)nullptr; - size_t bufAddr = (const char*)MR->addr - (const char*)nullptr; + size_t dataAddr = reinterpret_cast<size_t>(data) / sizeof(char); + size_t bufAddr = reinterpret_cast<size_t>(MR->addr) / sizeof(char); return (dataAddr >= bufAddr) && (dataAddr + len <= bufAddr + MR->length); } }; @@ -264,7 +264,7 @@ namespace NNetliba { Y_ASSERT(mem->IsCovered(buf, len)); ibv_recv_wr wr, *bad; ibv_sge sg; - sg.addr = (const char*)buf - (const char*)nullptr; + sg.addr = reinterpret_cast<ui64>(buf) / sizeof(char); sg.length = len; sg.lkey = mem->GetLKey(); Zero(wr); @@ -413,7 +413,7 @@ namespace NNetliba { } void FillSendAttrs(ibv_send_wr* wr, ibv_sge* sg, TPtrArg<TMemoryRegion> mem, ui64 id, const void* data, size_t len) { - ui64 localAddr = (const char*)data - (const char*)nullptr; + ui64 localAddr = reinterpret_cast<ui64>(data) / sizeof(char); ui32 lKey = 0; if (mem) { Y_ASSERT(mem->IsCovered(data, len)); diff --git a/library/cpp/netliba/v6/ib_mem.h b/library/cpp/netliba/v6/ib_mem.h index dfa5b9cd5f..5adcc59dd7 100644 --- a/library/cpp/netliba/v6/ib_mem.h +++ b/library/cpp/netliba/v6/ib_mem.h @@ -54,7 +54,7 @@ namespace NNetliba { return Data; } ui64 GetAddr() { - return Data - (char*)nullptr; + return reinterpret_cast<ui64>(Data) / sizeof(char); } size_t GetSize() { return Size; |