diff options
author | mydesktop <dev.mc2@gmail.com> | 2014-04-30 13:52:21 -0400 |
---|---|---|
committer | mydesktop <dev.mc2@gmail.com> | 2014-04-30 13:52:21 -0400 |
commit | 67df296650a72b8769fac58787148080ec771805 (patch) | |
tree | 121b2de24f67b7591b9e8ebda3bc9aa0c84ffbff /tests | |
parent | prompt to delete build directory on 'make clean' (diff) | |
download | monero-67df296650a72b8769fac58787148080ec771805.tar.xz |
various fixes to allow mac osx compilation
Diffstat (limited to 'tests')
-rw-r--r-- | tests/gtest/include/gtest/internal/gtest-port.h | 2 | ||||
-rw-r--r-- | tests/net_load_tests/net_load_tests.h | 14 | ||||
-rw-r--r-- | tests/performance_tests/performance_utils.h | 8 |
3 files changed, 15 insertions, 9 deletions
diff --git a/tests/gtest/include/gtest/internal/gtest-port.h b/tests/gtest/include/gtest/internal/gtest-port.h index 157b47f86..fbf28cd4e 100644 --- a/tests/gtest/include/gtest/internal/gtest-port.h +++ b/tests/gtest/include/gtest/internal/gtest-port.h @@ -204,6 +204,8 @@ #define GTEST_NAME_ "Google Test" #define GTEST_PROJECT_URL_ "http://code.google.com/p/googletest/" +#define GTEST_HAS_TR1_TUPLE 0 + // Determines the version of gcc that is used to compile this. #ifdef __GNUC__ // 40302 means version 4.3.2. diff --git a/tests/net_load_tests/net_load_tests.h b/tests/net_load_tests/net_load_tests.h index 20da11bf3..3d9569835 100644 --- a/tests/net_load_tests/net_load_tests.h +++ b/tests/net_load_tests/net_load_tests.h @@ -212,8 +212,8 @@ namespace net_load_tests struct request { - size_t open_request_target; - size_t max_opened_conn_count; + uint64_t open_request_target; + uint64_t max_opened_conn_count; BEGIN_KV_SERIALIZE_MAP() KV_SERIALIZE(open_request_target) @@ -240,9 +240,9 @@ namespace net_load_tests struct response { - size_t opened_connections_count; - size_t new_connection_counter; - size_t close_connection_counter; + uint64_t opened_connections_count; + uint64_t new_connection_counter; + uint64_t close_connection_counter; BEGIN_KV_SERIALIZE_MAP() KV_SERIALIZE(opened_connections_count) @@ -295,7 +295,7 @@ namespace net_load_tests struct request { - size_t request_size; + uint64_t request_size; BEGIN_KV_SERIALIZE_MAP() KV_SERIALIZE(request_size) @@ -310,7 +310,7 @@ namespace net_load_tests struct request { std::string data; - size_t response_size; + uint64_t response_size; BEGIN_KV_SERIALIZE_MAP() KV_SERIALIZE(data) diff --git a/tests/performance_tests/performance_utils.h b/tests/performance_tests/performance_utils.h index b2ac4076f..45ca5b27b 100644 --- a/tests/performance_tests/performance_utils.h +++ b/tests/performance_tests/performance_utils.h @@ -14,7 +14,9 @@ void set_process_affinity(int core) { -#if defined(BOOST_WINDOWS) +#if defined (__APPLE__) + return; +#elif defined(BOOST_WINDOWS) DWORD_PTR mask = 1; for (int i = 0; i < core; ++i) { @@ -34,7 +36,9 @@ void set_process_affinity(int core) void set_thread_high_priority() { -#if defined(BOOST_WINDOWS) +#if defined(__APPLE__) + return; +#elif defined(BOOST_WINDOWS) ::SetPriorityClass(::GetCurrentProcess(), HIGH_PRIORITY_CLASS); #elif defined(BOOST_HAS_PTHREADS) pthread_attr_t attr; |