summaryrefslogtreecommitdiffstats
path: root/contrib/libs
diff options
context:
space:
mode:
authorthegeorg <[email protected]>2022-07-27 14:57:45 +0300
committerthegeorg <[email protected]>2022-07-27 14:57:45 +0300
commitd322072ff2e25d205d39881d33637263b78134fe (patch)
treee8b2c216934b2815364f979c51912ee550aa855a /contrib/libs
parent283ebca3fa44f91459284afc7bbf590f06041f0d (diff)
Drop remaining traces of ACTORLIB_HUGE_PB_SIZE
The only usage of this define was removed in rXXXXXX.
Diffstat (limited to 'contrib/libs')
-rw-r--r--contrib/libs/benchmark/LICENSE32
-rw-r--r--contrib/libs/benchmark/include/benchmark/export.h65
-rw-r--r--contrib/libs/benchmark/src/string_util.cc8
3 files changed, 39 insertions, 66 deletions
diff --git a/contrib/libs/benchmark/LICENSE b/contrib/libs/benchmark/LICENSE
index a5c40b3ee13..d6456956733 100644
--- a/contrib/libs/benchmark/LICENSE
+++ b/contrib/libs/benchmark/LICENSE
@@ -200,35 +200,3 @@
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.
-
-
-Only benchmark/config/generate_export_header.bzl depends on the following licence:
-
- BSD 3-Clause License
-
-Copyright (c) [year], [fullname]
-
-Redistribution and use in source and binary forms, with or without
-modification, are permitted provided that the following conditions are met:
-
-1. Redistributions of source code must retain the above copyright notice, this
- list of conditions and the following disclaimer.
-
-2. Redistributions in binary form must reproduce the above copyright notice,
- this list of conditions and the following disclaimer in the documentation
- and/or other materials provided with the distribution.
-
-3. Neither the name of the copyright holder nor the names of its
- contributors may be used to endorse or promote products derived from
- this software without specific prior written permission.
-
-THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS"
-AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
-IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE
-DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE LIABLE
-FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
-DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR
-SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER
-CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY,
-OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE
-OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
diff --git a/contrib/libs/benchmark/include/benchmark/export.h b/contrib/libs/benchmark/include/benchmark/export.h
index fe5a452eded..f96f8596cd9 100644
--- a/contrib/libs/benchmark/include/benchmark/export.h
+++ b/contrib/libs/benchmark/include/benchmark/export.h
@@ -1,42 +1,47 @@
-
#ifndef BENCHMARK_EXPORT_H
#define BENCHMARK_EXPORT_H
-#ifdef BENCHMARK_STATIC_DEFINE
-# define BENCHMARK_EXPORT
-# define BENCHMARK_NO_EXPORT
-#else
-# ifndef BENCHMARK_EXPORT
-# ifdef benchmark_EXPORTS
- /* We are building this library */
-# define BENCHMARK_EXPORT __attribute__((visibility("default")))
-# else
- /* We are using this library */
-# define BENCHMARK_EXPORT __attribute__((visibility("default")))
-# endif
-# endif
+#if defined(_WIN32)
+#define EXPORT_ATTR __declspec(dllexport)
+#define IMPORT_ATTR __declspec(dllimport)
+#define NO_EXPORT_ATTR
+#define DEPRECATED_ATTR __declspec(deprecated)
+#else // _WIN32
+#define EXPORT_ATTR __attribute__((visibility("default")))
+#define IMPORT_ATTR __attribute__((visibility("default")))
+#define NO_EXPORT_ATTR __attribute__((visibility("hidden")))
+#define DEPRECATE_ATTR __attribute__((__deprecated__))
+#endif // _WIN32
-# ifndef BENCHMARK_NO_EXPORT
-# define BENCHMARK_NO_EXPORT __attribute__((visibility("hidden")))
-# endif
-#endif
+#ifdef BENCHMARK_STATIC_DEFINE
+#define BENCHMARK_EXPORT
+#define BENCHMARK_NO_EXPORT
+#else // BENCHMARK_STATIC_DEFINE
+#ifndef BENCHMARK_EXPORT
+#ifdef benchmark_EXPORTS
+/* We are building this library */
+#define BENCHMARK_EXPORT EXPORT_ATTR
+#else // benchmark_EXPORTS
+/* We are using this library */
+#define BENCHMARK_EXPORT IMPORT_ATTR
+#endif // benchmark_EXPORTS
+#endif // !BENCHMARK_EXPORT
+
+#ifndef BENCHMARK_NO_EXPORT
+#define BENCHMARK_NO_EXPORT NO_EXPORT_ATTR
+#endif // !BENCHMARK_NO_EXPORT
+#endif // BENCHMARK_STATIC_DEFINE
#ifndef BENCHMARK_DEPRECATED
-# define BENCHMARK_DEPRECATED __attribute__ ((__deprecated__))
-#endif
+#define BENCHMARK_DEPRECATED DEPRECATE_ATTR
+#endif // BENCHMARK_DEPRECATED
#ifndef BENCHMARK_DEPRECATED_EXPORT
-# define BENCHMARK_DEPRECATED_EXPORT BENCHMARK_EXPORT BENCHMARK_DEPRECATED
-#endif
+#define BENCHMARK_DEPRECATED_EXPORT BENCHMARK_EXPORT BENCHMARK_DEPRECATED
+#endif // BENCHMARK_DEPRECATED_EXPORT
#ifndef BENCHMARK_DEPRECATED_NO_EXPORT
-# define BENCHMARK_DEPRECATED_NO_EXPORT BENCHMARK_NO_EXPORT BENCHMARK_DEPRECATED
-#endif
-
-#if 0 /* DEFINE_NO_DEPRECATED */
-# ifndef BENCHMARK_NO_DEPRECATED
-# define BENCHMARK_NO_DEPRECATED
-# endif
-#endif
+#define BENCHMARK_DEPRECATED_NO_EXPORT BENCHMARK_NO_EXPORT BENCHMARK_DEPRECATED
+#endif // BENCHMARK_DEPRECATED_EXPORT
#endif /* BENCHMARK_EXPORT_H */
diff --git a/contrib/libs/benchmark/src/string_util.cc b/contrib/libs/benchmark/src/string_util.cc
index 401fa13df7a..b3196fc2663 100644
--- a/contrib/libs/benchmark/src/string_util.cc
+++ b/contrib/libs/benchmark/src/string_util.cc
@@ -133,21 +133,21 @@ std::string StrFormatImp(const char* msg, va_list args) {
// TODO(ericwf): use std::array for first attempt to avoid one memory
// allocation guess what the size might be
std::array<char, 256> local_buff;
- std::size_t size = local_buff.size();
+
// 2015-10-08: vsnprintf is used instead of snd::vsnprintf due to a limitation
// in the android-ndk
- auto ret = vsnprintf(local_buff.data(), size, msg, args_cp);
+ auto ret = vsnprintf(local_buff.data(), local_buff.size(), msg, args_cp);
va_end(args_cp);
// handle empty expansion
if (ret == 0) return std::string{};
- if (static_cast<std::size_t>(ret) < size)
+ if (static_cast<std::size_t>(ret) < local_buff.size())
return std::string(local_buff.data());
// we did not provide a long enough buffer on our first attempt.
// add 1 to size to account for null-byte in size cast to prevent overflow
- size = static_cast<std::size_t>(ret) + 1;
+ std::size_t size = static_cast<std::size_t>(ret) + 1;
auto buff_ptr = std::unique_ptr<char[]>(new char[size]);
// 2015-10-08: vsnprintf is used instead of snd::vsnprintf due to a limitation
// in the android-ndk