You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@thrift.apache.org by jk...@apache.org on 2018/12/10 23:44:29 UTC

[thrift] branch master updated (9c3d2d6 -> 44ee32c)

This is an automated email from the ASF dual-hosted git repository.

jking pushed a change to branch master
in repository https://gitbox.apache.org/repos/asf/thrift.git.


    from 9c3d2d6  Fix build compiler with cmake
     new f201bf0  Fix build with c++17
     new db61f10  Fix build with old c++
     new e6e7e62  Correct c++17 definition
     new 44ee32c  Fix c++98 build

The 4 revisions listed above as "new" are entirely new to this
repository and will be described in separate emails.  The revisions
listed as "add" were already present in the repository and have only
been added to this reference.


Summary of changes:
 lib/cpp/src/thrift/transport/TSocketPool.cpp | 11 ++++++++++-
 1 file changed, 10 insertions(+), 1 deletion(-)


[thrift] 01/04: Fix build with c++17

Posted by jk...@apache.org.
This is an automated email from the ASF dual-hosted git repository.

jking pushed a commit to branch master
in repository https://gitbox.apache.org/repos/asf/thrift.git

commit f201bf05fbb56a33112e9f7ccf3790dffeab383e
Author: proller <pr...@users.noreply.github.com>
AuthorDate: Thu Dec 6 14:13:15 2018 +0300

    Fix build with c++17
---
 lib/cpp/src/thrift/transport/TSocketPool.cpp | 5 ++++-
 1 file changed, 4 insertions(+), 1 deletion(-)

diff --git a/lib/cpp/src/thrift/transport/TSocketPool.cpp b/lib/cpp/src/thrift/transport/TSocketPool.cpp
index 0cec259..910fe52 100644
--- a/lib/cpp/src/thrift/transport/TSocketPool.cpp
+++ b/lib/cpp/src/thrift/transport/TSocketPool.cpp
@@ -21,6 +21,7 @@
 
 #include <algorithm>
 #include <iostream>
+#include <random>
 
 #include <thrift/transport/TSocketPool.h>
 
@@ -188,7 +189,9 @@ void TSocketPool::open() {
   }
 
   if (randomize_ && numServers > 1) {
-    random_shuffle(servers_.begin(), servers_.end());
+    std::random_device rng;
+    std::mt19937 urng(rng());
+    std::shuffle(servers_.begin(), servers_.end(), urng);
   }
 
   for (size_t i = 0; i < numServers; ++i) {


[thrift] 04/04: Fix c++98 build

Posted by jk...@apache.org.
This is an automated email from the ASF dual-hosted git repository.

jking pushed a commit to branch master
in repository https://gitbox.apache.org/repos/asf/thrift.git

commit 44ee32cef57cbbd0ad62dfa026f0ee5e746f5c2b
Author: proller <pr...@users.noreply.github.com>
AuthorDate: Mon Dec 10 19:16:30 2018 +0300

    Fix c++98 build
---
 lib/cpp/src/thrift/transport/TSocketPool.cpp | 2 ++
 1 file changed, 2 insertions(+)

diff --git a/lib/cpp/src/thrift/transport/TSocketPool.cpp b/lib/cpp/src/thrift/transport/TSocketPool.cpp
index b5cfe26..a34d135 100644
--- a/lib/cpp/src/thrift/transport/TSocketPool.cpp
+++ b/lib/cpp/src/thrift/transport/TSocketPool.cpp
@@ -21,7 +21,9 @@
 
 #include <algorithm>
 #include <iostream>
+#if __cplusplus >= 201703L
 #include <random>
+#endif
 
 #include <thrift/transport/TSocketPool.h>
 


[thrift] 02/04: Fix build with old c++

Posted by jk...@apache.org.
This is an automated email from the ASF dual-hosted git repository.

jking pushed a commit to branch master
in repository https://gitbox.apache.org/repos/asf/thrift.git

commit db61f10497bcf069da03537629dcc79b0523ebe4
Author: proller <pr...@users.noreply.github.com>
AuthorDate: Mon Dec 10 16:25:04 2018 +0300

    Fix build with old c++
---
 lib/cpp/src/thrift/transport/TSocketPool.cpp | 4 ++++
 1 file changed, 4 insertions(+)

diff --git a/lib/cpp/src/thrift/transport/TSocketPool.cpp b/lib/cpp/src/thrift/transport/TSocketPool.cpp
index 910fe52..2a983e3 100644
--- a/lib/cpp/src/thrift/transport/TSocketPool.cpp
+++ b/lib/cpp/src/thrift/transport/TSocketPool.cpp
@@ -189,9 +189,13 @@ void TSocketPool::open() {
   }
 
   if (randomize_ && numServers > 1) {
+#if __cplusplus >= 201500L // c++17
     std::random_device rng;
     std::mt19937 urng(rng());
     std::shuffle(servers_.begin(), servers_.end(), urng);
+#else
+    std::random_shuffle(servers_.begin(), servers_.end());
+#endif
   }
 
   for (size_t i = 0; i < numServers; ++i) {


[thrift] 03/04: Correct c++17 definition

Posted by jk...@apache.org.
This is an automated email from the ASF dual-hosted git repository.

jking pushed a commit to branch master
in repository https://gitbox.apache.org/repos/asf/thrift.git

commit e6e7e62981e285d6d7e023a618be3bafa514edae
Author: proller <pr...@users.noreply.github.com>
AuthorDate: Mon Dec 10 16:45:06 2018 +0300

    Correct c++17 definition
---
 lib/cpp/src/thrift/transport/TSocketPool.cpp | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/lib/cpp/src/thrift/transport/TSocketPool.cpp b/lib/cpp/src/thrift/transport/TSocketPool.cpp
index 2a983e3..b5cfe26 100644
--- a/lib/cpp/src/thrift/transport/TSocketPool.cpp
+++ b/lib/cpp/src/thrift/transport/TSocketPool.cpp
@@ -189,7 +189,7 @@ void TSocketPool::open() {
   }
 
   if (randomize_ && numServers > 1) {
-#if __cplusplus >= 201500L // c++17
+#if __cplusplus >= 201703L
     std::random_device rng;
     std::mt19937 urng(rng());
     std::shuffle(servers_.begin(), servers_.end(), urng);