BIND 10 trac826, updated. 539b22d0e9306dfb49b7a54fdde3bb34827ad5be check last ported libs and fix (now I am at asiolink (included))

BIND 10 source code commits bind10-changes at lists.isc.org
Thu Jun 28 16:04:47 UTC 2012


The branch, trac826 has been updated
       via  539b22d0e9306dfb49b7a54fdde3bb34827ad5be (commit)
      from  b3fff272b7cc27a9a95896a579a585265ebf18cb (commit)

Those revisions listed above that are new to this repository have
not appeared on any other notification email; so we list those
revisions in full, below.

- Log -----------------------------------------------------------------
commit 539b22d0e9306dfb49b7a54fdde3bb34827ad5be
Author: Francis Dupont <fdupont at isc.org>
Date:   Thu Jun 28 18:04:37 2012 +0200

    check last ported libs and fix (now I am at asiolink (included))

-----------------------------------------------------------------------

Summary of changes:
 src/lib/asiolink/io_address.cc                    |   14 ++++++++++++--
 src/lib/asiolink/io_address.h                     |    2 ++
 src/lib/asiolink/io_asio_socket.h                 |    2 ++
 src/lib/asiolink/io_endpoint.cc                   |   11 ++++++++---
 src/lib/asiolink/io_endpoint.h                    |    9 +++++----
 src/lib/asiolink/io_message.h                     |    2 ++
 src/lib/asiolink/io_service.cc                    |    6 +++++-
 src/lib/asiolink/io_socket.cc                     |    2 ++
 src/lib/asiolink/io_socket.h                      |    2 ++
 src/lib/asiolink/simple_callback.h                |    4 +---
 src/lib/asiolink/tcp_socket.h                     |    6 ++++++
 src/lib/asiolink/tests/interval_timer_unittest.cc |    3 ++-
 src/lib/asiolink/udp_socket.h                     |    2 ++
 src/lib/config/ccsession.cc                       |    1 +
 src/lib/config/tests/ccsession_unittests.cc       |   12 ++++++++----
 src/lib/config/tests/fake_session.cc              |   16 ++++++++--------
 src/lib/xfr/xfrout_client.cc                      |    3 ++-
 win32build/VS2010/bind10.sln                      |    1 +
 18 files changed, 71 insertions(+), 27 deletions(-)

-----------------------------------------------------------------------
diff --git a/src/lib/asiolink/io_address.cc b/src/lib/asiolink/io_address.cc
index 832452c..43bb4d9 100644
--- a/src/lib/asiolink/io_address.cc
+++ b/src/lib/asiolink/io_address.cc
@@ -14,10 +14,15 @@
 
 #include <config.h>
 
-#include <unistd.h>             // for some IPC/network system calls
 #include <stdint.h>
+
+#ifdef _WIN32
+#include <ws2tcpip.h>
+#else
+#include <unistd.h>             // for some IPC/network system calls
 #include <sys/socket.h>
 #include <netinet/in.h>
+#endif
 
 #include <asio.hpp>
 
@@ -72,7 +77,12 @@ IOAddress::from_bytes(short family, const uint8_t* data) {
 
     BOOST_STATIC_ASSERT(INET6_ADDRSTRLEN >= INET_ADDRSTRLEN);
     char addr_str[INET6_ADDRSTRLEN];
-    inet_ntop(family, data, addr_str, INET6_ADDRSTRLEN);
+#ifdef _WIN32
+#define DECONST (void *)
+#else
+#define DECONST
+#endif
+    inet_ntop(family, DECONST data, addr_str, INET6_ADDRSTRLEN);
     return IOAddress(string(addr_str));
 }
 
diff --git a/src/lib/asiolink/io_address.h b/src/lib/asiolink/io_address.h
index c40e5b9..0b9e56a 100644
--- a/src/lib/asiolink/io_address.h
+++ b/src/lib/asiolink/io_address.h
@@ -18,7 +18,9 @@
 // IMPORTANT NOTE: only very few ASIO headers files can be included in
 // this file.  In particular, asio.hpp should never be included here.
 // See the description of the namespace below.
+#ifndef _WIN32
 #include <unistd.h>             // for some network system calls
+#endif
 #include <stdint.h>             // for uint32_t
 #include <asio/ip/address.hpp>
 
diff --git a/src/lib/asiolink/io_asio_socket.h b/src/lib/asiolink/io_asio_socket.h
index aeac63d..42b4a6a 100644
--- a/src/lib/asiolink/io_asio_socket.h
+++ b/src/lib/asiolink/io_asio_socket.h
@@ -18,7 +18,9 @@
 // IMPORTANT NOTE: only very few ASIO headers files can be included in
 // this file.  In particular, asio.hpp should never be included here.
 // See the description of the namespace below.
+#ifndef _WIN32
 #include <unistd.h>             // for some network system calls
+#endif
 
 #include <functional>
 #include <string>
diff --git a/src/lib/asiolink/io_endpoint.cc b/src/lib/asiolink/io_endpoint.cc
index 2354521..19a281a 100644
--- a/src/lib/asiolink/io_endpoint.cc
+++ b/src/lib/asiolink/io_endpoint.cc
@@ -14,6 +14,14 @@
 
 #include <config.h>
 
+#ifdef _WIN32
+#include <ws2tcpip.h>
+#else
+#include <unistd.h>             // for some IPC/network system calls
+#include <sys/socket.h>
+#include <netinet/in.h>
+#endif
+
 #include <asio.hpp>
 
 #include <asiolink/io_address.h>
@@ -25,9 +33,6 @@
 #include <boost/lexical_cast.hpp>
 
 #include <cassert>
-#include <unistd.h>             // for some IPC/network system calls
-#include <sys/socket.h>
-#include <netinet/in.h>
 
 using namespace std;
 
diff --git a/src/lib/asiolink/io_endpoint.h b/src/lib/asiolink/io_endpoint.h
index 973fc8b..75951ae 100644
--- a/src/lib/asiolink/io_endpoint.h
+++ b/src/lib/asiolink/io_endpoint.h
@@ -18,6 +18,11 @@
 // IMPORTANT NOTE: only very few ASIO headers files can be included in
 // this file.  In particular, asio.hpp should never be included here.
 // See the description of the namespace below.
+#ifndef _WIN32
+#include <unistd.h>             // for some network system calls
+
+#include <sys/socket.h>         // for sockaddr
+#endif
 
 #include <functional>
 #include <string>
@@ -27,10 +32,6 @@
 
 # include <ostream>
 
-#include <unistd.h>             // for some network system calls
-
-#include <sys/socket.h>         // for sockaddr
-
 namespace isc {
 namespace asiolink {
 
diff --git a/src/lib/asiolink/io_message.h b/src/lib/asiolink/io_message.h
index 81f6da1..ea2a255 100644
--- a/src/lib/asiolink/io_message.h
+++ b/src/lib/asiolink/io_message.h
@@ -18,7 +18,9 @@
 // IMPORTANT NOTE: only very few ASIO headers files can be included in
 // this file.  In particular, asio.hpp should never be included here.
 // See the description of the namespace below.
+#ifndef _WIN32
 #include <unistd.h>             // for some network system calls
+#endif
 
 #include <functional>
 #include <string>
diff --git a/src/lib/asiolink/io_service.cc b/src/lib/asiolink/io_service.cc
index 15fad0c..e7b9f8e 100644
--- a/src/lib/asiolink/io_service.cc
+++ b/src/lib/asiolink/io_service.cc
@@ -14,9 +14,13 @@
 
 #include <config.h>
 
-#include <unistd.h>             // for some IPC/network system calls
+#ifdef _WIN32
+#include <ws2tcpip.h>
+#else
 #include <netinet/in.h>
 #include <sys/socket.h>
+#include <unistd.h>             // for some IPC/network system calls
+#endif
 
 #include <asio.hpp>
 #include <asiolink/io_service.h>
diff --git a/src/lib/asiolink/io_socket.cc b/src/lib/asiolink/io_socket.cc
index e1498dc..2e31003 100644
--- a/src/lib/asiolink/io_socket.cc
+++ b/src/lib/asiolink/io_socket.cc
@@ -12,6 +12,8 @@
 // OR OTHER TORTIOUS ACTION, ARISING OUT OF OR IN CONNECTION WITH THE USE OR
 // PERFORMANCE OF THIS SOFTWARE.
 
+#include <config.h>
+
 #include "io_socket.h"
 
 #include <asio.hpp>
diff --git a/src/lib/asiolink/io_socket.h b/src/lib/asiolink/io_socket.h
index ab6479c..2f51895 100644
--- a/src/lib/asiolink/io_socket.h
+++ b/src/lib/asiolink/io_socket.h
@@ -18,7 +18,9 @@
 // IMPORTANT NOTE: only very few ASIO headers files can be included in
 // this file.  In particular, asio.hpp should never be included here.
 // See the description of the namespace below.
+#ifndef _WIN32
 #include <unistd.h>             // for some network system calls
+#endif
 
 #include <functional>
 #include <string>
diff --git a/src/lib/asiolink/simple_callback.h b/src/lib/asiolink/simple_callback.h
index a297a1d..6cb07e2 100644
--- a/src/lib/asiolink/simple_callback.h
+++ b/src/lib/asiolink/simple_callback.h
@@ -49,9 +49,7 @@ protected:
     ///
     /// This is intentionally defined as \c protected as this base class
     /// should never be instantiated (except as part of a derived class).
-    SimpleCallback() {
-        self_ = this;
-    }
+    SimpleCallback() { self_ = this; }
 public:
     /// \brief The destructor
     virtual ~SimpleCallback() {}
diff --git a/src/lib/asiolink/tcp_socket.h b/src/lib/asiolink/tcp_socket.h
index 2505d7b..b0fc4fb 100644
--- a/src/lib/asiolink/tcp_socket.h
+++ b/src/lib/asiolink/tcp_socket.h
@@ -20,9 +20,11 @@
 #endif
 
 #include <log/dummylog.h>
+#ifndef _WIN32
 #include <netinet/in.h>
 #include <sys/socket.h>
 #include <unistd.h>             // for some IPC/network system calls
+#endif
 
 #include <algorithm>
 #include <cassert>
@@ -41,6 +43,10 @@
 #include <asiolink/io_service.h>
 #include <asiolink/tcp_endpoint.h>
 
+#if defined(_WIN32) && defined(min)
+#undef min
+#endif
+
 namespace isc {
 namespace asiolink {
 
diff --git a/src/lib/asiolink/tests/interval_timer_unittest.cc b/src/lib/asiolink/tests/interval_timer_unittest.cc
index 420cb90..6ae6528 100644
--- a/src/lib/asiolink/tests/interval_timer_unittest.cc
+++ b/src/lib/asiolink/tests/interval_timer_unittest.cc
@@ -177,7 +177,8 @@ TEST_F(IntervalTimerTest, startIntervalTimer) {
     // Expect TimerCallBack is called; timer_called_ is true
     EXPECT_TRUE(timer_called_);
     // Expect test_runtime is 100 milliseconds or longer.
-    EXPECT_TRUE(test_runtime > boost::posix_time::milliseconds(100)) <<
+    // FD: add 10 ms margin for VS 2008 on Win7 VM
+    EXPECT_TRUE(test_runtime > boost::posix_time::milliseconds(90)) <<
                 "test runtime " << test_runtime.total_milliseconds() <<
                 "msec " << ">= 100";
 }
diff --git a/src/lib/asiolink/udp_socket.h b/src/lib/asiolink/udp_socket.h
index c061fba..0063744 100644
--- a/src/lib/asiolink/udp_socket.h
+++ b/src/lib/asiolink/udp_socket.h
@@ -20,9 +20,11 @@
 #endif
 
 #include <log/dummylog.h>
+#ifndef _WIN32
 #include <netinet/in.h>
 #include <sys/socket.h>
 #include <unistd.h>             // for some IPC/network system calls
+#endif
 
 #include <cstddef>
 
diff --git a/src/lib/config/ccsession.cc b/src/lib/config/ccsession.cc
index 6787609..8063f43 100644
--- a/src/lib/config/ccsession.cc
+++ b/src/lib/config/ccsession.cc
@@ -19,6 +19,7 @@
 #include <string.h>
 #ifdef _WIN32
 #include <time.h>
+#include <ws2tcpip.h>
 #else
 #include <sys/time.h>
 #endif
diff --git a/src/lib/config/tests/ccsession_unittests.cc b/src/lib/config/tests/ccsession_unittests.cc
index 3fca741..e256ebe 100644
--- a/src/lib/config/tests/ccsession_unittests.cc
+++ b/src/lib/config/tests/ccsession_unittests.cc
@@ -14,6 +14,10 @@
 
 #include <config.h>
 
+#include _WIN32
+#include <ws2tcpip.h>
+#endif
+
 #include <gtest/gtest.h>
 
 #include <config/tests/fake_session.h>
@@ -740,8 +744,8 @@ protected:
         registerCommand(const string& recipient)
     {
         return (mccs_.groupRecvMsgAsync(
-            bind(&AsyncReceiveCCSessionTest::callback, this, next_flag_ ++, _1,
-                 _2, _3), false, -1, recipient));
+            boost::bind(&AsyncReceiveCCSessionTest::callback, this,
+                 next_flag_ ++, _1, _2, _3), false, -1, recipient));
     }
     /// \brief Convenience function to queue a request to get a reply
     ///     message.
@@ -749,8 +753,8 @@ protected:
         registerReply(int seq)
     {
         return (mccs_.groupRecvMsgAsync(
-            bind(&AsyncReceiveCCSessionTest::callback, this, next_flag_ ++, _1,
-                 _2, _3), true, seq));
+            boost::bind(&AsyncReceiveCCSessionTest::callback, this,
+                 next_flag_ ++, _1, _2, _3), true, seq));
     }
     /// \brief Check the next called callback was with this flag
     void called(int flag) {
diff --git a/src/lib/config/tests/fake_session.cc b/src/lib/config/tests/fake_session.cc
index bf92b42..ed44d4f 100644
--- a/src/lib/config/tests/fake_session.cc
+++ b/src/lib/config/tests/fake_session.cc
@@ -16,6 +16,14 @@
 
 #include <stdint.h>
 
+#ifdef _WIN32
+#include <ws2tcpip.h>
+#else
+#include <sys/types.h>
+#include <sys/socket.h>
+#include <netinet/in.h>
+#endif
+
 #include <cstdio>
 #include <vector>
 #include <iostream>
@@ -32,14 +40,6 @@ using namespace std;
 using namespace isc::cc;
 using namespace isc::data;
 
-#ifdef _WIN32
-#include <ws2tcpip.h>
-#else
-#include <sys/types.h>
-#include <sys/socket.h>
-#include <netinet/in.h>
-#endif
-
 // ok i want these in cc/data 
 bool
 listContains(ConstElementPtr list, ConstElementPtr el) {
diff --git a/src/lib/xfr/xfrout_client.cc b/src/lib/xfr/xfrout_client.cc
index 9dae821..a5f60cb 100644
--- a/src/lib/xfr/xfrout_client.cc
+++ b/src/lib/xfr/xfrout_client.cc
@@ -12,6 +12,8 @@
 // OR OTHER TORTIOUS ACTION, ARISING OUT OF OR IN CONNECTION WITH THE USE OR
 // PERFORMANCE OF THIS SOFTWARE.
 
+#include <config.h>
+
 #include <cstdlib>
 #include <cstring>
 #include <iostream>
@@ -61,7 +63,6 @@ XfroutClient::~XfroutClient() {
 void
 XfroutClient::connect() {
     try {
-        impl_->socket_.connect(stream_protocol::endpoint(impl_->file_path_));
 #ifndef _WIN32
         stream_protocol::endpoint ep(impl_->file_path_);
 #else
diff --git a/win32build/VS2010/bind10.sln b/win32build/VS2010/bind10.sln
index 06ba5de..cd98f67 100755
--- a/win32build/VS2010/bind10.sln
+++ b/win32build/VS2010/bind10.sln
@@ -143,6 +143,7 @@ Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "libcfgclient", "libcfgclien
 EndProject
 Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "libcfgclient_tests", "libcfgclient_tests\libcfgclient_tests.vcxproj", "{5D857B14-7763-466C-9D4E-D7C2E57C0E7F}"
 	ProjectSection(ProjectDependencies) = postProject
+		{33927325-C9B5-4FE6-B69F-318433AFF4BD} = {33927325-C9B5-4FE6-B69F-318433AFF4BD}
 		{7D04222B-643C-446C-A2B8-93AF74A86246} = {7D04222B-643C-446C-A2B8-93AF74A86246}
 		{8F120666-1A69-4506-8546-0F665E80FFB7} = {8F120666-1A69-4506-8546-0F665E80FFB7}
 		{813BA1C9-8CD8-4B06-B1C0-FDAB576AC4B6} = {813BA1C9-8CD8-4B06-B1C0-FDAB576AC4B6}



More information about the bind10-changes mailing list