pkgsrc-Changes-HG archive

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index][Old Index]

[pkgsrc/trunk]: pkgsrc/benchmarks/google-benchmark google-benchmark: fix buil...



details:   https://anonhg.NetBSD.org/pkgsrc/rev/6a1e41f90732
branches:  trunk
changeset: 375808:6a1e41f90732
user:      tnn <tnn%pkgsrc.org@localhost>
date:      Sun Mar 27 12:04:05 2022 +0000

description:
google-benchmark: fix build on SunOS

diffstat:

 benchmarks/google-benchmark/distinfo                                               |   3 +-
 benchmarks/google-benchmark/patches/patch-test_benchmark__setup__teardown__test.cc |  44 ++++++++++
 2 files changed, 46 insertions(+), 1 deletions(-)

diffs (59 lines):

diff -r 4ea04e1ef8cf -r 6a1e41f90732 benchmarks/google-benchmark/distinfo
--- a/benchmarks/google-benchmark/distinfo      Sun Mar 27 11:48:16 2022 +0000
+++ b/benchmarks/google-benchmark/distinfo      Sun Mar 27 12:04:05 2022 +0000
@@ -1,5 +1,6 @@
-$NetBSD: distinfo,v 1.16 2022/01/16 23:09:35 wiz Exp $
+$NetBSD: distinfo,v 1.17 2022/03/27 12:04:05 tnn Exp $
 
 BLAKE2s (benchmark-1.6.1.tar.gz) = e1d824a20befda52931de3256cbf065724b076fdf4d6feb8b101e56d283f8418
 SHA512 (benchmark-1.6.1.tar.gz) = 7d3e3baf5a2d92e9552ab5007c37253b3510ac269edf8922a2794ff3dfbd0bf5b4c519240d4577b1ec30ef9e8a64caa17a809054c3dc7f2b1bcd410596177d67
 Size (benchmark-1.6.1.tar.gz) = 184616 bytes
+SHA1 (patch-test_benchmark__setup__teardown__test.cc) = d3baa390eb590628fd42c85ce6ec42767e66c15b
diff -r 4ea04e1ef8cf -r 6a1e41f90732 benchmarks/google-benchmark/patches/patch-test_benchmark__setup__teardown__test.cc
--- /dev/null   Thu Jan 01 00:00:00 1970 +0000
+++ b/benchmarks/google-benchmark/patches/patch-test_benchmark__setup__teardown__test.cc        Sun Mar 27 12:04:05 2022 +0000
@@ -0,0 +1,44 @@
+$NetBSD: patch-test_benchmark__setup__teardown__test.cc,v 1.1 2022/03/27 12:04:05 tnn Exp $
+
+Rename namespace single due to conflict:
+error: 'namespace single { }' redeclared as different kind of entity
+/usr/include/floatingpoint.h:69:15: note: previous declaration 'typedef float single'
+   69 | typedef float single;
+
+--- test/benchmark_setup_teardown_test.cc.orig 2022-01-10 19:14:27.000000000 +0000
++++ test/benchmark_setup_teardown_test.cc
+@@ -10,19 +10,19 @@
+ 
+ // Test that Setup() and Teardown() are called exactly once
+ // for each benchmark run (single-threaded).
+-namespace single {
++namespace single_ {
+ static int setup_call = 0;
+ static int teardown_call = 0;
+-}  // namespace single
++}  // namespace single_
+ static void DoSetup1(const benchmark::State& state) {
+-  ++single::setup_call;
++  ++single_::setup_call;
+ 
+   // Setup/Teardown should never be called with any thread_idx != 0.
+   assert(state.thread_index() == 0);
+ }
+ 
+ static void DoTeardown1(const benchmark::State& state) {
+-  ++single::teardown_call;
++  ++single_::teardown_call;
+   assert(state.thread_index() == 0);
+ }
+ 
+@@ -134,8 +134,8 @@ int main(int argc, char** argv) {
+   assert(ret > 0);
+ 
+   // Setup/Teardown is called once for each arg group (1,3,5,7).
+-  assert(single::setup_call == 4);
+-  assert(single::teardown_call == 4);
++  assert(single_::setup_call == 4);
++  assert(single_::teardown_call == 4);
+ 
+   // 3 group of threads calling this function (3,5,10).
+   assert(concurrent::setup_call.load(std::memory_order_relaxed) == 3);



Home | Main Index | Thread Index | Old Index