BIND 10 trac2117, updated. 4aff51e3eb9ecbb835dc708a06b1984ac0e726e6 update everything (compiling and not yet fully tested)
BIND 10 source code commits
bind10-changes at lists.isc.org
Sun Jul 8 15:12:43 UTC 2012
The branch, trac2117 has been updated
via 4aff51e3eb9ecbb835dc708a06b1984ac0e726e6 (commit)
from 73809f34a36413b6a155d9ab8f1edc028e340819 (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 4aff51e3eb9ecbb835dc708a06b1984ac0e726e6
Author: Francis Dupont <fdupont at isc.org>
Date: Sun Jul 8 17:12:12 2012 +0200
update everything (compiling and not yet fully tested)
-----------------------------------------------------------------------
Summary of changes:
src/lib/datasrc/cache.cc | 2 +
src/lib/datasrc/cache.h | 11 +-
src/lib/datasrc/client.h | 5 +-
src/lib/datasrc/client_list.cc | 4 +
src/lib/datasrc/client_list.h | 11 +-
src/lib/datasrc/data_source.cc | 13 ++
src/lib/datasrc/data_source.h | 33 ++--
src/lib/datasrc/database.cc | 2 +
src/lib/datasrc/database.h | 5 +-
..._config.h.pre.in => datasrc_config.h.pre.win32} | 0
src/lib/{cache => datasrc}/dll.h | 14 +-
src/lib/datasrc/factory.cc | 81 ++++++++
src/lib/datasrc/factory.h | 22 ++-
src/lib/datasrc/iterator.h | 3 +-
src/lib/datasrc/logger.cc | 4 +-
src/lib/datasrc/logger.h | 3 +-
src/lib/datasrc/memory_datasrc.cc | 4 +
src/lib/datasrc/memory_datasrc.h | 29 ++-
src/lib/datasrc/memory_datasrc_link.cc | 23 ++-
src/lib/datasrc/query.cc | 2 +
src/lib/datasrc/query.h | 7 +-
src/lib/datasrc/rbnode_rrset.h | 5 +-
src/lib/datasrc/rbtree.h | 12 +-
src/lib/datasrc/sqlite3_accessor.cc | 8 +
src/lib/datasrc/sqlite3_accessor.h | 28 ++-
src/lib/datasrc/sqlite3_accessor_link.cc | 19 +-
src/lib/datasrc/sqlite3_datasrc.cc | 10 +-
src/lib/datasrc/sqlite3_datasrc.h | 28 ++-
src/lib/datasrc/static.zone.win32 | 34 ++++
src/lib/datasrc/static_datasrc.cc | 2 +
src/lib/datasrc/static_datasrc.h | 13 +-
src/lib/datasrc/static_datasrc_link.cc | 22 ++-
src/lib/datasrc/tests/cache_unittest.cc | 6 +
src/lib/datasrc/tests/client_list_unittest.cc | 28 +--
src/lib/datasrc/tests/database_unittest.cc | 24 ++-
src/lib/datasrc/tests/factory_unittest.cc | 6 +-
src/lib/datasrc/tests/memory_datasrc_unittest.cc | 10 +-
src/lib/datasrc/tests/rbtree_unittest.cc | 2 +
src/lib/datasrc/tests/sqlite3_accessor_unittest.cc | 14 ++
src/lib/datasrc/tests/test_client.cc | 19 +-
src/lib/datasrc/tests/test_datasrc.cc | 42 +++--
.../datasrc/tests/zone_finder_context_unittest.cc | 6 +-
src/lib/datasrc/tests/zonetable_unittest.cc | 5 +
src/lib/datasrc/zone.h | 21 +--
src/lib/datasrc/zone_finder_context.cc | 2 +
src/lib/datasrc/zonetable.cc | 2 +
src/lib/datasrc/zonetable.h | 7 +-
src/lib/dhcp/iface_mgr.cc | 2 +-
src/lib/dhcp/iface_mgr.h | 2 +-
src/lib/dns/python/dll.h | 10 +
src/lib/dns/python/edns_python.cc | 6 +-
src/lib/dns/python/edns_python.h | 6 +-
src/lib/dns/python/messagerenderer_python.cc | 4 +-
src/lib/dns/python/messagerenderer_python.h | 5 +-
src/lib/dns/python/name_python.cc | 4 +-
src/lib/dns/python/name_python.h | 4 +-
src/lib/dns/python/opcode_python.cc | 6 +-
src/lib/dns/python/opcode_python.h | 7 +-
src/lib/dns/python/pydnspp_common.cc | 2 +-
src/lib/dns/python/pydnspp_common.h | 1 +
src/lib/dns/python/question_python.cc | 6 +-
src/lib/dns/python/question_python.h | 7 +-
src/lib/dns/python/rcode_python.cc | 6 +-
src/lib/dns/python/rcode_python.h | 6 +-
src/lib/dns/python/rdata_python.cc | 6 +-
src/lib/dns/python/rdata_python.h | 7 +-
src/lib/dns/python/rrclass_python.cc | 6 +-
src/lib/dns/python/rrclass_python.h | 7 +-
src/lib/dns/python/rrset_python.cc | 8 +-
src/lib/dns/python/rrset_python.h | 8 +-
src/lib/dns/python/rrttl_python.cc | 6 +-
src/lib/dns/python/rrttl_python.h | 6 +-
src/lib/dns/python/rrtype_python.cc | 6 +-
src/lib/dns/python/rrtype_python.h | 7 +-
src/lib/dns/python/serial_python.cc | 6 +-
src/lib/dns/python/serial_python.h | 7 +-
src/lib/dns/python/tsig_python.cc | 4 +-
src/lib/dns/python/tsig_python.h | 5 +-
src/lib/dns/python/tsig_rdata_python.cc | 6 +-
src/lib/dns/python/tsig_rdata_python.h | 8 +-
src/lib/dns/python/tsigkey_python.cc | 8 +-
src/lib/dns/python/tsigkey_python.h | 10 +-
src/lib/dns/python/tsigrecord_python.cc | 6 +-
src/lib/dns/python/tsigrecord_python.h | 8 +-
.../python/isc/acl/dns_requestcontext_python.cc | 4 +
.../isc/cc/tests/{cc_test.in => cc_test.win32} | 6 +-
.../tests/{config_test.in => config_test.win32} | 8 +-
src/lib/python/isc/datasrc/__init__.py | 10 +-
src/lib/python/isc/datasrc/client_python.cc | 2 +
src/lib/python/isc/log/log.cc | 4 +
.../{log_console.py.in => log_console.py.win32} | 2 +-
src/lib/python/isc/notify/notify_out.py | 3 +-
src/lib/python/isc/notify/tests/notify_out_test.py | 6 +-
.../isc/util/cio/socketsessionforwarder_python.cc | 23 ++-
.../isc/util/cio/socketsessionreceiver_python.cc | 36 +++-
src/lib/python/isc/util/socketpair.py | 50 +++++
src/lib/python/isc/util/socketserver_mixin.py | 3 +-
.../lib/server_common/PARTIAL_PORT_ON_WINDOWS | 0
src/lib/server_common/client.cc | 4 +-
src/lib/server_common/client.h | 12 +-
src/lib/{asiodns => server_common}/dll.h | 14 +-
src/lib/server_common/keyring.cc | 14 +-
src/lib/server_common/keyring.h | 7 +-
src/lib/server_common/logger.cc | 2 +
src/lib/server_common/logger.h | 1 +
src/lib/server_common/portconfig.cc | 13 +-
src/lib/server_common/portconfig.h | 5 +-
src/lib/server_common/socket_request.cc | 95 +++++++++-
src/lib/server_common/socket_request.h | 28 ++-
src/lib/server_common/tests/client_unittest.cc | 2 +
.../tests/{data_path.h.in => data_path.h.win32} | 4 +-
src/lib/server_common/tests/keyring_test.cc | 4 +
src/lib/server_common/tests/portconfig_unittest.cc | 9 +-
.../server_common/tests/socket_requestor_test.cc | 193 ++++++++++++++++++--
src/lib/testutils/dnsmessage_test.cc | 14 +-
src/lib/testutils/dnsmessage_test.h | 14 +-
.../socket_request.cc} | 10 +-
src/lib/testutils/srv_test.cc | 4 +-
src/lib/testutils/srv_test.h | 18 +-
src/lib/util/python/dll.h | 36 ----
src/lib/util/python/pycppwrapper_util.h | 4 +-
tests/tools/badpacket/badpacket.cc | 6 +-
tests/tools/badpacket/command_options.cc | 2 +-
tests/tools/badpacket/header_flags.h | 11 +-
tests/tools/badpacket/option_info.h | 5 +
win32build/VS2010/b10-dhcp6/b10-dhcp6.vcxproj | 2 +-
.../b10-resolver_tests/b10-resolver_tests.vcxproj | 12 +-
win32build/VS2010/bind10.sln | 81 +++++++-
win32build/VS2010/libdatasrc/libdatasrc.vcxproj | 26 ++-
.../VS2010/libdatasrc/libdatasrc.vcxproj.filters | 45 +----
.../libdatasrc_memory.vcxproj} | 42 +++--
.../libdatasrc_memory.vcxproj.filters} | 16 +-
.../libdatasrc_memory.vcxproj.user} | 0
.../libdatasrc_sqlite3.vcxproj} | 56 +++---
.../libdatasrc_sqlite3.vcxproj.filters} | 27 ++-
.../libdatasrc_sqlite3.vcxproj.user} | 0
.../libdatasrc_static.vcxproj} | 43 +++--
.../libdatasrc_static.vcxproj.filters} | 24 +--
.../libdatasrc_static.vcxproj.user} | 0
.../libdatasrc_tests/libdatasrc_tests.vcxproj | 12 +-
win32build/VS2010/libdhcp/libdhcp.vcxproj | 8 +-
.../VS2010/libdhcp_tests/libdhcp_tests.vcxproj | 12 +-
.../libresolve_tests/libresolve_tests.vcxproj | 4 +-
.../libserver_common/libserver_common.vcxproj | 13 +-
.../libserver_common_tests.vcxproj | 12 +-
.../VS2010/libtestutils/libtestutils.vcxproj | 5 +-
.../libtestutils/libtestutils.vcxproj.filters | 3 +
win32build/VS2010/pydacl/pydacl.vcxproj | 20 +-
win32build/VS2010/pyddatasrc/pyddatasrc.vcxproj | 20 +-
win32build/VS2010/pyddns++/pyddns++.vcxproj | 4 +-
win32build/VS2010/pyddnsacl/pyddnsacl.vcxproj | 20 +-
win32build/VS2010/pydlog/pydlog.vcxproj | 22 +--
win32build/VS2010/pydutil_io/pydutil_io.vcxproj | 4 +-
.../pydutil_unittests/pydutil_unittests.vcxproj | 4 +-
.../VS2010/tt-badpacket/tt-badpacket.vcxproj | 10 +-
.../tt-badpacket_tests/tt-badpacket_tests.vcxproj | 12 +-
156 files changed, 1460 insertions(+), 659 deletions(-)
copy src/lib/datasrc/{datasrc_config.h.pre.in => datasrc_config.h.pre.win32} (100%)
copy src/lib/{cache => datasrc}/dll.h (79%)
create mode 100644 src/lib/datasrc/static.zone.win32
copy src/lib/python/isc/cc/tests/{cc_test.in => cc_test.win32} (86%)
copy src/lib/python/isc/config/tests/{config_test.in => config_test.win32} (84%)
copy src/lib/python/isc/log/tests/{log_console.py.in => log_console.py.win32} (96%)
create mode 100644 src/lib/python/isc/util/socketpair.py
copy NEWS => src/lib/server_common/PARTIAL_PORT_ON_WINDOWS (100%)
copy src/lib/{asiodns => server_common}/dll.h (77%)
copy src/lib/server_common/tests/{data_path.h.in => data_path.h.win32} (85%)
copy src/lib/{asiolink/simple_callback.cc => testutils/socket_request.cc} (84%)
delete mode 100644 src/lib/util/python/dll.h
copy win32build/VS2010/{libbench/libbench.vcxproj => libdatasrc_memory/libdatasrc_memory.vcxproj} (72%)
mode change 100755 => 100644
copy win32build/VS2010/{libcryptolink/libcryptolink.vcxproj.filters => libdatasrc_memory/libdatasrc_memory.vcxproj.filters} (66%)
mode change 100755 => 100644
copy win32build/VS2010/{BINDInstall/BINDInstall.vcxproj.user => libdatasrc_memory/libdatasrc_memory.vcxproj.user} (100%)
mode change 100755 => 100644
copy win32build/VS2010/{libacl/libacl.vcxproj => libdatasrc_sqlite3/libdatasrc_sqlite3.vcxproj} (62%)
mode change 100755 => 100644
copy win32build/VS2010/{libcc/libcc.vcxproj.filters => libdatasrc_sqlite3/libdatasrc_sqlite3.vcxproj.filters} (65%)
mode change 100755 => 100644
copy win32build/VS2010/{BINDInstall/BINDInstall.vcxproj.user => libdatasrc_sqlite3/libdatasrc_sqlite3.vcxproj.user} (100%)
mode change 100755 => 100644
copy win32build/VS2010/{libdnsacl/libdnsacl.vcxproj => libdatasrc_static/libdatasrc_static.vcxproj} (70%)
mode change 100755 => 100644
copy win32build/VS2010/{libcc/libcc.vcxproj.filters => libdatasrc_static/libdatasrc_static.vcxproj.filters} (63%)
mode change 100755 => 100644
copy win32build/VS2010/{BINDInstall/BINDInstall.vcxproj.user => libdatasrc_static/libdatasrc_static.vcxproj.user} (100%)
mode change 100755 => 100644
-----------------------------------------------------------------------
diff --git a/src/lib/datasrc/cache.cc b/src/lib/datasrc/cache.cc
index d88e649..447fc8f 100644
--- a/src/lib/datasrc/cache.cc
+++ b/src/lib/datasrc/cache.cc
@@ -12,6 +12,8 @@
// OR OTHER TORTIOUS ACTION, ARISING OUT OF OR IN CONNECTION WITH THE USE OR
// PERFORMANCE OF THIS SOFTWARE.
+#define ISC_LIBDATASRC_EXPORT
+
#include <stdint.h>
#include <map>
diff --git a/src/lib/datasrc/cache.h b/src/lib/datasrc/cache.h
index 054912c..355c4b4 100644
--- a/src/lib/datasrc/cache.h
+++ b/src/lib/datasrc/cache.h
@@ -20,17 +20,18 @@
#include <boost/shared_ptr.hpp>
#include <dns/rrset.h>
+#include <datasrc/dll.h>
namespace isc {
namespace dns {
-class Name;
-class RRClass;
-class RRType;
+class ISC_LIBDATASRC_API Name;
+class ISC_LIBDATASRC_API RRClass;
+class ISC_LIBDATASRC_API RRType;
}
namespace datasrc {
-class CacheNode;
+class ISC_LIBDATASRC_API CacheNode;
typedef boost::shared_ptr<CacheNode> CacheNodePtr;
typedef boost::shared_ptr<const CacheNode> ConstCacheNodePtr;
@@ -80,7 +81,7 @@ class HotCacheImpl;
/// does not currently use threads, but if it ever does (or if libdatasrc
/// is ever used by a threaded application), this will need to be
/// revisited.
-class HotCache {
+class ISC_LIBDATASRC_API HotCache {
private:
/// \name Static definitions
//@{
diff --git a/src/lib/datasrc/client.h b/src/lib/datasrc/client.h
index dab081f..2dcb995 100644
--- a/src/lib/datasrc/client.h
+++ b/src/lib/datasrc/client.h
@@ -22,6 +22,7 @@
#include <exceptions/exceptions.h>
+#include <datasrc/dll.h>
#include <datasrc/zone.h>
/// \file
@@ -69,7 +70,7 @@ namespace isc {
namespace datasrc {
// The iterator.h is not included on purpose, most application won't need it
-class ZoneIterator;
+class ISC_LIBDATASRC_API ZoneIterator;
typedef boost::shared_ptr<ZoneIterator> ZoneIteratorPtr;
/// \brief The base class of data source clients.
@@ -128,7 +129,7 @@ typedef boost::shared_ptr<ZoneIterator> ZoneIteratorPtr;
///
/// \todo This class is still not complete. It will need more factory methods,
/// e.g. for (re)loading a zone.
-class DataSourceClient : boost::noncopyable {
+class ISC_LIBDATASRC_API DataSourceClient : boost::noncopyable {
public:
/// \brief A helper structure to represent the search result of
/// \c find().
diff --git a/src/lib/datasrc/client_list.cc b/src/lib/datasrc/client_list.cc
index 549b216..19c1ba8 100644
--- a/src/lib/datasrc/client_list.cc
+++ b/src/lib/datasrc/client_list.cc
@@ -12,6 +12,10 @@
// OR OTHER TORTIOUS ACTION, ARISING OUT OF OR IN CONNECTION WITH THE USE OR
// PERFORMANCE OF THIS SOFTWARE.
+#define ISC_LIBDATASRC_EXPORT
+
+#include <config.h>
+
#include "client_list.h"
#include "client.h"
#include "factory.h"
diff --git a/src/lib/datasrc/client_list.h b/src/lib/datasrc/client_list.h
index 599dca8..b8612c7 100644
--- a/src/lib/datasrc/client_list.h
+++ b/src/lib/datasrc/client_list.h
@@ -18,6 +18,7 @@
#include <dns/name.h>
#include <cc/data.h>
#include <exceptions/exceptions.h>
+#include <datasrc/dll.h>
#include <vector>
#include <boost/shared_ptr.hpp>
@@ -26,11 +27,11 @@
namespace isc {
namespace datasrc {
-class ZoneFinder;
+class ISC_LIBDATASRC_API ZoneFinder;
typedef boost::shared_ptr<ZoneFinder> ZoneFinderPtr;
-class DataSourceClient;
+class ISC_LIBDATASRC_API DataSourceClient;
typedef boost::shared_ptr<DataSourceClient> DataSourceClientPtr;
-class DataSourceClientContainer;
+class ISC_LIBDATASRC_API DataSourceClientContainer;
typedef boost::shared_ptr<DataSourceClientContainer>
DataSourceClientContainerPtr;
@@ -47,7 +48,7 @@ typedef boost::shared_ptr<DataSourceClientContainer>
/// have it to allow easy testing. It is possible to create a mock-up class
/// instead of creating a full-blown configuration. The real implementation
/// is the ConfigurableClientList.
-class ClientList : public boost::noncopyable {
+class ISC_LIBDATASRC_API ClientList : public boost::noncopyable {
protected:
/// \brief Constructor.
///
@@ -183,7 +184,7 @@ typedef boost::shared_ptr<const ClientList> ConstClientListPtr;
///
/// While it is possible to inherit this class, it is not expected to be
/// inherited except for tests.
-class ConfigurableClientList : public ClientList {
+class ISC_LIBDATASRC_API ConfigurableClientList : public ClientList {
public:
/// \brief Exception thrown when there's an error in configuration.
class ConfigurationError : public Exception {
diff --git a/src/lib/datasrc/data_source.cc b/src/lib/datasrc/data_source.cc
index a713b82..3cfaa88 100644
--- a/src/lib/datasrc/data_source.cc
+++ b/src/lib/datasrc/data_source.cc
@@ -12,6 +12,8 @@
// OR OTHER TORTIOUS ACTION, ARISING OUT OF OR IN CONNECTION WITH THE USE OR
// PERFORMANCE OF THIS SOFTWARE.
+#define ISC_LIBDATASRC_EXPORT
+
#include <config.h>
#include <cassert>
@@ -40,11 +42,22 @@
#include <cc/data.h>
+#ifdef _MSC_VER
+#define RETERR(x) __pragma(warning(push)) \
+ __pragma(warning(disable: 4127)) \
+ do { \
+ DataSrc::Result r = (x); \
+ if (r != DataSrc::SUCCESS) \
+ return (r); \
+ } while (0) \
+ __pragma(warning(pop))
+#else
#define RETERR(x) do { \
DataSrc::Result r = (x); \
if (r != DataSrc::SUCCESS) \
return (r); \
} while (0)
+#endif
using namespace std;
using namespace isc::util;
diff --git a/src/lib/datasrc/data_source.h b/src/lib/datasrc/data_source.h
index c35f0d3..a705434 100644
--- a/src/lib/datasrc/data_source.h
+++ b/src/lib/datasrc/data_source.h
@@ -26,28 +26,33 @@
#include <dns/name.h>
#include <dns/rrclass.h>
#include <cc/data.h>
+#include <datasrc/dll.h>
+
+#if defined(_WIN32) && defined(ERROR)
+#undef ERROR
+#endif
namespace isc {
namespace dns {
-class Name;
-class RRType;
-class RRset;
-class RRsetList;
+class ISC_LIBDATASRC_API Name;
+class ISC_LIBDATASRC_API RRType;
+class ISC_LIBDATASRC_API RRset;
+class ISC_LIBDATASRC_API RRsetList;
}
namespace datasrc {
-class DataSrcMatch;
-class Query;
+class ISC_LIBDATASRC_API DataSrcMatch;
+class ISC_LIBDATASRC_API Query;
-class DataSrc;
+class ISC_LIBDATASRC_API DataSrc;
typedef boost::shared_ptr<DataSrc> DataSrcPtr;
typedef boost::shared_ptr<const DataSrc> ConstDataSrcPtr;
/// This exception represents Backend-independent errors relating to
/// data source operations.
-class DataSourceError : public Exception {
+class ISC_LIBDATASRC_API DataSourceError : public Exception {
public:
DataSourceError(const char* file, size_t line, const char* what) :
isc::Exception(file, line, what) {}
@@ -59,14 +64,14 @@ public:
/// combination does not exist in the differences table. (Note that this
/// includes the case where the differences table contains no records related
/// to that zone.)
-class NoSuchSerial : public DataSourceError {
+class ISC_LIBDATASRC_API NoSuchSerial : public DataSourceError {
public:
NoSuchSerial(const char* file, size_t line, const char* what) :
DataSourceError(file, line, what) {}
};
-class AbstractDataSrc {
+class ISC_LIBDATASRC_API AbstractDataSrc {
///
/// \name Constructors, Assignment Operator and Destructor.
///
@@ -172,7 +177,7 @@ public:
};
// Base class for a DNS Data Source
-class DataSrc : public AbstractDataSrc {
+class ISC_LIBDATASRC_API DataSrc : public AbstractDataSrc {
///
/// \name Constructors, Assignment Operator and Destructor.
///
@@ -238,7 +243,7 @@ private:
isc::dns::RRClass rrclass;
};
-class MetaDataSrc : public DataSrc {
+class ISC_LIBDATASRC_API MetaDataSrc : public DataSrc {
///
/// \name Constructors, Assignment Operator and Destructor.
///
@@ -323,7 +328,7 @@ private:
/// - There is no matching %data source and name found (which is probably
/// wrong, see below), or the given enclosing name gives a longer match
/// than the currently stored enclosing name against the specified name.
-class DataSrcMatch {
+class ISC_LIBDATASRC_API DataSrcMatch {
///
/// \name Constructors, Assignment Operator and Destructor.
///
@@ -409,7 +414,7 @@ private:
const isc::dns::RRClass& rrclass_;
};
-class Nsec3Param {
+class ISC_LIBDATASRC_API Nsec3Param {
public:
Nsec3Param(uint8_t a, uint8_t f, uint16_t i, const std::vector<uint8_t>& s);
std::string getHash(const isc::dns::Name& name) const;
diff --git a/src/lib/datasrc/database.cc b/src/lib/datasrc/database.cc
index a8ba55e..f894c5a 100644
--- a/src/lib/datasrc/database.cc
+++ b/src/lib/datasrc/database.cc
@@ -12,6 +12,8 @@
// OR OTHER TORTIOUS ACTION, ARISING OUT OF OR IN CONNECTION WITH THE USE OR
// PERFORMANCE OF THIS SOFTWARE.
+#define ISC_LIBDATASRC_EXPORT
+
#include <string>
#include <utility>
#include <vector>
diff --git a/src/lib/datasrc/database.h b/src/lib/datasrc/database.h
index 65ddfcc..21ed616 100644
--- a/src/lib/datasrc/database.h
+++ b/src/lib/datasrc/database.h
@@ -24,6 +24,7 @@
#include <dns/rrset.h>
#include <dns/rrtype.h>
+#include <datasrc/dll.h>
#include <datasrc/data_source.h>
#include <datasrc/client.h>
#include <datasrc/zone.h>
@@ -59,7 +60,7 @@ namespace datasrc {
/// database, having multiple instances of this class. If the database
/// allows having multiple open queries at one connection, the connection
/// class may share it.
-class DatabaseAccessor : boost::noncopyable {
+class ISC_LIBDATASRC_API DatabaseAccessor : boost::noncopyable {
public:
/// \brief Data columns for by IteratorContext::getNext()
///
@@ -809,7 +810,7 @@ public:
/// While it is possible to subclass it for specific database in case
/// of special needs, it is not expected to be needed. This should just
/// work as it is with whatever DatabaseAccessor.
-class DatabaseClient : public DataSourceClient {
+class ISC_LIBDATASRC_API DatabaseClient : public DataSourceClient {
public:
/// \brief Constructor
///
diff --git a/src/lib/datasrc/datasrc_config.h.pre.win32 b/src/lib/datasrc/datasrc_config.h.pre.win32
new file mode 100644
index 0000000..9074df6
--- /dev/null
+++ b/src/lib/datasrc/datasrc_config.h.pre.win32
@@ -0,0 +1,31 @@
+// Copyright (C) 2011 Internet Systems Consortium, Inc. ("ISC")
+//
+// Permission to use, copy, modify, and/or distribute this software for any
+// purpose with or without fee is hereby granted, provided that the above
+// copyright notice and this permission notice appear in all copies.
+//
+// THE SOFTWARE IS PROVIDED "AS IS" AND ISC DISCLAIMS ALL WARRANTIES WITH
+// REGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED WARRANTIES OF MERCHANTABILITY
+// AND FITNESS. IN NO EVENT SHALL ISC BE LIABLE FOR ANY SPECIAL, DIRECT,
+// INDIRECT, OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES WHATSOEVER RESULTING FROM
+// LOSS OF USE, DATA OR PROFITS, WHETHER IN AN ACTION OF CONTRACT, NEGLIGENCE
+// OR OTHER TORTIOUS ACTION, ARISING OUT OF OR IN CONNECTION WITH THE USE OR
+// PERFORMANCE OF THIS SOFTWARE.
+#ifndef __DATASRC_CONFIG_H
+#define __DATASRC_CONFIG_H 1
+
+namespace isc {
+namespace datasrc {
+
+/// \brief Default directory to find the loadable data source libraries
+///
+/// This is the directory where, once installed, loadable backend libraries
+/// such as memory_ds.so and sqlite3_ds.so are found. It is used by the
+/// DataSourceClient loader if no absolute path is used and
+/// B10_FROM_BUILD is not set in the environment.
+const char* const BACKEND_LIBRARY_PATH = "@@PKGLIBDIR@@/";
+
+} // end namespace datasrc
+} // end namespace isc
+
+#endif // __DATASRC_CONFIG_H
diff --git a/src/lib/datasrc/dll.h b/src/lib/datasrc/dll.h
new file mode 100644
index 0000000..b4f4a7d
--- /dev/null
+++ b/src/lib/datasrc/dll.h
@@ -0,0 +1,32 @@
+// Copyright (C) 2012 Internet Systems Consortium, Inc. ("ISC")
+//
+// Permission to use, copy, modify, and/or distribute this software for any
+// purpose with or without fee is hereby granted, provided that the above
+// copyright notice and this permission notice appear in all copies.
+//
+// THE SOFTWARE IS PROVIDED "AS IS" AND ISC DISCLAIMS ALL WARRANTIES WITH
+// REGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED WARRANTIES OF MERCHANTABILITY
+// AND FITNESS. IN NO EVENT SHALL ISC BE LIABLE FOR ANY SPECIAL, DIRECT,
+// INDIRECT, OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES WHATSOEVER RESULTING FROM
+// LOSS OF USE, DATA OR PROFITS, WHETHER IN AN ACTION OF CONTRACT, NEGLIGENCE
+// OR OTHER TORTIOUS ACTION, ARISING OUT OF OR IN CONNECTION WITH THE USE OR
+// PERFORMANCE OF THIS SOFTWARE.
+
+#ifndef __LIBDATASRC_H
+#define __LIBDATASRC_H 1
+
+#if !defined(_WIN32) || defined(USE_STATIC_LINK)
+#define ISC_LIBDATASRC_API
+#else
+#ifdef ISC_LIBDATASRC_EXPORT
+#define ISC_LIBDATASRC_API __declspec(dllexport)
+#else
+#define ISC_LIBDATASRC_API __declspec(dllimport)
+#endif
+#endif
+
+#endif // __LIBDATASRC_H
+
+// Local Variables:
+// mode: c++
+// End:
diff --git a/src/lib/datasrc/factory.cc b/src/lib/datasrc/factory.cc
index 82b4df9..03c34d0 100644
--- a/src/lib/datasrc/factory.cc
+++ b/src/lib/datasrc/factory.cc
@@ -12,6 +12,10 @@
// OR OTHER TORTIOUS ACTION, ARISING OUT OF OR IN CONNECTION WITH THE USE OR
// PERFORMANCE OF THIS SOFTWARE.
+#define ISC_LIBDATASRC_EXPORT
+
+#include <config.h>
+
#include "factory.h"
#include "data_source.h"
@@ -25,7 +29,9 @@
#include <exceptions/exceptions.h>
+#ifndef _WIN32
#include <dlfcn.h>
+#endif
#include <cstdlib>
using namespace std;
@@ -58,6 +64,7 @@ getDataSourceLibFile(const std::string& type) {
if (ext_pos == std::string::npos || ext_pos + 3 != lib_file.length()) {
lib_file.append("_ds.so");
}
+#ifndef _WIN32
// And if it is not an absolute path, prepend it with our
// loadable backend library path
if (type[0] != '/') {
@@ -70,6 +77,20 @@ getDataSourceLibFile(const std::string& type) {
lib_file = isc::datasrc::BACKEND_LIBRARY_PATH + lib_file;
}
}
+#else
+ // And if it is not an absolute path, prepend it with our
+ // loadable backend library path
+ if (type[0] != '\\') {
+ // When running from the build tree, we do NOT want
+ // to load the installed loadable library
+ if (getenv("B10_FROM_BUILD") != NULL) {
+ lib_file = std::string(getenv("B10_FROM_BUILD")) +
+ "\\win32build\\VS2010\\Release\\" + lib_file;
+ } else {
+ lib_file = isc::datasrc::BACKEND_LIBRARY_PATH + lib_file;
+ }
+ }
+#endif
return (lib_file);
}
} // end anonymous namespace
@@ -78,6 +99,7 @@ namespace isc {
namespace datasrc {
LibraryContainer::LibraryContainer(const std::string& name) {
+#ifndef _WIN32
// use RTLD_GLOBAL so that shared symbols (e.g. exceptions)
// are recognized as such
ds_lib_ = dlopen(name.c_str(), RTLD_NOW | RTLD_GLOBAL);
@@ -87,14 +109,45 @@ LibraryContainer::LibraryContainer(const std::string& name) {
isc_throw(DataSourceLibraryError, "dlopen failed for " << name <<
": " << dlerror());
}
+#else
+#ifndef USE_STATIC_LINK
+ ds_lib_ = LoadLibraryA(name.c_str());
+ if (ds_lib_ == NULL) {
+ isc_throw(DataSourceLibraryError, "dLoadLibrary failed for " << name <<
+ ": " << strerror(GetLastError()));
+ }
+#else
+ if (strcmp(name.c_str(), "sqlite3_ds.so") == 0)
+ ds_lib_ = 1;
+ else if (strcmp(name.c_str(), "memory_ds.so") == 0)
+ ds_lib_ = 2;
+ else if (strcmp(name.c_str(), "static_ds.so") == 0)
+ ds_lib_ = 3;
+ else {
+ isc_throw(DataSourceLibraryError,
+ "only \"sqlite3\", \"memory\" and \"static\" are supported");
+ }
+#endif
+#endif
}
LibraryContainer::~LibraryContainer() {
+#ifndef _WIN32
dlclose(ds_lib_);
+#else
+#ifndef USE_STATIC_LINK
+ FreeLibrary(ds_lib_);
+#endif
+#endif
}
+#ifndef _WIN32
void*
+#else
+FARPROC
+#endif
LibraryContainer::getSym(const char* name) {
+#ifndef _WIN32
// Since dlsym can return NULL on success, we check for errors by
// first clearing any existing errors with dlerror(), then calling dlsym,
// and finally checking for errors with dlerror()
@@ -108,6 +161,34 @@ LibraryContainer::getSym(const char* name) {
}
return (sym);
+#else
+#ifndef USE_STATIC_LINK
+ FARPROC sym = GetProcAddress(ds_lib_, name);
+ if (sym == NULL) {
+ isc_throw(DataSourceLibrarySymbolError, strerror(GetLastError()));
+ }
+ return (sym);
+#else
+ if (strcmp(name, "createInstance") == 0) {
+ if (ds_lib_ == 1)
+ return SQLCreateInstance;
+ else if (ds_lib_ == 2)
+ return MemoryCreateInstance;
+ else
+ return StaticCreateInstance;
+ } else if (strcmp(name, "destroyInstance") == 0) {
+ if (ds_lib_ == 1)
+ return SQLDestroyInstance;
+ else if (ds_lib_ == 2)
+ return MemoryDestroyInstance;
+ else
+ return StaticDestroyInstance;
+ } else {
+ isc_throw(DataSourceLibrarySymbolError,
+ "not \"createInstance\" or \"destroyInstance\"");
+ }
+#endif
+#endif
}
DataSourceClientContainer::DataSourceClientContainer(const std::string& type,
diff --git a/src/lib/datasrc/factory.h b/src/lib/datasrc/factory.h
index 2731f58..f98c78f 100644
--- a/src/lib/datasrc/factory.h
+++ b/src/lib/datasrc/factory.h
@@ -15,6 +15,7 @@
#ifndef __DATA_SOURCE_FACTORY_H
#define __DATA_SOURCE_FACTORY_H 1
+#include <datasrc/dll.h>
#include <datasrc/data_source.h>
#include <datasrc/client.h>
@@ -29,7 +30,7 @@ namespace datasrc {
/// \brief Raised if there is an error loading the datasource implementation
/// library
-class DataSourceLibraryError : public DataSourceError {
+class ISC_LIBDATASRC_API DataSourceLibraryError : public DataSourceError {
public:
DataSourceLibraryError(const char* file, size_t line, const char* what) :
DataSourceError(file, line, what) {}
@@ -37,7 +38,8 @@ public:
/// \brief Raised if there is an error reading a symbol from the datasource
/// implementation library
-class DataSourceLibrarySymbolError : public DataSourceError {
+class ISC_LIBDATASRC_API DataSourceLibrarySymbolError :
+ public DataSourceError {
public:
DataSourceLibrarySymbolError(const char* file, size_t line,
const char* what) :
@@ -60,7 +62,7 @@ typedef void ds_destructor(DataSourceClient* instance);
/// in other places than for dynamically loading datasources, then, apart
/// from moving it to another location, we also need to make the
/// exceptions raised more general.
-class LibraryContainer : boost::noncopyable {
+class ISC_LIBDATASRC_API LibraryContainer : boost::noncopyable {
public:
/// \brief Constructor
///
@@ -93,10 +95,22 @@ public:
/// argument in the constructor). This argument is always a fixed
/// string in the code, while the other can be read from
/// configuration, and needs modification
+#ifndef _WIN32
void* getSym(const char* name);
+#else
+ FARPROC getSym(const char* name);
+#endif
private:
/// Pointer to the dynamically loaded library structure
+#ifndef _WIN32
void *ds_lib_;
+#else
+#ifndef USE_STATIC_LINK
+ HMODULE ds_lib_;
+#else
+ int ds_lib_;
+#endif
+#endif
};
@@ -141,7 +155,7 @@ private:
/// derived classes as well. Currently, the class is actually derived in some
/// of the tests, which is rather unclean (as this class as written is really
/// intended to be used directly).
-class DataSourceClientContainer : boost::noncopyable {
+class ISC_LIBDATASRC_API DataSourceClientContainer : boost::noncopyable {
public:
/// \brief Constructor
///
diff --git a/src/lib/datasrc/iterator.h b/src/lib/datasrc/iterator.h
index 99d3331..b0bc1a4 100644
--- a/src/lib/datasrc/iterator.h
+++ b/src/lib/datasrc/iterator.h
@@ -19,6 +19,7 @@
#include <boost/noncopyable.hpp>
+#include <datasrc/dll.h>
#include <datasrc/zone.h>
namespace isc {
@@ -34,7 +35,7 @@ namespace datasrc {
*
* There's no way to start iterating from the beginning again or return.
*/
-class ZoneIterator : public boost::noncopyable {
+class ISC_LIBDATASRC_API ZoneIterator : public boost::noncopyable {
public:
/**
* \brief Destructor
diff --git a/src/lib/datasrc/logger.cc b/src/lib/datasrc/logger.cc
index 846e43b..48ab9c9 100644
--- a/src/lib/datasrc/logger.cc
+++ b/src/lib/datasrc/logger.cc
@@ -12,12 +12,14 @@
// OR OTHER TORTIOUS ACTION, ARISING OUT OF OR IN CONNECTION WITH THE USE OR
// PERFORMANCE OF THIS SOFTWARE.
+#define ISC_LIBDATASRC_EXPORT
+
#include <datasrc/logger.h>
namespace isc {
namespace datasrc {
-isc::log::Logger logger("datasrc");
+ISC_LIBDATASRC_API isc::log::Logger logger("datasrc");
}
}
diff --git a/src/lib/datasrc/logger.h b/src/lib/datasrc/logger.h
index db4e5cb..6e72e77 100644
--- a/src/lib/datasrc/logger.h
+++ b/src/lib/datasrc/logger.h
@@ -16,6 +16,7 @@
#define __DATASRC_LOGGER_H
#include <log/macros.h>
+#include <datasrc/dll.h>
#include <datasrc/datasrc_messages.h>
/// \file datasrc/logger.h
@@ -29,7 +30,7 @@ namespace isc {
namespace datasrc {
/// \brief The logger for this library
-extern isc::log::Logger logger;
+extern ISC_LIBDATASRC_API isc::log::Logger logger;
/// \brief Trace basic operations
const int DBG_TRACE_BASIC = DBGLVL_TRACE_BASIC;
diff --git a/src/lib/datasrc/memory_datasrc.cc b/src/lib/datasrc/memory_datasrc.cc
index c5122bf..f5729fa 100644
--- a/src/lib/datasrc/memory_datasrc.cc
+++ b/src/lib/datasrc/memory_datasrc.cc
@@ -12,6 +12,10 @@
// OR OTHER TORTIOUS ACTION, ARISING OUT OF OR IN CONNECTION WITH THE USE OR
// PERFORMANCE OF THIS SOFTWARE.
+#define ISC_LIBDATASRC_EXPORT
+
+#include <config.h>
+
#include <exceptions/exceptions.h>
#include <dns/name.h>
diff --git a/src/lib/datasrc/memory_datasrc.h b/src/lib/datasrc/memory_datasrc.h
index be545d4..3529ac6 100644
--- a/src/lib/datasrc/memory_datasrc.h
+++ b/src/lib/datasrc/memory_datasrc.h
@@ -19,6 +19,7 @@
#include <boost/noncopyable.hpp>
+#include <datasrc/dll.h>
#include <datasrc/zonetable.h>
#include <datasrc/client.h>
@@ -26,8 +27,8 @@
namespace isc {
namespace dns {
-class Name;
-class RRsetList;
+class ISC_LIBDATASRC_API Name;
+class ISC_LIBDATASRC_API RRsetList;
};
namespace datasrc {
@@ -40,7 +41,8 @@ namespace datasrc {
/// backend). This is why the class has methods like \c load() or \c add().
///
/// This class is non copyable.
-class InMemoryZoneFinder : boost::noncopyable, public ZoneFinder {
+class ISC_LIBDATASRC_API InMemoryZoneFinder :
+ boost::noncopyable, public ZoneFinder {
///
/// \name Constructors and Destructor.
public:
@@ -253,7 +255,7 @@ private:
/// The findZone() method takes a domain name and returns the best matching
/// \c InMemoryZoneFinder in the form of (Boost) shared pointer, so that it can
/// provide the general interface for all data sources.
-class InMemoryClient : public DataSourceClient {
+class ISC_LIBDATASRC_API InMemoryClient : public DataSourceClient {
public:
///
/// \name Constructors and Destructor.
@@ -351,12 +353,25 @@ private:
/// during initialization
/// \return An instance of the memory datasource client, or NULL if there was
/// an error
-extern "C" DataSourceClient* createInstance(isc::data::ConstElementPtr config,
- std::string& error);
+
+#if defined(_WIN32) && defined(USE_STATIC_LINK)
+extern "C" ISC_LIBDATASRC_API DataSourceClient*
+MemoryCreateInstance(isc::data::ConstElementPtr config, std::string& error);
+extern "C" ISC_LIBDATASRC_API DataSourceClient*
+StaticCreateInstance(isc::data::ConstElementPtr config, std::string& error);
/// \brief Destroy the instance created by createInstance()
-extern "C" void destroyInstance(DataSourceClient* instance);
+extern "C" ISC_LIBDATASRC_API void
+MemoryDestroyInstance(DataSourceClient* instance);
+extern "C" ISC_LIBDATASRC_API void
+StaticDestroyInstance(DataSourceClient* instance);
+#else
+extern "C" ISC_LIBDATASRC_API DataSourceClient*
+createInstance(isc::data::ConstElementPtr config, std::string& error);
+/// \brief Destroy the instance created by createInstance()
+extern "C" ISC_LIBDATASRC_API void destroyInstance(DataSourceClient* instance);
+#endif
}
}
diff --git a/src/lib/datasrc/memory_datasrc_link.cc b/src/lib/datasrc/memory_datasrc_link.cc
index cbbc6db..7d088b1 100644
--- a/src/lib/datasrc/memory_datasrc_link.cc
+++ b/src/lib/datasrc/memory_datasrc_link.cc
@@ -12,6 +12,10 @@
// OR OTHER TORTIOUS ACTION, ARISING OUT OF OR IN CONNECTION WITH THE USE OR
// PERFORMANCE OF THIS SOFTWARE.
+#define ISC_LIBDATASRC_EXPORT
+
+#include <config.h>
+
#include <cc/data.h>
#include <dns/rrclass.h>
@@ -35,7 +39,7 @@ namespace datasrc {
/// This exception is raised if there is an error in the configuration
/// that has been passed; missing information, duplicate values, etc.
-class InMemoryConfigError : public isc::Exception {
+class ISC_LIBDATASRC_API InMemoryConfigError : public isc::Exception {
public:
InMemoryConfigError(const char* file, size_t line, const char* what) :
isc::Exception(file, line, what) {}
@@ -245,8 +249,13 @@ applyConfig(isc::datasrc::InMemoryClient& client,
} // end unnamed namespace
-DataSourceClient *
-createInstance(isc::data::ConstElementPtr config, std::string& error) {
+ISC_LIBDATASRC_API DataSourceClient *
+#if defined(_WIN32) && defined(USE_STATIC_LINK)
+MemoryCreateInstance
+#else
+createInstance
+#endif
+(isc::data::ConstElementPtr config, std::string& error) {
ElementPtr errors(Element::createList());
if (!checkConfig(config, errors)) {
error = "Configuration error: " + errors->str();
@@ -269,7 +278,13 @@ createInstance(isc::data::ConstElementPtr config, std::string& error) {
}
}
-void destroyInstance(DataSourceClient* instance) {
+ISC_LIBDATASRC_API void
+#if defined(_WIN32) && defined(USE_STATIC_LINK)
+MemoryDestroyInstance
+#else
+destroyInstance
+#endif
+(DataSourceClient* instance) {
delete instance;
}
diff --git a/src/lib/datasrc/query.cc b/src/lib/datasrc/query.cc
index a8d675a..4d3936f 100644
--- a/src/lib/datasrc/query.cc
+++ b/src/lib/datasrc/query.cc
@@ -12,6 +12,8 @@
// OR OTHER TORTIOUS ACTION, ARISING OUT OF OR IN CONNECTION WITH THE USE OR
// PERFORMANCE OF THIS SOFTWARE.
+#define ISC_LIBDATASRC_EXPORT
+
#include <util/buffer.h>
#include <dns/name.h>
#include <dns/rrset.h>
diff --git a/src/lib/datasrc/query.h b/src/lib/datasrc/query.h
index 43b62cc..01cb782 100644
--- a/src/lib/datasrc/query.h
+++ b/src/lib/datasrc/query.h
@@ -17,6 +17,7 @@
#include <boost/shared_ptr.hpp>
+#include <datasrc/dll.h>
#include <datasrc/cache.h>
#include <datasrc/data_source.h>
@@ -30,11 +31,11 @@
namespace isc {
namespace datasrc {
-class Query;
+class ISC_LIBDATASRC_API Query;
typedef boost::shared_ptr<Query> QueryPtr;
// An individual task to be carried out by the query logic
-class QueryTask {
+class ISC_LIBDATASRC_API QueryTask {
private:
/// Note: The copy constructor and the assignment operator are intentionally
/// defined as private.
@@ -158,7 +159,7 @@ typedef boost::shared_ptr<QueryTask> QueryTaskPtr;
typedef std::queue<QueryTaskPtr> QueryTaskQueue;
// Data Source query
-class Query {
+class ISC_LIBDATASRC_API Query {
public:
// The state of a query: pending or answered.
enum Status {
diff --git a/src/lib/datasrc/rbnode_rrset.h b/src/lib/datasrc/rbnode_rrset.h
index 3161cdb..e872755 100644
--- a/src/lib/datasrc/rbnode_rrset.h
+++ b/src/lib/datasrc/rbnode_rrset.h
@@ -22,6 +22,7 @@
#include <dns/rrttl.h>
#include <dns/rrtype.h>
#include <util/buffer.h>
+#include <datasrc/dll.h>
#include <string>
#include <vector>
@@ -43,7 +44,7 @@ struct RBNodeRRsetImpl;
// Note that the definition of the structure is still hidden within the
// implementation, so, basically, a normal application should never be able
// to use it directly even if it peeks into the "internal" namespace.
-struct AdditionalNodeInfo;
+struct ISC_LIBDATASRC_API AdditionalNodeInfo;
/// \brief Special RRset for optimizing memory datasource requirement
///
@@ -84,7 +85,7 @@ struct AdditionalNodeInfo;
///
// Note: non-Doxygen-documented methods are documented in the base class.
-class RBNodeRRset : public isc::dns::AbstractRRset {
+class ISC_LIBDATASRC_API RBNodeRRset : public isc::dns::AbstractRRset {
private:
// Note: The copy constructor and the assignment operator are intentionally
diff --git a/src/lib/datasrc/rbtree.h b/src/lib/datasrc/rbtree.h
index 106aaa8..bda54e0 100644
--- a/src/lib/datasrc/rbtree.h
+++ b/src/lib/datasrc/rbtree.h
@@ -23,12 +23,11 @@
/// issue, the design and interface are not fixed, and RBTree isn't ready
/// to be used as a base data structure by other modules.
-#include <exceptions/exceptions.h>
-
#include <dns/name.h>
#include <boost/utility.hpp>
#include <boost/shared_ptr.hpp>
#include <exceptions/exceptions.h>
+#include <datasrc/dll.h>
#include <ostream>
#include <algorithm>
#include <cassert>
@@ -327,6 +326,11 @@ private:
// This is only to support NULL nodes.
+#ifdef _MSC_VER
+#pragma warning(push)
+#pragma warning(disable: 4355)
+#endif
+
template <typename T>
RBNode<T>::RBNode() :
parent_(NULL),
@@ -345,6 +349,10 @@ RBNode<T>::RBNode() :
down_ = this;
}
+#ifdef _MSC_VER
+#pragma warning(pop)
+#endif
+
template <typename T>
RBNode<T>::RBNode(const isc::dns::Name& name) :
parent_(NULL_NODE()),
diff --git a/src/lib/datasrc/sqlite3_accessor.cc b/src/lib/datasrc/sqlite3_accessor.cc
index ba21de8..4927ed8 100644
--- a/src/lib/datasrc/sqlite3_accessor.cc
+++ b/src/lib/datasrc/sqlite3_accessor.cc
@@ -12,6 +12,10 @@
// OR OTHER TORTIOUS ACTION, ARISING OUT OF OR IN CONNECTION WITH THE USE OR
// PERFORMANCE OF THIS SOFTWARE.
+#define ISC_LIBDATASRC_EXPORT
+
+#include <config.h>
+
#include <sqlite3.h>
#include <string>
@@ -376,10 +380,14 @@ prepare(sqlite3* const db, const char* const statement) {
// exclusive database locks (which should only occur on startup, and only
// when the database has not been created yet)
void doSleep() {
+#ifdef _WIN32
+ Sleep(100);
+#else
struct timespec req;
req.tv_sec = 0;
req.tv_nsec = 100000000;
nanosleep(&req, NULL);
+#endif
}
// returns the schema version if the schema version table exists
diff --git a/src/lib/datasrc/sqlite3_accessor.h b/src/lib/datasrc/sqlite3_accessor.h
index 3e44d5b..e76bd05 100644
--- a/src/lib/datasrc/sqlite3_accessor.h
+++ b/src/lib/datasrc/sqlite3_accessor.h
@@ -16,6 +16,7 @@
#ifndef __DATASRC_SQLITE3_ACCESSOR_H
#define __DATASRC_SQLITE3_ACCESSOR_H
+#include <datasrc/dll.h>
#include <datasrc/database.h>
#include <datasrc/data_source.h>
@@ -29,7 +30,7 @@
namespace isc {
namespace dns {
-class RRClass;
+class ISC_LIBDATASRC_API RRClass;
}
namespace datasrc {
@@ -41,13 +42,13 @@ namespace datasrc {
* It might mean corrupt database file, invalid request or that something is
* rotten in the library.
*/
-class SQLite3Error : public DataSourceError {
+class ISC_LIBDATASRC_API SQLite3Error : public DataSourceError {
public:
SQLite3Error(const char* file, size_t line, const char* what) :
DataSourceError(file, line, what) {}
};
-class IncompatibleDbVersion : public Exception {
+class ISC_LIBDATASRC_API IncompatibleDbVersion : public Exception {
public:
IncompatibleDbVersion(const char* file, size_t line, const char* what) :
isc::Exception(file, line, what) {}
@@ -59,7 +60,7 @@ public:
* Thrown if a query expecting a certain number of rows back returned too
* many rows.
*/
-class TooMuchData : public DataSourceError {
+class ISC_LIBDATASRC_API TooMuchData : public DataSourceError {
public:
TooMuchData(const char* file, size_t line, const char* what) :
DataSourceError(file, line, what) {}
@@ -71,7 +72,7 @@ public:
* Thrown if a query expecting a certain number of rows back returned too
* few rows (including none).
*/
-class TooLittleData : public DataSourceError {
+class ISC_LIBDATASRC_API TooLittleData : public DataSourceError {
public:
TooLittleData(const char* file, size_t line, const char* what) :
DataSourceError(file, line, what) {}
@@ -86,7 +87,7 @@ struct SQLite3Parameters;
* According to the design, it doesn't interpret the data in any way, it just
* provides unified access to the DB.
*/
-class SQLite3Accessor : public DatabaseAccessor,
+class ISC_LIBDATASRC_API SQLite3Accessor : public DatabaseAccessor,
public boost::enable_shared_from_this<SQLite3Accessor> {
public:
/**
@@ -282,11 +283,20 @@ private:
/// during initialization
/// \return An instance of the sqlite3 datasource client, or NULL if there was
/// an error
-extern "C" DataSourceClient* createInstance(isc::data::ConstElementPtr config,
- std::string& error);
+#if defined(_WIN32) && defined(USE_STATIC_LINK)
+extern "C" ISC_LIBDATASRC_API DataSourceClient*
+SQLCreateInstance(isc::data::ConstElementPtr config, std::string& error);
/// \brief Destroy the instance created by createInstance()
-extern "C" void destroyInstance(DataSourceClient* instance);
+extern "C" ISC_LIBDATASRC_API void
+SQLDestroyInstance(DataSourceClient* instance);
+#else
+extern "C" ISC_LIBDATASRC_API DataSourceClient*
+createInstance(isc::data::ConstElementPtr config, std::string& error);
+
+/// \brief Destroy the instance created by createInstance()
+extern "C" ISC_LIBDATASRC_API void destroyInstance(DataSourceClient* instance);
+#endif
}
}
diff --git a/src/lib/datasrc/sqlite3_accessor_link.cc b/src/lib/datasrc/sqlite3_accessor_link.cc
index c064e0f..826077a 100644
--- a/src/lib/datasrc/sqlite3_accessor_link.cc
+++ b/src/lib/datasrc/sqlite3_accessor_link.cc
@@ -12,6 +12,8 @@
// OR OTHER TORTIOUS ACTION, ARISING OUT OF OR IN CONNECTION WITH THE USE OR
// PERFORMANCE OF THIS SOFTWARE.
+#define ISC_LIBDATASRC_EXPORT
+
#include <cc/data.h>
#include <dns/rrclass.h>
@@ -75,8 +77,13 @@ checkConfig(ConstElementPtr config, ElementPtr errors) {
} // end unnamed namespace
-DataSourceClient *
-createInstance(isc::data::ConstElementPtr config, std::string& error) {
+ISC_LIBDATASRC_API DataSourceClient *
+#if defined(_WIN32) && defined(USE_STATIC_LINK)
+SQLCreateInstance
+#else
+createInstance
+#endif
+(isc::data::ConstElementPtr config, std::string& error) {
ElementPtr errors(Element::createList());
if (!checkConfig(config, errors)) {
error = "Configuration error: " + errors->str();
@@ -99,7 +106,13 @@ createInstance(isc::data::ConstElementPtr config, std::string& error) {
}
}
-void destroyInstance(DataSourceClient* instance) {
+ISC_LIBDATASRC_API void
+#if defined(_WIN32) && defined(USE_STATIC_LINK)
+SQLDestroyInstance
+#else
+destroyInstance
+#endif
+(DataSourceClient* instance) {
delete instance;
}
diff --git a/src/lib/datasrc/sqlite3_datasrc.cc b/src/lib/datasrc/sqlite3_datasrc.cc
index b450cd5..6ddee35 100644
--- a/src/lib/datasrc/sqlite3_datasrc.cc
+++ b/src/lib/datasrc/sqlite3_datasrc.cc
@@ -12,6 +12,10 @@
// OR OTHER TORTIOUS ACTION, ARISING OUT OF OR IN CONNECTION WITH THE USE OR
// PERFORMANCE OF THIS SOFTWARE.
+#define ISC_LIBDATASRC_EXPORT
+
+#include <config.h>
+
#include <string>
#include <sstream>
#include <utility>
@@ -49,7 +53,7 @@ using namespace isc::dns::rdata;
namespace isc {
namespace datasrc {
-struct Sqlite3Parameters {
+struct ISC_LIBDATASRC_API Sqlite3Parameters {
Sqlite3Parameters() : db_(NULL), major_version_(-1), minor_version_(-1),
q_zone_(NULL), q_record_(NULL), q_addrs_(NULL), q_referral_(NULL),
q_any_(NULL), q_count_(NULL), q_previous_(NULL), q_nsec3_(NULL),
@@ -692,10 +696,14 @@ prepare(sqlite3* const db, const char* const statement) {
// exclusive database locks (which should only occur on startup, and only
// when the database has not been created yet)
void do_sleep() {
+#ifdef _WIN32
+ Sleep(100);
+#else
struct timespec req;
req.tv_sec = 0;
req.tv_nsec = 100000000;
nanosleep(&req, NULL);
+#endif
}
// returns the schema version element if the schema version table exists
diff --git a/src/lib/datasrc/sqlite3_datasrc.h b/src/lib/datasrc/sqlite3_datasrc.h
index 8ee042f..18ffd34 100644
--- a/src/lib/datasrc/sqlite3_datasrc.h
+++ b/src/lib/datasrc/sqlite3_datasrc.h
@@ -19,35 +19,41 @@
#include <exceptions/exceptions.h>
+#include <datasrc/dll.h>
#include <datasrc/data_source.h>
+#ifdef _MSC_VER
+#pragma warning(push)
+#pragma warning(disable: 4373)
+#endif
+
namespace isc {
namespace dns {
-class Name;
-class RRClass;
-class RRType;
-class RRsetList;
+class ISC_LIBDATASRC_API Name;
+class ISC_LIBDATASRC_API RRClass;
+class ISC_LIBDATASRC_API RRType;
+class ISC_LIBDATASRC_API RRsetList;
}
namespace datasrc {
-class Query;
-struct Sqlite3Parameters;
+class ISC_LIBDATASRC_API Query;
+struct ISC_LIBDATASRC_API Sqlite3Parameters;
-class Sqlite3Error : public Exception {
+class ISC_LIBDATASRC_API Sqlite3Error : public Exception {
public:
Sqlite3Error(const char* file, size_t line, const char* what) :
isc::Exception(file, line, what) {}
};
-class IncompatibleDbVersion : public Exception {
+class ISC_LIBDATASRC_API IncompatibleDbVersion : public Exception {
public:
IncompatibleDbVersion(const char* file, size_t line, const char* what) :
isc::Exception(file, line, what) {}
};
-class Sqlite3DataSrc : public DataSrc {
+class ISC_LIBDATASRC_API Sqlite3DataSrc : public DataSrc {
///
/// \name Constructors, Assignment Operator and Destructor.
///
@@ -123,6 +129,10 @@ private:
}
}
+#ifdef _MSC_VER
+#pragma warning(pop)
+#endif
+
#endif // __DATA_SOURCE_SQLITE3_H
// Local Variables:
diff --git a/src/lib/datasrc/static.zone.win32 b/src/lib/datasrc/static.zone.win32
new file mode 100644
index 0000000..61699d8
--- /dev/null
+++ b/src/lib/datasrc/static.zone.win32
@@ -0,0 +1,34 @@
+;; This is the content of the BIND./CH zone. It contains the version and
+;; authors (called VERSION.BIND. and AUTHORS.BIND.). You can add more or
+;; modify the zone. Then you can reload the zone by issuing the command
+;;
+;; loadzone CH BIND
+;;
+;; in the bindctl.
+
+BIND. 0 CH SOA bind. authors.bind. 0 28800 7200 604800 86400
+
+VERSION.BIND. 0 CH TXT "bind10-trac826 20120701"
+;; HOSTNAME.BIND 0 CH TXT "localhost"
+AUTHORS.BIND. 0 CH TXT "Chen Zhengzhang"
+AUTHORS.BIND. 0 CH TXT "Dmitriy Volodin"
+AUTHORS.BIND. 0 CH TXT "Evan Hunt"
+AUTHORS.BIND. 0 CH TXT "Haidong Wang"
+AUTHORS.BIND. 0 CH TXT "Haikuo Zhang"
+AUTHORS.BIND. 0 CH TXT "Han Feng"
+AUTHORS.BIND. 0 CH TXT "Jelte Jansen"
+AUTHORS.BIND. 0 CH TXT "Jeremy C. Reed"
+AUTHORS.BIND. 0 CH TXT "Xie Jiagui"
+AUTHORS.BIND. 0 CH TXT "Jin Jian"
+AUTHORS.BIND. 0 CH TXT "JINMEI Tatuya"
+AUTHORS.BIND. 0 CH TXT "Kazunori Fujiwara"
+AUTHORS.BIND. 0 CH TXT "Michael Graff"
+AUTHORS.BIND. 0 CH TXT "Michal Vaner"
+AUTHORS.BIND. 0 CH TXT "Mukund Sivaraman"
+AUTHORS.BIND. 0 CH TXT "Naoki Kambe"
+AUTHORS.BIND. 0 CH TXT "Shane Kerr"
+AUTHORS.BIND. 0 CH TXT "Shen Tingting"
+AUTHORS.BIND. 0 CH TXT "Stephen Morris"
+AUTHORS.BIND. 0 CH TXT "Yoshitaka Aharen"
+AUTHORS.BIND. 0 CH TXT "Zhang Likun"
+;AUTHORS.BIND. 0 CH TXT "Francis Dupont"
diff --git a/src/lib/datasrc/static_datasrc.cc b/src/lib/datasrc/static_datasrc.cc
index 77d7a1d..31f01f6 100644
--- a/src/lib/datasrc/static_datasrc.cc
+++ b/src/lib/datasrc/static_datasrc.cc
@@ -12,6 +12,8 @@
// OR OTHER TORTIOUS ACTION, ARISING OUT OF OR IN CONNECTION WITH THE USE OR
// PERFORMANCE OF THIS SOFTWARE.
+#define ISC_LIBDATASRC_EXPORT
+
#include <config.h>
#include <cassert>
diff --git a/src/lib/datasrc/static_datasrc.h b/src/lib/datasrc/static_datasrc.h
index 4d212fe..501cec5 100644
--- a/src/lib/datasrc/static_datasrc.h
+++ b/src/lib/datasrc/static_datasrc.h
@@ -23,23 +23,24 @@
#ifndef __STATIC_DATA_SOURCE_H
#define __STATIC_DATA_SOURCE_H
+#include <datasrc/dll.h>
#include <datasrc/data_source.h>
namespace isc {
namespace dns {
-class Name;
-class RRClass;
-class RRType;
-class RRType;
-class RRsetList;
+class ISC_LIBDATASRC_API Name;
+class ISC_LIBDATASRC_API RRClass;
+class ISC_LIBDATASRC_API RRType;
+class ISC_LIBDATASRC_API RRType;
+class ISC_LIBDATASRC_API RRsetList;
}
namespace datasrc {
struct StaticDataSrcImpl;
-class StaticDataSrc : public DataSrc {
+class ISC_LIBDATASRC_API StaticDataSrc : public DataSrc {
private:
///
/// \name Constructors, Assignment Operator and Destructor.
diff --git a/src/lib/datasrc/static_datasrc_link.cc b/src/lib/datasrc/static_datasrc_link.cc
index 789580d..6509a63 100644
--- a/src/lib/datasrc/static_datasrc_link.cc
+++ b/src/lib/datasrc/static_datasrc_link.cc
@@ -12,6 +12,8 @@
// OR OTHER TORTIOUS ACTION, ARISING OUT OF OR IN CONNECTION WITH THE USE OR
// PERFORMANCE OF THIS SOFTWARE.
+#define ISC_LIBDATASRC_EXPORT
+
#include "client.h"
#include "memory_datasrc.h"
@@ -29,13 +31,18 @@ using namespace std;
namespace isc {
namespace datasrc {
-DataSourceClient*
-createInstance(ConstElementPtr config, string& error) {
+ISC_LIBDATASRC_API DataSourceClient*
+#if defined(_WIN32) && defined(USE_STATIC_LINK)
+StaticCreateInstance
+#else
+createInstance
+#endif
+(ConstElementPtr config, string& error) {
try {
// Create the data source
auto_ptr<InMemoryClient> client(new InMemoryClient());
// Hardcode the origin and class
- shared_ptr<InMemoryZoneFinder>
+ boost::shared_ptr<InMemoryZoneFinder>
finder(new InMemoryZoneFinder(RRClass::CH(), Name("BIND")));
// Fill it with data
const string path(config->stringValue());
@@ -53,8 +60,13 @@ createInstance(ConstElementPtr config, string& error) {
return (NULL);
}
-void
-destroyInstance(DataSourceClient* instance) {
+ISC_LIBDATASRC_API void
+#if defined(_WIN32) && defined(USE_STATIC_LINK)
+StaticDestroyInstance
+#else
+destroyInstance
+#endif
+(DataSourceClient* instance) {
delete instance;
}
diff --git a/src/lib/datasrc/tests/cache_unittest.cc b/src/lib/datasrc/tests/cache_unittest.cc
index 1325f64..c02622d 100644
--- a/src/lib/datasrc/tests/cache_unittest.cc
+++ b/src/lib/datasrc/tests/cache_unittest.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 <stdexcept>
#include <dns/name.h>
@@ -210,7 +212,11 @@ TEST_F(CacheTest, expire) {
aaaa->addRdata(in::AAAA("2001:db8:3:bb::5"));
cache.addPositive(aaaa, 0, 1);
+#ifdef _WIN32
+ Sleep(2000);
+#else
sleep(2);
+#endif
RRsetPtr r;
uint32_t f;
diff --git a/src/lib/datasrc/tests/client_list_unittest.cc b/src/lib/datasrc/tests/client_list_unittest.cc
index ae22470..e44c378 100644
--- a/src/lib/datasrc/tests/client_list_unittest.cc
+++ b/src/lib/datasrc/tests/client_list_unittest.cc
@@ -43,14 +43,14 @@ public:
RRClass getClass() const {
isc_throw(isc::NotImplemented, "Not implemented");
}
- shared_ptr<Context> find(const Name&, const RRType&,
- const FindOptions)
+ boost::shared_ptr<Context> find(const Name&, const RRType&,
+ const FindOptions)
{
isc_throw(isc::NotImplemented, "Not implemented");
}
- shared_ptr<Context> findAll(const Name&,
- vector<ConstRRsetPtr>&,
- const FindOptions)
+ boost::shared_ptr<Context> findAll(const Name&,
+ vector<ConstRRsetPtr>&,
+ const FindOptions)
{
isc_throw(isc::NotImplemented, "Not implemented");
}
@@ -62,7 +62,7 @@ public:
};
// Constructor from a list of zones.
MockDataSourceClient(const char* zone_names[]) {
- for (const char** zone(zone_names); *zone; ++zone) {
+ for (const char** zone = zone_names; *zone; ++zone) {
zones.insert(Name(*zone));
}
}
@@ -125,7 +125,7 @@ public:
if (type == "error") {
isc_throw(DataSourceError, "The error data source type");
}
- shared_ptr<MockDataSourceClient>
+ boost::shared_ptr<MockDataSourceClient>
ds(new MockDataSourceClient(type, configuration));
// Make sure it is deleted when the test list is deleted.
to_delete_.push_back(ds);
@@ -134,7 +134,7 @@ public:
private:
// Hold list of data sources created internally, so they are preserved
// until the end of the test and then deleted.
- vector<shared_ptr<MockDataSourceClient> > to_delete_;
+ vector<boost::shared_ptr<MockDataSourceClient> > to_delete_;
};
const char* ds_zones[][3] = {
@@ -171,7 +171,7 @@ public:
"}]"))
{
for (size_t i(0); i < ds_count; ++ i) {
- shared_ptr<MockDataSourceClient>
+ boost::shared_ptr<MockDataSourceClient>
ds(new MockDataSourceClient(ds_zones[i]));
ds_.push_back(ds);
ds_info_.push_back(ConfigurableClientList::DataSourceInfo(ds.get(),
@@ -180,7 +180,7 @@ public:
}
// Check the positive result is as we expect it.
void positiveResult(const ClientList::FindResult& result,
- const shared_ptr<MockDataSourceClient>& dsrc,
+ const boost::shared_ptr<MockDataSourceClient>& dsrc,
const Name& name, bool exact,
const char* test)
{
@@ -231,9 +231,9 @@ public:
EXPECT_EQ(type, ds->type_);
EXPECT_TRUE(Element::fromJSON(params)->equals(*ds->configuration_));
}
- shared_ptr<TestedList> list_;
+ boost::shared_ptr<TestedList> list_;
const ClientList::FindResult negativeResult_;
- vector<shared_ptr<MockDataSourceClient> > ds_;
+ vector<boost::shared_ptr<MockDataSourceClient> > ds_;
vector<ConfigurableClientList::DataSourceInfo> ds_info_;
const ConstElementPtr config_elem_;
};
@@ -386,7 +386,7 @@ TEST_F(ListTest, configureParams) {
"{}",
NULL
};
- for (const char** param(params); *param; ++param) {
+ for (const char** param = params; *param; ++param) {
SCOPED_TRACE(*param);
ConstElementPtr elem(Element::fromJSON(string("["
"{"
@@ -424,7 +424,7 @@ TEST_F(ListTest, wrongConfig) {
// Put something inside to see it survives the exception
list_->configure(*config_elem_, true);
checkDS(0, "test_type", "{}");
- for (const char** config(configs); *config; ++config) {
+ for (const char** config = configs; *config; ++config) {
SCOPED_TRACE(*config);
ConstElementPtr elem(Element::fromJSON(*config));
EXPECT_THROW(list_->configure(*elem, true),
diff --git a/src/lib/datasrc/tests/database_unittest.cc b/src/lib/datasrc/tests/database_unittest.cc
index 5f18283..8230888 100644
--- a/src/lib/datasrc/tests/database_unittest.cc
+++ b/src/lib/datasrc/tests/database_unittest.cc
@@ -1170,9 +1170,23 @@ public:
// probably move this to some specialized templated method specific
// to SQLite3 (or for even a longer term we should add an API to
// purge the diffs table).
+#ifdef _WIN32
+ const char* const install_pcmd = "copy" " " TEST_DATA_COMMONDIR
+ "/rwtest.sqlite3 " TEST_DATA_BUILDDIR
+ "/rwtest.sqlite3.copied";
+ char install_cmd[1024];
+ for (unsigned int i = 0;; i++) {
+ install_cmd[i] = install_pcmd[i];
+ if (install_cmd[i] == '/')
+ install_cmd[i] = '\\';
+ if (install_cmd[i] == 0)
+ break;
+ }
+#else
const char* const install_cmd = INSTALL_PROG " -c " TEST_DATA_COMMONDIR
"/rwtest.sqlite3 " TEST_DATA_BUILDDIR
"/rwtest.sqlite3.copied";
+#endif
if (system(install_cmd) != 0) {
// any exception will do, this is failure in test setup, but nice
// to show the command that fails, and shouldn't be caught
@@ -1487,7 +1501,8 @@ TYPED_TEST(DatabaseClientTest, iterator) {
ASSERT_NE(ConstRRsetPtr(), rrset);
// The first name should be the zone origin.
- EXPECT_EQ(this->zname_, rrset->getName());
+ const Name origin = this->zname_;
+ EXPECT_EQ(origin, rrset->getName());
}
// Supplemental structure used in the couple of tests below. It represents
@@ -1805,8 +1820,8 @@ TEST_F(MockDatabaseClientTest, ttldiff_separate_rrs) {
// Walk through the full iterator, we should see 1 rrset with name
// ttldiff1.example.org., and two rdatas. Same for ttldiff2
Name name("ttldiff.example.org.");
- int found1 = false;
- int found2 = false;
+ bool found1 = false;
+ bool found2 = false;
ConstRRsetPtr rrset = it->getNextRRset();
while(rrset != ConstRRsetPtr()) {
if (rrset->getName() == name) {
@@ -2943,7 +2958,8 @@ TYPED_TEST(DatabaseClientTest, getOrigin) {
if (this->is_mock_) {
EXPECT_EQ(READONLY_ZONE_ID, finder->zone_id());
}
- EXPECT_EQ(this->zname_, finder->getOrigin());
+ const Name origin = this->zname_;
+ EXPECT_EQ(origin, finder->getOrigin());
}
TYPED_TEST(DatabaseClientTest, updaterFinder) {
diff --git a/src/lib/datasrc/tests/factory_unittest.cc b/src/lib/datasrc/tests/factory_unittest.cc
index 2031d50..1b71615 100644
--- a/src/lib/datasrc/tests/factory_unittest.cc
+++ b/src/lib/datasrc/tests/factory_unittest.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 <boost/scoped_ptr.hpp>
#include <datasrc/datasrc_config.h>
@@ -48,6 +50,7 @@ pathtestHelper(const std::string& file, const std::string& expected_error) {
EXPECT_EQ(expected_error, error.substr(0, expected_error.size()));
}
+#ifndef _WIN32
TEST(FactoryTest, paths) {
// Test whether the paths are made absolute if they are not,
// by inspecting the error that is raised when they are wrong
@@ -96,6 +99,7 @@ TEST(FactoryTest, paths) {
ASSERT_THROW(DataSourceClientContainer(".so", ElementPtr()),
DataSourceLibraryError);
}
+#endif
TEST(FactoryTest, sqlite3ClientBadConfig) {
// We start out by building the configuration data bit by bit,
@@ -283,7 +287,7 @@ TEST(FactoryTest, staticDSBadConfig) {
"true",
NULL
};
- for (const char** config(configs); *config; ++config) {
+ for (const char** config = configs; *config; ++config) {
SCOPED_TRACE(*config);
EXPECT_THROW(DataSourceClientContainer("static",
Element::fromJSON(*config)),
diff --git a/src/lib/datasrc/tests/memory_datasrc_unittest.cc b/src/lib/datasrc/tests/memory_datasrc_unittest.cc
index 580f7ff..a9faf28 100644
--- a/src/lib/datasrc/tests/memory_datasrc_unittest.cc
+++ b/src/lib/datasrc/tests/memory_datasrc_unittest.cc
@@ -364,7 +364,11 @@ class InMemoryZoneFinderTest : public ::testing::Test {
// A straightforward pair of textual RR(set) and a RRsetPtr variable
// to store the RRset. Used to build test data below.
struct RRsetData {
+#ifdef _MSC_VER
+ char* text; // textual representation of an RRset
+#else
const char* const text; // textual representation of an RRset
+#endif
RRsetPtr* rrset;
};
protected:
@@ -1254,8 +1258,10 @@ TEST_F(InMemoryZoneFinderTest, loadFromIterator) {
const char* const a_sig_txt = "ns1.example.org. 300 IN RRSIG A 5 3 300 "
"20000101000000 20000201000000 12345 example.org. FAKEFAKE\n";
ss << soa_txt << soa_sig_txt << a_txt << a_sig_txt;
- shared_ptr<DataSourceClient> db_client = unittest::createSQLite3Client(
- class_, origin_, TEST_DATA_BUILDDIR "/contexttest.sqlite3.copied", ss);
+ boost::shared_ptr<DataSourceClient>
+ db_client = unittest::createSQLite3Client(
+ class_, origin_,
+ TEST_DATA_BUILDDIR "/contexttest.sqlite3.copied", ss);
zone_finder_.load(*db_client->getIterator(origin_));
// The new content should be visible, including the previously-nonexistent
diff --git a/src/lib/datasrc/tests/rbtree_unittest.cc b/src/lib/datasrc/tests/rbtree_unittest.cc
index a11bff5..bd12e6a 100644
--- a/src/lib/datasrc/tests/rbtree_unittest.cc
+++ b/src/lib/datasrc/tests/rbtree_unittest.cc
@@ -34,7 +34,9 @@ using namespace isc::datasrc;
// XXX: some compilers cannot find class static constants used in
// EXPECT_xxx macros, for which we need an explicit empty definition.
+#ifndef _MSC_VER
const size_t Name::MAX_LABELS;
+#endif
/* The initial structure of rbtree
*
diff --git a/src/lib/datasrc/tests/sqlite3_accessor_unittest.cc b/src/lib/datasrc/tests/sqlite3_accessor_unittest.cc
index 718d29b..27389f2 100644
--- a/src/lib/datasrc/tests/sqlite3_accessor_unittest.cc
+++ b/src/lib/datasrc/tests/sqlite3_accessor_unittest.cc
@@ -764,9 +764,23 @@ protected:
SQLite3Update() {
// Note: if "installing" the test file fails some of the subsequent
// tests would fail.
+#ifdef _WIN32
+ const char *install_pcmd = "copy" " " TEST_DATA_DIR
+ "/test.sqlite3 " TEST_DATA_BUILDDIR
+ "/test.sqlite3.copied";
+ char install_cmd[1024];
+ for (unsigned int i = 0;; i++) {
+ install_cmd[i] = install_pcmd[i];
+ if (install_cmd[i] == '/')
+ install_cmd[i] = '\\';
+ if (install_cmd[i] == 0)
+ break;
+ }
+#else
const char *install_cmd = INSTALL_PROG " -c " TEST_DATA_DIR
"/test.sqlite3 " TEST_DATA_BUILDDIR
"/test.sqlite3.copied";
+#endif
if (system(install_cmd) != 0) {
// any exception will do, this is failure in test setup, but nice
// to show the command that fails, and shouldn't be caught
diff --git a/src/lib/datasrc/tests/test_client.cc b/src/lib/datasrc/tests/test_client.cc
index c7854ed..e71a42b 100644
--- a/src/lib/datasrc/tests/test_client.cc
+++ b/src/lib/datasrc/tests/test_client.cc
@@ -48,7 +48,7 @@ addRRset(ZoneUpdaterPtr updater, ConstRRsetPtr rrset) {
}
}
-shared_ptr<DataSourceClient>
+boost::shared_ptr<DataSourceClient>
createSQLite3Client(RRClass zclass, const Name& zname,
const char* const db_file, const char* const zone_file)
{
@@ -60,24 +60,35 @@ createSQLite3Client(RRClass zclass, const Name& zname,
return (createSQLite3Client(zclass, zname, db_file, ifs));
}
-shared_ptr<DataSourceClient>
+boost::shared_ptr<DataSourceClient>
createSQLite3Client(RRClass zclass, const Name& zname,
const char* const db_file, istream& rr_stream)
{
// We always begin with an empty template SQLite3 DB file and install
// the zone data from the zone file to ensure both cases have the
// same test data.
+#ifdef _WIN32
+ const char* const install_cmd_prefix = "copy" " " TEST_DATA_COMMONDIR
+ "/rwtest.sqlite3 ";
+ string install_cmd = string(install_cmd_prefix) + db_file;
+ size_t pos = 0;
+ while ((pos = install_cmd.find('/', pos)) != std::string::npos) {
+ install_cmd[pos] = '\\';
+ }
+#else
const char* const install_cmd_prefix = INSTALL_PROG " -c " TEST_DATA_COMMONDIR
"/rwtest.sqlite3 ";
const string install_cmd = string(install_cmd_prefix) + db_file;
+#endif
if (system(install_cmd.c_str()) != 0) {
isc_throw(isc::Unexpected,
"Error setting up; command failed: " << install_cmd);
}
- shared_ptr<SQLite3Accessor> accessor(
+ boost::shared_ptr<SQLite3Accessor> accessor(
new SQLite3Accessor(db_file, zclass.toText()));
- shared_ptr<DatabaseClient> client(new DatabaseClient(zclass, accessor));
+ boost::shared_ptr<DatabaseClient> client(
+ new DatabaseClient(zclass, accessor));
ZoneUpdaterPtr updater = client->getUpdater(zname, true);
masterLoad(rr_stream, zname, zclass, boost::bind(addRRset, updater, _1));
diff --git a/src/lib/datasrc/tests/test_datasrc.cc b/src/lib/datasrc/tests/test_datasrc.cc
index d78e7db..ee318ec 100644
--- a/src/lib/datasrc/tests/test_datasrc.cc
+++ b/src/lib/datasrc/tests/test_datasrc.cc
@@ -80,23 +80,29 @@ namespace {
// For simplicity we use the same single TTL for all test RRs.
const uint32_t TEST_TTL = 3600;
+#ifdef _MSC_VER
+#define PODconst
+#else
+#define PODconst const
+#endif
+
struct RRData {
- const char* const name;
- const char* const rrtype;
- const char* const rdata;
+ PODconst char* PODconst name;
+ PODconst char* PODconst rrtype;
+ PODconst char* PODconst rdata;
};
struct ZoneData {
- const char* const zone_name;
- const char* const rrclass;
- const struct RRData* records;
- const struct RRData* glue_records;
+ PODconst char* PODconst zone_name;
+ PODconst char* PODconst rrclass;
+ PODconst struct RRData* records;
+ PODconst struct RRData* glue_records;
};
//
// zone data for example.com
//
-const struct RRData example_com_records[] = {
+PODconst struct RRData example_com_records[] = {
// example.com
{"example.com", "NS", "dns01.example.com"},
{"example.com", "NS", "dns02.example.com"},
@@ -200,7 +206,7 @@ const struct RRData example_com_records[] = {
{NULL, NULL, NULL}
};
-const struct RRData example_com_glue_records[] = {
+PODconst struct RRData example_com_glue_records[] = {
{"ns1.subzone.example.com", "A", "192.0.2.1"},
{"ns2.subzone.example.com", "A", "192.0.2.2"},
{NULL, NULL, NULL}
@@ -209,7 +215,7 @@ const struct RRData example_com_glue_records[] = {
//
// zone data for sql1.example.com
//
-const struct RRData sql1_example_com_records[] = {
+PODconst struct RRData sql1_example_com_records[] = {
{"sql1.example.com", "NS", "dns01.example.com"},
{"sql1.example.com", "NS", "dns02.example.com"},
{"sql1.example.com", "NS", "dns03.example.com"},
@@ -231,7 +237,7 @@ const struct RRData sql1_example_com_records[] = {
//
// zone data for loop.example
//
-const struct RRData loop_example_records[] = {
+PODconst struct RRData loop_example_records[] = {
{"loop.example", "SOA", "master.loop.example admin.loop.example. "
"1234 3600 1800 2419200 7200"},
{"loop.example", "NS", "ns.loop.example"},
@@ -243,7 +249,7 @@ const struct RRData loop_example_records[] = {
//
// zone data for nons.example
//
-const struct RRData nons_example_records[] = {
+PODconst struct RRData nons_example_records[] = {
{"nons.example", "SOA", "master.nons.example admin.nons.example. "
"1234 3600 1800 2419200 7200"},
{"www.nons.example", "A", "192.0.2.1"},
@@ -260,7 +266,7 @@ const struct RRData nons_example_records[] = {
{NULL, NULL, NULL}
};
-const struct RRData nons_example_glue_records[] = {
+PODconst struct RRData nons_example_glue_records[] = {
{"ns.incompletechild.nons.example", "A", "192.0.2.1"},
{NULL, NULL, NULL}
};
@@ -268,7 +274,7 @@ const struct RRData nons_example_glue_records[] = {
//
// zone data for nons-dname.example
//
-const struct RRData nonsdname_example_records[] = {
+PODconst struct RRData nonsdname_example_records[] = {
{"nons-dname.example", "SOA", "master.nons-dname.example "
"admin.nons-dname.example. 1234 3600 1800 2419200 7200"},
{"nons-dname.example", "DNAME", "example.org"},
@@ -280,7 +286,7 @@ const struct RRData nonsdname_example_records[] = {
//
// zone data for nosoa.example
//
-const struct RRData nosoa_example_records[] = {
+PODconst struct RRData nosoa_example_records[] = {
{"nosoa.example", "NS", "ns.nosoa.example"},
{"www.nosoa.example", "A", "192.0.2.1"},
{"ns.nosoa.example", "A", "192.0.2.2"},
@@ -290,7 +296,7 @@ const struct RRData nosoa_example_records[] = {
//
// zone data for apexcname.example.
//
-const struct RRData apexcname_example_records[] = {
+PODconst struct RRData apexcname_example_records[] = {
{"apexcname.example", "CNAME", "canonical.apexcname.example"},
{"canonical.apexcname.example", "SOA",
"master.apexcname.example "
@@ -302,14 +308,14 @@ const struct RRData apexcname_example_records[] = {
//
// empty data set, for convenience.
//
-const struct RRData empty_records[] = {
+PODconst struct RRData empty_records[] = {
{NULL, NULL, NULL}
};
//
// test zones
//
-const struct ZoneData zone_data[] = {
+PODconst struct ZoneData zone_data[] = {
{ "example.com", "IN", example_com_records, example_com_glue_records },
{ "sql1.example.com", "IN", sql1_example_com_records, empty_records },
{ "loop.example", "IN", loop_example_records, empty_records },
diff --git a/src/lib/datasrc/tests/zone_finder_context_unittest.cc b/src/lib/datasrc/tests/zone_finder_context_unittest.cc
index b3c9b2d..780feef 100644
--- a/src/lib/datasrc/tests/zone_finder_context_unittest.cc
+++ b/src/lib/datasrc/tests/zone_finder_context_unittest.cc
@@ -49,7 +49,7 @@ namespace {
const char* const TEST_ZONE_FILE = TEST_DATA_DIR "/contexttest.zone";
// Convenient shortcut
-typedef shared_ptr<DataSourceClient> DataSourceClientPtr;
+typedef boost::shared_ptr<DataSourceClient> DataSourceClientPtr;
// This is the type used as the test parameter. Note that this is
// intentionally a plain old type (i.e. a function pointer), not a class;
@@ -59,9 +59,9 @@ typedef DataSourceClientPtr (*ClientCreator)(RRClass, const Name&);
// Creator for the in-memory client to be tested
DataSourceClientPtr
createInMemoryClient(RRClass zclass, const Name& zname) {
- shared_ptr<InMemoryClient> client(new InMemoryClient);
+ boost::shared_ptr<InMemoryClient> client(new InMemoryClient);
- shared_ptr<InMemoryZoneFinder> finder(
+ boost::shared_ptr<InMemoryZoneFinder> finder(
new InMemoryZoneFinder(zclass, zname));
finder->load(TEST_ZONE_FILE);
diff --git a/src/lib/datasrc/tests/zonetable_unittest.cc b/src/lib/datasrc/tests/zonetable_unittest.cc
index fa74c0e..5c7837e 100644
--- a/src/lib/datasrc/tests/zonetable_unittest.cc
+++ b/src/lib/datasrc/tests/zonetable_unittest.cc
@@ -39,8 +39,13 @@ TEST(ZoneTest, init) {
TEST(ZoneTest, find) {
InMemoryZoneFinder zone(RRClass::IN(), Name("example.com"));
+#ifdef _MSC_VER
+ EXPECT_EQ(ZoneFinder::NXDOMAIN,
+ zone.find(Name("www.example.com"), RRType::A())->code);
+#else
EXPECT_EQ(ZoneFinder::NXDOMAIN,
zone.find(Name("www.example.com"), RRType::A()).code);
+#endif
}
class ZoneTableTest : public ::testing::Test {
diff --git a/src/lib/datasrc/zone.h b/src/lib/datasrc/zone.h
index c41a2c2..1b5ced6 100644
--- a/src/lib/datasrc/zone.h
+++ b/src/lib/datasrc/zone.h
@@ -19,6 +19,7 @@
#include <dns/rrset.h>
#include <dns/rrtype.h>
+#include <datasrc/dll.h>
#include <datasrc/result.h>
#include <utility>
@@ -31,7 +32,7 @@ namespace datasrc {
///
/// This is thrown when a method is called for a name or RRset which
/// is not in or below the zone.
-class OutOfZone : public Exception {
+class ISC_LIBDATASRC_API OutOfZone : public Exception {
public:
OutOfZone(const char* file, size_t line, const char* what) :
isc::Exception(file, line, what) {}
@@ -62,7 +63,7 @@ public:
/// same name and type can be different if other threads or programs make
/// updates to the zone between the lookups. We should revisit this point
/// as we gain more experiences.
-class ZoneFinder {
+class ISC_LIBDATASRC_API ZoneFinder {
public:
/// Result codes of the \c find() method.
///
@@ -167,7 +168,7 @@ public:
/// ZoneFinder that originally performed the \c find() call, and expects
/// the finder is valid throughout the lifetime of this object. It's
/// caller's responsibility to ensure that assumption.
- class Context {
+ class ISC_LIBDATASRC_API Context {
public:
/// \brief The constructor for the normal find call.
///
@@ -376,16 +377,6 @@ public:
/// RRsets for that name are searched just like the normal case;
/// otherwise, if the search has encountered a zone cut, \c DELEGATION
/// with the information of the highest zone cut will be returned.
- /// Note: the term "glue" in the DNS protocol standard may sometimes
- /// cause confusion: some people use this term strictly for an address
- /// record (type AAAA or A) for the name used in the RDATA of an NS RR;
- /// some others seem to give it broader flexibility. Nevertheless,
- /// in this API the "GLUE OK" simply means the search by find() can
- /// continue beyond a zone cut; the derived class implementation does
- /// not have to, and should not, check whether the type is an address
- /// record or whether the query name is pointed by some NS RR.
- /// It's up to the caller with which definition of "glue" the search
- /// result with this option should be used.
/// - \c FIND_DNSSEC Request that DNSSEC data (like NSEC, RRSIGs) are
/// returned with the answer. It is allowed for the data source to
/// include them even when not requested.
@@ -695,7 +686,7 @@ typedef boost::shared_ptr<ZoneFinder::Context> ConstZoneFinderContextPtr;
/// \note This initial implementation provides a quite simple interface of
/// adding and deleting RRs (see the description of the related methods).
/// It may be revisited as we gain more experiences.
-class ZoneUpdater {
+class ISC_LIBDATASRC_API ZoneUpdater {
protected:
/// The default constructor.
///
@@ -913,7 +904,7 @@ typedef boost::shared_ptr<ZoneUpdater> ZoneUpdaterPtr;
/// over the sequences. Every time the \c getNextDiff() method is called
/// it returns one element of the differences in the form of an \c RRset
/// until it reaches the end of the entire sequences.
-class ZoneJournalReader {
+class ISC_LIBDATASRC_API ZoneJournalReader {
public:
/// Result codes used by a factory method for \c ZoneJournalReader
enum Result {
diff --git a/src/lib/datasrc/zone_finder_context.cc b/src/lib/datasrc/zone_finder_context.cc
index 7913d71..4524474 100644
--- a/src/lib/datasrc/zone_finder_context.cc
+++ b/src/lib/datasrc/zone_finder_context.cc
@@ -12,6 +12,8 @@
// OR OTHER TORTIOUS ACTION, ARISING OUT OF OR IN CONNECTION WITH THE USE OR
// PERFORMANCE OF THIS SOFTWARE.
+#define ISC_LIBDATASRC_EXPORT
+
#include <dns/rdata.h>
#include <dns/rrset.h>
#include <dns/rrtype.h>
diff --git a/src/lib/datasrc/zonetable.cc b/src/lib/datasrc/zonetable.cc
index 644861c..c494383 100644
--- a/src/lib/datasrc/zonetable.cc
+++ b/src/lib/datasrc/zonetable.cc
@@ -12,6 +12,8 @@
// OR OTHER TORTIOUS ACTION, ARISING OUT OF OR IN CONNECTION WITH THE USE OR
// PERFORMANCE OF THIS SOFTWARE.
+#define ISC_LIBDATASRC_EXPORT
+
#include <cassert>
#include <dns/name.h>
diff --git a/src/lib/datasrc/zonetable.h b/src/lib/datasrc/zonetable.h
index 5a34480..f2492fa 100644
--- a/src/lib/datasrc/zonetable.h
+++ b/src/lib/datasrc/zonetable.h
@@ -19,12 +19,13 @@
#include <dns/rrset.h>
+#include <datasrc/dll.h>
#include <datasrc/zone.h>
namespace isc {
namespace dns {
-class Name;
-class RRClass;
+class ISC_LIBDATASRC_API Name;
+class ISC_LIBDATASRC_API RRClass;
}
namespace datasrc {
@@ -38,7 +39,7 @@ namespace datasrc {
///
/// For more descriptions about its struct and interfaces, please refer to the
/// corresponding struct and interfaces of \c MemoryDataSrc.
-class ZoneTable {
+class ISC_LIBDATASRC_API ZoneTable {
public:
struct FindResult {
FindResult(result::Result param_code, const ZoneFinderPtr param_zone) :
diff --git a/src/lib/dhcp/iface_mgr.cc b/src/lib/dhcp/iface_mgr.cc
index fe18dae..e1bf70f 100644
--- a/src/lib/dhcp/iface_mgr.cc
+++ b/src/lib/dhcp/iface_mgr.cc
@@ -20,7 +20,7 @@
#include <string.h>
#ifdef _WIN32
#include <ws2tcpip.h>
-#include <netioapi.h>
+#include <iphlpapi.h>
#else
#include <netinet/in.h>
#include <arpa/inet.h>
diff --git a/src/lib/dhcp/iface_mgr.h b/src/lib/dhcp/iface_mgr.h
index 1951f8c..69cfb6a 100644
--- a/src/lib/dhcp/iface_mgr.h
+++ b/src/lib/dhcp/iface_mgr.h
@@ -89,7 +89,7 @@ public:
/// Iface structure represents network interface with all useful
/// information, like name, interface index, MAC address and
/// list of assigned addresses
- class Iface {
+ class ISC_LIBDHCP_API Iface {
public:
/// @brief Iface constructor.
///
diff --git a/src/lib/dns/python/dll.h b/src/lib/dns/python/dll.h
index 53352e6..846fa82 100644
--- a/src/lib/dns/python/dll.h
+++ b/src/lib/dns/python/dll.h
@@ -25,6 +25,16 @@
#endif
#endif
+#if !defined(_WIN32) || defined(USE_STATIC_LINK) || defined(USE_STATIC_WRAPPER)
+#define ISC_PYTHON_WRAPPER_API
+#else
+#ifdef ISC_LIBDNS_PYTHON_EXPORT
+#define ISC_PYTHON_WRAPPER_API __declspec(dllexport)
+#else
+#define ISC_PYTHON_WRAPPER_API __declspec(dllimport)
+#endif
+#endif
+
#endif // __LIBDNS_PYTHON_H
// Local Variables:
diff --git a/src/lib/dns/python/edns_python.cc b/src/lib/dns/python/edns_python.cc
index 54749c1..99097b7 100644
--- a/src/lib/dns/python/edns_python.cc
+++ b/src/lib/dns/python/edns_python.cc
@@ -365,14 +365,14 @@ ISC_LIBDNS_PYTHON_API PyTypeObject edns_type = {
0 // tp_version_tag
};
-PyObject*
+ISC_LIBDNS_PYTHON_API PyObject*
createEDNSObject(const EDNS& source) {
EDNSContainer container(PyObject_New(s_EDNS, &edns_type));
container.set(new EDNS(source));
return (container.release());
}
-bool
+ISC_LIBDNS_PYTHON_API bool
PyEDNS_Check(PyObject* obj) {
if (obj == NULL) {
isc_throw(PyCPPWrapperException, "obj argument NULL in typecheck");
@@ -380,7 +380,7 @@ PyEDNS_Check(PyObject* obj) {
return (PyObject_TypeCheck(obj, &edns_type));
}
-const EDNS&
+ISC_LIBDNS_PYTHON_API const EDNS&
PyEDNS_ToEDNS(const PyObject* edns_obj) {
if (edns_obj == NULL) {
isc_throw(PyCPPWrapperException,
diff --git a/src/lib/dns/python/edns_python.h b/src/lib/dns/python/edns_python.h
index e612a5f..2517870 100644
--- a/src/lib/dns/python/edns_python.h
+++ b/src/lib/dns/python/edns_python.h
@@ -34,7 +34,7 @@ extern ISC_LIBDNS_PYTHON_API PyTypeObject edns_type;
/// returns a NULL pointer).
/// This function is expected to be called within a try block
/// followed by necessary setup for python exception.
-PyObject* createEDNSObject(const EDNS& source);
+ISC_LIBDNS_PYTHON_API PyObject* createEDNSObject(const EDNS& source);
/// \brief Checks if the given python object is a EDNS object
///
@@ -42,7 +42,7 @@ PyObject* createEDNSObject(const EDNS& source);
///
/// \param obj The object to check the type of
/// \return true if the object is of type EDNS, false otherwise
-bool PyEDNS_Check(PyObject* obj);
+ISC_LIBDNS_PYTHON_API bool PyEDNS_Check(PyObject* obj);
/// \brief Returns a reference to the EDNS object contained within the given
/// Python object.
@@ -54,7 +54,7 @@ bool PyEDNS_Check(PyObject* obj);
/// may be destroyed, the caller must copy it itself.
///
/// \param edns_obj The edns object to convert
-const EDNS& PyEDNS_ToEDNS(const PyObject* edns_obj);
+ISC_LIBDNS_PYTHON_API const EDNS& PyEDNS_ToEDNS(const PyObject* edns_obj);
} // namespace python
} // namespace dns
diff --git a/src/lib/dns/python/messagerenderer_python.cc b/src/lib/dns/python/messagerenderer_python.cc
index 16a5ed8..8da00db 100644
--- a/src/lib/dns/python/messagerenderer_python.cc
+++ b/src/lib/dns/python/messagerenderer_python.cc
@@ -241,7 +241,7 @@ ISC_LIBDNS_PYTHON_API PyTypeObject messagerenderer_type = {
// copy the existing buffer into a new one, then create a new renderer with
// that buffer?
-bool
+ISC_LIBDNS_PYTHON_API bool
PyMessageRenderer_Check(PyObject* obj) {
if (obj == NULL) {
isc_throw(PyCPPWrapperException, "obj argument NULL in typecheck");
@@ -249,7 +249,7 @@ PyMessageRenderer_Check(PyObject* obj) {
return (PyObject_TypeCheck(obj, &messagerenderer_type));
}
-MessageRenderer&
+ISC_LIBDNS_PYTHON_API MessageRenderer&
PyMessageRenderer_ToMessageRenderer(PyObject* messagerenderer_obj) {
if (messagerenderer_obj == NULL) {
isc_throw(PyCPPWrapperException,
diff --git a/src/lib/dns/python/messagerenderer_python.h b/src/lib/dns/python/messagerenderer_python.h
index 5d1586b..d13ecec 100644
--- a/src/lib/dns/python/messagerenderer_python.h
+++ b/src/lib/dns/python/messagerenderer_python.h
@@ -34,7 +34,7 @@ extern ISC_LIBDNS_PYTHON_API PyTypeObject messagerenderer_type;
///
/// \param obj The object to check the type of
/// \return true if the object is of type MessageRenderer, false otherwise
-bool PyMessageRenderer_Check(PyObject* obj);
+ISC_LIBDNS_PYTHON_API bool PyMessageRenderer_Check(PyObject* obj);
/// \brief Returns a reference to the MessageRenderer object contained within the given
/// Python object.
@@ -46,7 +46,8 @@ bool PyMessageRenderer_Check(PyObject* obj);
/// may be destroyed, the caller must copy it itself.
///
/// \param messagerenderer_obj The messagerenderer object to convert
-MessageRenderer& PyMessageRenderer_ToMessageRenderer(PyObject* messagerenderer_obj);
+ISC_LIBDNS_PYTHON_API MessageRenderer&
+PyMessageRenderer_ToMessageRenderer(PyObject* messagerenderer_obj);
} // namespace python
} // namespace dns
diff --git a/src/lib/dns/python/name_python.cc b/src/lib/dns/python/name_python.cc
index f9dd6f0..d0815bb 100644
--- a/src/lib/dns/python/name_python.cc
+++ b/src/lib/dns/python/name_python.cc
@@ -673,7 +673,7 @@ createNameObject(const Name& source) {
return (container.release());
}
-bool
+ISC_LIBDNS_PYTHON_API bool
PyName_Check(PyObject* obj) {
if (obj == NULL) {
isc_throw(PyCPPWrapperException, "obj argument NULL in typecheck");
@@ -681,7 +681,7 @@ PyName_Check(PyObject* obj) {
return (PyObject_TypeCheck(obj, &name_type));
}
-const Name&
+ISC_LIBDNS_PYTHON_API const Name&
PyName_ToName(const PyObject* name_obj) {
if (name_obj == NULL) {
isc_throw(PyCPPWrapperException,
diff --git a/src/lib/dns/python/name_python.h b/src/lib/dns/python/name_python.h
index 066c8ae..90f9e6e 100644
--- a/src/lib/dns/python/name_python.h
+++ b/src/lib/dns/python/name_python.h
@@ -59,7 +59,7 @@ ISC_LIBDNS_PYTHON_API PyObject* createNameObject(const Name& source);
///
/// \param obj The object to check the type of
/// \return true if the object is of type Name, false otherwise
-bool PyName_Check(PyObject* obj);
+ISC_LIBDNS_PYTHON_API bool PyName_Check(PyObject* obj);
/// \brief Returns a reference to the Name object contained within the given
/// Python object.
@@ -71,7 +71,7 @@ bool PyName_Check(PyObject* obj);
/// may be destroyed, the caller must copy it itself.
///
/// \param name_obj The name object to convert
-const Name& PyName_ToName(const PyObject* name_obj);
+ISC_LIBDNS_PYTHON_API const Name& PyName_ToName(const PyObject* name_obj);
} // namespace python
} // namespace dns
diff --git a/src/lib/dns/python/opcode_python.cc b/src/lib/dns/python/opcode_python.cc
index 7887964..3f3038c 100644
--- a/src/lib/dns/python/opcode_python.cc
+++ b/src/lib/dns/python/opcode_python.cc
@@ -343,14 +343,14 @@ ISC_LIBDNS_PYTHON_API PyTypeObject opcode_type = {
0 // tp_version_tag
};
-PyObject*
+ISC_LIBDNS_PYTHON_API PyObject*
createOpcodeObject(const Opcode& source) {
OpcodeContainer container(PyObject_New(s_Opcode, &opcode_type));
container.set(new Opcode(source));
return (container.release());
}
-bool
+ISC_LIBDNS_PYTHON_API bool
PyOpcode_Check(PyObject* obj) {
if (obj == NULL) {
isc_throw(PyCPPWrapperException, "obj argument NULL in typecheck");
@@ -358,7 +358,7 @@ PyOpcode_Check(PyObject* obj) {
return (PyObject_TypeCheck(obj, &opcode_type));
}
-const Opcode&
+ISC_LIBDNS_PYTHON_API const Opcode&
PyOpcode_ToOpcode(const PyObject* opcode_obj) {
if (opcode_obj == NULL) {
isc_throw(PyCPPWrapperException,
diff --git a/src/lib/dns/python/opcode_python.h b/src/lib/dns/python/opcode_python.h
index d1efefa..6656583 100644
--- a/src/lib/dns/python/opcode_python.h
+++ b/src/lib/dns/python/opcode_python.h
@@ -34,7 +34,7 @@ extern ISC_LIBDNS_PYTHON_API PyTypeObject opcode_type;
/// returns a NULL pointer).
/// This function is expected to be called within a try block
/// followed by necessary setup for python exception.
-PyObject* createOpcodeObject(const Opcode& source);
+ISC_LIBDNS_PYTHON_API PyObject* createOpcodeObject(const Opcode& source);
/// \brief Checks if the given python object is a Opcode object
///
@@ -42,7 +42,7 @@ PyObject* createOpcodeObject(const Opcode& source);
///
/// \param obj The object to check the type of
/// \return true if the object is of type Opcode, false otherwise
-bool PyOpcode_Check(PyObject* obj);
+ISC_LIBDNS_PYTHON_API bool PyOpcode_Check(PyObject* obj);
/// \brief Returns a reference to the Opcode object contained within the given
/// Python object.
@@ -54,7 +54,8 @@ bool PyOpcode_Check(PyObject* obj);
/// may be destroyed, the caller must copy it itself.
///
/// \param opcode_obj The opcode object to convert
-const Opcode& PyOpcode_ToOpcode(const PyObject* opcode_obj);
+ISC_LIBDNS_PYTHON_API const Opcode&
+PyOpcode_ToOpcode(const PyObject* opcode_obj);
} // namespace python
} // namespace dns
diff --git a/src/lib/dns/python/pydnspp_common.cc b/src/lib/dns/python/pydnspp_common.cc
index 32da3c4..ef6a511 100644
--- a/src/lib/dns/python/pydnspp_common.cc
+++ b/src/lib/dns/python/pydnspp_common.cc
@@ -56,7 +56,7 @@ ISC_LIBDNS_PYTHON_API PyObject* po_InvalidParameter;
ISC_LIBDNS_PYTHON_API PyObject* po_DNSMessageBADVERS;
-int
+ISC_LIBDNS_PYTHON_API int
readDataFromSequence(uint8_t *data, size_t len, PyObject* sequence) {
PyObject* el = NULL;
for (size_t i = 0; i < len; i++) {
diff --git a/src/lib/dns/python/pydnspp_common.h b/src/lib/dns/python/pydnspp_common.h
index fec8ae8..2a749e4 100644
--- a/src/lib/dns/python/pydnspp_common.h
+++ b/src/lib/dns/python/pydnspp_common.h
@@ -42,6 +42,7 @@ extern ISC_LIBDNS_PYTHON_API PyObject* po_DNSMessageBADVERS;
// The current implementation removes read items from the
// head of the sequence, unless it fails (and returns -1), in which
// case nothing is removed
+ISC_LIBDNS_PYTHON_API
int readDataFromSequence(uint8_t *data, size_t len, PyObject* sequence);
ISC_LIBDNS_PYTHON_API
diff --git a/src/lib/dns/python/question_python.cc b/src/lib/dns/python/question_python.cc
index 1a4ad61..c0239ba 100644
--- a/src/lib/dns/python/question_python.cc
+++ b/src/lib/dns/python/question_python.cc
@@ -292,7 +292,7 @@ ISC_LIBDNS_PYTHON_API PyTypeObject question_type = {
0 // tp_version_tag
};
-PyObject*
+ISC_LIBDNS_PYTHON_API PyObject*
createQuestionObject(const Question& source) {
s_Question* question =
static_cast<s_Question*>(question_type.tp_alloc(&question_type, 0));
@@ -300,7 +300,7 @@ createQuestionObject(const Question& source) {
return (question);
}
-bool
+ISC_LIBDNS_PYTHON_API bool
PyQuestion_Check(PyObject* obj) {
if (obj == NULL) {
isc_throw(PyCPPWrapperException, "obj argument NULL in typecheck");
@@ -308,7 +308,7 @@ PyQuestion_Check(PyObject* obj) {
return (PyObject_TypeCheck(obj, &question_type));
}
-const Question&
+ISC_LIBDNS_PYTHON_API const Question&
PyQuestion_ToQuestion(const PyObject* question_obj) {
if (question_obj == NULL) {
isc_throw(PyCPPWrapperException,
diff --git a/src/lib/dns/python/question_python.h b/src/lib/dns/python/question_python.h
index 1dcbae1..0fd9f6d 100644
--- a/src/lib/dns/python/question_python.h
+++ b/src/lib/dns/python/question_python.h
@@ -36,7 +36,7 @@ extern ISC_LIBDNS_PYTHON_API PyTypeObject question_type;
/// returns a NULL pointer).
/// This function is expected to be called within a try block
/// followed by necessary setup for python exception.
-PyObject* createQuestionObject(const Question& source);
+ISC_LIBDNS_PYTHON_API PyObject* createQuestionObject(const Question& source);
/// \brief Checks if the given python object is a Question object
///
@@ -44,7 +44,7 @@ PyObject* createQuestionObject(const Question& source);
///
/// \param obj The object to check the type of
/// \return true if the object is of type Question, false otherwise
-bool PyQuestion_Check(PyObject* obj);
+ISC_LIBDNS_PYTHON_API bool PyQuestion_Check(PyObject* obj);
/// \brief Returns a reference to the Question object contained within the given
/// Python object.
@@ -56,7 +56,8 @@ bool PyQuestion_Check(PyObject* obj);
/// may be destroyed, the caller must copy it itself.
///
/// \param question_obj The question object to convert
-const Question& PyQuestion_ToQuestion(const PyObject* question_obj);
+ISC_LIBDNS_PYTHON_API const Question&
+PyQuestion_ToQuestion(const PyObject* question_obj);
} // namespace python
} // namespace dns
diff --git a/src/lib/dns/python/rcode_python.cc b/src/lib/dns/python/rcode_python.cc
index d409fdf..615851f 100644
--- a/src/lib/dns/python/rcode_python.cc
+++ b/src/lib/dns/python/rcode_python.cc
@@ -383,14 +383,14 @@ ISC_LIBDNS_PYTHON_API PyTypeObject rcode_type = {
0 // tp_version_tag
};
-PyObject*
+ISC_LIBDNS_PYTHON_API PyObject*
createRcodeObject(const Rcode& source) {
RcodeContainer container(PyObject_New(s_Rcode, &rcode_type));
container.set(new Rcode(source));
return (container.release());
}
-bool
+ISC_LIBDNS_PYTHON_API bool
PyRcode_Check(PyObject* obj) {
if (obj == NULL) {
isc_throw(PyCPPWrapperException, "obj argument NULL in typecheck");
@@ -398,7 +398,7 @@ PyRcode_Check(PyObject* obj) {
return (PyObject_TypeCheck(obj, &rcode_type));
}
-const Rcode&
+ISC_LIBDNS_PYTHON_API const Rcode&
PyRcode_ToRcode(const PyObject* rcode_obj) {
if (rcode_obj == NULL) {
isc_throw(PyCPPWrapperException,
diff --git a/src/lib/dns/python/rcode_python.h b/src/lib/dns/python/rcode_python.h
index 51b805f..a7e850c 100644
--- a/src/lib/dns/python/rcode_python.h
+++ b/src/lib/dns/python/rcode_python.h
@@ -34,7 +34,7 @@ extern ISC_LIBDNS_PYTHON_API PyTypeObject rcode_type;
/// returns a NULL pointer).
/// This function is expected to be called within a try block
/// followed by necessary setup for python exception.
-PyObject* createRcodeObject(const Rcode& source);
+ISC_LIBDNS_PYTHON_API PyObject* createRcodeObject(const Rcode& source);
/// \brief Checks if the given python object is a Rcode object
///
@@ -42,7 +42,7 @@ PyObject* createRcodeObject(const Rcode& source);
///
/// \param obj The object to check the type of
/// \return true if the object is of type Rcode, false otherwise
-bool PyRcode_Check(PyObject* obj);
+ISC_LIBDNS_PYTHON_API bool PyRcode_Check(PyObject* obj);
/// \brief Returns a reference to the Rcode object contained within the given
/// Python object.
@@ -54,7 +54,7 @@ bool PyRcode_Check(PyObject* obj);
/// may be destroyed, the caller must copy it itself.
///
/// \param rcode_obj The rcode object to convert
-const Rcode& PyRcode_ToRcode(const PyObject* rcode_obj);
+ISC_LIBDNS_PYTHON_API const Rcode& PyRcode_ToRcode(const PyObject* rcode_obj);
} // namespace python
} // namespace dns
diff --git a/src/lib/dns/python/rdata_python.cc b/src/lib/dns/python/rdata_python.cc
index baf88f0..8b0ed70 100644
--- a/src/lib/dns/python/rdata_python.cc
+++ b/src/lib/dns/python/rdata_python.cc
@@ -344,7 +344,7 @@ ISC_LIBDNS_PYTHON_API PyTypeObject rdata_type = {
0 // tp_version_tag
};
-PyObject*
+ISC_LIBDNS_PYTHON_API PyObject*
createRdataObject(ConstRdataPtr source) {
s_Rdata* py_rdata =
static_cast<s_Rdata*>(rdata_type.tp_alloc(&rdata_type, 0));
@@ -356,7 +356,7 @@ createRdataObject(ConstRdataPtr source) {
return (py_rdata);
}
-bool
+ISC_LIBDNS_PYTHON_API bool
PyRdata_Check(PyObject* obj) {
if (obj == NULL) {
isc_throw(PyCPPWrapperException, "obj argument NULL in typecheck");
@@ -364,7 +364,7 @@ PyRdata_Check(PyObject* obj) {
return (PyObject_TypeCheck(obj, &rdata_type));
}
-const Rdata&
+ISC_LIBDNS_PYTHON_API const Rdata&
PyRdata_ToRdata(const PyObject* rdata_obj) {
if (rdata_obj == NULL) {
isc_throw(PyCPPWrapperException,
diff --git a/src/lib/dns/python/rdata_python.h b/src/lib/dns/python/rdata_python.h
index 8688cc8..3b8fcf2 100644
--- a/src/lib/dns/python/rdata_python.h
+++ b/src/lib/dns/python/rdata_python.h
@@ -37,7 +37,7 @@ extern ISC_LIBDNS_PYTHON_API PyTypeObject rdata_type;
/// returns a NULL pointer).
/// This function is expected to be called within a try block
/// followed by necessary setup for python exception.
-PyObject* createRdataObject(isc::dns::rdata::ConstRdataPtr source);
+ISC_LIBDNS_PYTHON_API PyObject* createRdataObject(isc::dns::rdata::ConstRdataPtr source);
/// \brief Checks if the given python object is a Rdata object
///
@@ -45,7 +45,7 @@ PyObject* createRdataObject(isc::dns::rdata::ConstRdataPtr source);
///
/// \param obj The object to check the type of
/// \return true if the object is of type Rdata, false otherwise
-bool PyRdata_Check(PyObject* obj);
+ISC_LIBDNS_PYTHON_API bool PyRdata_Check(PyObject* obj);
/// \brief Returns a reference to the Rdata object contained within the given
/// Python object.
@@ -57,7 +57,8 @@ bool PyRdata_Check(PyObject* obj);
/// may be destroyed, the caller must copy it itself.
///
/// \param rdata_obj The rdata object to convert
-const isc::dns::rdata::Rdata& PyRdata_ToRdata(const PyObject* rdata_obj);
+ISC_LIBDNS_PYTHON_API const isc::dns::rdata::Rdata&
+PyRdata_ToRdata(const PyObject* rdata_obj);
} // namespace python
} // namespace dns
diff --git a/src/lib/dns/python/rrclass_python.cc b/src/lib/dns/python/rrclass_python.cc
index e78dd46..1f9daa8 100644
--- a/src/lib/dns/python/rrclass_python.cc
+++ b/src/lib/dns/python/rrclass_python.cc
@@ -345,7 +345,7 @@ ISC_LIBDNS_PYTHON_API PyTypeObject rrclass_type = {
0 // tp_version_tag
};
-PyObject*
+ISC_LIBDNS_PYTHON_API PyObject*
createRRClassObject(const RRClass& source) {
RRClassContainer container(PyObject_New(s_RRClass, &rrclass_type));
container.set(new RRClass(source));
@@ -353,7 +353,7 @@ createRRClassObject(const RRClass& source) {
}
-bool
+ISC_LIBDNS_PYTHON_API bool
PyRRClass_Check(PyObject* obj) {
if (obj == NULL) {
isc_throw(PyCPPWrapperException, "obj argument NULL in typecheck");
@@ -361,7 +361,7 @@ PyRRClass_Check(PyObject* obj) {
return (PyObject_TypeCheck(obj, &rrclass_type));
}
-const RRClass&
+ISC_LIBDNS_PYTHON_API const RRClass&
PyRRClass_ToRRClass(const PyObject* rrclass_obj) {
if (rrclass_obj == NULL) {
isc_throw(PyCPPWrapperException,
diff --git a/src/lib/dns/python/rrclass_python.h b/src/lib/dns/python/rrclass_python.h
index d71aa97..e39eb38 100644
--- a/src/lib/dns/python/rrclass_python.h
+++ b/src/lib/dns/python/rrclass_python.h
@@ -37,7 +37,7 @@ extern ISC_LIBDNS_PYTHON_API PyTypeObject rrclass_type;
/// returns a NULL pointer).
/// This function is expected to be called within a try block
/// followed by necessary setup for python exception.
-PyObject* createRRClassObject(const RRClass& source);
+ISC_LIBDNS_PYTHON_API PyObject* createRRClassObject(const RRClass& source);
/// \brief Checks if the given python object is a RRClass object
///
@@ -45,7 +45,7 @@ PyObject* createRRClassObject(const RRClass& source);
///
/// \param obj The object to check the type of
/// \return true if the object is of type RRClass, false otherwise
-bool PyRRClass_Check(PyObject* obj);
+ISC_LIBDNS_PYTHON_API bool PyRRClass_Check(PyObject* obj);
/// \brief Returns a reference to the RRClass object contained within the given
/// Python object.
@@ -57,7 +57,8 @@ bool PyRRClass_Check(PyObject* obj);
/// may be destroyed, the caller must copy it itself.
///
/// \param rrclass_obj The rrclass object to convert
-const RRClass& PyRRClass_ToRRClass(const PyObject* rrclass_obj);
+ISC_LIBDNS_PYTHON_API const RRClass&
+PyRRClass_ToRRClass(const PyObject* rrclass_obj);
} // namespace python
diff --git a/src/lib/dns/python/rrset_python.cc b/src/lib/dns/python/rrset_python.cc
index 6a13e2c..9274bd4 100644
--- a/src/lib/dns/python/rrset_python.cc
+++ b/src/lib/dns/python/rrset_python.cc
@@ -416,7 +416,7 @@ ISC_LIBDNS_PYTHON_API PyTypeObject rrset_type = {
0 // tp_version_tag
};
-PyObject*
+ISC_LIBDNS_PYTHON_API PyObject*
createRRsetObject(const AbstractRRset& source) {
// RRsets are noncopyable, so as a workaround we recreate a new one
@@ -444,7 +444,7 @@ createRRsetObject(const AbstractRRset& source) {
return (py_rrset);
}
-bool
+ISC_LIBDNS_PYTHON_API bool
PyRRset_Check(PyObject* obj) {
if (obj == NULL) {
isc_throw(PyCPPWrapperException, "obj argument NULL in typecheck");
@@ -452,13 +452,13 @@ PyRRset_Check(PyObject* obj) {
return (PyObject_TypeCheck(obj, &rrset_type));
}
-AbstractRRset&
+ISC_LIBDNS_PYTHON_API AbstractRRset&
PyRRset_ToRRset(PyObject* rrset_obj) {
s_RRset* rrset = static_cast<s_RRset*>(rrset_obj);
return (*rrset->cppobj);
}
-RRsetPtr
+ISC_LIBDNS_PYTHON_API RRsetPtr
PyRRset_ToRRsetPtr(PyObject* rrset_obj) {
if (rrset_obj == NULL) {
isc_throw(PyCPPWrapperException,
diff --git a/src/lib/dns/python/rrset_python.h b/src/lib/dns/python/rrset_python.h
index f32d2b1..547b205 100644
--- a/src/lib/dns/python/rrset_python.h
+++ b/src/lib/dns/python/rrset_python.h
@@ -37,7 +37,7 @@ extern ISC_LIBDNS_PYTHON_API PyTypeObject rrset_type;
/// returns a NULL pointer).
/// This function is expected to be called within a try block
/// followed by necessary setup for python exception.
-PyObject* createRRsetObject(const AbstractRRset& source);
+ISC_LIBDNS_PYTHON_API PyObject* createRRsetObject(const AbstractRRset& source);
/// \brief Checks if the given python object is a RRset object
///
@@ -45,7 +45,7 @@ PyObject* createRRsetObject(const AbstractRRset& source);
///
/// \param obj The object to check the type of
/// \return true if the object is of type RRset, false otherwise
-bool PyRRset_Check(PyObject* obj);
+ISC_LIBDNS_PYTHON_API bool PyRRset_Check(PyObject* obj);
/// \brief Returns a reference to the RRset object contained within the given
/// Python object.
@@ -57,7 +57,7 @@ bool PyRRset_Check(PyObject* obj);
/// may be destroyed, the caller must copy it itself.
///
/// \param rrset_obj The rrset object to convert
-AbstractRRset& PyRRset_ToRRset(PyObject* rrset_obj);
+ISC_LIBDNS_PYTHON_API AbstractRRset& PyRRset_ToRRset(PyObject* rrset_obj);
/// \brief Returns the shared_ptr of the RRset object contained within the
/// given Python object.
@@ -66,7 +66,7 @@ AbstractRRset& PyRRset_ToRRset(PyObject* rrset_obj);
/// either the right call to ParseTuple("O!"), or with PyRRset_Check()
///
/// \param rrset_obj The rrset object to convert
-RRsetPtr PyRRset_ToRRsetPtr(PyObject* rrset_obj);
+ISC_LIBDNS_PYTHON_API RRsetPtr PyRRset_ToRRsetPtr(PyObject* rrset_obj);
} // namespace python
diff --git a/src/lib/dns/python/rrttl_python.cc b/src/lib/dns/python/rrttl_python.cc
index b54068e..fb2d930 100644
--- a/src/lib/dns/python/rrttl_python.cc
+++ b/src/lib/dns/python/rrttl_python.cc
@@ -293,14 +293,14 @@ ISC_LIBDNS_PYTHON_API PyTypeObject rrttl_type = {
0 // tp_version_tag
};
-PyObject*
+ISC_LIBDNS_PYTHON_API PyObject*
createRRTTLObject(const RRTTL& source) {
RRTTLContainer container(PyObject_New(s_RRTTL, &rrttl_type));
container.set(new RRTTL(source));
return (container.release());
}
-bool
+ISC_LIBDNS_PYTHON_API bool
PyRRTTL_Check(PyObject* obj) {
if (obj == NULL) {
isc_throw(PyCPPWrapperException, "obj argument NULL in typecheck");
@@ -308,7 +308,7 @@ PyRRTTL_Check(PyObject* obj) {
return (PyObject_TypeCheck(obj, &rrttl_type));
}
-const RRTTL&
+ISC_LIBDNS_PYTHON_API const RRTTL&
PyRRTTL_ToRRTTL(const PyObject* rrttl_obj) {
if (rrttl_obj == NULL) {
isc_throw(PyCPPWrapperException,
diff --git a/src/lib/dns/python/rrttl_python.h b/src/lib/dns/python/rrttl_python.h
index 3683a89..0c694dc 100644
--- a/src/lib/dns/python/rrttl_python.h
+++ b/src/lib/dns/python/rrttl_python.h
@@ -37,7 +37,7 @@ extern ISC_LIBDNS_PYTHON_API PyTypeObject rrttl_type;
/// returns a NULL pointer).
/// This function is expected to be called within a try block
/// followed by necessary setup for python exception.
-PyObject* createRRTTLObject(const RRTTL& source);
+ISC_LIBDNS_PYTHON_API PyObject* createRRTTLObject(const RRTTL& source);
/// \brief Checks if the given python object is a RRTTL object
///
@@ -45,7 +45,7 @@ PyObject* createRRTTLObject(const RRTTL& source);
///
/// \param obj The object to check the type of
/// \return true if the object is of type RRTTL, false otherwise
-bool PyRRTTL_Check(PyObject* obj);
+ISC_LIBDNS_PYTHON_API bool PyRRTTL_Check(PyObject* obj);
/// \brief Returns a reference to the RRTTL object contained within the given
/// Python object.
@@ -57,7 +57,7 @@ bool PyRRTTL_Check(PyObject* obj);
/// may be destroyed, the caller must copy it itself.
///
/// \param rrttl_obj The rrttl object to convert
-const RRTTL& PyRRTTL_ToRRTTL(const PyObject* rrttl_obj);
+ISC_LIBDNS_PYTHON_API const RRTTL& PyRRTTL_ToRRTTL(const PyObject* rrttl_obj);
} // namespace python
} // namespace dns
diff --git a/src/lib/dns/python/rrtype_python.cc b/src/lib/dns/python/rrtype_python.cc
index b131b27..d5afdcc 100644
--- a/src/lib/dns/python/rrtype_python.cc
+++ b/src/lib/dns/python/rrtype_python.cc
@@ -435,14 +435,14 @@ ISC_LIBDNS_PYTHON_API PyTypeObject rrtype_type = {
0 // tp_version_tag
};
-PyObject*
+ISC_LIBDNS_PYTHON_API PyObject*
createRRTypeObject(const RRType& source) {
RRTypeContainer container(PyObject_New(s_RRType, &rrtype_type));
container.set(new RRType(source));
return (container.release());
}
-bool
+ISC_LIBDNS_PYTHON_API bool
PyRRType_Check(PyObject* obj) {
if (obj == NULL) {
isc_throw(PyCPPWrapperException, "obj argument NULL in typecheck");
@@ -450,7 +450,7 @@ PyRRType_Check(PyObject* obj) {
return (PyObject_TypeCheck(obj, &rrtype_type));
}
-const RRType&
+ISC_LIBDNS_PYTHON_API const RRType&
PyRRType_ToRRType(const PyObject* rrtype_obj) {
if (rrtype_obj == NULL) {
isc_throw(PyCPPWrapperException,
diff --git a/src/lib/dns/python/rrtype_python.h b/src/lib/dns/python/rrtype_python.h
index 01b4e20..8c8b8e7 100644
--- a/src/lib/dns/python/rrtype_python.h
+++ b/src/lib/dns/python/rrtype_python.h
@@ -37,7 +37,7 @@ extern ISC_LIBDNS_PYTHON_API PyTypeObject rrtype_type;
/// returns a NULL pointer).
/// This function is expected to be called within a try block
/// followed by necessary setup for python exception.
-PyObject* createRRTypeObject(const RRType& source);
+ISC_LIBDNS_PYTHON_API PyObject* createRRTypeObject(const RRType& source);
/// \brief Checks if the given python object is a RRType object
///
@@ -45,7 +45,7 @@ PyObject* createRRTypeObject(const RRType& source);
///
/// \param obj The object to check the type of
/// \return true if the object is of type RRType, false otherwise
-bool PyRRType_Check(PyObject* obj);
+ISC_LIBDNS_PYTHON_API bool PyRRType_Check(PyObject* obj);
/// \brief Returns a reference to the RRType object contained within the given
/// Python object.
@@ -57,7 +57,8 @@ bool PyRRType_Check(PyObject* obj);
/// may be destroyed, the caller must copy it itself.
///
/// \param rrtype_obj The rrtype object to convert
-const RRType& PyRRType_ToRRType(const PyObject* rrtype_obj);
+ISC_LIBDNS_PYTHON_API const RRType&
+PyRRType_ToRRType(const PyObject* rrtype_obj);
} // namespace python
diff --git a/src/lib/dns/python/serial_python.cc b/src/lib/dns/python/serial_python.cc
index 7ced27c..6fda6e5 100644
--- a/src/lib/dns/python/serial_python.cc
+++ b/src/lib/dns/python/serial_python.cc
@@ -252,14 +252,14 @@ ISC_LIBDNS_PYTHON_API PyTypeObject serial_type = {
0 // tp_version_tag
};
-PyObject*
+ISC_LIBDNS_PYTHON_API PyObject*
createSerialObject(const Serial& source) {
SerialContainer container(PyObject_New(s_Serial, &serial_type));
container.set(new Serial(source));
return (container.release());
}
-bool
+ISC_LIBDNS_PYTHON_API bool
PySerial_Check(PyObject* obj) {
if (obj == NULL) {
isc_throw(PyCPPWrapperException,
@@ -268,7 +268,7 @@ PySerial_Check(PyObject* obj) {
return (PyObject_TypeCheck(obj, &serial_type));
}
-const Serial&
+ISC_LIBDNS_PYTHON_API const Serial&
PySerial_ToSerial(const PyObject* serial_obj) {
if (serial_obj == NULL) {
isc_throw(PyCPPWrapperException,
diff --git a/src/lib/dns/python/serial_python.h b/src/lib/dns/python/serial_python.h
index 22ee3eb..cb5241c 100644
--- a/src/lib/dns/python/serial_python.h
+++ b/src/lib/dns/python/serial_python.h
@@ -34,7 +34,7 @@ extern ISC_LIBDNS_PYTHON_API PyTypeObject serial_type;
/// returns a NULL pointer).
/// This function is expected to be called within a try block
/// followed by necessary setup for python exception.
-PyObject* createSerialObject(const Serial& source);
+ISC_LIBDNS_PYTHON_API PyObject* createSerialObject(const Serial& source);
/// \brief Checks if the given python object is a Serial object
///
@@ -42,7 +42,7 @@ PyObject* createSerialObject(const Serial& source);
///
/// \param obj The object to check the type of
/// \return true if the object is of type Serial, false otherwise
-bool PySerial_Check(PyObject* obj);
+ISC_LIBDNS_PYTHON_API bool PySerial_Check(PyObject* obj);
/// \brief Returns a reference to the Serial object contained within the given
/// Python object.
@@ -54,7 +54,8 @@ bool PySerial_Check(PyObject* obj);
/// may be destroyed, the caller must copy it itself.
///
/// \param Serial_obj The Serial object to convert
-const Serial& PySerial_ToSerial(const PyObject* Serial_obj);
+ISC_LIBDNS_PYTHON_API const Serial&
+PySerial_ToSerial(const PyObject* Serial_obj);
} // namespace python
} // namespace dns
diff --git a/src/lib/dns/python/tsig_python.cc b/src/lib/dns/python/tsig_python.cc
index 932f0bd..e149c4b 100644
--- a/src/lib/dns/python/tsig_python.cc
+++ b/src/lib/dns/python/tsig_python.cc
@@ -304,7 +304,7 @@ ISC_LIBDNS_PYTHON_API PyTypeObject tsigcontext_type = {
0 // tp_version_tag
};
-bool
+ISC_LIBDNS_PYTHON_API bool
PyTSIGContext_Check(PyObject* obj) {
if (obj == NULL) {
isc_throw(PyCPPWrapperException, "obj argument NULL in typecheck");
@@ -312,7 +312,7 @@ PyTSIGContext_Check(PyObject* obj) {
return (PyObject_TypeCheck(obj, &tsigcontext_type));
}
-TSIGContext&
+ISC_LIBDNS_PYTHON_API TSIGContext&
PyTSIGContext_ToTSIGContext(PyObject* tsigcontext_obj) {
if (tsigcontext_obj == NULL) {
isc_throw(PyCPPWrapperException,
diff --git a/src/lib/dns/python/tsig_python.h b/src/lib/dns/python/tsig_python.h
index 455df3a..b953522 100644
--- a/src/lib/dns/python/tsig_python.h
+++ b/src/lib/dns/python/tsig_python.h
@@ -36,7 +36,7 @@ extern ISC_LIBDNS_PYTHON_API PyObject* po_TSIGContextError;
///
/// \param obj The object to check the type of
/// \return true if the object is of type TSIGContext, false otherwise
-bool PyTSIGContext_Check(PyObject* obj);
+ISC_LIBDNS_PYTHON_API bool PyTSIGContext_Check(PyObject* obj);
/// \brief Returns a reference to the TSIGContext object contained within the given
/// Python object.
@@ -48,7 +48,8 @@ bool PyTSIGContext_Check(PyObject* obj);
/// may be destroyed, the caller must copy it itself.
///
/// \param tsigcontext_obj The tsigcontext object to convert
-TSIGContext& PyTSIGContext_ToTSIGContext(PyObject* tsigcontext_obj);
+ISC_LIBDNS_PYTHON_API TSIGContext&
+PyTSIGContext_ToTSIGContext(PyObject* tsigcontext_obj);
} // namespace python
diff --git a/src/lib/dns/python/tsig_rdata_python.cc b/src/lib/dns/python/tsig_rdata_python.cc
index d93ee34..4475b3e 100644
--- a/src/lib/dns/python/tsig_rdata_python.cc
+++ b/src/lib/dns/python/tsig_rdata_python.cc
@@ -339,14 +339,14 @@ ISC_LIBDNS_PYTHON_API PyTypeObject tsig_type = {
0 // tp_version_tag
};
-PyObject*
+ISC_LIBDNS_PYTHON_API PyObject*
createTSIGObject(const any::TSIG& source) {
TSIGContainer container(PyObject_New(s_TSIG, &tsig_type));
container.set(new any::TSIG(source));
return (container.release());
}
-bool
+ISC_LIBDNS_PYTHON_API bool
PyTSIG_Check(PyObject* obj) {
if (obj == NULL) {
isc_throw(PyCPPWrapperException, "obj argument NULL in typecheck");
@@ -354,7 +354,7 @@ PyTSIG_Check(PyObject* obj) {
return (PyObject_TypeCheck(obj, &tsig_type));
}
-const any::TSIG&
+ISC_LIBDNS_PYTHON_API const any::TSIG&
PyTSIG_ToTSIG(const PyObject* tsig_obj) {
if (tsig_obj == NULL) {
isc_throw(PyCPPWrapperException,
diff --git a/src/lib/dns/python/tsig_rdata_python.h b/src/lib/dns/python/tsig_rdata_python.h
index 31df6d0..c90e114 100644
--- a/src/lib/dns/python/tsig_rdata_python.h
+++ b/src/lib/dns/python/tsig_rdata_python.h
@@ -38,7 +38,8 @@ extern ISC_LIBDNS_PYTHON_API PyTypeObject tsig_type;
/// returns a NULL pointer).
/// This function is expected to be called with in a try block
/// followed by necessary setup for python exception.
-PyObject* createTSIGObject(const rdata::any::TSIG& source);
+ISC_LIBDNS_PYTHON_API PyObject*
+createTSIGObject(const rdata::any::TSIG& source);
/// \brief Checks if the given python object is a TSIG object
///
@@ -46,7 +47,7 @@ PyObject* createTSIGObject(const rdata::any::TSIG& source);
///
/// \param obj The object to check the type of
/// \return true if the object is of type TSIG, false otherwise
-bool PyTSIG_Check(PyObject* obj);
+ISC_LIBDNS_PYTHON_API bool PyTSIG_Check(PyObject* obj);
/// \brief Returns a reference to the TSIG object contained within the given
/// Python object.
@@ -58,7 +59,8 @@ bool PyTSIG_Check(PyObject* obj);
/// may be destroyed, the caller must copy it itself.
///
/// \param tsig_obj The tsig object to convert
-const rdata::any::TSIG& PyTSIG_ToTSIG(const PyObject* tsig_obj);
+ISC_LIBDNS_PYTHON_API const rdata::any::TSIG&
+PyTSIG_ToTSIG(const PyObject* tsig_obj);
} // namespace python
} // namespace dns
diff --git a/src/lib/dns/python/tsigkey_python.cc b/src/lib/dns/python/tsigkey_python.cc
index 9547323..f8b938d 100644
--- a/src/lib/dns/python/tsigkey_python.cc
+++ b/src/lib/dns/python/tsigkey_python.cc
@@ -234,7 +234,7 @@ ISC_LIBDNS_PYTHON_API PyTypeObject tsigkey_type = {
0 // tp_version_tag
};
-bool
+ISC_LIBDNS_PYTHON_API bool
PyTSIGKey_Check(PyObject* obj) {
if (obj == NULL) {
isc_throw(PyCPPWrapperException, "obj argument NULL in typecheck");
@@ -242,7 +242,7 @@ PyTSIGKey_Check(PyObject* obj) {
return (PyObject_TypeCheck(obj, &tsigkey_type));
}
-const TSIGKey&
+ISC_LIBDNS_PYTHON_API const TSIGKey&
PyTSIGKey_ToTSIGKey(const PyObject* tsigkey_obj) {
const s_TSIGKey* tsigkey = static_cast<const s_TSIGKey*>(tsigkey_obj);
return (*tsigkey->cppobj);
@@ -446,7 +446,7 @@ ISC_LIBDNS_PYTHON_API PyTypeObject tsigkeyring_type = {
0 // tp_version_tag
};
-bool
+ISC_LIBDNS_PYTHON_API bool
PyTSIGKeyRing_Check(PyObject* obj) {
if (obj == NULL) {
isc_throw(PyCPPWrapperException, "obj argument NULL in typecheck");
@@ -454,7 +454,7 @@ PyTSIGKeyRing_Check(PyObject* obj) {
return (PyObject_TypeCheck(obj, &tsigkeyring_type));
}
-const TSIGKeyRing&
+ISC_LIBDNS_PYTHON_API const TSIGKeyRing&
PyTSIGKeyRing_ToTSIGKeyRing(const PyObject* tsigkeyring_obj) {
if (tsigkeyring_obj == NULL) {
isc_throw(PyCPPWrapperException,
diff --git a/src/lib/dns/python/tsigkey_python.h b/src/lib/dns/python/tsigkey_python.h
index 07a40a0..b830b96 100644
--- a/src/lib/dns/python/tsigkey_python.h
+++ b/src/lib/dns/python/tsigkey_python.h
@@ -35,7 +35,7 @@ extern ISC_LIBDNS_PYTHON_API PyTypeObject tsigkeyring_type;
///
/// \param obj The object to check the type of
/// \return true if the object is of type TSIGKey, false otherwise
-bool PyTSIGKey_Check(PyObject* obj);
+ISC_LIBDNS_PYTHON_API bool PyTSIGKey_Check(PyObject* obj);
/// \brief Returns a reference to the TSIGKey object contained within the given
/// Python object.
@@ -47,13 +47,14 @@ bool PyTSIGKey_Check(PyObject* obj);
/// may be destroyed, the caller must copy it itself.
///
/// \param tsigkey_obj The tsigkey object to convert
-const TSIGKey& PyTSIGKey_ToTSIGKey(const PyObject* tsigkey_obj);
+ISC_LIBDNS_PYTHON_API const TSIGKey&
+PyTSIGKey_ToTSIGKey(const PyObject* tsigkey_obj);
/// \brief Checks if the given python object is a TSIGKeyRing object
///
/// \param obj The object to check the type of
/// \return true if the object is of type TSIGKeyRing, false otherwise
-bool PyTSIGKeyRing_Check(PyObject* obj);
+ISC_LIBDNS_PYTHON_API bool PyTSIGKeyRing_Check(PyObject* obj);
/// \brief Returns a reference to the TSIGKeyRing object contained within the given
/// Python object.
@@ -65,7 +66,8 @@ bool PyTSIGKeyRing_Check(PyObject* obj);
/// may be destroyed, the caller must copy it itself.
///
/// \param tsigkeyring_obj The tsigkeyring object to convert
-const TSIGKeyRing& PyTSIGKeyRing_ToTSIGKeyRing(const PyObject* tsigkeyring_obj);
+ISC_LIBDNS_PYTHON_API const TSIGKeyRing&
+PyTSIGKeyRing_ToTSIGKeyRing(const PyObject* tsigkeyring_obj);
} // namespace python
} // namespace dns
diff --git a/src/lib/dns/python/tsigrecord_python.cc b/src/lib/dns/python/tsigrecord_python.cc
index 180fbcb..84896b4 100644
--- a/src/lib/dns/python/tsigrecord_python.cc
+++ b/src/lib/dns/python/tsigrecord_python.cc
@@ -264,14 +264,14 @@ ISC_LIBDNS_PYTHON_API PyTypeObject tsigrecord_type = {
0 // tp_version_tag
};
-PyObject*
+ISC_LIBDNS_PYTHON_API PyObject*
createTSIGRecordObject(const TSIGRecord& source) {
TSIGRecordContainer container(PyObject_New(s_TSIGRecord, &tsigrecord_type));
container.set(new TSIGRecord(source));
return (container.release());
}
-bool
+ISC_LIBDNS_PYTHON_API bool
PyTSIGRecord_Check(PyObject* obj) {
if (obj == NULL) {
isc_throw(PyCPPWrapperException, "obj argument NULL in typecheck");
@@ -279,7 +279,7 @@ PyTSIGRecord_Check(PyObject* obj) {
return (PyObject_TypeCheck(obj, &tsigrecord_type));
}
-const TSIGRecord&
+ISC_LIBDNS_PYTHON_API const TSIGRecord&
PyTSIGRecord_ToTSIGRecord(PyObject* tsigrecord_obj) {
if (tsigrecord_obj == NULL) {
isc_throw(PyCPPWrapperException,
diff --git a/src/lib/dns/python/tsigrecord_python.h b/src/lib/dns/python/tsigrecord_python.h
index 892d127..c653812 100644
--- a/src/lib/dns/python/tsigrecord_python.h
+++ b/src/lib/dns/python/tsigrecord_python.h
@@ -35,7 +35,8 @@ extern ISC_LIBDNS_PYTHON_API PyTypeObject tsigrecord_type;
/// returns a NULL pointer).
/// This function is expected to be called with in a try block
/// followed by necessary setup for python exception.
-PyObject* createTSIGRecordObject(const TSIGRecord& source);
+ISC_LIBDNS_PYTHON_API PyObject*
+createTSIGRecordObject(const TSIGRecord& source);
/// \brief Checks if the given python object is a TSIGRecord object
///
@@ -43,7 +44,7 @@ PyObject* createTSIGRecordObject(const TSIGRecord& source);
///
/// \param obj The object to check the type of
/// \return true if the object is of type TSIGRecord, false otherwise
-bool PyTSIGRecord_Check(PyObject* obj);
+ISC_LIBDNS_PYTHON_API bool PyTSIGRecord_Check(PyObject* obj);
/// \brief Returns a reference to the TSIGRecord object contained within the given
/// Python object.
@@ -55,7 +56,8 @@ bool PyTSIGRecord_Check(PyObject* obj);
/// may be destroyed, the caller must copy it itself.
///
/// \param rrtype_obj The rrtype object to convert
-const TSIGRecord& PyTSIGRecord_ToTSIGRecord(PyObject* tsigrecord_obj);
+ISC_LIBDNS_PYTHON_API const TSIGRecord&
+PyTSIGRecord_ToTSIGRecord(PyObject* tsigrecord_obj);
} // namespace python
} // namespace dns
diff --git a/src/lib/python/isc/acl/dns_requestcontext_python.cc b/src/lib/python/isc/acl/dns_requestcontext_python.cc
index 7f33f59..898437f 100644
--- a/src/lib/python/isc/acl/dns_requestcontext_python.cc
+++ b/src/lib/python/isc/acl/dns_requestcontext_python.cc
@@ -20,10 +20,14 @@
// http://docs.python.org/py3k/extending/extending.html#a-simple-example
#include <Python.h>
+#ifdef _WIN32
+#include <ws2tcpip.h>
+#else
#include <sys/types.h>
#include <sys/socket.h>
#include <netinet/in.h>
#include <netdb.h>
+#endif
#include <string.h>
#include <cassert>
diff --git a/src/lib/python/isc/cc/tests/cc_test.win32 b/src/lib/python/isc/cc/tests/cc_test.win32
new file mode 100755
index 0000000..e01f130
--- /dev/null
+++ b/src/lib/python/isc/cc/tests/cc_test.win32
@@ -0,0 +1,27 @@
+#! /bin/sh
+
+# Copyright (C) 2010 Internet Systems Consortium.
+#
+# Permission to use, copy, modify, and distribute this software for any
+# purpose with or without fee is hereby granted, provided that the above
+# copyright notice and this permission notice appear in all copies.
+#
+# THE SOFTWARE IS PROVIDED "AS IS" AND INTERNET SYSTEMS CONSORTIUM
+# DISCLAIMS ALL WARRANTIES WITH REGARD TO THIS SOFTWARE INCLUDING ALL
+# IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS. IN NO EVENT SHALL
+# INTERNET SYSTEMS CONSORTIUM BE LIABLE FOR ANY SPECIAL, DIRECT,
+# INDIRECT, OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES WHATSOEVER RESULTING
+# FROM LOSS OF USE, DATA OR PROFITS, WHETHER IN AN ACTION OF CONTRACT,
+# NEGLIGENCE OR OTHER TORTIOUS ACTION, ARISING OUT OF OR IN CONNECTION
+# WITH THE USE OR PERFORMANCE OF THIS SOFTWARE.
+
+PYTHON_EXEC=${PYTHON_EXEC:-"C:\Python32\python.exe"}
+export PYTHON_EXEC
+
+CONFIG_PATH=${BIND10HOME}/src/lib/python/isc/cc/tests
+
+PYTHONPATH=${BIND10HOME}/src/lib/python
+export PYTHONPATH
+
+cd ${BIND10_PATH}
+${PYTHON_EXEC} -O ${CONFIG_PATH}/session_test.py $*
diff --git a/src/lib/python/isc/config/tests/config_test.win32 b/src/lib/python/isc/config/tests/config_test.win32
new file mode 100755
index 0000000..03e1b02
--- /dev/null
+++ b/src/lib/python/isc/config/tests/config_test.win32
@@ -0,0 +1,36 @@
+#! /bin/sh
+
+# Copyright (C) 2010 Internet Systems Consortium.
+#
+# Permission to use, copy, modify, and distribute this software for any
+# purpose with or without fee is hereby granted, provided that the above
+# copyright notice and this permission notice appear in all copies.
+#
+# THE SOFTWARE IS PROVIDED "AS IS" AND INTERNET SYSTEMS CONSORTIUM
+# DISCLAIMS ALL WARRANTIES WITH REGARD TO THIS SOFTWARE INCLUDING ALL
+# IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS. IN NO EVENT SHALL
+# INTERNET SYSTEMS CONSORTIUM BE LIABLE FOR ANY SPECIAL, DIRECT,
+# INDIRECT, OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES WHATSOEVER RESULTING
+# FROM LOSS OF USE, DATA OR PROFITS, WHETHER IN AN ACTION OF CONTRACT,
+# NEGLIGENCE OR OTHER TORTIOUS ACTION, ARISING OUT OF OR IN CONNECTION
+# WITH THE USE OR PERFORMANCE OF THIS SOFTWARE.
+
+PYTHON_EXEC=${PYTHON_EXEC:-"C:\Python32\python.exe"}
+export PYTHON_EXEC
+
+CONFIG_PATH=%BIND10HOME%/src/lib/python/isc/config/tests
+
+PYTHONPATH=%BIND10HOME%/src/lib/python
+export PYTHONPATH
+
+CONFIG_TESTDATA_PATH=%BIND10HOME%/src/lib/config/testdata
+export CONFIG_TESTDATA_PATH
+
+cd ${BIND10_PATH}
+${PYTHON_EXEC} -O ${CONFIG_PATH}/config_data_test.py $*
+
+${PYTHON_EXEC} -O ${CONFIG_PATH}/module_spec_test.py $*
+
+${PYTHON_EXEC} -O ${CONFIG_PATH}/ccsession_test.py $*
+
+${PYTHON_EXEC} -O ${CONFIG_PATH}/cfgmgr_test.py $*
diff --git a/src/lib/python/isc/datasrc/__init__.py b/src/lib/python/isc/datasrc/__init__.py
index 7ebd918..ea0c0a7 100644
--- a/src/lib/python/isc/datasrc/__init__.py
+++ b/src/lib/python/isc/datasrc/__init__.py
@@ -7,9 +7,10 @@ import os
# is that exceptions are not recognized by type. So to make
# sure this doesn't happen, we temporarily set RTLD_GLOBAL
# during the loading of the datasource wrappers.
-import ctypes
-flags = sys.getdlopenflags()
-sys.setdlopenflags(flags | ctypes.RTLD_GLOBAL)
+if sys.platform != 'win32':
+ import ctypes
+ flags = sys.getdlopenflags()
+ sys.setdlopenflags(flags | ctypes.RTLD_GLOBAL)
# this setup is a temporary workaround to deal with the problem of
# having both 'normal' python modules and a wrapper module
@@ -28,7 +29,8 @@ else:
from isc.datasrc.datasrc import *
# revert to the default dlopen flags
-sys.setdlopenflags(flags)
+if sys.platform != 'win32':
+ sys.setdlopenflags(flags)
from isc.datasrc.sqlite3_ds import *
from isc.datasrc.master import *
diff --git a/src/lib/python/isc/datasrc/client_python.cc b/src/lib/python/isc/datasrc/client_python.cc
index bdf84a3..f93030f 100644
--- a/src/lib/python/isc/datasrc/client_python.cc
+++ b/src/lib/python/isc/datasrc/client_python.cc
@@ -20,6 +20,8 @@
// http://docs.python.org/py3k/extending/extending.html#a-simple-example
#include <Python.h>
+#include <config.h>
+
#include <util/python/pycppwrapper_util.h>
#include <datasrc/client.h>
diff --git a/src/lib/python/isc/log/log.cc b/src/lib/python/isc/log/log.cc
index 69e70b7..1123811 100644
--- a/src/lib/python/isc/log/log.cc
+++ b/src/lib/python/isc/log/log.cc
@@ -18,6 +18,10 @@
#include <config.h>
+#ifdef _WIN32
+#include <ws2tcpip.h>
+#endif
+
#include <log/message_dictionary.h>
#include <log/logger_manager.h>
#include <log/logger_support.h>
diff --git a/src/lib/python/isc/log/tests/log_console.py.win32 b/src/lib/python/isc/log/tests/log_console.py.win32
new file mode 100755
index 0000000..84dc591
--- /dev/null
+++ b/src/lib/python/isc/log/tests/log_console.py.win32
@@ -0,0 +1,15 @@
+#!/usr/bin/python
+
+import isc.log
+# This would come from a dictionary in real life
+MSG_ID = isc.log.create_message("MSG_ID", "Message with %2 %1")
+DIFFERENT = isc.log.create_message("DIFFERENT", "Different message")
+isc.log.init("test")
+logger = isc.log.Logger("output")
+
+logger.debug(20, MSG_ID, "test", "no output")
+logger.info(MSG_ID, [1, 2, 3, 4], "list")
+logger.warn(DIFFERENT)
+logger.fatal(MSG_ID, 1, 2)
+logger.set_severity("DEBUG", 99)
+logger.debug(1, MSG_ID, 2, 3)
diff --git a/src/lib/python/isc/notify/notify_out.py b/src/lib/python/isc/notify/notify_out.py
index 34db14c..c098daa 100644
--- a/src/lib/python/isc/notify/notify_out.py
+++ b/src/lib/python/isc/notify/notify_out.py
@@ -25,6 +25,7 @@ from isc.datasrc import DataSourceClient
from isc.net import addr
import isc
from isc.log_messages.notify_out_messages import *
+from isc.util.socketpair import socketpair
logger = isc.log.Logger("notify_out")
@@ -132,7 +133,7 @@ class NotifyOut:
self._waiting_zones = []
self._notifying_zones = []
self._serving = False
- self._read_sock, self._write_sock = socket.socketpair()
+ self._read_sock, self._write_sock = socketpair.socketpair()
self._read_sock.setblocking(False)
self.notify_num = 0 # the count of in progress notifies
self._verbose = verbose
diff --git a/src/lib/python/isc/notify/tests/notify_out_test.py b/src/lib/python/isc/notify/tests/notify_out_test.py
index 1b3a4a1..d3b57da 100644
--- a/src/lib/python/isc/notify/tests/notify_out_test.py
+++ b/src/lib/python/isc/notify/tests/notify_out_test.py
@@ -22,13 +22,14 @@ import socket
from isc.notify import notify_out, SOCK_DATA
import isc.log
from isc.dns import *
+from isc.util.socketpair import socketpair
TESTDATA_SRCDIR = os.getenv("TESTDATASRCDIR")
# our fake socket, where we can read and insert messages
class MockSocket():
def __init__(self):
- self._local_sock, self._remote_sock = socket.socketpair()
+ self._local_sock, self._remote_sock = socketpair.socketpair()
def connect(self, to):
pass
@@ -200,7 +201,8 @@ class TestNotifyOut(unittest.TestCase):
self._notify._read_sock.close()
if self._notify._write_sock is not None:
self._notify._write_sock.close()
- self._notify._read_sock, self._notify._write_sock = socket.socketpair()
+ self._notify._read_sock, self._notify._write_sock = \
+ socketpair.socketpair()
self._notify._write_sock.send(SOCK_DATA)
replied_zones, timeout_zones = self._notify._wait_for_notify_reply()
self.assertEqual(0, len(replied_zones))
diff --git a/src/lib/python/isc/util/cio/socketsessionforwarder_python.cc b/src/lib/python/isc/util/cio/socketsessionforwarder_python.cc
index 583a877..f6e406f 100644
--- a/src/lib/python/isc/util/cio/socketsessionforwarder_python.cc
+++ b/src/lib/python/isc/util/cio/socketsessionforwarder_python.cc
@@ -20,9 +20,11 @@
// http://docs.python.org/py3k/extending/extending.html#a-simple-example
#include <Python.h>
+#ifndef _WIN32
#include <sys/types.h>
#include <sys/socket.h>
#include <netdb.h>
+#endif
#include <string>
#include <stdexcept>
@@ -181,15 +183,34 @@ SocketSessionForwarder_push(PyObject* po_self, PyObject* args) {
static_cast<s_SocketSessionForwarder*>(po_self);
try {
- int fd, family, type, protocol;
+#ifdef _WIN32
+ SOCKET fd,
+#else
+ int fd,
+#endif
+ int family, type, protocol;
PyObject* po_local_end;
PyObject* po_remote_end;
Py_buffer py_buf;
+#ifdef _WIN32
+#ifdef _WIN64
+ if (!PyArg_ParseTuple(args, "LiiiOOy*", &fd, &family, &type, &protocol,
+ &po_local_end, &po_remote_end, &py_buf)) {
+ return (NULL);
+ }
+#else
+ if (!PyArg_ParseTuple(args, "liiiOOy*", &fd, &family, &type, &protocol,
+ &po_local_end, &po_remote_end, &py_buf)) {
+ return (NULL);
+ }
+#endif
+#else
if (!PyArg_ParseTuple(args, "iiiiOOy*", &fd, &family, &type, &protocol,
&po_local_end, &po_remote_end, &py_buf)) {
return (NULL);
}
+#endif
struct sockaddr_storage ss_local, ss_remote;
parsePySocketAddress(po_local_end, type, protocol, &ss_local);
parsePySocketAddress(po_remote_end, type, protocol, &ss_remote);
diff --git a/src/lib/python/isc/util/cio/socketsessionreceiver_python.cc b/src/lib/python/isc/util/cio/socketsessionreceiver_python.cc
index c79f6e0..0dab918 100644
--- a/src/lib/python/isc/util/cio/socketsessionreceiver_python.cc
+++ b/src/lib/python/isc/util/cio/socketsessionreceiver_python.cc
@@ -20,10 +20,12 @@
// http://docs.python.org/py3k/extending/extending.html#a-simple-example
#include <Python.h>
+#ifndef _WIN32
#include <sys/types.h>
#include <sys/socket.h>
#include <netinet/in.h>
#include <netdb.h>
+#endif
#include <string>
#include <stdexcept>
@@ -78,11 +80,26 @@ SocketSessionReceiver_init(PyObject* po_self, PyObject* args, PyObject*) {
NULL));
PyObjectContainer fdarg_container(
Py_BuildValue("(O)", fd_container.get()));
+#ifdef _WIN32
+ SOCKET fd;
+#ifdef _WIN64
+ if (PyArg_ParseTuple(fdarg_container.get(), "L", &fd)) {
+ self->cppobj = new SocketSessionReceiver(fd);
+ return (0);
+ }
+#else
+ if (PyArg_ParseTuple(fdarg_container.get(), "l", &fd)) {
+ self->cppobj = new SocketSessionReceiver(fd);
+ return (0);
+ }
+#endif
+#else
int fd;
if (PyArg_ParseTuple(fdarg_container.get(), "i", &fd)) {
self->cppobj = new SocketSessionReceiver(fd);
return (0);
}
+#endif
PyErr_SetString(PyExc_TypeError, "Given object's fileno() doesn't "
"return an integer, probably not a valid socket "
"object");
@@ -157,11 +174,19 @@ SocketSessionReceiver_destroy(PyObject* po_self) {
// A helper struct to automatically close a socket in an RAII manner.
struct ScopedSocket : boost::noncopyable {
+#ifdef _WIN32
+ ScopedSocket(SOCKET fd) : fd_(fd) {}
+ ~ScopedSocket() {
+ closesocket(fd_);
+ }
+ const SOCKET fd_;
+#else
ScopedSocket(int fd) : fd_(fd) {}
~ScopedSocket() {
close(fd_);
}
const int fd_;
+#endif
};
PyObject*
@@ -180,7 +205,16 @@ SocketSessionReceiver_pop(PyObject* po_self, PyObject*) {
ScopedSocket sock(session.getSocket());
// Build Python socket object
- PyObjectContainer c_args(Py_BuildValue("(iiii)", sock.fd_,
+ PyObjectContainer c_args(Py_BuildValue(
+#ifdef _WIN32
+#ifdef _WIN64
+ "(Liii)", sock.fd_,
+#else
+ "(liii)", sock.fd_,
+#endif
+#else
+ "(iiii)", sock.fd_,
+#endif
session.getFamily(),
session.getType(),
session.getProtocol()));
diff --git a/src/lib/python/isc/util/socketpair.py b/src/lib/python/isc/util/socketpair.py
new file mode 100644
index 0000000..d45b34b
--- /dev/null
+++ b/src/lib/python/isc/util/socketpair.py
@@ -0,0 +1,50 @@
+# Copyright (C) 2012 Internet Systems Consortium.
+#
+# Permission to use, copy, modify, and distribute this software for any
+# purpose with or without fee is hereby granted, provided that the above
+# copyright notice and this permission notice appear in all copies.
+#
+# THE SOFTWARE IS PROVIDED "AS IS" AND INTERNET SYSTEMS CONSORTIUM
+# DISCLAIMS ALL WARRANTIES WITH REGARD TO THIS SOFTWARE INCLUDING ALL
+# IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS. IN NO EVENT SHALL
+# INTERNET SYSTEMS CONSORTIUM BE LIABLE FOR ANY SPECIAL, DIRECT,
+# INDIRECT, OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES WHATSOEVER RESULTING
+# FROM LOSS OF USE, DATA OR PROFITS, WHETHER IN AN ACTION OF CONTRACT,
+# NEGLIGENCE OR OTHER TORTIOUS ACTION, ARISING OUT OF OR IN CONNECTION
+# WITH THE USE OR PERFORMANCE OF THIS SOFTWARE.
+
+"""Extension to socketpair() for Windows."""
+
+import socket
+import threading
+
+try:
+ pairfamily = socket.AF_UNIX
+except NameError:
+ pairfamily = socket.AF_INET
+
+def socketpair(family=pairfamily, type_=socket.SOCK_STREAM, proto=0):
+ """Wrapper for Windows"""
+ try:
+ sock1, sock2 = socket.socketpair(family, type_, proto)
+ return (sock1, sock2)
+ except NameError:
+ # get passive socket
+ psock = socket.socket(family, type_, proto)
+ psock.setsocketop(socket.SOL_SOCKET, socket.SO_REUSEADDR, 1)
+ psock.bind(('127.0.0.1', 0))
+ intf, port = psock.getsockname()
+ psock.listen(1)
+ # get first socket
+ sock1 = socket.socket(family, type_, proto)
+ cthread = threading.Thread(target=pconnect_, args=[sock1, port])
+ cthread.setDaemon(1)
+ cthread.start()
+ # get second socket
+ sock2, _ = psock.accept()
+ psock.close()
+ return (sock1, sock2)
+
+def pconnect_(sock.port):
+ """connect helper"""
+ sock.connect(('127.0.0.1', port))
diff --git a/src/lib/python/isc/util/socketserver_mixin.py b/src/lib/python/isc/util/socketserver_mixin.py
index e954fe1..5f22229 100644
--- a/src/lib/python/isc/util/socketserver_mixin.py
+++ b/src/lib/python/isc/util/socketserver_mixin.py
@@ -16,6 +16,7 @@
import threading
import socket
import select
+from sys.util.socketpair import socketpair
SOCK_DATA = b'somedata'
class NoPollMixIn:
@@ -53,7 +54,7 @@ class NoPollMixIn:
some other thread.
'''
def __init__(self):
- self.__read_sock, self.__write_sock = socket.socketpair()
+ self.__read_sock, self.__write_sock = socketpair.socketpair()
self._is_shut_down = threading.Event()
def serve_forever(self, poll_interval=None):
diff --git a/src/lib/server_common/PARTIAL_PORT_ON_WINDOWS b/src/lib/server_common/PARTIAL_PORT_ON_WINDOWS
new file mode 100644
index 0000000..e69de29
diff --git a/src/lib/server_common/client.cc b/src/lib/server_common/client.cc
index e6383d6..3315550 100644
--- a/src/lib/server_common/client.cc
+++ b/src/lib/server_common/client.cc
@@ -12,6 +12,8 @@
// OR OTHER TORTIOUS ACTION, ARISING OUT OF OR IN CONNECTION WITH THE USE OR
// PERFORMANCE OF THIS SOFTWARE.
+#define ISC_LIBSERVER_COMMON_EXPORT
+
#include <string>
#include <sstream>
@@ -62,7 +64,7 @@ Client::toText() const {
return (ss.str());
}
-std::ostream&
+ISC_LIBSERVER_COMMON_API std::ostream&
isc::server_common::operator<<(std::ostream& os, const Client& client) {
return (os << client.toText());
}
diff --git a/src/lib/server_common/client.h b/src/lib/server_common/client.h
index 8cafb1e..c750a63 100644
--- a/src/lib/server_common/client.h
+++ b/src/lib/server_common/client.h
@@ -21,15 +21,16 @@
#include <boost/noncopyable.hpp>
#include <acl/ip_check.h>
+#include <server_common/dll.h>
namespace isc {
namespace asiolink {
-class IOMessage;
-class IOEndpoint;
+class ISC_LIBSERVER_COMMON_API IOMessage;
+class ISC_LIBSERVER_COMMON_API IOEndpoint;
}
namespace acl {
-struct IPAddress;
+struct ISC_LIBSERVER_COMMON_API IPAddress;
}
namespace server_common {
@@ -67,7 +68,7 @@ namespace server_common {
/// We might also want to separate DNS clients for authoritative servers
/// and clients for the resolver, especially because the former could be
/// simpler with performance optimizations.
-class Client : boost::noncopyable {
+class ISC_LIBSERVER_COMMON_API Client : boost::noncopyable {
public:
///
/// \name Constructors and Destructor
@@ -143,7 +144,8 @@ private:
/// \param client A reference to a \c Client object output by the operation.
/// \return A reference to the same \c std::ostream object referenced by
/// parameter \c os after the insertion operation.
-std::ostream& operator<<(std::ostream& os, const Client& client);
+ISC_LIBSERVER_COMMON_API std::ostream&
+operator<<(std::ostream& os, const Client& client);
}
}
diff --git a/src/lib/server_common/dll.h b/src/lib/server_common/dll.h
new file mode 100644
index 0000000..920827c
--- /dev/null
+++ b/src/lib/server_common/dll.h
@@ -0,0 +1,32 @@
+// Copyright (C) 2012 Internet Systems Consortium, Inc. ("ISC")
+//
+// Permission to use, copy, modify, and/or distribute this software for any
+// purpose with or without fee is hereby granted, provided that the above
+// copyright notice and this permission notice appear in all copies.
+//
+// THE SOFTWARE IS PROVIDED "AS IS" AND ISC DISCLAIMS ALL WARRANTIES WITH
+// REGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED WARRANTIES OF MERCHANTABILITY
+// AND FITNESS. IN NO EVENT SHALL ISC BE LIABLE FOR ANY SPECIAL, DIRECT,
+// INDIRECT, OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES WHATSOEVER RESULTING FROM
+// LOSS OF USE, DATA OR PROFITS, WHETHER IN AN ACTION OF CONTRACT, NEGLIGENCE
+// OR OTHER TORTIOUS ACTION, ARISING OUT OF OR IN CONNECTION WITH THE USE OR
+// PERFORMANCE OF THIS SOFTWARE.
+
+#ifndef __LIBSERVER_COMMON_H
+#define __LIBSERVER_COMMON_H 1
+
+#if !defined(_WIN32) || defined(USE_STATIC_LINK)
+#define ISC_LIBSERVER_COMMON_API
+#else
+#ifdef ISC_LIBSERVER_COMMON_EXPORT
+#define ISC_LIBSERVER_COMMON_API __declspec(dllexport)
+#else
+#define ISC_LIBSERVER_COMMON_API __declspec(dllimport)
+#endif
+#endif
+
+#endif // __LIBSERVER_COMMON_H
+
+// Local Variables:
+// mode: c++
+// End:
diff --git a/src/lib/server_common/keyring.cc b/src/lib/server_common/keyring.cc
index 501dfd9..fc4b0d5 100644
--- a/src/lib/server_common/keyring.cc
+++ b/src/lib/server_common/keyring.cc
@@ -12,6 +12,14 @@
// OR OTHER TORTIOUS ACTION, ARISING OUT OF OR IN CONNECTION WITH THE USE OR
// PERFORMANCE OF THIS SOFTWARE.
+#define ISC_LIBSERVER_COMMON_EXPORT
+
+#include <config.h>
+
+#ifdef _WIN32
+#include <ws2tcpip.h>
+#endif
+
#include <server_common/keyring.h>
#include <server_common/logger.h>
@@ -23,7 +31,7 @@ namespace server_common {
typedef boost::shared_ptr<TSIGKeyRing> KeyringPtr;
-KeyringPtr keyring;
+ISC_LIBSERVER_COMMON_API KeyringPtr keyring;
namespace {
@@ -46,7 +54,7 @@ updateKeyring(const std::string&, ConstElementPtr data,
}
-void
+ISC_LIBSERVER_COMMON_API void
initKeyring(config::ModuleCCSession& session) {
if (keyring) {
// We are already initialized
@@ -56,7 +64,7 @@ initKeyring(config::ModuleCCSession& session) {
session.addRemoteConfig("tsig_keys", updateKeyring, false);
}
-void
+ISC_LIBSERVER_COMMON_API void
deinitKeyring(config::ModuleCCSession& session) {
if (!keyring) {
// Not initialized, ignore it
diff --git a/src/lib/server_common/keyring.h b/src/lib/server_common/keyring.h
index 9c067e9..fb3d630 100644
--- a/src/lib/server_common/keyring.h
+++ b/src/lib/server_common/keyring.h
@@ -18,6 +18,7 @@
#include <boost/shared_ptr.hpp>
#include <dns/tsigkey.h>
#include <config/ccsession.h>
+#include <server_common/dll.h>
/**
* \file keyring.h
@@ -55,7 +56,7 @@ namespace server_common {
* but you need to call initKeyring first, otherwise you'll find a NULL pointer
* here only.
*/
-extern boost::shared_ptr<dns::TSIGKeyRing> keyring;
+extern ISC_LIBSERVER_COMMON_API boost::shared_ptr<dns::TSIGKeyRing> keyring;
/**
* \brief Load the key ring for the first time
@@ -71,7 +72,7 @@ extern boost::shared_ptr<dns::TSIGKeyRing> keyring;
*
* \param session The configuration session used to talk to the config manager.
*/
-void
+ISC_LIBSERVER_COMMON_API void
initKeyring(config::ModuleCCSession& session);
/**
@@ -93,7 +94,7 @@ initKeyring(config::ModuleCCSession& session);
* as walidity should have been checked already in the config manager, or
* throw? What about when we get an update and it's invalid?
*/
-void
+ISC_LIBSERVER_COMMON_API void
deinitKeyring(config::ModuleCCSession& session);
}
diff --git a/src/lib/server_common/logger.cc b/src/lib/server_common/logger.cc
index 0b9ab6e..764bac7 100644
--- a/src/lib/server_common/logger.cc
+++ b/src/lib/server_common/logger.cc
@@ -12,6 +12,8 @@
// OR OTHER TORTIOUS ACTION, ARISING OUT OF OR IN CONNECTION WITH THE USE OR
// PERFORMANCE OF THIS SOFTWARE.
+#define ISC_LIBSERVER_COMMON_EXPORT
+
#include <server_common/logger.h>
namespace isc {
diff --git a/src/lib/server_common/logger.h b/src/lib/server_common/logger.h
index 80bc81d..86307d1 100644
--- a/src/lib/server_common/logger.h
+++ b/src/lib/server_common/logger.h
@@ -16,6 +16,7 @@
#define __SERVER_COMMON_LOGGER_H
#include <log/macros.h>
+#include <server_common/dll.h>
#include <server_common/server_common_messages.h>
/// \file server_common/logger.h
diff --git a/src/lib/server_common/portconfig.cc b/src/lib/server_common/portconfig.cc
index 530c919..41f9981 100644
--- a/src/lib/server_common/portconfig.cc
+++ b/src/lib/server_common/portconfig.cc
@@ -12,6 +12,15 @@
// OR OTHER TORTIOUS ACTION, ARISING OUT OF OR IN CONNECTION WITH THE USE OR
// PERFORMANCE OF THIS SOFTWARE.
+#define ISC_LIBSERVER_COMMON_EXPORT
+
+#include <config.h>
+
+#ifdef _WIN32
+#include <ws2tcpip.h>
+#include <mswsock.h>
+#endif
+
#include <server_common/portconfig.h>
#include <server_common/logger.h>
#include <server_common/socket_request.h>
@@ -31,7 +40,7 @@ namespace isc {
namespace server_common {
namespace portconfig {
-AddressList
+ISC_LIBSERVER_COMMON_API AddressList
parseAddresses(isc::data::ConstElementPtr addresses,
const std::string& elemName)
{
@@ -108,7 +117,7 @@ setAddresses(DNSServiceBase& service, const AddressList& addresses,
}
-void
+ISC_LIBSERVER_COMMON_API void
installListenAddresses(const AddressList& new_addresses,
AddressList& address_store,
DNSServiceBase& service,
diff --git a/src/lib/server_common/portconfig.h b/src/lib/server_common/portconfig.h
index 0795728..63b1148 100644
--- a/src/lib/server_common/portconfig.h
+++ b/src/lib/server_common/portconfig.h
@@ -18,6 +18,7 @@
#include <cc/data.h>
#include <asiodns/dns_service.h>
+#include <server_common/dll.h>
#include <utility>
#include <string>
@@ -77,7 +78,7 @@ typedef std::vector<AddressPair> AddressList;
* element in the hash, port number out of range).
* \throw std::bad_alloc when allocation fails.
*/
-AddressList
+ISC_LIBSERVER_COMMON_API AddressList
parseAddresses(isc::data::ConstElementPtr addresses,
const std::string& elemName);
@@ -111,7 +112,7 @@ parseAddresses(isc::data::ConstElementPtr addresses,
/// \throw std::bad_alloc when allocation fails.
/// \throw isc::InvalidOperation when the function is called and the
/// SocketRequestor isn't initialized yet.
-void
+ISC_LIBSERVER_COMMON_API void
installListenAddresses(const AddressList& new_addresses,
AddressList& address_store,
asiodns::DNSServiceBase& dns_service,
diff --git a/src/lib/server_common/socket_request.cc b/src/lib/server_common/socket_request.cc
index e471ad0..8cb6055 100644
--- a/src/lib/server_common/socket_request.cc
+++ b/src/lib/server_common/socket_request.cc
@@ -11,8 +11,18 @@
// LOSS OF USE, DATA OR PROFITS, WHETHER IN AN ACTION OF CONTRACT, NEGLIGENCE
// OR OTHER TORTIOUS ACTION, ARISING OUT OF OR IN CONNECTION WITH THE USE OR
// PERFORMANCE OF THIS SOFTWARE.
+
+#define ISC_LIBSERVER_COMMON_EXPORT
+
#include <config.h>
+#ifdef _WIN32
+#include <ws2tcpip.h>
+#else
+#include <sys/un.h>
+#include <sys/socket.h>
+#endif
+
#include "socket_request.h"
#include <server_common/logger.h>
@@ -22,8 +32,6 @@
#include <util/io/fd.h>
#include <util/io/fd_share.h>
-#include <sys/un.h>
-#include <sys/socket.h>
#include <cerrno>
#include <csignal>
#include <cstddef>
@@ -170,6 +178,7 @@ readRequestSocketAnswer(isc::data::ConstElementPtr recv_msg,
// \return the socket file descriptor
int
createFdShareSocket(const std::string& path) {
+#ifndef _WIN32
// TODO: Current master has socketsession code and better way
// of handling errors without potential leaks for this. It is
// not public there at this moment, but when this is merged
@@ -203,17 +212,56 @@ createFdShareSocket(const std::string& path) {
": " << strerror(errno));
}
return (sock_pass_fd);
+#else
+ // TODO: Current master has socketsession code and better way
+ // of handling errors without potential leaks for this. It is
+ // not public there at this moment, but when this is merged
+ // we should make a ticket to move this functionality to the
+ // SocketSessionReceiver and use that.
+ const SOCKET sock_pass_fd = socket(AF_INET, SOCK_STREAM, 0);
+ if (sock_pass_fd == INVALID_SOCKET) {
+ isc_throw(SocketRequestor::SocketError,
+ "Unable to open ip socket " << path <<
+ ": " << strerror(WSAGetLastError()));
+ }
+ struct sockaddr_in sock_pass_addr;
+ sock_pass_addr.sin_family = AF_INET;
+ if (atoi(path.c_str()) == 0) {
+ closesocket(sock_pass_fd);
+ isc_throw(SocketRequestor::SocketError,
+ "Unable to open ip socket " << path <<
+ ": bad port");
+ }
+ sock_pass_addr.sin_addr.s_addr = inet_addr("127.0.0.1");
+ sock_pass_addr.sin_port = htons(atoi(path.c_str()));
+ const socklen_t len = sizeof(sock_pass_addr);
+ // Yes, C-style cast bad. See previous comment about SocketSessionReceiver.
+ if (connect(sock_pass_fd, (const struct sockaddr*)&sock_pass_addr,
+ len) == SOCKET_ERROR) {
+ closesocket(sock_pass_fd);
+ isc_throw(SocketRequestor::SocketError,
+ "Unable to open ip socket " << path <<
+ ": " << strerror(WSAGetLastError()));
+ }
+ return (sock_pass_fd);
+#endif
}
// Reads a socket fd over the given socket (using recv_fd()).
//
// \exception SocketError if the socket cannot be read
// \return the socket fd that has been read
+#ifdef _WIN32
+SOCKET
+getSocketFd(const std::string& token, SOCKET sock_pass_fd)
+#else
int
-getSocketFd(const std::string& token, int sock_pass_fd) {
+getSocketFd(const std::string& token, int sock_pass_fd)
+#endif
+{
// Tell the boss the socket token.
const std::string token_data = token + "\n";
- if (!isc::util::io::write_data(sock_pass_fd, token_data.c_str(),
+ if (!isc::util::io::send_data(sock_pass_fd, token_data.c_str(),
token_data.size())) {
isc_throw(SocketRequestor::SocketError, "Error writing socket token");
}
@@ -222,7 +270,7 @@ getSocketFd(const std::string& token, int sock_pass_fd) {
// from its cache succeeded
char status[3]; // We need a space for trailing \0, hence 3
memset(status, 0, 3);
- if (isc::util::io::read_data(sock_pass_fd, status, 2) < 2) {
+ if (isc::util::io::recv_data(sock_pass_fd, status, 2) < 2) {
isc_throw(SocketRequestor::SocketError,
"Error reading status code while requesting socket");
}
@@ -236,10 +284,14 @@ getSocketFd(const std::string& token, int sock_pass_fd) {
"'");
}
+#ifdef _WIN32
+ const SOCKET passed_sock_fd = isc::util::io::recv_fd(sock_pass_fd);
+#else
const int passed_sock_fd = isc::util::io::recv_fd(sock_pass_fd);
+#endif
// check for error values of passed_sock_fd (see fd_share.h)
- if (passed_sock_fd < 0) {
+ if ((int)passed_sock_fd < 0) {
switch (passed_sock_fd) {
case isc::util::io::FD_SYSTEM_ERROR:
isc_throw(SocketRequestor::SocketError,
@@ -269,6 +321,7 @@ public:
session_(session),
app_name_(app_name)
{
+#ifndef _WIN32
// We need to filter SIGPIPE to prevent it from happening in
// getSocketFd() while writing to the UNIX domain socket after the
// remote end closed it. See lib/util/io/socketsession for more
@@ -280,6 +333,7 @@ public:
isc_throw(Unexpected, "Failed to filter SIGPIPE: " <<
strerror(errno));
}
+#endif
LOG_DEBUG(logger, DBGLVL_TRACE_BASIC, SOCKETREQUESTOR_CREATED).
arg(app_name);
}
@@ -356,10 +410,18 @@ public:
private:
// Returns the domain socket file descriptor
// If we had not opened it yet, opens it now
+#ifdef _WIN32
+ SOCKET
+#else
int
+#endif
getFdShareSocket(const std::string& path) {
if (fd_share_sockets_.find(path) == fd_share_sockets_.end()) {
+#ifdef _WIN32
+ const SOCKET new_fd = createFdShareSocket(path);
+#else
const int new_fd = createFdShareSocket(path);
+#endif
// Technically, the (creation and) assignment of the new map entry
// could thrown an exception and lead to FD leak. This should be
// cleaned up later (see comment about SocketSessionReceiver above)
@@ -373,22 +435,35 @@ private:
// Closes the sockets that has been used for fd_share
void
closeFdShareSockets() {
+#ifdef _WIN32
+ for (std::map<std::string, SOCKET>::const_iterator it =
+ fd_share_sockets_.begin();
+ it != fd_share_sockets_.end();
+ ++it) {
+ closesocket((*it).second);
+ }
+#else
for (std::map<std::string, int>::const_iterator it =
fd_share_sockets_.begin();
it != fd_share_sockets_.end();
++it) {
close((*it).second);
}
+#endif
}
cc::AbstractSession& session_;
const std::string app_name_;
+#ifdef _WIN32
+ std::map<std::string, SOCKET> fd_share_sockets_;
+#else
std::map<std::string, int> fd_share_sockets_;
+#endif
};
}
-SocketRequestor&
+ISC_LIBSERVER_COMMON_API SocketRequestor&
socketRequestor() {
if (requestor != NULL) {
return (*requestor);
@@ -397,7 +472,7 @@ socketRequestor() {
}
}
-void
+ISC_LIBSERVER_COMMON_API void
initSocketRequestor(cc::AbstractSession& session,
const std::string& app_name)
{
@@ -409,12 +484,12 @@ initSocketRequestor(cc::AbstractSession& session,
}
}
-void
+ISC_LIBSERVER_COMMON_API void
initTestSocketRequestor(SocketRequestor* new_requestor) {
requestor = new_requestor;
}
-void
+ISC_LIBSERVER_COMMON_API void
cleanupSocketRequestor() {
if (requestor != NULL) {
delete requestor;
diff --git a/src/lib/server_common/socket_request.h b/src/lib/server_common/socket_request.h
index aac95d1..98743d4 100644
--- a/src/lib/server_common/socket_request.h
+++ b/src/lib/server_common/socket_request.h
@@ -16,6 +16,7 @@
#define __SOCKET_REQUEST_H 1
#include <exceptions/exceptions.h>
+#include <server_common/dll.h>
#include <boost/noncopyable.hpp>
#include <utility>
@@ -43,7 +44,7 @@ namespace server_common {
/// subclass when needed.
///
/// \see socketRequestor function to access the object of this class.
-class SocketRequestor : boost::noncopyable {
+class ISC_LIBSERVER_COMMON_API SocketRequestor : boost::noncopyable {
protected:
/// \brief Protected constructor
///
@@ -66,7 +67,11 @@ public:
/// socket (you might want to use it directly with functions like recv,
/// or fill it into an asio socket). The other part is the token
/// representing the socket, which allows it to be given up again.
+#ifdef _WIN32
typedef std::pair<int, std::string> SocketID;
+#else
+ typedef std::pair<SOCKET, std::string> SocketID;
+#endif
/// \brief The protocol of requested socket
///
@@ -97,7 +102,7 @@ public:
/// This is thrown if the other side doesn't want to comply to our
/// requests, like when we ask for a socket already held by someone
/// else or ask for nonsense (releasing a socket we don't own).
- class SocketError : public Exception {
+ class ISC_LIBSERVER_COMMON_API SocketError : public Exception {
public:
SocketError(const char* file, size_t line, const char* what) :
Exception(file, line, what)
@@ -115,7 +120,7 @@ public:
///
/// \see ShareError
/// \see SocketAllocateError
- class NonFatalSocketError : public SocketError {
+ class ISC_LIBSERVER_COMMON_API NonFatalSocketError : public SocketError {
public:
NonFatalSocketError(const char* file, size_t line, const char* what) :
SocketError(file, line, what)
@@ -129,7 +134,7 @@ public:
/// allocated by bind10, but other bind10 module(s) is using it and
/// the sharing parameters are incompatible (the socket can't be shared
/// between the module and our module).
- class ShareError : public NonFatalSocketError {
+ class ISC_LIBSERVER_COMMON_API ShareError : public NonFatalSocketError {
public:
ShareError(const char* file, size_t line, const char* what) :
NonFatalSocketError(file, line, what)
@@ -143,7 +148,8 @@ public:
/// creator. This can happen when the address/port pair is already taken
/// by a different application, the socket creator doesn't have enough
/// privileges, or for some kind of similar reason.
- class SocketAllocateError : public NonFatalSocketError {
+ class ISC_LIBSERVER_COMMON_API SocketAllocateError :
+ public NonFatalSocketError {
public:
SocketAllocateError(const char* file, size_t line, const char* what) :
NonFatalSocketError(file, line, what)
@@ -225,7 +231,7 @@ public:
/// \return the active socket requestor object.
/// \throw InvalidOperation if the object was not yet initialized.
/// \see SocketRequestor::init to initialize the object.
-SocketRequestor& socketRequestor();
+ISC_LIBSERVER_COMMON_API SocketRequestor& socketRequestor();
/// \brief Initialize the singleton object
///
@@ -242,8 +248,9 @@ SocketRequestor& socketRequestor();
/// to avoid them and provide the name of the application
/// here.
/// \throw InvalidOperation when it is called more than once
-void initSocketRequestor(cc::AbstractSession& session,
- const std::string& app_name);
+ISC_LIBSERVER_COMMON_API void
+initSocketRequestor(cc::AbstractSession& session,
+ const std::string& app_name);
/// \brief Initialization for tests
///
@@ -260,7 +267,8 @@ void initSocketRequestor(cc::AbstractSession& session,
/// \param requestor the object to be used. It can be NULL to reset to
/// an "virgin" state (which acts as if initTest or init was never
/// called before).
-void initTestSocketRequestor(SocketRequestor* requestor);
+ISC_LIBSERVER_COMMON_API void
+initTestSocketRequestor(SocketRequestor* requestor);
/// \brief Destroy the singleton instance
///
@@ -270,7 +278,7 @@ void initTestSocketRequestor(SocketRequestor* requestor);
/// that want to be completely clean on exit.
/// After this function has been called, all operations except init
/// will fail.
-void cleanupSocketRequestor();
+ISC_LIBSERVER_COMMON_API void cleanupSocketRequestor();
}
}
diff --git a/src/lib/server_common/tests/client_unittest.cc b/src/lib/server_common/tests/client_unittest.cc
index c8db846..b308ef7 100644
--- a/src/lib/server_common/tests/client_unittest.cc
+++ b/src/lib/server_common/tests/client_unittest.cc
@@ -12,8 +12,10 @@
// OR OTHER TORTIOUS ACTION, ARISING OUT OF OR IN CONNECTION WITH THE USE OR
// PERFORMANCE OF THIS SOFTWARE.
+#ifndef _WIN32
#include <sys/types.h>
#include <sys/socket.h>
+#endif
#include <string.h>
#include <string>
diff --git a/src/lib/server_common/tests/data_path.h.win32 b/src/lib/server_common/tests/data_path.h.win32
new file mode 100644
index 0000000..06e2ace
--- /dev/null
+++ b/src/lib/server_common/tests/data_path.h.win32
@@ -0,0 +1,16 @@
+// Copyright (C) 2011 Internet Systems Consortium, Inc. ("ISC")
+//
+// Permission to use, copy, modify, and/or distribute this software for any
+// purpose with or without fee is hereby granted, provided that the above
+// copyright notice and this permission notice appear in all copies.
+//
+// THE SOFTWARE IS PROVIDED "AS IS" AND ISC DISCLAIMS ALL WARRANTIES WITH
+// REGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED WARRANTIES OF MERCHANTABILITY
+// AND FITNESS. IN NO EVENT SHALL ISC BE LIABLE FOR ANY SPECIAL, DIRECT,
+// INDIRECT, OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES WHATSOEVER RESULTING FROM
+// LOSS OF USE, DATA OR PROFITS, WHETHER IN AN ACTION OF CONTRACT, NEGLIGENCE
+// OR OTHER TORTIOUS ACTION, ARISING OUT OF OR IN CONNECTION WITH THE USE OR
+// PERFORMANCE OF THIS SOFTWARE.
+
+#define TEST_DATA_PATH BIND10HOME "/src/lib/server_common/tests/testdata"
+#define PLUGIN_DATA_PATH BIND10HOME "/src/bin/cfgmgr/plugins"
diff --git a/src/lib/server_common/tests/keyring_test.cc b/src/lib/server_common/tests/keyring_test.cc
index dab43df..98092de 100644
--- a/src/lib/server_common/tests/keyring_test.cc
+++ b/src/lib/server_common/tests/keyring_test.cc
@@ -12,6 +12,10 @@
// OR OTHER TORTIOUS ACTION, ARISING OUT OF OR IN CONNECTION WITH THE USE OR
// PERFORMANCE OF THIS SOFTWARE.
+#ifdef _WIN32
+#include <ws2tcpip.h>
+#endif
+
#include <server_common/keyring.h>
#include <server_common/tests/data_path.h>
diff --git a/src/lib/server_common/tests/portconfig_unittest.cc b/src/lib/server_common/tests/portconfig_unittest.cc
index ac880c0..9cb0d79 100644
--- a/src/lib/server_common/tests/portconfig_unittest.cc
+++ b/src/lib/server_common/tests/portconfig_unittest.cc
@@ -12,6 +12,13 @@
// OR OTHER TORTIOUS ACTION, ARISING OUT OF OR IN CONNECTION WITH THE USE OR
// PERFORMANCE OF THIS SOFTWARE.
+#include <config.h>
+
+#ifdef _WIN32
+#include <ws2tcpip.h>
+#include <mswsock.h>
+#endif
+
#include <gtest/gtest.h>
#include <server_common/portconfig.h>
@@ -307,7 +314,7 @@ typedef InstallListenAddresses InstallListenAddressesDeathTest;
// There are systems which don't have EXPECT_DEATH. We skip the tests there.
// We're lucky, EXPECT_DEATH is a macro, so we can test for its existence this
// easily.
-#ifdef EXPECT_DEATH
+#if defined(EXPECT_DEATH) && !defined(NO_EXPECT_DEATH)
// We make the socket requestor throw a "fatal" exception, one where we can't be
// sure the state between processes is consistent. So we abort in that case.
TEST_F(InstallListenAddressesDeathTest, inconsistent) {
diff --git a/src/lib/server_common/tests/socket_requestor_test.cc b/src/lib/server_common/tests/socket_requestor_test.cc
index 9adf84d..bd2cd2a 100644
--- a/src/lib/server_common/tests/socket_requestor_test.cc
+++ b/src/lib/server_common/tests/socket_requestor_test.cc
@@ -14,6 +14,13 @@
#include <config.h>
+#ifdef _WIN32
+#include <ws2tcpip.h>
+#else
+#include <sys/socket.h>
+#include <sys/un.h>
+#endif
+
#include <server_common/socket_request.h>
#include <gtest/gtest.h>
@@ -27,10 +34,9 @@
#include <cstdlib>
#include <cstddef>
#include <cerrno>
-#include <sys/socket.h>
-#include <sys/un.h>
#include <boost/foreach.hpp>
+#include <boost/lexical_cast.hpp>
#include <boost/scoped_ptr.hpp>
#include <util/io/fd.h>
@@ -237,6 +243,7 @@ TEST_F(SocketRequestorTest, testBadRequestAnswers) {
addAnswer("foo", std::string(1000, 'x'));
EXPECT_THROW(doRequest(), SocketRequestor::SocketError);
+#ifndef _WIN32
// Test values around path boundary
struct sockaddr_un sock_un;
const std::string max_len(sizeof(sock_un.sun_path) - 1, 'x');
@@ -260,6 +267,7 @@ TEST_F(SocketRequestorTest, testBadRequestAnswers) {
} catch (const SocketRequestor::SocketError& se) {
EXPECT_NE(std::string::npos, std::string(se.what()).find("too long"));
}
+#endif
// Send back an error response
// A generic one first
@@ -325,15 +333,26 @@ TEST_F(SocketRequestorTest, testBadSocketReleaseAnswers) {
// send expected data.
// It returns true when the timeout is set successfully; otherwise false.
bool
-setRecvTimo(int s) {
+#ifdef _WIN32
+setRecvTimo(SOCKET s)
+#else
+setRecvTimo(int s)
+#endif
+{
const struct timeval timeo = { 10, 0 }; // 10sec, arbitrary choice
- if (setsockopt(s, SOL_SOCKET, SO_RCVTIMEO, &timeo, sizeof(timeo)) == 0) {
+ if (setsockopt(s, SOL_SOCKET, SO_RCVTIMEO,
+ (char *) &timeo, sizeof(timeo)) == 0) {
return (true);
}
+#ifdef _WIN32
+ isc_throw(isc::Unexpected, "set RCVTIMEO failed: "
+ << strerror(WSAGetLastError()));
+#else
if (errno == ENOPROTOOPT) { // deviant OS, give up using it.
return (false);
}
isc_throw(isc::Unexpected, "set RCVTIMEO failed: " << strerror(errno));
+#endif
}
// Helper test class that creates a randomly named domain socket
@@ -342,8 +361,31 @@ setRecvTimo(int s) {
// When run() is called, it creates the socket, forks, and the child will
// listen for a connection, then send all the data passed to run to that
// connection, and then close the socket
+typedef std::pair<std::string, int> DataPair;
+
+#ifdef _WIN32
+struct childargs {
+ SOCKET fd_;
+ const std::vector<DataPair>& data;
+
+ childargs(SOCKET fd_,
+ const std::vector<DataPair>& data) :
+ fd_(fd_), data(data) {}
+private:
+ childargs& operator=(childargs const&);
+};
+#endif
+
class TestSocket {
public:
+#ifdef _WIN32
+ TestSocket() : fd_(INVALID_SOCKET) {
+ int port = 15000 + rand() & 255;
+ std::string sport = boost::lexical_cast<std::string>(port);
+ path_ = strdup(sport.c_str());
+ }
+ friend DWORD WINAPI childproc(void *args);
+#else
TestSocket() : fd_(-1) {
path_ = strdup("test_socket.XXXXXX");
// Misuse mkstemp to generate a file name.
@@ -354,11 +396,25 @@ public:
// Just need the name, so immediately close
close(f);
}
+#endif
~TestSocket() {
cleanup();
}
+#ifdef _WIN32
+ void
+ cleanup() {
+ if (path_ != NULL) {
+ free(path_);
+ path_ = NULL;
+ }
+ if (fd_ != INVALID_SOCKET) {
+ closesocket(fd_);
+ fd_ = INVALID_SOCKET;
+ }
+ }
+#else
void
cleanup() {
unlink(path_);
@@ -371,6 +427,7 @@ public:
fd_ = -1;
}
}
+#endif
// Returns the path used for the socket
const char* getPath() const {
@@ -381,7 +438,21 @@ public:
// If the underlying system doesn't allow to set read timeout, tell the
// caller that via a false return value so that the caller can avoid
// performing tests that could result in a dead lock.
- bool run(const std::vector<std::pair<std::string, int> >& data) {
+#ifdef _WIN32
+ bool run(const std::vector<DataPair>& data) {
+ create();
+ const bool timo_ok = setRecvTimo(fd_);
+ struct childargs *args = new childargs(fd_, data);
+ if (CreateThread(NULL, 0, childproc, args, 0, NULL) == NULL) {
+ isc_throw(Unexpected, "CreateThread failed: "
+ << strerror(GetLastError()));
+ }
+ // parent does not need fd anymore
+ fd_ = INVALID_SOCKET;
+ return (timo_ok);
+ }
+#else
+ bool run(const std::vector<DataPair>& data) {
create();
const bool timo_ok = setRecvTimo(fd_);
const int child_pid = fork();
@@ -395,8 +466,37 @@ public:
}
return (timo_ok);
}
+#endif
+
private:
// Actually create the socket and listen on it
+#ifdef _WIN32
+ void
+ create() {
+ fd_ = socket(AF_INET, SOCK_STREAM, 0);
+ if (fd_ == INVALID_SOCKET) {
+ isc_throw(Unexpected, "Unable to create socket");
+ }
+ struct sockaddr_in socket_address;
+ socket_address.sin_family = AF_INET;
+ socket_address.sin_addr.s_addr = inet_addr("127.0.0.1");
+ socket_address.sin_port = htons(atoi(path_));
+ socklen_t len = sizeof(socket_address);
+
+ if (::bind(fd_, (struct sockaddr*)&socket_address,
+ len) == SOCKET_ERROR) {
+ isc_throw(Unexpected,
+ "unable to bind to test ip socket " << path_ <<
+ ": " << strerror(WSAGetLastError()));
+ }
+
+ if (listen(fd_, 1) == SOCKET_ERROR) {
+ isc_throw(Unexpected,
+ "unable to listen on test ip socket " << path_ <<
+ ": " << strerror(WSAGetLastError()));
+ }
+ }
+#else
void
create() {
fd_ = socket(AF_UNIX, SOCK_STREAM, 0);
@@ -432,6 +532,7 @@ private:
": " << strerror(errno));
}
}
+#endif
// Accept one connection, then for each value of the vector,
// read the socket token from the connection and match the string
@@ -450,22 +551,29 @@ private:
// NOTE: client_fd could leak on exception. This should be cleaned up.
// See the note about SocketSessionReceiver in socket_request.cc.
void
- serve(const std::vector<std::pair<std::string, int> > data) {
+ serve(const std::vector<DataPair> data) {
+#ifdef _WIN32
+ const SOCKET client_fd = accept(fd_, NULL, NULL);
+ if (client_fd == INVALID_SOCKET) {
+ isc_throw(Unexpected, "Error in accept(): "
+ << strerror(WSAGetLastError()));
+ }
+#else
const int client_fd = accept(fd_, NULL, NULL);
if (client_fd == -1) {
isc_throw(Unexpected, "Error in accept(): " << strerror(errno));
}
+#endif
if (!setRecvTimo(client_fd)) {
// In the loop below we do blocking read. To avoid deadlock
// when the parent is buggy we'll skip it unless we can
// set a read timeout on the socket.
return;
}
- typedef std::pair<std::string, int> DataPair;
BOOST_FOREACH(DataPair cur_data, data) {
char buf[5];
memset(buf, 0, 5);
- if (isc::util::io::read_data(client_fd, buf, 4) != 4) {
+ if (isc::util::io::recv_data(client_fd, buf, 4) != 4) {
isc_throw(Unexpected, "unable to receive socket token");
}
if (cur_data.first != buf) {
@@ -476,10 +584,10 @@ private:
bool result;
if (cur_data.second == -1) {
// send 'CREATOR_SOCKET_UNAVAILABLE'
- result = isc::util::io::write_data(client_fd, "0\n", 2);
+ result = isc::util::io::send_data(client_fd, "0\n", 2);
} else if (cur_data.second == -2) {
// send 'CREATOR_SOCKET_OK' first
- result = isc::util::io::write_data(client_fd, "1\n", 2);
+ result = isc::util::io::send_data(client_fd, "1\n", 2);
if (result) {
if (send(client_fd, "a", 1, 0) != 1) {
result = false;
@@ -487,7 +595,7 @@ private:
}
} else {
// send 'CREATOR_SOCKET_OK' first
- result = isc::util::io::write_data(client_fd, "1\n", 2);
+ result = isc::util::io::send_data(client_fd, "1\n", 2);
if (result) {
if (isc::util::io::send_fd(client_fd,
cur_data.second) != 0) {
@@ -496,26 +604,50 @@ private:
}
}
if (!result) {
+#ifdef _WIN32
+ isc_throw(Exception, "Error in send_fd(): " <<
+ strerror(WSAGetLastError()));
+#else
isc_throw(Exception, "Error in send_fd(): " <<
strerror(errno));
+#endif
}
}
+#ifdef _WIN32
+ closesocket(client_fd);
+#else
close(client_fd);
+#endif
}
+#ifdef _WIN32
+ SOCKET fd_;
+#else
int fd_;
+#endif
char* path_;
};
+#ifdef _WIN32
+DWORD WINAPI childproc(void *args) {
+ childargs *cargs = static_cast<childargs *>(args);
+ TestSocket child;
+ child.fd_ = cargs->fd_;
+ child.serve(cargs->data);
+ return 0;
+}
+#endif
+
+#ifndef _WIN32
TEST_F(SocketRequestorTest, testSocketPassing) {
TestSocket ts;
- std::vector<std::pair<std::string, int> > data;
- data.push_back(std::pair<std::string, int>("foo\n", 1));
- data.push_back(std::pair<std::string, int>("bar\n", 2));
- data.push_back(std::pair<std::string, int>("foo\n", 3));
- data.push_back(std::pair<std::string, int>("foo\n", 1));
- data.push_back(std::pair<std::string, int>("foo\n", -1));
- data.push_back(std::pair<std::string, int>("foo\n", -2));
+ std::vector<DataPair> data;
+ data.push_back(DataPair("foo\n", 1));
+ data.push_back(DataPair("bar\n", 2));
+ data.push_back(DataPair("foo\n", 3));
+ data.push_back(DataPair("foo\n", 1));
+ data.push_back(DataPair("foo\n", -1));
+ data.push_back(DataPair("foo\n", -2));
// run() returns true iff we can specify read timeout so we avoid a
// deadlock. Unless there's a bug the test should succeed even without the
@@ -528,27 +660,39 @@ TEST_F(SocketRequestorTest, testSocketPassing) {
addAnswer("foo", ts.getPath());
socket_id = doRequest();
EXPECT_EQ("foo", socket_id.second);
+#ifdef _WIN32
+ EXPECT_EQ(0, closesocket(socket_id.first));
+#else
EXPECT_EQ(0, close(socket_id.first));
+#endif
// 2 should be ok too
addAnswer("bar", ts.getPath());
socket_id = doRequest();
EXPECT_EQ("bar", socket_id.second);
+#ifdef _WIN32
+ EXPECT_EQ(0, closesocket(socket_id.first));
+#else
EXPECT_EQ(0, close(socket_id.first));
+#endif
// 3 should be ok too (reuse earlier token)
addAnswer("foo", ts.getPath());
socket_id = doRequest();
EXPECT_EQ("foo", socket_id.second);
+#ifdef _WIN32
+ EXPECT_EQ(0, closesocket(socket_id.first));
+#else
EXPECT_EQ(0, close(socket_id.first));
+#endif
}
// Create a second socket server, to test that multiple different
// domains sockets would work as well (even though we don't actually
// use that feature)
TestSocket ts2;
- std::vector<std::pair<std::string, int> > data2;
- data2.push_back(std::pair<std::string, int>("foo\n", 1));
+ std::vector<DataPair> data2;
+ data2.push_back(DataPair("foo\n", 1));
const bool timo_ok2 = ts2.run(data2);
if (timo_ok2) {
@@ -556,7 +700,11 @@ TEST_F(SocketRequestorTest, testSocketPassing) {
addAnswer("foo", ts2.getPath());
socket_id = doRequest();
EXPECT_EQ("foo", socket_id.second);
+#ifdef _WIN32
+ EXPECT_EQ(0, closesocket(socket_id.first));
+#else
EXPECT_EQ(0, close(socket_id.first));
+#endif
}
if (timo_ok) {
@@ -564,7 +712,11 @@ TEST_F(SocketRequestorTest, testSocketPassing) {
addAnswer("foo", ts.getPath());
socket_id = doRequest();
EXPECT_EQ("foo", socket_id.second);
+#ifdef _WIN32
+ EXPECT_EQ(0, closesocket(socket_id.first));
+#else
EXPECT_EQ(0, close(socket_id.first));
+#endif
// -1 is a "normal" error
addAnswer("foo", ts.getPath());
@@ -585,5 +737,6 @@ TEST_F(SocketRequestorTest, testSocketPassing) {
addAnswer("foo", ts2.getPath());
EXPECT_THROW(doRequest(), SocketRequestor::SocketError);
}
+#endif
}
diff --git a/src/lib/testutils/dnsmessage_test.cc b/src/lib/testutils/dnsmessage_test.cc
index 687f742..fe6a79e 100644
--- a/src/lib/testutils/dnsmessage_test.cc
+++ b/src/lib/testutils/dnsmessage_test.cc
@@ -35,13 +35,13 @@ using namespace isc::dns;
namespace isc {
namespace testutils {
-const unsigned int QR_FLAG = 0x1;
-const unsigned int AA_FLAG = 0x2;
-const unsigned int TC_FLAG = 0x4;
-const unsigned int RD_FLAG = 0x8;
-const unsigned int RA_FLAG = 0x10;
-const unsigned int AD_FLAG = 0x20;
-const unsigned int CD_FLAG = 0x40;
+ISC_LIBTESTUTILS_API const unsigned int QR_FLAG = 0x1;
+ISC_LIBTESTUTILS_API const unsigned int AA_FLAG = 0x2;
+ISC_LIBTESTUTILS_API const unsigned int TC_FLAG = 0x4;
+ISC_LIBTESTUTILS_API const unsigned int RD_FLAG = 0x8;
+ISC_LIBTESTUTILS_API const unsigned int RA_FLAG = 0x10;
+ISC_LIBTESTUTILS_API const unsigned int AD_FLAG = 0x20;
+ISC_LIBTESTUTILS_API const unsigned int CD_FLAG = 0x40;
void
headerCheck(const Message& message, const qid_t qid, const Rcode& rcode,
diff --git a/src/lib/testutils/dnsmessage_test.h b/src/lib/testutils/dnsmessage_test.h
index d794953..0417a09 100644
--- a/src/lib/testutils/dnsmessage_test.h
+++ b/src/lib/testutils/dnsmessage_test.h
@@ -42,13 +42,13 @@ namespace testutils {
/// (The flag values is irrelevant to their wire-format values).
/// The meaning of the flags should be obvious from the variable names.
//@{
-extern const unsigned int QR_FLAG;
-extern const unsigned int AA_FLAG;
-extern const unsigned int TC_FLAG;
-extern const unsigned int RD_FLAG;
-extern const unsigned int RA_FLAG;
-extern const unsigned int AD_FLAG;
-extern const unsigned int CD_FLAG;
+extern ISC_LIBTESTUTILS_API const unsigned int QR_FLAG;
+extern ISC_LIBTESTUTILS_API const unsigned int AA_FLAG;
+extern ISC_LIBTESTUTILS_API const unsigned int TC_FLAG;
+extern ISC_LIBTESTUTILS_API const unsigned int RD_FLAG;
+extern ISC_LIBTESTUTILS_API const unsigned int RA_FLAG;
+extern ISC_LIBTESTUTILS_API const unsigned int AD_FLAG;
+extern ISC_LIBTESTUTILS_API const unsigned int CD_FLAG;
//@}
/// Set of unit tests to examine a DNS message header.
diff --git a/src/lib/testutils/socket_request.cc b/src/lib/testutils/socket_request.cc
new file mode 100644
index 0000000..10a5085
--- /dev/null
+++ b/src/lib/testutils/socket_request.cc
@@ -0,0 +1,31 @@
+// Copyright (C) 2012 Internet Systems Consortium, Inc. ("ISC")
+//
+// Permission to use, copy, modify, and/or distribute this software for any
+// purpose with or without fee is hereby granted, provided that the above
+// copyright notice and this permission notice appear in all copies.
+//
+// THE SOFTWARE IS PROVIDED "AS IS" AND ISC DISCLAIMS ALL WARRANTIES WITH
+// REGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED WARRANTIES OF MERCHANTABILITY
+// AND FITNESS. IN NO EVENT SHALL ISC BE LIABLE FOR ANY SPECIAL, DIRECT,
+// INDIRECT, OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES WHATSOEVER RESULTING FROM
+// LOSS OF USE, DATA OR PROFITS, WHETHER IN AN ACTION OF CONTRACT, NEGLIGENCE
+// OR OTHER TORTIOUS ACTION, ARISING OUT OF OR IN CONNECTION WITH THE USE OR
+// PERFORMANCE OF THIS SOFTWARE.
+
+#define ISC_LIBTESTUTILS_EXPORT
+
+#include <config.h>
+
+#ifdef _WIN32
+#include <ws2tcpip.h>
+#endif
+
+#include <testutils/socket_request.h>
+
+// Instantiate class
+
+class ISC_LIBTESTUTILS_API TestSocketRequestor;
+
+// Local Variables:
+// mode: c++
+// End:
diff --git a/src/lib/testutils/srv_test.cc b/src/lib/testutils/srv_test.cc
index bb11c71..f5a27ce 100644
--- a/src/lib/testutils/srv_test.cc
+++ b/src/lib/testutils/srv_test.cc
@@ -40,8 +40,8 @@ using namespace isc::asiolink;
namespace isc {
namespace testutils {
-const char* const DEFAULT_REMOTE_ADDRESS = "192.0.2.1";
-const uint16_t DEFAULT_REMOTE_PORT = 53210;
+const ISC_LIBTESTUTILS_API char* const DEFAULT_REMOTE_ADDRESS = "192.0.2.1";
+const ISC_LIBTESTUTILS_API uint16_t DEFAULT_REMOTE_PORT = 53210;
SrvTestBase::SrvTestBase() : request_message(Message::RENDER),
parse_message(new Message(Message::PARSE)),
diff --git a/src/lib/testutils/srv_test.h b/src/lib/testutils/srv_test.h
index 5dd0bbd..e70c8de 100644
--- a/src/lib/testutils/srv_test.h
+++ b/src/lib/testutils/srv_test.h
@@ -35,19 +35,19 @@ class ISC_LIBTESTUTILS_API IOEndpoint;
namespace isc {
namespace testutils {
-extern const char* const DEFAULT_REMOTE_ADDRESS;
-extern const uint16_t DEFAULT_REMOTE_PORT;
+extern ISC_LIBTESTUTILS_API const char* const DEFAULT_REMOTE_ADDRESS;
+extern ISC_LIBTESTUTILS_API const uint16_t DEFAULT_REMOTE_PORT;
// These are flags to indicate whether the corresponding flag bit of the
// DNS header is to be set in the test cases. (The flag values
// is irrelevant to their wire-format values)
-extern const unsigned int QR_FLAG;
-extern const unsigned int AA_FLAG;
-extern const unsigned int TC_FLAG;
-extern const unsigned int RD_FLAG;
-extern const unsigned int RA_FLAG;
-extern const unsigned int AD_FLAG;
-extern const unsigned int CD_FLAG;
+extern ISC_LIBTESTUTILS_API const unsigned int QR_FLAG;
+extern ISC_LIBTESTUTILS_API const unsigned int AA_FLAG;
+extern ISC_LIBTESTUTILS_API const unsigned int TC_FLAG;
+extern ISC_LIBTESTUTILS_API const unsigned int RD_FLAG;
+extern ISC_LIBTESTUTILS_API const unsigned int RA_FLAG;
+extern ISC_LIBTESTUTILS_API const unsigned int AD_FLAG;
+extern ISC_LIBTESTUTILS_API const unsigned int CD_FLAG;
/// \brief The base class for Auth and Recurse test case
class ISC_LIBTESTUTILS_API SrvTestBase : public ::testing::Test {
diff --git a/src/lib/util/python/dll.h b/src/lib/util/python/dll.h
deleted file mode 100644
index 92a5d1b..0000000
--- a/src/lib/util/python/dll.h
+++ /dev/null
@@ -1,36 +0,0 @@
-// Copyright (C) 2012 Internet Systems Consortium, Inc. ("ISC")
-//
-// Permission to use, copy, modify, and/or distribute this software for any
-// purpose with or without fee is hereby granted, provided that the above
-// copyright notice and this permission notice appear in all copies.
-//
-// THE SOFTWARE IS PROVIDED "AS IS" AND ISC DISCLAIMS ALL WARRANTIES WITH
-// REGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED WARRANTIES OF MERCHANTABILITY
-// AND FITNESS. IN NO EVENT SHALL ISC BE LIABLE FOR ANY SPECIAL, DIRECT,
-// INDIRECT, OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES WHATSOEVER RESULTING FROM
-// LOSS OF USE, DATA OR PROFITS, WHETHER IN AN ACTION OF CONTRACT, NEGLIGENCE
-// OR OTHER TORTIOUS ACTION, ARISING OUT OF OR IN CONNECTION WITH THE USE OR
-// PERFORMANCE OF THIS SOFTWARE.
-
-#ifndef __LIBUTIL_PYTHON_H
-#define __LIBUTIL_PYTHON_H 1
-
-#ifdef ISC_LIBDNS_PYTHON_EXPORT
-#define ISC_LIBUTIL_PYTHON_EXPORT
-#endif
-
-#if !defined(_WIN32) || defined(USE_STATIC_LINK)
-#define ISC_LIBUTIL_PYTHON_API
-#else
-#ifdef ISC_LIBUTIL_PYTHON_EXPORT
-#define ISC_LIBUTIL_PYTHON_API __declspec(dllexport)
-#else
-#define ISC_LIBUTIL_PYTHON_API __declspec(dllimport)
-#endif
-#endif
-
-#endif // __LIBUTIL_PYTHON_H
-
-// Local Variables:
-// mode: c++
-// End:
diff --git a/src/lib/util/python/pycppwrapper_util.h b/src/lib/util/python/pycppwrapper_util.h
index 666675f..9a2ac5d 100644
--- a/src/lib/util/python/pycppwrapper_util.h
+++ b/src/lib/util/python/pycppwrapper_util.h
@@ -19,7 +19,7 @@
#include <exceptions/exceptions.h>
-#include <util/python/dll.h>
+#include <dns/python/dll.h>
/**
* @file pycppwrapper_util.h
@@ -61,7 +61,7 @@ namespace python {
/// This is thrown inside this utility when it finds a NULL pointer is passed
/// when it should not be NULL.
-class ISC_LIBUTIL_PYTHON_API PyCPPWrapperException : public isc::Exception {
+class ISC_PYTHON_WRAPPER_API PyCPPWrapperException : public isc::Exception {
public:
PyCPPWrapperException(const char* file, size_t line, const char* what) :
isc::Exception(file, line, what) {}
diff --git a/tests/tools/badpacket/badpacket.cc b/tests/tools/badpacket/badpacket.cc
index be393d5..a7563f7 100644
--- a/tests/tools/badpacket/badpacket.cc
+++ b/tests/tools/badpacket/badpacket.cc
@@ -12,11 +12,13 @@
// OR OTHER TORTIOUS ACTION, ARISING OUT OF OR IN CONNECTION WITH THE USE OR
// PERFORMANCE OF THIS SOFTWARE.
+#include <config.h>
+
+#ifndef _WIN32
#include <unistd.h>
+#endif
#include <iostream>
-#include <config.h>
-
#include <exceptions/exceptions.h>
#include <log/logger_support.h>
#include "command_options.h"
diff --git a/tests/tools/badpacket/command_options.cc b/tests/tools/badpacket/command_options.cc
index eea5ff0..25eded6 100644
--- a/tests/tools/badpacket/command_options.cc
+++ b/tests/tools/badpacket/command_options.cc
@@ -18,7 +18,7 @@
#include <vector>
#include <boost/lexical_cast.hpp>
-#include <getopt.h>
+#include <getopt_long.h>
#include "exceptions/exceptions.h"
#include "util/strutil.h"
diff --git a/tests/tools/badpacket/header_flags.h b/tests/tools/badpacket/header_flags.h
index 5d74e75..c7f915b 100644
--- a/tests/tools/badpacket/header_flags.h
+++ b/tests/tools/badpacket/header_flags.h
@@ -75,21 +75,18 @@ public:
/// hold, a BadValue exception is thrown.
void set(int index, uint16_t value) {
- // Declare an OptionInfo object for brevity and check the index is
- // valid.
- OptionInfo o;
- o.checkIndex(index);
+ OptionInfo::checkIndex(index);
// Ensure the value is within limits and throw an exception if not. (This
// should not really be needed, as the command line parsing should have
// checked the limits. But be safe.)
- if ((value < o.minval(index)) || (value > o.maxval(index))) {
+ if ((value < OptionInfo::minval(index)) || (value > OptionInfo::maxval(index))) {
isc_throw(isc::BadValue, "value of index " << index << " is out of range");
}
// Clear the field then set it with the value.
- flags_ &= ~o.mask(index);
- flags_ |= (value << o.offset(index));
+ flags_ &= ~OptionInfo::mask(index);
+ flags_ |= (value << OptionInfo::offset(index));
}
private:
diff --git a/tests/tools/badpacket/option_info.h b/tests/tools/badpacket/option_info.h
index a340c1d..23f487f 100644
--- a/tests/tools/badpacket/option_info.h
+++ b/tests/tools/badpacket/option_info.h
@@ -74,8 +74,13 @@ public:
/// flags field command options. Not all members of the structure are
/// relevant to all options.
struct Parameter {
+#ifdef _WIN32
+ char short_form; // Short form of the command switch
+ char* long_form; // Long form of the command switch
+#else
const char short_form; // Short form of the command switch
const char* long_form; // Long form of the command switch
+#endif
int word; // Byte offset of word in message header
uint16_t mask; // Bit mask of field in the flags word
int offset; // Offset of field in flags word
diff --git a/win32build/VS2010/b10-dhcp6/b10-dhcp6.vcxproj b/win32build/VS2010/b10-dhcp6/b10-dhcp6.vcxproj
index 8a17a44..df96f70 100755
--- a/win32build/VS2010/b10-dhcp6/b10-dhcp6.vcxproj
+++ b/win32build/VS2010/b10-dhcp6/b10-dhcp6.vcxproj
@@ -59,7 +59,7 @@
<SubSystem>Console</SubSystem>
<GenerateDebugInformation>true</GenerateDebugInformation>
<OutputFile>$(OutDir)b10-dhcp6$(TargetExt)</OutputFile>
- <AdditionalDependencies>libexceptionsd.lib;libutild.lib;liblogdlib;libccd.lib;libcfgclientd.lib;libasiolinkd.lib;libdhcpd.lib;log4cplusD.lib;iphlpapi.lib;%(AdditionalDependencies)</AdditionalDependencies>
+ <AdditionalDependencies>libexceptionsd.lib;libutild.lib;liblogd.lib;libccd.lib;libcfgclientd.lib;libasiolinkd.lib;libdhcpd.lib;log4cplusD.lib;iphlpapi.lib;%(AdditionalDependencies)</AdditionalDependencies>
<AdditionalLibraryDirectories>..\$(Configuration);..\..\..\..\log4cplus\v100\$(Configuration);%BOOST%\lib;%(AdditionalLibraryDirectories)</AdditionalLibraryDirectories>
</Link>
<PreBuildEvent>
diff --git a/win32build/VS2010/b10-resolver_tests/b10-resolver_tests.vcxproj b/win32build/VS2010/b10-resolver_tests/b10-resolver_tests.vcxproj
index 50f3ca9..ceabb3b 100755
--- a/win32build/VS2010/b10-resolver_tests/b10-resolver_tests.vcxproj
+++ b/win32build/VS2010/b10-resolver_tests/b10-resolver_tests.vcxproj
@@ -52,7 +52,7 @@
<PrecompiledHeader>NotUsing</PrecompiledHeader>
<WarningLevel>Level4</WarningLevel>
<Optimization>Disabled</Optimization>
- <PreprocessorDefinitions>WIN32;TEST_DATA_DIR="%BIND10HOME%/src/lib/testutils/testdata";TEST_DATA_BUILDDIR="%BIND10HOME%/src/lib/testutils/testdata";_DEBUG;_CONSOLE;%(PreprocessorDefinitions)</PreprocessorDefinitions>
+ <PreprocessorDefinitions>WIN32;GTEST_CREATE_SHARED_LIBRARY=1;TEST_DATA_DIR="%BIND10HOME%/src/lib/testutils/testdata";TEST_DATA_BUILDDIR="%BIND10HOME%/src/lib/testutils/testdata";_DEBUG;_CONSOLE;%(PreprocessorDefinitions)</PreprocessorDefinitions>
<AdditionalIncludeDirectories>..\..;..\..\..\src\lib;..\..\..\src\bin;..\..\..\ext\asio;..\..\..\..\gtest\include;%BOOST%;%(AdditionalIncludeDirectories)</AdditionalIncludeDirectories>
<CompileAs>CompileAsCpp</CompileAs>
</ClCompile>
@@ -60,8 +60,8 @@
<SubSystem>Console</SubSystem>
<GenerateDebugInformation>true</GenerateDebugInformation>
<OutputFile>$(OutDir)run_unittests.exe</OutputFile>
- <AdditionalLibraryDirectories>..\libexceptions\$(Configuration);..\libutil\$(Configuration);..\libutil_io\$(Configuration);..\libutil_unittests\$(Configuration);..\liblog\$(Configuration);..\libcryptolink\$(Configuration);..\libdns++\$(Configuration);..\libcc\$(Configuration);..\libcfgclient\$(Configuration);..\libacl\$(Configuration);..\libdnsacl\$(Configuration);..\libasiolink\$(Configuration);..\libasiodns\$(Configuration);..\libnsas\$(Configuration);..\libcache\$(Configuration);..\libresolve\$(Configuration);..\libtestutils\$(Configuration);..\libserver_common\$(Configuration);..\..\..\..\botan\md10\$(Configuration);..\..\..\..\log4cplus\md10\$(Configuration);..\..\..\..\gtest\md10\$(Configuration);%BOOST%/lib;%(AdditionalLibraryDirectories)</AdditionalLibraryDirectories>
- <AdditionalDependencies>libexceptions.lib;libutil.lib;libutil_io.lib;libutil_unittests.lib;liblog.lib;libcryptolink.lib;libdns++.lib;libcc.lib;libcfgclient.lib;libacl.lib;libdnsacl.lib;libasiolink.lib;libasiodns.lib;libnsas.lib;libcache.lib;libresolve.lib;libtestutils.lib;libserver_common.lib;botan.lib;log4cplusSD.lib;gtestd.lib;%(AdditionalDependencies)</AdditionalDependencies>
+ <AdditionalLibraryDirectories>..\$(Configuration);..\..\..\..\botan\v100\$(Configuration);..\..\..\..\log4cplus\v100\$(Configuration);..\..\..\..\gtest\v100\$(Configuration);%BOOST%/lib;%(AdditionalLibraryDirectories)</AdditionalLibraryDirectories>
+ <AdditionalDependencies>libexceptionsd.lib;libutild.lib;libutil_iod.lib;libutil_unittestsd.lib;liblogd.lib;libcryptolinkd.lib;libdns++d.lib;libccd.lib;libcfgclientd.lib;libacld.lib;libdnsacld.lib;libasiolinkd.lib;libasiodnsd.lib;libnsasd.lib;libcached.lib;libresolved.lib;libtestutilsd.lib;libserver_commond.lib;botand.lib;log4cplusD.lib;gtestd.lib;%(AdditionalDependencies)</AdditionalDependencies>
</Link>
</ItemDefinitionGroup>
<ItemDefinitionGroup Condition="'$(Configuration)|$(Platform)'=='Release|Win32'">
@@ -71,7 +71,7 @@
<Optimization>MaxSpeed</Optimization>
<FunctionLevelLinking>true</FunctionLevelLinking>
<IntrinsicFunctions>true</IntrinsicFunctions>
- <PreprocessorDefinitions>WIN32;TEST_DATA_DIR="%BIND10HOME%/src/lib/testutils/testdata";TEST_DATA_BUILDDIR="%BIND10HOME%/src/lib/testutils/testdata";NDEBUG;_CONSOLE;%(PreprocessorDefinitions)</PreprocessorDefinitions>
+ <PreprocessorDefinitions>WIN32;GTEST_CREATE_SHARED_LIBRARY=1;TEST_DATA_DIR="%BIND10HOME%/src/lib/testutils/testdata";TEST_DATA_BUILDDIR="%BIND10HOME%/src/lib/testutils/testdata";NDEBUG;_CONSOLE;%(PreprocessorDefinitions)</PreprocessorDefinitions>
<AdditionalIncludeDirectories>..\..;..\..\..\src\lib;..\..\..\src\bin;..\..\..\ext\asio;..\..\..\..\gtest\include;%BOOST%;%(AdditionalIncludeDirectories)</AdditionalIncludeDirectories>
<CompileAs>CompileAsCpp</CompileAs>
</ClCompile>
@@ -81,8 +81,8 @@
<EnableCOMDATFolding>true</EnableCOMDATFolding>
<OptimizeReferences>true</OptimizeReferences>
<OutputFile>$(OutDir)run_unittests.exe</OutputFile>
- <AdditionalLibraryDirectories>..\libexceptions\$(Configuration);..\libutil\$(Configuration);..\libutil_io\$(Configuration);..\libutil_unittests\$(Configuration);..\liblog\$(Configuration);..\libcryptolink\$(Configuration);..\libdns++\$(Configuration);..\libcc\$(Configuration);..\libcfgclient\$(Configuration);..\libacl\$(Configuration);..\libdnsacl\$(Configuration);..\libasiolink\$(Configuration);..\libasiodns\$(Configuration);..\libnsas\$(Configuration);..\libcache\$(Configuration);..\libresolve\$(Configuration);..\libtestutils\$(Configuration);..\libserver_common\$(Configuration);..\..\..\..\botan\md10\$(Configuration);..\..\..\..\log4cplus\md10\$(Configuration);..\..\..\..\gtest\md10\$(Configuration);%BOOST%/lib;%(AdditionalLibraryDirectories)</AdditionalLibraryDirectories>
- <AdditionalDependencies>libexceptions.lib;libutil.lib;libutil_io.lib;libutil_unittests.lib;liblog.lib;libcryptolink.lib;libdns++.lib;libcc.lib;libcfgclient.lib;libacl.lib;libdnsacl.lib;libasiolink.lib;libasiodns.lib;libnsas.lib;libcache.lib;libresolve.lib;libtestutils.lib;libserver_common.lib;botan.lib;log4cplusS.lib;gtest.lib;%(AdditionalDependencies)</AdditionalDependencies>
+ <AdditionalLibraryDirectories>..\$(Configuration);..\..\..\..\botan\v100\$(Configuration);..\..\..\..\log4cplus\v100\$(Configuration);..\..\..\..\gtest\v100\$(Configuration);%BOOST%/lib;%(AdditionalLibraryDirectories)</AdditionalLibraryDirectories>
+ <AdditionalDependencies>libexceptions.lib;libutil.lib;libutil_io.lib;libutil_unittests.lib;liblog.lib;libcryptolink.lib;libdns++.lib;libcc.lib;libcfgclient.lib;libacl.lib;libdnsacl.lib;libasiolink.lib;libasiodns.lib;libnsas.lib;libcache.lib;libresolve.lib;libtestutils.lib;libserver_common.lib;botan.lib;log4cplus.lib;gtest.lib;%(AdditionalDependencies)</AdditionalDependencies>
</Link>
</ItemDefinitionGroup>
<ItemGroup>
diff --git a/win32build/VS2010/bind10.sln b/win32build/VS2010/bind10.sln
index fefc0f2..6a771d9 100755
--- a/win32build/VS2010/bind10.sln
+++ b/win32build/VS2010/bind10.sln
@@ -7,9 +7,13 @@ Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "BINDInstall", "BINDInstall\
{9F69DE07-D285-4B5C-8528-DF975C59ED3B} = {9F69DE07-D285-4B5C-8528-DF975C59ED3B}
{3FFD260A-C606-49D1-A34F-74B78D8DC76F} = {3FFD260A-C606-49D1-A34F-74B78D8DC76F}
{1AB80214-A605-4453-8960-F618C72C4CF3} = {1AB80214-A605-4453-8960-F618C72C4CF3}
+ {4D551D14-3C0F-4554-B20C-4B600249E42A} = {4D551D14-3C0F-4554-B20C-4B600249E42A}
{5D857B14-7763-466C-9D4E-D7C2E57C0E7F} = {5D857B14-7763-466C-9D4E-D7C2E57C0E7F}
+ {32624520-5341-471B-B88D-2599DBCDABF5} = {32624520-5341-471B-B88D-2599DBCDABF5}
+ {831EDB24-3B0A-44AE-A192-6F3DEA1A9BA6} = {831EDB24-3B0A-44AE-A192-6F3DEA1A9BA6}
{33927325-C9B5-4FE6-B69F-318433AFF4BD} = {33927325-C9B5-4FE6-B69F-318433AFF4BD}
{D781E925-FE57-4C75-9E26-BBC102B6A24A} = {D781E925-FE57-4C75-9E26-BBC102B6A24A}
+ {1ADF152B-0153-424D-B195-5821B30128D6} = {1ADF152B-0153-424D-B195-5821B30128D6}
{7D04222B-643C-446C-A2B8-93AF74A86246} = {7D04222B-643C-446C-A2B8-93AF74A86246}
{DCF4ED2E-FFD1-4432-AFEF-8D6EC96B79A2} = {DCF4ED2E-FFD1-4432-AFEF-8D6EC96B79A2}
{E7E6EC32-E109-4334-9BCD-BC8190489070} = {E7E6EC32-E109-4334-9BCD-BC8190489070}
@@ -17,40 +21,55 @@ Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "BINDInstall", "BINDInstall\
{6D55503E-0B43-4273-B6A5-4CEB39E114AC} = {6D55503E-0B43-4273-B6A5-4CEB39E114AC}
{13215E3E-E75D-463D-A0EF-93A1C9A20896} = {13215E3E-E75D-463D-A0EF-93A1C9A20896}
{9FBAAE48-1543-41C9-80EA-A65E7C1D1A98} = {9FBAAE48-1543-41C9-80EA-A65E7C1D1A98}
+ {48B8644A-79FB-4D03-A981-1CA21FEE3286} = {48B8644A-79FB-4D03-A981-1CA21FEE3286}
{635B804D-1B52-433E-9ECD-84F507FDB1F1} = {635B804D-1B52-433E-9ECD-84F507FDB1F1}
{67046450-CCEA-4CAC-A05B-17516F3FB540} = {67046450-CCEA-4CAC-A05B-17516F3FB540}
{6A29BC58-CA6E-4196-8E88-C675FE944BBF} = {6A29BC58-CA6E-4196-8E88-C675FE944BBF}
+ {D28AD35D-E759-442E-8AC9-582DB8AA7D97} = {D28AD35D-E759-442E-8AC9-582DB8AA7D97}
{55BCB364-62B0-4F93-8B88-38F3349B22C8} = {55BCB364-62B0-4F93-8B88-38F3349B22C8}
{8F120666-1A69-4506-8546-0F665E80FFB7} = {8F120666-1A69-4506-8546-0F665E80FFB7}
+ {47052F67-D9A0-433E-A074-5E50247B5F48} = {47052F67-D9A0-433E-A074-5E50247B5F48}
{8412D26C-6C2B-4FCC-ABB4-E9509E833951} = {8412D26C-6C2B-4FCC-ABB4-E9509E833951}
{DC86E86E-BB80-4C93-8A1F-E409C1FA38D2} = {DC86E86E-BB80-4C93-8A1F-E409C1FA38D2}
{2C518972-FF5F-4D33-9D3E-5BCC6357EDD7} = {2C518972-FF5F-4D33-9D3E-5BCC6357EDD7}
+ {E5640378-81D0-4769-B108-4DF4E2B0AD0C} = {E5640378-81D0-4769-B108-4DF4E2B0AD0C}
{F8616086-9CE9-4F32-BC97-8494EADAEC6F} = {F8616086-9CE9-4F32-BC97-8494EADAEC6F}
{761E7D88-6CCB-4E41-9F1E-6C1FBBD062F5} = {761E7D88-6CCB-4E41-9F1E-6C1FBBD062F5}
+ {D9178188-26B3-466B-A85A-C3C3344438BE} = {D9178188-26B3-466B-A85A-C3C3344438BE}
{6280D58A-5E05-45D1-8B79-DF677C114CD4} = {6280D58A-5E05-45D1-8B79-DF677C114CD4}
+ {D09B618B-D0E4-468D-A4BD-E204B4344C18} = {D09B618B-D0E4-468D-A4BD-E204B4344C18}
{FF298091-A570-41CF-BB91-841ECB7F4E5F} = {FF298091-A570-41CF-BB91-841ECB7F4E5F}
+ {FAF93094-D5F8-45AC-8C6C-29BCC522204B} = {FAF93094-D5F8-45AC-8C6C-29BCC522204B}
+ {3D451C9D-2AE7-4E8D-93B8-4E5470064FF5} = {3D451C9D-2AE7-4E8D-93B8-4E5470064FF5}
{08075CA0-4E2C-451E-BAA6-E422353A5FC1} = {08075CA0-4E2C-451E-BAA6-E422353A5FC1}
{6AC4F7A4-9BDC-415F-81DB-6332CACA38B3} = {6AC4F7A4-9BDC-415F-81DB-6332CACA38B3}
{D85833AC-23A9-4710-9911-8AAEC4BF6E8F} = {D85833AC-23A9-4710-9911-8AAEC4BF6E8F}
{1CCFABAC-5A0B-499F-914E-AAD0371EEC4F} = {1CCFABAC-5A0B-499F-914E-AAD0371EEC4F}
{B5D971AD-D95B-4A15-9E31-38AEF4F69627} = {B5D971AD-D95B-4A15-9E31-38AEF4F69627}
+ {B681A9B5-8BA0-4553-B3EC-F94DC4986CA3} = {B681A9B5-8BA0-4553-B3EC-F94DC4986CA3}
{EB54F7B8-FAEF-4348-989C-D4E6B42CEFB1} = {EB54F7B8-FAEF-4348-989C-D4E6B42CEFB1}
{13D541BC-8365-42F7-840F-A117CA0413DD} = {13D541BC-8365-42F7-840F-A117CA0413DD}
{2D4553C4-1AA7-4524-ABC0-6FDF4EEE6F2E} = {2D4553C4-1AA7-4524-ABC0-6FDF4EEE6F2E}
{813BA1C9-8CD8-4B06-B1C0-FDAB576AC4B6} = {813BA1C9-8CD8-4B06-B1C0-FDAB576AC4B6}
+ {58BDBBCB-A5C5-4C3B-BC3C-EB8AD72D8DAC} = {58BDBBCB-A5C5-4C3B-BC3C-EB8AD72D8DAC}
{FEFFE0CB-CD6B-4E61-854C-39506D6DCD5D} = {FEFFE0CB-CD6B-4E61-854C-39506D6DCD5D}
{2E64F6CC-3AD9-4DA7-8E05-ABBB83F9AFC4} = {2E64F6CC-3AD9-4DA7-8E05-ABBB83F9AFC4}
+ {F27BC0D0-A334-4DC0-9DC9-880D5DA74524} = {F27BC0D0-A334-4DC0-9DC9-880D5DA74524}
{AC4806D1-C2CC-444B-8F0D-209851A969D2} = {AC4806D1-C2CC-444B-8F0D-209851A969D2}
{7BA6A1D1-3C42-40B9-9336-342982DD408B} = {7BA6A1D1-3C42-40B9-9336-342982DD408B}
{65B0B6D2-94CE-4A21-85E7-A047C79044F9} = {65B0B6D2-94CE-4A21-85E7-A047C79044F9}
{F6E728D3-A0B2-40F6-9B91-7D4474D778F3} = {F6E728D3-A0B2-40F6-9B91-7D4474D778F3}
+ {FD0368DA-87CE-44D8-802B-9E755E95B493} = {FD0368DA-87CE-44D8-802B-9E755E95B493}
{564B0ADE-76A4-4833-9610-8DEEA6A15423} = {564B0ADE-76A4-4833-9610-8DEEA6A15423}
{7EB244E7-D381-4CF4-A2D4-739B81F77588} = {7EB244E7-D381-4CF4-A2D4-739B81F77588}
{C90961EC-3DDF-432F-8E3D-BDA06E4859D9} = {C90961EC-3DDF-432F-8E3D-BDA06E4859D9}
+ {66C9A5EC-514B-4BDC-AC74-ED4CB465CAAF} = {66C9A5EC-514B-4BDC-AC74-ED4CB465CAAF}
{C7DEAFEC-423B-486D-BBD8-896B0DE69DDE} = {C7DEAFEC-423B-486D-BBD8-896B0DE69DDE}
{9C5774EF-E833-4150-8B7A-B6082D879775} = {9C5774EF-E833-4150-8B7A-B6082D879775}
{7B80F6F0-E0CD-40D3-87B7-95C2EA2581BA} = {7B80F6F0-E0CD-40D3-87B7-95C2EA2581BA}
+ {F1C335F5-32B3-4401-8CEF-CB0990D4FE7E} = {F1C335F5-32B3-4401-8CEF-CB0990D4FE7E}
{CC29C1F9-A77B-476C-803E-8830F8312571} = {CC29C1F9-A77B-476C-803E-8830F8312571}
+ {165C00FA-A384-450C-95D4-7069FBAEE072} = {165C00FA-A384-450C-95D4-7069FBAEE072}
{2844FDFB-A0A1-4FA4-A654-15D69CC717DD} = {2844FDFB-A0A1-4FA4-A654-15D69CC717DD}
{AEF3DFFE-B566-4E6A-B299-B59B81022C06} = {AEF3DFFE-B566-4E6A-B299-B59B81022C06}
EndProjectSection
@@ -296,21 +315,30 @@ Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "libtestutils", "libtestutil
{8F120666-1A69-4506-8546-0F665E80FFB7} = {8F120666-1A69-4506-8546-0F665E80FFB7}
{F6E728D3-A0B2-40F6-9B91-7D4474D778F3} = {F6E728D3-A0B2-40F6-9B91-7D4474D778F3}
{7EB244E7-D381-4CF4-A2D4-739B81F77588} = {7EB244E7-D381-4CF4-A2D4-739B81F77588}
+ {66C9A5EC-514B-4BDC-AC74-ED4CB465CAAF} = {66C9A5EC-514B-4BDC-AC74-ED4CB465CAAF}
{CC29C1F9-A77B-476C-803E-8830F8312571} = {CC29C1F9-A77B-476C-803E-8830F8312571}
EndProjectSection
EndProject
Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "libdatasrc", "libdatasrc\libdatasrc.vcxproj", "{32624520-5341-471B-B88D-2599DBCDABF5}"
ProjectSection(ProjectDependencies) = postProject
- {55BCB364-62B0-4F93-8B88-38F3349B22C8} = {55BCB364-62B0-4F93-8B88-38F3349B22C8}
+ {8F120666-1A69-4506-8546-0F665E80FFB7} = {8F120666-1A69-4506-8546-0F665E80FFB7}
+ {F8616086-9CE9-4F32-BC97-8494EADAEC6F} = {F8616086-9CE9-4F32-BC97-8494EADAEC6F}
+ {2E64F6CC-3AD9-4DA7-8E05-ABBB83F9AFC4} = {2E64F6CC-3AD9-4DA7-8E05-ABBB83F9AFC4}
+ {F6E728D3-A0B2-40F6-9B91-7D4474D778F3} = {F6E728D3-A0B2-40F6-9B91-7D4474D778F3}
+ {CC29C1F9-A77B-476C-803E-8830F8312571} = {CC29C1F9-A77B-476C-803E-8830F8312571}
+ {AEF3DFFE-B566-4E6A-B299-B59B81022C06} = {AEF3DFFE-B566-4E6A-B299-B59B81022C06}
EndProjectSection
EndProject
Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "libdatasrc_tests", "libdatasrc_tests\libdatasrc_tests.vcxproj", "{4D551D14-3C0F-4554-B20C-4B600249E42A}"
ProjectSection(ProjectDependencies) = postProject
{32624520-5341-471B-B88D-2599DBCDABF5} = {32624520-5341-471B-B88D-2599DBCDABF5}
{7D04222B-643C-446C-A2B8-93AF74A86246} = {7D04222B-643C-446C-A2B8-93AF74A86246}
+ {D28AD35D-E759-442E-8AC9-582DB8AA7D97} = {D28AD35D-E759-442E-8AC9-582DB8AA7D97}
{55BCB364-62B0-4F93-8B88-38F3349B22C8} = {55BCB364-62B0-4F93-8B88-38F3349B22C8}
{8F120666-1A69-4506-8546-0F665E80FFB7} = {8F120666-1A69-4506-8546-0F665E80FFB7}
+ {58BDBBCB-A5C5-4C3B-BC3C-EB8AD72D8DAC} = {58BDBBCB-A5C5-4C3B-BC3C-EB8AD72D8DAC}
{F6E728D3-A0B2-40F6-9B91-7D4474D778F3} = {F6E728D3-A0B2-40F6-9B91-7D4474D778F3}
+ {FD0368DA-87CE-44D8-802B-9E755E95B493} = {FD0368DA-87CE-44D8-802B-9E755E95B493}
{CC29C1F9-A77B-476C-803E-8830F8312571} = {CC29C1F9-A77B-476C-803E-8830F8312571}
{2844FDFB-A0A1-4FA4-A654-15D69CC717DD} = {2844FDFB-A0A1-4FA4-A654-15D69CC717DD}
{AEF3DFFE-B566-4E6A-B299-B59B81022C06} = {AEF3DFFE-B566-4E6A-B299-B59B81022C06}
@@ -318,7 +346,16 @@ Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "libdatasrc_tests", "libdata
EndProject
Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "libserver_common", "libserver_common\libserver_common.vcxproj", "{66C9A5EC-514B-4BDC-AC74-ED4CB465CAAF}"
ProjectSection(ProjectDependencies) = postProject
+ {69048307-9655-4AAA-B07E-B67345C1DEF9} = {69048307-9655-4AAA-B07E-B67345C1DEF9}
{32624520-5341-471B-B88D-2599DBCDABF5} = {32624520-5341-471B-B88D-2599DBCDABF5}
+ {7D04222B-643C-446C-A2B8-93AF74A86246} = {7D04222B-643C-446C-A2B8-93AF74A86246}
+ {635B804D-1B52-433E-9ECD-84F507FDB1F1} = {635B804D-1B52-433E-9ECD-84F507FDB1F1}
+ {813BA1C9-8CD8-4B06-B1C0-FDAB576AC4B6} = {813BA1C9-8CD8-4B06-B1C0-FDAB576AC4B6}
+ {2E64F6CC-3AD9-4DA7-8E05-ABBB83F9AFC4} = {2E64F6CC-3AD9-4DA7-8E05-ABBB83F9AFC4}
+ {AC4806D1-C2CC-444B-8F0D-209851A969D2} = {AC4806D1-C2CC-444B-8F0D-209851A969D2}
+ {F6E728D3-A0B2-40F6-9B91-7D4474D778F3} = {F6E728D3-A0B2-40F6-9B91-7D4474D778F3}
+ {CC29C1F9-A77B-476C-803E-8830F8312571} = {CC29C1F9-A77B-476C-803E-8830F8312571}
+ {AEF3DFFE-B566-4E6A-B299-B59B81022C06} = {AEF3DFFE-B566-4E6A-B299-B59B81022C06}
EndProjectSection
EndProject
Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "libserver_common_tests", "libserver_common_tests\libserver_common_tests.vcxproj", "{D09B618B-D0E4-468D-A4BD-E204B4344C18}"
@@ -384,6 +421,7 @@ Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "libdhcp", "libdhcp\libdhcp.
ProjectSection(ProjectDependencies) = postProject
{69048307-9655-4AAA-B07E-B67345C1DEF9} = {69048307-9655-4AAA-B07E-B67345C1DEF9}
{7D04222B-643C-446C-A2B8-93AF74A86246} = {7D04222B-643C-446C-A2B8-93AF74A86246}
+ {8F120666-1A69-4506-8546-0F665E80FFB7} = {8F120666-1A69-4506-8546-0F665E80FFB7}
EndProjectSection
EndProject
Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "libdhcp_tests", "libdhcp_tests\libdhcp_tests.vcxproj", "{D9178188-26B3-466B-A85A-C3C3344438BE}"
@@ -468,8 +506,8 @@ Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "pyddatasrc", "pyddatasrc\py
{7D04222B-643C-446C-A2B8-93AF74A86246} = {7D04222B-643C-446C-A2B8-93AF74A86246}
{13215E3E-E75D-463D-A0EF-93A1C9A20896} = {13215E3E-E75D-463D-A0EF-93A1C9A20896}
{8F120666-1A69-4506-8546-0F665E80FFB7} = {8F120666-1A69-4506-8546-0F665E80FFB7}
- {13D541BC-8365-42F7-840F-A117CA0413DD} = {13D541BC-8365-42F7-840F-A117CA0413DD}
{F6E728D3-A0B2-40F6-9B91-7D4474D778F3} = {F6E728D3-A0B2-40F6-9B91-7D4474D778F3}
+ {CC29C1F9-A77B-476C-803E-8830F8312571} = {CC29C1F9-A77B-476C-803E-8830F8312571}
{AEF3DFFE-B566-4E6A-B299-B59B81022C06} = {AEF3DFFE-B566-4E6A-B299-B59B81022C06}
EndProjectSection
EndProject
@@ -621,6 +659,33 @@ Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "pydutil_unittests", "pyduti
{8F120666-1A69-4506-8546-0F665E80FFB7} = {8F120666-1A69-4506-8546-0F665E80FFB7}
EndProjectSection
EndProject
+Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "libdatasrc_sqlite3", "libdatasrc_sqlite3\libdatasrc_sqlite3.vcxproj", "{58BDBBCB-A5C5-4C3B-BC3C-EB8AD72D8DAC}"
+ ProjectSection(ProjectDependencies) = postProject
+ {32624520-5341-471B-B88D-2599DBCDABF5} = {32624520-5341-471B-B88D-2599DBCDABF5}
+ {7D04222B-643C-446C-A2B8-93AF74A86246} = {7D04222B-643C-446C-A2B8-93AF74A86246}
+ {8F120666-1A69-4506-8546-0F665E80FFB7} = {8F120666-1A69-4506-8546-0F665E80FFB7}
+ {F6E728D3-A0B2-40F6-9B91-7D4474D778F3} = {F6E728D3-A0B2-40F6-9B91-7D4474D778F3}
+ {CC29C1F9-A77B-476C-803E-8830F8312571} = {CC29C1F9-A77B-476C-803E-8830F8312571}
+ {AEF3DFFE-B566-4E6A-B299-B59B81022C06} = {AEF3DFFE-B566-4E6A-B299-B59B81022C06}
+ EndProjectSection
+EndProject
+Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "libdatasrc_memory", "libdatasrc_memory\libdatasrc_memory.vcxproj", "{D28AD35D-E759-442E-8AC9-582DB8AA7D97}"
+ ProjectSection(ProjectDependencies) = postProject
+ {32624520-5341-471B-B88D-2599DBCDABF5} = {32624520-5341-471B-B88D-2599DBCDABF5}
+ {7D04222B-643C-446C-A2B8-93AF74A86246} = {7D04222B-643C-446C-A2B8-93AF74A86246}
+ {F6E728D3-A0B2-40F6-9B91-7D4474D778F3} = {F6E728D3-A0B2-40F6-9B91-7D4474D778F3}
+ {CC29C1F9-A77B-476C-803E-8830F8312571} = {CC29C1F9-A77B-476C-803E-8830F8312571}
+ {AEF3DFFE-B566-4E6A-B299-B59B81022C06} = {AEF3DFFE-B566-4E6A-B299-B59B81022C06}
+ EndProjectSection
+EndProject
+Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "libdatasrc_static", "libdatasrc_static\libdatasrc_static.vcxproj", "{FD0368DA-87CE-44D8-802B-9E755E95B493}"
+ ProjectSection(ProjectDependencies) = postProject
+ {32624520-5341-471B-B88D-2599DBCDABF5} = {32624520-5341-471B-B88D-2599DBCDABF5}
+ {F6E728D3-A0B2-40F6-9B91-7D4474D778F3} = {F6E728D3-A0B2-40F6-9B91-7D4474D778F3}
+ {CC29C1F9-A77B-476C-803E-8830F8312571} = {CC29C1F9-A77B-476C-803E-8830F8312571}
+ {AEF3DFFE-B566-4E6A-B299-B59B81022C06} = {AEF3DFFE-B566-4E6A-B299-B59B81022C06}
+ EndProjectSection
+EndProject
Global
GlobalSection(SolutionConfigurationPlatforms) = preSolution
Debug|Win32 = Debug|Win32
@@ -895,6 +960,18 @@ Global
{08075CA0-4E2C-451E-BAA6-E422353A5FC1}.Debug|Win32.Build.0 = Debug|Win32
{08075CA0-4E2C-451E-BAA6-E422353A5FC1}.Release|Win32.ActiveCfg = Release|Win32
{08075CA0-4E2C-451E-BAA6-E422353A5FC1}.Release|Win32.Build.0 = Release|Win32
+ {58BDBBCB-A5C5-4C3B-BC3C-EB8AD72D8DAC}.Debug|Win32.ActiveCfg = Debug|Win32
+ {58BDBBCB-A5C5-4C3B-BC3C-EB8AD72D8DAC}.Debug|Win32.Build.0 = Debug|Win32
+ {58BDBBCB-A5C5-4C3B-BC3C-EB8AD72D8DAC}.Release|Win32.ActiveCfg = Release|Win32
+ {58BDBBCB-A5C5-4C3B-BC3C-EB8AD72D8DAC}.Release|Win32.Build.0 = Release|Win32
+ {D28AD35D-E759-442E-8AC9-582DB8AA7D97}.Debug|Win32.ActiveCfg = Debug|Win32
+ {D28AD35D-E759-442E-8AC9-582DB8AA7D97}.Debug|Win32.Build.0 = Debug|Win32
+ {D28AD35D-E759-442E-8AC9-582DB8AA7D97}.Release|Win32.ActiveCfg = Release|Win32
+ {D28AD35D-E759-442E-8AC9-582DB8AA7D97}.Release|Win32.Build.0 = Release|Win32
+ {FD0368DA-87CE-44D8-802B-9E755E95B493}.Debug|Win32.ActiveCfg = Debug|Win32
+ {FD0368DA-87CE-44D8-802B-9E755E95B493}.Debug|Win32.Build.0 = Debug|Win32
+ {FD0368DA-87CE-44D8-802B-9E755E95B493}.Release|Win32.ActiveCfg = Release|Win32
+ {FD0368DA-87CE-44D8-802B-9E755E95B493}.Release|Win32.Build.0 = Release|Win32
EndGlobalSection
GlobalSection(SolutionProperties) = preSolution
HideSolutionNode = FALSE
diff --git a/win32build/VS2010/libdatasrc/libdatasrc.vcxproj b/win32build/VS2010/libdatasrc/libdatasrc.vcxproj
index a76b4d9..d15940b 100755
--- a/win32build/VS2010/libdatasrc/libdatasrc.vcxproj
+++ b/win32build/VS2010/libdatasrc/libdatasrc.vcxproj
@@ -18,17 +18,14 @@
<ClInclude Include="..\..\..\src\lib\datasrc\datasrc_config.h" />
<ClInclude Include="..\..\..\src\lib\datasrc\datasrc_messages.h" />
<ClInclude Include="..\..\..\src\lib\datasrc\data_source.h" />
+ <ClInclude Include="..\..\..\src\lib\datasrc\dll.h" />
<ClInclude Include="..\..\..\src\lib\datasrc\factory.h" />
<ClInclude Include="..\..\..\src\lib\datasrc\iterator.h" />
<ClInclude Include="..\..\..\src\lib\datasrc\logger.h" />
- <ClInclude Include="..\..\..\src\lib\datasrc\memory_datasrc.h" />
<ClInclude Include="..\..\..\src\lib\datasrc\query.h" />
<ClInclude Include="..\..\..\src\lib\datasrc\rbnode_rrset.h" />
<ClInclude Include="..\..\..\src\lib\datasrc\rbtree.h" />
<ClInclude Include="..\..\..\src\lib\datasrc\result.h" />
- <ClInclude Include="..\..\..\src\lib\datasrc\sqlite3_accessor.h" />
- <ClInclude Include="..\..\..\src\lib\datasrc\sqlite3_datasrc.h" />
- <ClInclude Include="..\..\..\src\lib\datasrc\static_datasrc.h" />
<ClInclude Include="..\..\..\src\lib\datasrc\zone.h" />
<ClInclude Include="..\..\..\src\lib\datasrc\zonetable.h" />
</ItemGroup>
@@ -40,16 +37,10 @@
<ClCompile Include="..\..\..\src\lib\datasrc\data_source.cc" />
<ClCompile Include="..\..\..\src\lib\datasrc\factory.cc" />
<ClCompile Include="..\..\..\src\lib\datasrc\logger.cc" />
- <ClCompile Include="..\..\..\src\lib\datasrc\memory_datasrc.cc" />
- <ClCompile Include="..\..\..\src\lib\datasrc\memory_datasrc_link.cc" />
<ClCompile Include="..\..\..\src\lib\datasrc\query.cc" />
- <ClCompile Include="..\..\..\src\lib\datasrc\sqlite3_accessor.cc" />
- <ClCompile Include="..\..\..\src\lib\datasrc\sqlite3_accessor_link.cc" />
- <ClCompile Include="..\..\..\src\lib\datasrc\sqlite3_datasrc.cc" />
- <ClCompile Include="..\..\..\src\lib\datasrc\static_datasrc.cc" />
- <ClCompile Include="..\..\..\src\lib\datasrc\static_datasrc_link.cc" />
<ClCompile Include="..\..\..\src\lib\datasrc\zonetable.cc" />
<ClCompile Include="..\..\..\src\lib\datasrc\zone_finder_context.cc" />
+ <ClCompile Include="..\..\dllmain.cc" />
</ItemGroup>
<PropertyGroup Label="Globals">
<ProjectGuid>{32624520-5341-471B-B88D-2599DBCDABF5}</ProjectGuid>
@@ -58,12 +49,12 @@
</PropertyGroup>
<Import Project="$(VCTargetsPath)\Microsoft.Cpp.Default.props" />
<PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'" Label="Configuration">
- <ConfigurationType>StaticLibrary</ConfigurationType>
+ <ConfigurationType>DynamicLibrary</ConfigurationType>
<UseDebugLibraries>true</UseDebugLibraries>
<CharacterSet>Unicode</CharacterSet>
</PropertyGroup>
<PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Release|Win32'" Label="Configuration">
- <ConfigurationType>StaticLibrary</ConfigurationType>
+ <ConfigurationType>DynamicLibrary</ConfigurationType>
<UseDebugLibraries>false</UseDebugLibraries>
<WholeProgramOptimization>true</WholeProgramOptimization>
<CharacterSet>Unicode</CharacterSet>
@@ -79,10 +70,11 @@
</ImportGroup>
<PropertyGroup Label="UserMacros" />
<PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">
- <OutDir>$(Configuration)\</OutDir>
+ <OutDir>$(Solutiondir)$(Configuration)\</OutDir>
+ <TargetName>$(ProjectName)d</TargetName>
</PropertyGroup>
<PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Release|Win32'">
- <OutDir>$(Configuration)\</OutDir>
+ <OutDir>$(Solutiondir)$(Configuration)\</OutDir>
</PropertyGroup>
<ItemDefinitionGroup Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">
<ClCompile>
@@ -96,6 +88,8 @@
<Link>
<SubSystem>Windows</SubSystem>
<GenerateDebugInformation>true</GenerateDebugInformation>
+ <AdditionalLibraryDirectories>..\$(Configuration);%(AdditionalLibraryDirectories)</AdditionalLibraryDirectories>
+ <AdditionalDependencies>libexceptionsd.lib;libutild.lib;liblogd.lib;libdns++d.lib;libccd.lib;libcached.lib;%(AdditionalDependencies)</AdditionalDependencies>
</Link>
<PreBuildEvent>
<Command>cd ..\..\..\src\lib\datasrc
@@ -126,6 +120,8 @@ copy static.zone.win32 static.zone
<GenerateDebugInformation>true</GenerateDebugInformation>
<EnableCOMDATFolding>true</EnableCOMDATFolding>
<OptimizeReferences>true</OptimizeReferences>
+ <AdditionalLibraryDirectories>..\$(Configuration);%(AdditionalLibraryDirectories)</AdditionalLibraryDirectories>
+ <AdditionalDependencies>libexceptions.lib;libutil.lib;liblog.lib;libdns++.lib;libcc.lib;libcache.lib;%(AdditionalDependencies)</AdditionalDependencies>
</Link>
<PreBuildEvent>
<Command>cd ..\..\..\src\lib\datasrc
diff --git a/win32build/VS2010/libdatasrc/libdatasrc.vcxproj.filters b/win32build/VS2010/libdatasrc/libdatasrc.vcxproj.filters
index 6ff5011..5d467f6 100755
--- a/win32build/VS2010/libdatasrc/libdatasrc.vcxproj.filters
+++ b/win32build/VS2010/libdatasrc/libdatasrc.vcxproj.filters
@@ -30,12 +30,6 @@
<ClInclude Include="..\..\..\src\lib\datasrc\result.h">
<Filter>Header Files</Filter>
</ClInclude>
- <ClInclude Include="..\..\..\src\lib\datasrc\sqlite3_datasrc.h">
- <Filter>Header Files</Filter>
- </ClInclude>
- <ClInclude Include="..\..\..\src\lib\datasrc\static_datasrc.h">
- <Filter>Header Files</Filter>
- </ClInclude>
<ClInclude Include="..\..\..\src\lib\datasrc\zone.h">
<Filter>Header Files</Filter>
</ClInclude>
@@ -51,28 +45,25 @@
<ClInclude Include="..\..\..\src\lib\datasrc\iterator.h">
<Filter>Header Files</Filter>
</ClInclude>
- <ClInclude Include="..\..\..\src\lib\datasrc\logger.h">
- <Filter>Header Files</Filter>
- </ClInclude>
<ClInclude Include="..\..\..\src\lib\datasrc\datasrc_messages.h">
<Filter>Header Files</Filter>
</ClInclude>
<ClInclude Include="..\..\..\src\lib\datasrc\factory.h">
<Filter>Header Files</Filter>
</ClInclude>
- <ClInclude Include="..\..\..\src\lib\datasrc\memory_datasrc.h">
+ <ClInclude Include="..\..\..\src\lib\datasrc\client_list.h">
<Filter>Header Files</Filter>
</ClInclude>
- <ClInclude Include="..\..\..\src\lib\datasrc\sqlite3_accessor.h">
+ <ClInclude Include="..\..\..\src\lib\datasrc\rbnode_rrset.h">
<Filter>Header Files</Filter>
</ClInclude>
- <ClInclude Include="..\..\..\src\lib\datasrc\client_list.h">
+ <ClInclude Include="..\..\..\src\lib\datasrc\dll.h">
<Filter>Header Files</Filter>
</ClInclude>
- <ClInclude Include="..\..\..\src\lib\datasrc\rbnode_rrset.h">
+ <ClInclude Include="..\..\..\src\lib\datasrc\datasrc_config.h">
<Filter>Header Files</Filter>
</ClInclude>
- <ClInclude Include="..\..\..\src\lib\datasrc\datasrc_config.h">
+ <ClInclude Include="..\..\..\src\lib\datasrc\logger.h">
<Filter>Header Files</Filter>
</ClInclude>
</ItemGroup>
@@ -86,12 +77,6 @@
<ClCompile Include="..\..\..\src\lib\datasrc\query.cc">
<Filter>Source Files</Filter>
</ClCompile>
- <ClCompile Include="..\..\..\src\lib\datasrc\sqlite3_datasrc.cc">
- <Filter>Source Files</Filter>
- </ClCompile>
- <ClCompile Include="..\..\..\src\lib\datasrc\static_datasrc.cc">
- <Filter>Source Files</Filter>
- </ClCompile>
<ClCompile Include="..\..\..\src\lib\datasrc\zonetable.cc">
<Filter>Source Files</Filter>
</ClCompile>
@@ -101,31 +86,19 @@
<ClCompile Include="..\..\..\src\lib\datasrc\datasrc_messages.cc">
<Filter>Source Files</Filter>
</ClCompile>
- <ClCompile Include="..\..\..\src\lib\datasrc\logger.cc">
- <Filter>Source Files</Filter>
- </ClCompile>
- <ClCompile Include="..\..\..\src\lib\datasrc\factory.cc">
- <Filter>Source Files</Filter>
- </ClCompile>
- <ClCompile Include="..\..\..\src\lib\datasrc\memory_datasrc.cc">
- <Filter>Source Files</Filter>
- </ClCompile>
- <ClCompile Include="..\..\..\src\lib\datasrc\sqlite3_accessor.cc">
- <Filter>Source Files</Filter>
- </ClCompile>
<ClCompile Include="..\..\..\src\lib\datasrc\client_list.cc">
<Filter>Source Files</Filter>
</ClCompile>
- <ClCompile Include="..\..\..\src\lib\datasrc\memory_datasrc_link.cc">
+ <ClCompile Include="..\..\..\src\lib\datasrc\zone_finder_context.cc">
<Filter>Source Files</Filter>
</ClCompile>
- <ClCompile Include="..\..\..\src\lib\datasrc\sqlite3_accessor_link.cc">
+ <ClCompile Include="..\..\dllmain.cc">
<Filter>Source Files</Filter>
</ClCompile>
- <ClCompile Include="..\..\..\src\lib\datasrc\static_datasrc_link.cc">
+ <ClCompile Include="..\..\..\src\lib\datasrc\factory.cc">
<Filter>Source Files</Filter>
</ClCompile>
- <ClCompile Include="..\..\..\src\lib\datasrc\zone_finder_context.cc">
+ <ClCompile Include="..\..\..\src\lib\datasrc\logger.cc">
<Filter>Source Files</Filter>
</ClCompile>
</ItemGroup>
diff --git a/win32build/VS2010/libdatasrc_memory/libdatasrc_memory.vcxproj b/win32build/VS2010/libdatasrc_memory/libdatasrc_memory.vcxproj
new file mode 100644
index 0000000..dbfbccb
--- /dev/null
+++ b/win32build/VS2010/libdatasrc_memory/libdatasrc_memory.vcxproj
@@ -0,0 +1,101 @@
+<?xml version="1.0" encoding="utf-8"?>
+<Project DefaultTargets="Build" ToolsVersion="4.0" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
+ <ItemGroup Label="ProjectConfigurations">
+ <ProjectConfiguration Include="Debug|Win32">
+ <Configuration>Debug</Configuration>
+ <Platform>Win32</Platform>
+ </ProjectConfiguration>
+ <ProjectConfiguration Include="Release|Win32">
+ <Configuration>Release</Configuration>
+ <Platform>Win32</Platform>
+ </ProjectConfiguration>
+ </ItemGroup>
+ <PropertyGroup Label="Globals">
+ <ProjectGuid>{D28AD35D-E759-442E-8AC9-582DB8AA7D97}</ProjectGuid>
+ <Keyword>Win32Proj</Keyword>
+ <RootNamespace>libdatasrc_memory</RootNamespace>
+ </PropertyGroup>
+ <Import Project="$(VCTargetsPath)\Microsoft.Cpp.Default.props" />
+ <PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'" Label="Configuration">
+ <ConfigurationType>DynamicLibrary</ConfigurationType>
+ <UseDebugLibraries>true</UseDebugLibraries>
+ <CharacterSet>Unicode</CharacterSet>
+ </PropertyGroup>
+ <PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Release|Win32'" Label="Configuration">
+ <ConfigurationType>DynamicLibrary</ConfigurationType>
+ <UseDebugLibraries>false</UseDebugLibraries>
+ <WholeProgramOptimization>true</WholeProgramOptimization>
+ <CharacterSet>Unicode</CharacterSet>
+ </PropertyGroup>
+ <Import Project="$(VCTargetsPath)\Microsoft.Cpp.props" />
+ <ImportGroup Label="ExtensionSettings">
+ </ImportGroup>
+ <ImportGroup Label="PropertySheets" Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">
+ <Import Project="$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props" Condition="exists('$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props')" Label="LocalAppDataPlatform" />
+ </ImportGroup>
+ <ImportGroup Label="PropertySheets" Condition="'$(Configuration)|$(Platform)'=='Release|Win32'">
+ <Import Project="$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props" Condition="exists('$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props')" Label="LocalAppDataPlatform" />
+ </ImportGroup>
+ <PropertyGroup Label="UserMacros" />
+ <PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">
+ <LinkIncremental>true</LinkIncremental>
+ <TargetName>memory_dsD</TargetName>
+ <TargetExt>.so</TargetExt>
+ </PropertyGroup>
+ <PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Release|Win32'">
+ <LinkIncremental>false</LinkIncremental>
+ <TargetName>memory_ds</TargetName>
+ <TargetExt>.so</TargetExt>
+ </PropertyGroup>
+ <ItemDefinitionGroup Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">
+ <ClCompile>
+ <PrecompiledHeader>NotUsing</PrecompiledHeader>
+ <WarningLevel>Level4</WarningLevel>
+ <Optimization>Disabled</Optimization>
+ <PreprocessorDefinitions>WIN32;_DEBUG;_WINDOWS;_USRDLL;LIBDATASRC_MEMORY_EXPORTS;%(PreprocessorDefinitions)</PreprocessorDefinitions>
+ <AdditionalIncludeDirectories>..\..;..\..\..\src\lib;%BOOST%;%(AdditionalIncludeDirectories)</AdditionalIncludeDirectories>
+ <CompileAs>CompileAsCpp</CompileAs>
+ </ClCompile>
+ <Link>
+ <SubSystem>Windows</SubSystem>
+ <GenerateDebugInformation>true</GenerateDebugInformation>
+ <AdditionalLibraryDirectories>..\$(Configuration);%(AdditionalLibraryDirectories)</AdditionalLibraryDirectories>
+ <AdditionalDependencies>libexceptionsd.lib;liblogd.lib;libdns++d.lib;libccd.lib;libdatasrcd.lib;%(AdditionalDependencies)</AdditionalDependencies>
+ </Link>
+ </ItemDefinitionGroup>
+ <ItemDefinitionGroup Condition="'$(Configuration)|$(Platform)'=='Release|Win32'">
+ <ClCompile>
+ <WarningLevel>Level3</WarningLevel>
+ <PrecompiledHeader>NotUsing</PrecompiledHeader>
+ <Optimization>MaxSpeed</Optimization>
+ <FunctionLevelLinking>true</FunctionLevelLinking>
+ <IntrinsicFunctions>true</IntrinsicFunctions>
+ <PreprocessorDefinitions>WIN32;NDEBUG;_WINDOWS;_USRDLL;LIBDATASRC_MEMORY_EXPORTS;%(PreprocessorDefinitions)</PreprocessorDefinitions>
+ <AdditionalIncludeDirectories>..\..;..\..\..\src\lib;%BOOST%;%(AdditionalIncludeDirectories)</AdditionalIncludeDirectories>
+ <CompileAs>CompileAsCpp</CompileAs>
+ </ClCompile>
+ <Link>
+ <SubSystem>Windows</SubSystem>
+ <GenerateDebugInformation>true</GenerateDebugInformation>
+ <EnableCOMDATFolding>true</EnableCOMDATFolding>
+ <OptimizeReferences>true</OptimizeReferences>
+ <AdditionalLibraryDirectories>..\$(Configuration);%(AdditionalLibraryDirectories)</AdditionalLibraryDirectories>
+ <AdditionalDependencies>libexceptions.lib;liblog.lib;libdns++.lib;libcc.lib;libdatasrc.lib;%(AdditionalDependencies)</AdditionalDependencies>
+ </Link>
+ </ItemDefinitionGroup>
+ <ItemGroup>
+ <ClInclude Include="..\..\..\src\lib\datasrc\datasrc_messages.h" />
+ <ClInclude Include="..\..\..\src\lib\datasrc\dll.h" />
+ <ClInclude Include="..\..\..\src\lib\datasrc\memory_datasrc.h" />
+ </ItemGroup>
+ <ItemGroup>
+ <ClCompile Include="..\..\..\src\lib\datasrc\datasrc_messages.cc" />
+ <ClCompile Include="..\..\..\src\lib\datasrc\logger.cc" />
+ <ClCompile Include="..\..\..\src\lib\datasrc\memory_datasrc.cc" />
+ <ClCompile Include="..\..\..\src\lib\datasrc\memory_datasrc_link.cc" />
+ <ClCompile Include="..\..\dllmain.cc" />
+ </ItemGroup>
+ <Import Project="$(VCTargetsPath)\Microsoft.Cpp.targets" />
+ <ImportGroup Label="ExtensionTargets">
+ </ImportGroup>
+</Project>
\ No newline at end of file
diff --git a/win32build/VS2010/libdatasrc_memory/libdatasrc_memory.vcxproj.filters b/win32build/VS2010/libdatasrc_memory/libdatasrc_memory.vcxproj.filters
new file mode 100644
index 0000000..616c2bb
--- /dev/null
+++ b/win32build/VS2010/libdatasrc_memory/libdatasrc_memory.vcxproj.filters
@@ -0,0 +1,45 @@
+<?xml version="1.0" encoding="utf-8"?>
+<Project ToolsVersion="4.0" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
+ <ItemGroup>
+ <Filter Include="Source Files">
+ <UniqueIdentifier>{4FC737F1-C7A5-4376-A066-2A32D752A2FF}</UniqueIdentifier>
+ <Extensions>cpp;c;cc;cxx;def;odl;idl;hpj;bat;asm;asmx</Extensions>
+ </Filter>
+ <Filter Include="Header Files">
+ <UniqueIdentifier>{93995380-89BD-4b04-88EB-625FBE52EBFB}</UniqueIdentifier>
+ <Extensions>h;hpp;hxx;hm;inl;inc;xsd</Extensions>
+ </Filter>
+ <Filter Include="Resource Files">
+ <UniqueIdentifier>{67DA6AB6-F800-4c08-8B7A-83BB121AAD01}</UniqueIdentifier>
+ <Extensions>rc;ico;cur;bmp;dlg;rc2;rct;bin;rgs;gif;jpg;jpeg;jpe;resx;tiff;tif;png;wav;mfcribbon-ms</Extensions>
+ </Filter>
+ </ItemGroup>
+ <ItemGroup>
+ <ClInclude Include="..\..\..\src\lib\datasrc\dll.h">
+ <Filter>Header Files</Filter>
+ </ClInclude>
+ <ClInclude Include="..\..\..\src\lib\datasrc\memory_datasrc.h">
+ <Filter>Header Files</Filter>
+ </ClInclude>
+ <ClInclude Include="..\..\..\src\lib\datasrc\datasrc_messages.h">
+ <Filter>Header Files</Filter>
+ </ClInclude>
+ </ItemGroup>
+ <ItemGroup>
+ <ClCompile Include="..\..\..\src\lib\datasrc\datasrc_messages.cc">
+ <Filter>Source Files</Filter>
+ </ClCompile>
+ <ClCompile Include="..\..\..\src\lib\datasrc\memory_datasrc.cc">
+ <Filter>Source Files</Filter>
+ </ClCompile>
+ <ClCompile Include="..\..\..\src\lib\datasrc\memory_datasrc_link.cc">
+ <Filter>Source Files</Filter>
+ </ClCompile>
+ <ClCompile Include="..\..\dllmain.cc">
+ <Filter>Source Files</Filter>
+ </ClCompile>
+ <ClCompile Include="..\..\..\src\lib\datasrc\logger.cc">
+ <Filter>Source Files</Filter>
+ </ClCompile>
+ </ItemGroup>
+</Project>
\ No newline at end of file
diff --git a/win32build/VS2010/libdatasrc_memory/libdatasrc_memory.vcxproj.user b/win32build/VS2010/libdatasrc_memory/libdatasrc_memory.vcxproj.user
new file mode 100644
index 0000000..695b5c7
--- /dev/null
+++ b/win32build/VS2010/libdatasrc_memory/libdatasrc_memory.vcxproj.user
@@ -0,0 +1,3 @@
+<?xml version="1.0" encoding="utf-8"?>
+<Project ToolsVersion="4.0" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
+</Project>
\ No newline at end of file
diff --git a/win32build/VS2010/libdatasrc_sqlite3/libdatasrc_sqlite3.vcxproj b/win32build/VS2010/libdatasrc_sqlite3/libdatasrc_sqlite3.vcxproj
new file mode 100644
index 0000000..22eb0b7
--- /dev/null
+++ b/win32build/VS2010/libdatasrc_sqlite3/libdatasrc_sqlite3.vcxproj
@@ -0,0 +1,103 @@
+<?xml version="1.0" encoding="utf-8"?>
+<Project DefaultTargets="Build" ToolsVersion="4.0" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
+ <ItemGroup Label="ProjectConfigurations">
+ <ProjectConfiguration Include="Debug|Win32">
+ <Configuration>Debug</Configuration>
+ <Platform>Win32</Platform>
+ </ProjectConfiguration>
+ <ProjectConfiguration Include="Release|Win32">
+ <Configuration>Release</Configuration>
+ <Platform>Win32</Platform>
+ </ProjectConfiguration>
+ </ItemGroup>
+ <PropertyGroup Label="Globals">
+ <ProjectGuid>{58BDBBCB-A5C5-4C3B-BC3C-EB8AD72D8DAC}</ProjectGuid>
+ <Keyword>Win32Proj</Keyword>
+ <RootNamespace>libdatasrc_sqlite3</RootNamespace>
+ </PropertyGroup>
+ <Import Project="$(VCTargetsPath)\Microsoft.Cpp.Default.props" />
+ <PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'" Label="Configuration">
+ <ConfigurationType>DynamicLibrary</ConfigurationType>
+ <UseDebugLibraries>true</UseDebugLibraries>
+ <CharacterSet>Unicode</CharacterSet>
+ </PropertyGroup>
+ <PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Release|Win32'" Label="Configuration">
+ <ConfigurationType>DynamicLibrary</ConfigurationType>
+ <UseDebugLibraries>false</UseDebugLibraries>
+ <WholeProgramOptimization>true</WholeProgramOptimization>
+ <CharacterSet>Unicode</CharacterSet>
+ </PropertyGroup>
+ <Import Project="$(VCTargetsPath)\Microsoft.Cpp.props" />
+ <ImportGroup Label="ExtensionSettings">
+ </ImportGroup>
+ <ImportGroup Label="PropertySheets" Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">
+ <Import Project="$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props" Condition="exists('$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props')" Label="LocalAppDataPlatform" />
+ </ImportGroup>
+ <ImportGroup Label="PropertySheets" Condition="'$(Configuration)|$(Platform)'=='Release|Win32'">
+ <Import Project="$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props" Condition="exists('$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props')" Label="LocalAppDataPlatform" />
+ </ImportGroup>
+ <PropertyGroup Label="UserMacros" />
+ <PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">
+ <LinkIncremental>true</LinkIncremental>
+ <TargetName>sqlite3_dsD</TargetName>
+ <TargetExt>.so</TargetExt>
+ </PropertyGroup>
+ <PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Release|Win32'">
+ <LinkIncremental>false</LinkIncremental>
+ <TargetName>sqlite3_ds</TargetName>
+ <TargetExt>.so</TargetExt>
+ </PropertyGroup>
+ <ItemDefinitionGroup Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">
+ <ClCompile>
+ <PrecompiledHeader>NotUsing</PrecompiledHeader>
+ <WarningLevel>Level4</WarningLevel>
+ <Optimization>Disabled</Optimization>
+ <PreprocessorDefinitions>WIN32;_DEBUG;_WINDOWS;_USRDLL;LIBDATASRC_SQLITE3_EXPORTS;%(PreprocessorDefinitions)</PreprocessorDefinitions>
+ <AdditionalIncludeDirectories>..\..;..\..\..\src\lib;C:\sqlite3;%BOOST%;%(AdditionalIncludeDirectories)</AdditionalIncludeDirectories>
+ <CompileAs>CompileAsCpp</CompileAs>
+ </ClCompile>
+ <Link>
+ <SubSystem>Windows</SubSystem>
+ <GenerateDebugInformation>true</GenerateDebugInformation>
+ <AdditionalLibraryDirectories>..\$(Configuration);C:\sqlite3;%(AdditionalLibraryDirectories)</AdditionalLibraryDirectories>
+ <AdditionalDependencies>libexceptionsd.lib;libutild.lib;liblogd.lib;libdns++d.lib;libccd.lib;libdatasrcd.lib;sqlite3.lib;%(AdditionalDependencies)</AdditionalDependencies>
+ </Link>
+ </ItemDefinitionGroup>
+ <ItemDefinitionGroup Condition="'$(Configuration)|$(Platform)'=='Release|Win32'">
+ <ClCompile>
+ <WarningLevel>Level3</WarningLevel>
+ <PrecompiledHeader>NotUsing</PrecompiledHeader>
+ <Optimization>MaxSpeed</Optimization>
+ <FunctionLevelLinking>true</FunctionLevelLinking>
+ <IntrinsicFunctions>true</IntrinsicFunctions>
+ <PreprocessorDefinitions>WIN32;NDEBUG;_WINDOWS;_USRDLL;LIBDATASRC_SQLITE3_EXPORTS;%(PreprocessorDefinitions)</PreprocessorDefinitions>
+ <AdditionalIncludeDirectories>..\..;..\..\..\src\lib;C:\sqlite3;%BOOST%;%(AdditionalIncludeDirectories)</AdditionalIncludeDirectories>
+ <CompileAs>CompileAsCpp</CompileAs>
+ </ClCompile>
+ <Link>
+ <SubSystem>Windows</SubSystem>
+ <GenerateDebugInformation>true</GenerateDebugInformation>
+ <EnableCOMDATFolding>true</EnableCOMDATFolding>
+ <OptimizeReferences>true</OptimizeReferences>
+ <AdditionalLibraryDirectories>..\$(Configuration);C:\sqlite3;%(AdditionalLibraryDirectories)</AdditionalLibraryDirectories>
+ <AdditionalDependencies>libexceptions.lib;libutil.lib;liblog.lib;libdns++.lib;libcc.lib;libdatasrc.lib;sqlite3.lib;%(AdditionalDependencies)</AdditionalDependencies>
+ </Link>
+ </ItemDefinitionGroup>
+ <ItemGroup>
+ <ClInclude Include="..\..\..\src\lib\datasrc\datasrc_messages.h" />
+ <ClInclude Include="..\..\..\src\lib\datasrc\dll.h" />
+ <ClInclude Include="..\..\..\src\lib\datasrc\sqlite3_accessor.h" />
+ <ClInclude Include="..\..\..\src\lib\datasrc\sqlite3_datasrc.h" />
+ </ItemGroup>
+ <ItemGroup>
+ <ClCompile Include="..\..\..\src\lib\datasrc\datasrc_messages.cc" />
+ <ClCompile Include="..\..\..\src\lib\datasrc\logger.cc" />
+ <ClCompile Include="..\..\..\src\lib\datasrc\sqlite3_accessor.cc" />
+ <ClCompile Include="..\..\..\src\lib\datasrc\sqlite3_accessor_link.cc" />
+ <ClCompile Include="..\..\..\src\lib\datasrc\sqlite3_datasrc.cc" />
+ <ClCompile Include="..\..\dllmain.cc" />
+ </ItemGroup>
+ <Import Project="$(VCTargetsPath)\Microsoft.Cpp.targets" />
+ <ImportGroup Label="ExtensionTargets">
+ </ImportGroup>
+</Project>
\ No newline at end of file
diff --git a/win32build/VS2010/libdatasrc_sqlite3/libdatasrc_sqlite3.vcxproj.filters b/win32build/VS2010/libdatasrc_sqlite3/libdatasrc_sqlite3.vcxproj.filters
new file mode 100644
index 0000000..e7cf5f2
--- /dev/null
+++ b/win32build/VS2010/libdatasrc_sqlite3/libdatasrc_sqlite3.vcxproj.filters
@@ -0,0 +1,51 @@
+<?xml version="1.0" encoding="utf-8"?>
+<Project ToolsVersion="4.0" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
+ <ItemGroup>
+ <Filter Include="Source Files">
+ <UniqueIdentifier>{4FC737F1-C7A5-4376-A066-2A32D752A2FF}</UniqueIdentifier>
+ <Extensions>cpp;c;cc;cxx;def;odl;idl;hpj;bat;asm;asmx</Extensions>
+ </Filter>
+ <Filter Include="Header Files">
+ <UniqueIdentifier>{93995380-89BD-4b04-88EB-625FBE52EBFB}</UniqueIdentifier>
+ <Extensions>h;hpp;hxx;hm;inl;inc;xsd</Extensions>
+ </Filter>
+ <Filter Include="Resource Files">
+ <UniqueIdentifier>{67DA6AB6-F800-4c08-8B7A-83BB121AAD01}</UniqueIdentifier>
+ <Extensions>rc;ico;cur;bmp;dlg;rc2;rct;bin;rgs;gif;jpg;jpeg;jpe;resx;tiff;tif;png;wav;mfcribbon-ms</Extensions>
+ </Filter>
+ </ItemGroup>
+ <ItemGroup>
+ <ClInclude Include="..\..\..\src\lib\datasrc\dll.h">
+ <Filter>Header Files</Filter>
+ </ClInclude>
+ <ClInclude Include="..\..\..\src\lib\datasrc\sqlite3_accessor.h">
+ <Filter>Header Files</Filter>
+ </ClInclude>
+ <ClInclude Include="..\..\..\src\lib\datasrc\datasrc_messages.h">
+ <Filter>Header Files</Filter>
+ </ClInclude>
+ <ClInclude Include="..\..\..\src\lib\datasrc\sqlite3_datasrc.h">
+ <Filter>Header Files</Filter>
+ </ClInclude>
+ </ItemGroup>
+ <ItemGroup>
+ <ClCompile Include="..\..\..\src\lib\datasrc\sqlite3_accessor.cc">
+ <Filter>Source Files</Filter>
+ </ClCompile>
+ <ClCompile Include="..\..\..\src\lib\datasrc\sqlite3_accessor_link.cc">
+ <Filter>Source Files</Filter>
+ </ClCompile>
+ <ClCompile Include="..\..\dllmain.cc">
+ <Filter>Source Files</Filter>
+ </ClCompile>
+ <ClCompile Include="..\..\..\src\lib\datasrc\datasrc_messages.cc">
+ <Filter>Source Files</Filter>
+ </ClCompile>
+ <ClCompile Include="..\..\..\src\lib\datasrc\logger.cc">
+ <Filter>Source Files</Filter>
+ </ClCompile>
+ <ClCompile Include="..\..\..\src\lib\datasrc\sqlite3_datasrc.cc">
+ <Filter>Source Files</Filter>
+ </ClCompile>
+ </ItemGroup>
+</Project>
\ No newline at end of file
diff --git a/win32build/VS2010/libdatasrc_sqlite3/libdatasrc_sqlite3.vcxproj.user b/win32build/VS2010/libdatasrc_sqlite3/libdatasrc_sqlite3.vcxproj.user
new file mode 100644
index 0000000..695b5c7
--- /dev/null
+++ b/win32build/VS2010/libdatasrc_sqlite3/libdatasrc_sqlite3.vcxproj.user
@@ -0,0 +1,3 @@
+<?xml version="1.0" encoding="utf-8"?>
+<Project ToolsVersion="4.0" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
+</Project>
\ No newline at end of file
diff --git a/win32build/VS2010/libdatasrc_static/libdatasrc_static.vcxproj b/win32build/VS2010/libdatasrc_static/libdatasrc_static.vcxproj
new file mode 100644
index 0000000..fdf3106
--- /dev/null
+++ b/win32build/VS2010/libdatasrc_static/libdatasrc_static.vcxproj
@@ -0,0 +1,102 @@
+<?xml version="1.0" encoding="utf-8"?>
+<Project DefaultTargets="Build" ToolsVersion="4.0" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
+ <ItemGroup Label="ProjectConfigurations">
+ <ProjectConfiguration Include="Debug|Win32">
+ <Configuration>Debug</Configuration>
+ <Platform>Win32</Platform>
+ </ProjectConfiguration>
+ <ProjectConfiguration Include="Release|Win32">
+ <Configuration>Release</Configuration>
+ <Platform>Win32</Platform>
+ </ProjectConfiguration>
+ </ItemGroup>
+ <PropertyGroup Label="Globals">
+ <ProjectGuid>{FD0368DA-87CE-44D8-802B-9E755E95B493}</ProjectGuid>
+ <Keyword>Win32Proj</Keyword>
+ <RootNamespace>libdatasrc_static</RootNamespace>
+ </PropertyGroup>
+ <Import Project="$(VCTargetsPath)\Microsoft.Cpp.Default.props" />
+ <PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'" Label="Configuration">
+ <ConfigurationType>DynamicLibrary</ConfigurationType>
+ <UseDebugLibraries>true</UseDebugLibraries>
+ <CharacterSet>Unicode</CharacterSet>
+ </PropertyGroup>
+ <PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Release|Win32'" Label="Configuration">
+ <ConfigurationType>DynamicLibrary</ConfigurationType>
+ <UseDebugLibraries>false</UseDebugLibraries>
+ <WholeProgramOptimization>true</WholeProgramOptimization>
+ <CharacterSet>Unicode</CharacterSet>
+ </PropertyGroup>
+ <Import Project="$(VCTargetsPath)\Microsoft.Cpp.props" />
+ <ImportGroup Label="ExtensionSettings">
+ </ImportGroup>
+ <ImportGroup Label="PropertySheets" Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">
+ <Import Project="$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props" Condition="exists('$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props')" Label="LocalAppDataPlatform" />
+ </ImportGroup>
+ <ImportGroup Label="PropertySheets" Condition="'$(Configuration)|$(Platform)'=='Release|Win32'">
+ <Import Project="$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props" Condition="exists('$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props')" Label="LocalAppDataPlatform" />
+ </ImportGroup>
+ <PropertyGroup Label="UserMacros" />
+ <PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">
+ <LinkIncremental>true</LinkIncremental>
+ <TargetName>static_dsD</TargetName>
+ <TargetExt>.so</TargetExt>
+ </PropertyGroup>
+ <PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Release|Win32'">
+ <LinkIncremental>false</LinkIncremental>
+ <TargetName>static_ds</TargetName>
+ <TargetExt>.so</TargetExt>
+ </PropertyGroup>
+ <ItemDefinitionGroup Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">
+ <ClCompile>
+ <PrecompiledHeader>NotUsing</PrecompiledHeader>
+ <WarningLevel>Level4</WarningLevel>
+ <Optimization>Disabled</Optimization>
+ <PreprocessorDefinitions>WIN32;_DEBUG;_WINDOWS;_USRDLL;LIBDATASRC_STATIC_EXPORTS;%(PreprocessorDefinitions)</PreprocessorDefinitions>
+ <AdditionalIncludeDirectories>..\..;..\..\..\src\lib;%BOOST%;%(AdditionalIncludeDirectories)</AdditionalIncludeDirectories>
+ <CompileAs>CompileAsCpp</CompileAs>
+ </ClCompile>
+ <Link>
+ <SubSystem>Windows</SubSystem>
+ <GenerateDebugInformation>true</GenerateDebugInformation>
+ <AdditionalLibraryDirectories>..\$(Configuration);%(AdditionalLibraryDirectories)</AdditionalLibraryDirectories>
+ <AdditionalDependencies>libexceptionsd.lib;liblogd.lib;libdns++d.lib;libccd.lib;libdatasrcd.lib;%(AdditionalDependencies)</AdditionalDependencies>
+ </Link>
+ </ItemDefinitionGroup>
+ <ItemDefinitionGroup Condition="'$(Configuration)|$(Platform)'=='Release|Win32'">
+ <ClCompile>
+ <WarningLevel>Level3</WarningLevel>
+ <PrecompiledHeader>NotUsing</PrecompiledHeader>
+ <Optimization>MaxSpeed</Optimization>
+ <FunctionLevelLinking>true</FunctionLevelLinking>
+ <IntrinsicFunctions>true</IntrinsicFunctions>
+ <PreprocessorDefinitions>WIN32;NDEBUG;_WINDOWS;_USRDLL;LIBDATASRC_STATIC_EXPORTS;%(PreprocessorDefinitions)</PreprocessorDefinitions>
+ <AdditionalIncludeDirectories>..\..;..\..\..\src\lib;%BOOST%;%(AdditionalIncludeDirectories)</AdditionalIncludeDirectories>
+ <CompileAs>CompileAsCpp</CompileAs>
+ </ClCompile>
+ <Link>
+ <SubSystem>Windows</SubSystem>
+ <GenerateDebugInformation>true</GenerateDebugInformation>
+ <EnableCOMDATFolding>true</EnableCOMDATFolding>
+ <OptimizeReferences>true</OptimizeReferences>
+ <AdditionalLibraryDirectories>..\$(Configuration);%(AdditionalLibraryDirectories)</AdditionalLibraryDirectories>
+ <AdditionalDependencies>libexceptions.lib;liblog.lib;libdns++.lib;libcc.lib;libdatasrc.lib;%(AdditionalDependencies)</AdditionalDependencies>
+ </Link>
+ </ItemDefinitionGroup>
+ <ItemGroup>
+ <ClInclude Include="..\..\..\src\lib\datasrc\datasrc_messages.h" />
+ <ClInclude Include="..\..\..\src\lib\datasrc\dll.h" />
+ <ClInclude Include="..\..\..\src\lib\datasrc\memory_datasrc.h" />
+ <ClInclude Include="..\..\..\src\lib\datasrc\static_datasrc.h" />
+ </ItemGroup>
+ <ItemGroup>
+ <ClCompile Include="..\..\..\src\lib\datasrc\datasrc_messages.cc" />
+ <ClCompile Include="..\..\..\src\lib\datasrc\logger.cc" />
+ <ClCompile Include="..\..\..\src\lib\datasrc\memory_datasrc.cc" />
+ <ClCompile Include="..\..\..\src\lib\datasrc\static_datasrc.cc" />
+ <ClCompile Include="..\..\..\src\lib\datasrc\static_datasrc_link.cc" />
+ </ItemGroup>
+ <Import Project="$(VCTargetsPath)\Microsoft.Cpp.targets" />
+ <ImportGroup Label="ExtensionTargets">
+ </ImportGroup>
+</Project>
\ No newline at end of file
diff --git a/win32build/VS2010/libdatasrc_static/libdatasrc_static.vcxproj.filters b/win32build/VS2010/libdatasrc_static/libdatasrc_static.vcxproj.filters
new file mode 100644
index 0000000..7a43c06
--- /dev/null
+++ b/win32build/VS2010/libdatasrc_static/libdatasrc_static.vcxproj.filters
@@ -0,0 +1,48 @@
+<?xml version="1.0" encoding="utf-8"?>
+<Project ToolsVersion="4.0" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
+ <ItemGroup>
+ <Filter Include="Source Files">
+ <UniqueIdentifier>{4FC737F1-C7A5-4376-A066-2A32D752A2FF}</UniqueIdentifier>
+ <Extensions>cpp;c;cc;cxx;def;odl;idl;hpj;bat;asm;asmx</Extensions>
+ </Filter>
+ <Filter Include="Header Files">
+ <UniqueIdentifier>{93995380-89BD-4b04-88EB-625FBE52EBFB}</UniqueIdentifier>
+ <Extensions>h;hpp;hxx;hm;inl;inc;xsd</Extensions>
+ </Filter>
+ <Filter Include="Resource Files">
+ <UniqueIdentifier>{67DA6AB6-F800-4c08-8B7A-83BB121AAD01}</UniqueIdentifier>
+ <Extensions>rc;ico;cur;bmp;dlg;rc2;rct;bin;rgs;gif;jpg;jpeg;jpe;resx;tiff;tif;png;wav;mfcribbon-ms</Extensions>
+ </Filter>
+ </ItemGroup>
+ <ItemGroup>
+ <ClInclude Include="..\..\..\src\lib\datasrc\datasrc_messages.h">
+ <Filter>Header Files</Filter>
+ </ClInclude>
+ <ClInclude Include="..\..\..\src\lib\datasrc\dll.h">
+ <Filter>Header Files</Filter>
+ </ClInclude>
+ <ClInclude Include="..\..\..\src\lib\datasrc\memory_datasrc.h">
+ <Filter>Header Files</Filter>
+ </ClInclude>
+ <ClInclude Include="..\..\..\src\lib\datasrc\static_datasrc.h">
+ <Filter>Header Files</Filter>
+ </ClInclude>
+ </ItemGroup>
+ <ItemGroup>
+ <ClCompile Include="..\..\..\src\lib\datasrc\datasrc_messages.cc">
+ <Filter>Source Files</Filter>
+ </ClCompile>
+ <ClCompile Include="..\..\..\src\lib\datasrc\logger.cc">
+ <Filter>Source Files</Filter>
+ </ClCompile>
+ <ClCompile Include="..\..\..\src\lib\datasrc\memory_datasrc.cc">
+ <Filter>Source Files</Filter>
+ </ClCompile>
+ <ClCompile Include="..\..\..\src\lib\datasrc\static_datasrc_link.cc">
+ <Filter>Source Files</Filter>
+ </ClCompile>
+ <ClCompile Include="..\..\..\src\lib\datasrc\static_datasrc.cc">
+ <Filter>Source Files</Filter>
+ </ClCompile>
+ </ItemGroup>
+</Project>
\ No newline at end of file
diff --git a/win32build/VS2010/libdatasrc_static/libdatasrc_static.vcxproj.user b/win32build/VS2010/libdatasrc_static/libdatasrc_static.vcxproj.user
new file mode 100644
index 0000000..695b5c7
--- /dev/null
+++ b/win32build/VS2010/libdatasrc_static/libdatasrc_static.vcxproj.user
@@ -0,0 +1,3 @@
+<?xml version="1.0" encoding="utf-8"?>
+<Project ToolsVersion="4.0" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
+</Project>
\ No newline at end of file
diff --git a/win32build/VS2010/libdatasrc_tests/libdatasrc_tests.vcxproj b/win32build/VS2010/libdatasrc_tests/libdatasrc_tests.vcxproj
index db0d3cc..d7a378e 100755
--- a/win32build/VS2010/libdatasrc_tests/libdatasrc_tests.vcxproj
+++ b/win32build/VS2010/libdatasrc_tests/libdatasrc_tests.vcxproj
@@ -52,7 +52,7 @@
<PrecompiledHeader>NotUsing</PrecompiledHeader>
<WarningLevel>Level4</WarningLevel>
<Optimization>Disabled</Optimization>
- <PreprocessorDefinitions>WIN32;TEST_DATA_DIR="%BIND10HOME%/src/lib/datasrc/tests/testdata";TEST_DATA_BUILDDIR="%BIND10HOME%/src/lib/datasrc/tests/testdata";TEST_DATA_COMMONDIR="%BIND10HOME%/src/lib/testutils/testdata";_DEBUG;_CONSOLE;%(PreprocessorDefinitions)</PreprocessorDefinitions>
+ <PreprocessorDefinitions>WIN32;GTEST_LINKED_AS_SHARED_LIBRARY=1;TEST_DATA_DIR="%BIND10HOME%/src/lib/datasrc/tests/testdata";TEST_DATA_BUILDDIR="%BIND10HOME%/src/lib/datasrc/tests/testdata";TEST_DATA_COMMONDIR="%BIND10HOME%/src/lib/testutils/testdata";_DEBUG;_CONSOLE;%(PreprocessorDefinitions)</PreprocessorDefinitions>
<AdditionalIncludeDirectories>..\..;..\..\..\src\lib;..\..\..\src\lib\dns;..\..\..\..\gtest\include;%BOOST%;C:\sqlite3;%(AdditionalIncludeDirectories)</AdditionalIncludeDirectories>
<CompileAs>CompileAsCpp</CompileAs>
</ClCompile>
@@ -60,8 +60,8 @@
<SubSystem>Console</SubSystem>
<GenerateDebugInformation>true</GenerateDebugInformation>
<OutputFile>$(OutDir)run_unittests$(TargetExt)</OutputFile>
- <AdditionalDependencies>libexceptions.lib;libutil.lib;libutil_unittests.lib;liblog.lib;libcryptolink.lib;libdns++.lib;libcc.lib;libtestutils.lib;libdatasrc.lib;botan.lib;log4cplusSD.lib;gtestd.lib;sqlite3.lib;ws2_32.lib;%(AdditionalDependencies)</AdditionalDependencies>
- <AdditionalLibraryDirectories>..\libexceptions\$(Configuration);..\libutil\$(Configuration);..\libutil_unittests\$(Configuration);..\liblog\$(Configuration);..\libcryptolink\$(Configuration);..\libdns++\$(Configuration);..\libcc\$(Configuration);..\libtestutils\$(Configuration);..\libdatasrc\$(Configuration);..\..\..\..\botan\md10\$(Configuration);..\..\..\..\log4cplus\md10\$(Configuration);..\..\..\..\gtest\md10\$(Configuration);C:\sqlite3;%(AdditionalLibraryDirectories)</AdditionalLibraryDirectories>
+ <AdditionalDependencies>libexceptionsd.lib;libutild.lib;libutil_unittestsd.lib;liblogd.lib;libcryptolinkd.lib;libdns++d.lib;libccd.lib;libtestutilsd.lib;libdatasrcd.lib;sqlite3_dsD.lib;memory_dsD.lib;static_dsD.lib;botand.lib;log4cplusD.lib;gtestd.lib;sqlite3.lib;ws2_32.lib;%(AdditionalDependencies)</AdditionalDependencies>
+ <AdditionalLibraryDirectories>..\$(Configuration);..\..\..\..\botan\v100\$(Configuration);..\..\..\..\log4cplus\v100\$(Configuration);..\..\..\..\gtest\v100\$(Configuration);C:\sqlite3;%(AdditionalLibraryDirectories)</AdditionalLibraryDirectories>
</Link>
<PreBuildEvent>
<Command>
@@ -75,7 +75,7 @@
<Optimization>MaxSpeed</Optimization>
<FunctionLevelLinking>true</FunctionLevelLinking>
<IntrinsicFunctions>true</IntrinsicFunctions>
- <PreprocessorDefinitions>WIN32;TEST_DATA_DIR="%BIND10HOME%/src/lib/datasrc/tests/testdata";TEST_DATA_BUILDDIR="%BIND10HOME%/src/lib/datasrc/tests/testdata";TEST_DATA_COMMONDIR="%BIND10HOME%/src/lib/testutils/testdata";NDEBUG;_CONSOLE;%(PreprocessorDefinitions)</PreprocessorDefinitions>
+ <PreprocessorDefinitions>WIN32;GTEST_LINKED_AS_SHARED_LIBRARY=1;TEST_DATA_DIR="%BIND10HOME%/src/lib/datasrc/tests/testdata";TEST_DATA_BUILDDIR="%BIND10HOME%/src/lib/datasrc/tests/testdata";TEST_DATA_COMMONDIR="%BIND10HOME%/src/lib/testutils/testdata";NDEBUG;_CONSOLE;%(PreprocessorDefinitions)</PreprocessorDefinitions>
<AdditionalIncludeDirectories>..\..;..\..\..\src\lib;..\..\..\src\lib\dns;..\..\..\..\gtest\include;%BOOST%;C:\sqlite3;%(AdditionalIncludeDirectories)</AdditionalIncludeDirectories>
<CompileAs>CompileAsCpp</CompileAs>
</ClCompile>
@@ -85,8 +85,8 @@
<EnableCOMDATFolding>true</EnableCOMDATFolding>
<OptimizeReferences>true</OptimizeReferences>
<OutputFile>$(OutDir)run_unittests$(TargetExt)</OutputFile>
- <AdditionalDependencies>libexceptions.lib;libutil.lib;libutil_unittests.lib;liblog.lib;libcryptolink.lib;libdns++.lib;libcc.lib;libtestutils.lib;libdatasrc.lib;botan.lib;log4cplusS.lib;gtest.lib;sqlite3.lib;ws2_32.lib;%(AdditionalDependencies)</AdditionalDependencies>
- <AdditionalLibraryDirectories>..\libexceptions\$(Configuration);..\libutil\$(Configuration);..\libutil_unittests\$(Configuration);..\liblog\$(Configuration);..\libcryptolink\$(Configuration);..\libdns++\$(Configuration);..\libcc\$(Configuration);..\libtestutils\$(Configuration);..\libdatasrc\$(Configuration);..\..\..\..\botan\md10\$(Configuration);..\..\..\..\log4cplus\md10\$(Configuration);..\..\..\..\gtest\md10\$(Configuration);C:\sqlite3;%(AdditionalLibraryDirectories)</AdditionalLibraryDirectories>
+ <AdditionalDependencies>libexceptions.lib;libutil.lib;libutil_unittests.lib;liblog.lib;libcryptolink.lib;libdns++.lib;libcc.lib;libtestutils.lib;libdatasrc.lib;sqlite3_ds.lib;memory_ds.lib;static_ds.lib;botan.lib;log4cplus.lib;gtest.lib;sqlite3.lib;ws2_32.lib;%(AdditionalDependencies)</AdditionalDependencies>
+ <AdditionalLibraryDirectories>..\$(Configuration);..\..\..\..\botan\v100\$(Configuration);..\..\..\..\log4cplus\v100\$(Configuration);..\..\..\..\gtest\v100\$(Configuration);C:\sqlite3;%(AdditionalLibraryDirectories)</AdditionalLibraryDirectories>
</Link>
<PreBuildEvent>
<Command>
diff --git a/win32build/VS2010/libdhcp/libdhcp.vcxproj b/win32build/VS2010/libdhcp/libdhcp.vcxproj
index b5ff416..b74a638 100755
--- a/win32build/VS2010/libdhcp/libdhcp.vcxproj
+++ b/win32build/VS2010/libdhcp/libdhcp.vcxproj
@@ -86,8 +86,8 @@
<Link>
<SubSystem>Windows</SubSystem>
<GenerateDebugInformation>true</GenerateDebugInformation>
- <AdditionalLibraryDirectories>..\$(Configuration);%(AdditionalLibraryDirectories)</AdditionalLibraryDirectories>
- <AdditionalDependencies>libexceptionsd.lib;libasiolinkd.lib;%(AdditionalDependencies)</AdditionalDependencies>
+ <AdditionalLibraryDirectories>..\$(Configuration);%BOOST%\lib;%(AdditionalLibraryDirectories)</AdditionalLibraryDirectories>
+ <AdditionalDependencies>libexceptionsd.lib;libutild.lib;libasiolinkd.lib;iphlpapi.lib;%(AdditionalDependencies)</AdditionalDependencies>
</Link>
</ItemDefinitionGroup>
<ItemDefinitionGroup Condition="'$(Configuration)|$(Platform)'=='Release|Win32'">
@@ -106,8 +106,8 @@
<GenerateDebugInformation>true</GenerateDebugInformation>
<EnableCOMDATFolding>true</EnableCOMDATFolding>
<OptimizeReferences>true</OptimizeReferences>
- <AdditionalLibraryDirectories>..\$(Configuration);%(AdditionalLibraryDirectories)</AdditionalLibraryDirectories>
- <AdditionalDependencies>libexceptions.lib;libasiolink.lib;%(AdditionalDependencies)</AdditionalDependencies>
+ <AdditionalLibraryDirectories>..\$(Configuration);%BOOST%\lib;%(AdditionalLibraryDirectories)</AdditionalLibraryDirectories>
+ <AdditionalDependencies>libexceptions.lib;libutil.lib;libasiolink.lib;iphlpapi.lib;%(AdditionalDependencies)</AdditionalDependencies>
</Link>
</ItemDefinitionGroup>
<Import Project="$(VCTargetsPath)\Microsoft.Cpp.targets" />
diff --git a/win32build/VS2010/libdhcp_tests/libdhcp_tests.vcxproj b/win32build/VS2010/libdhcp_tests/libdhcp_tests.vcxproj
index 3cd66b6..36b90c1 100755
--- a/win32build/VS2010/libdhcp_tests/libdhcp_tests.vcxproj
+++ b/win32build/VS2010/libdhcp_tests/libdhcp_tests.vcxproj
@@ -52,7 +52,7 @@
<PrecompiledHeader>NotUsing</PrecompiledHeader>
<WarningLevel>Level4</WarningLevel>
<Optimization>Disabled</Optimization>
- <PreprocessorDefinitions>WIN32;_DEBUG;_CONSOLE;%(PreprocessorDefinitions)</PreprocessorDefinitions>
+ <PreprocessorDefinitions>WIN32;GTEST_LINKED_AS_SHARED_LIBRARY=1;_DEBUG;_CONSOLE;%(PreprocessorDefinitions);%(PreprocessorDefinitions)</PreprocessorDefinitions>
<AdditionalIncludeDirectories>..\..;..\..\..\src\lib;..\..\..\ext\asio;..\..\..\..\gtest\include;%BOOST%;%(AdditionalIncludeDirectories)</AdditionalIncludeDirectories>
<CompileAs>CompileAsCpp</CompileAs>
</ClCompile>
@@ -60,8 +60,8 @@
<SubSystem>Console</SubSystem>
<GenerateDebugInformation>true</GenerateDebugInformation>
<OutputFile>$(OutDir)run_unittests$(TargetExt)</OutputFile>
- <AdditionalDependencies>libexceptions.lib;libutil.lib;libutil_unittests.lib;liblog.lib;libasiolink.lib;libdhcp.lib;log4cplusSD.lib;gtestd.lib;%(AdditionalDependencies);iphlpapi.lib</AdditionalDependencies>
- <AdditionalLibraryDirectories>..\libexceptions\$(Configuration);..\libutil\$(Configuration);..\libutil_unittests\$(Configuration);..\liblog\$(Configuration);..\libasiolink\$(Configuration);..\libdhcp\$(Configuration);..\..\..\..\log4cplus\md10\$(Configuration);..\..\..\..\gtest\md10\$(Configuration);%BOOST%\lib;%(AdditionalLibraryDirectories)</AdditionalLibraryDirectories>
+ <AdditionalDependencies>libexceptionsd.lib;libutild.lib;libutil_unittestsd.lib;liblogd.lib;libasiolinkd.lib;libdhcpd.lib;log4cplusD.lib;gtestd.lib;%(AdditionalDependencies);iphlpapi.lib</AdditionalDependencies>
+ <AdditionalLibraryDirectories>..\$(Configuration);..\..\..\..\log4cplus\v100\$(Configuration);..\..\..\..\gtest\v100\$(Configuration);%BOOST%\lib;%(AdditionalLibraryDirectories)</AdditionalLibraryDirectories>
</Link>
</ItemDefinitionGroup>
<ItemDefinitionGroup Condition="'$(Configuration)|$(Platform)'=='Release|Win32'">
@@ -71,7 +71,7 @@
<Optimization>MaxSpeed</Optimization>
<FunctionLevelLinking>true</FunctionLevelLinking>
<IntrinsicFunctions>true</IntrinsicFunctions>
- <PreprocessorDefinitions>WIN32;NDEBUG;_CONSOLE;%(PreprocessorDefinitions)</PreprocessorDefinitions>
+ <PreprocessorDefinitions>WIN32;GTEST_LINKED_AS_SHARED_LIBRARY=1;NDEBUG;_CONSOLE;%(PreprocessorDefinitions);%(PreprocessorDefinitions)</PreprocessorDefinitions>
<AdditionalIncludeDirectories>..\..;..\..\..\src\lib;..\..\..\ext\asio;..\..\..\..\gtest\include;%BOOST%;%(AdditionalIncludeDirectories)</AdditionalIncludeDirectories>
<CompileAs>CompileAsCpp</CompileAs>
</ClCompile>
@@ -81,8 +81,8 @@
<EnableCOMDATFolding>true</EnableCOMDATFolding>
<OptimizeReferences>true</OptimizeReferences>
<OutputFile>$(OutDir)run_unittests$(TargetExt)</OutputFile>
- <AdditionalLibraryDirectories>..\libexceptions\$(Configuration);..\libutil\$(Configuration);..\libutil_unittests\$(Configuration);..\liblog\$(Configuration);..\libasiolink\$(Configuration);..\libdhcp\$(Configuration);..\..\..\..\log4cplus\md10\$(Configuration);..\..\..\..\gtest\md10\$(Configuration);%BOOST%\lib;%(AdditionalLibraryDirectories)</AdditionalLibraryDirectories>
- <AdditionalDependencies>libexceptions.lib;libutil.lib;libutil_unittests.lib;liblog.lib;libasiolink.lib;libdhcp.lib;log4cplusS.lib;gtest.lib;%(AdditionalDependencies);iphlpapi.lib</AdditionalDependencies>
+ <AdditionalLibraryDirectories>..\$(Configuration);..\..\..\..\log4cplus\v100\$(Configuration);..\..\..\..\gtest\v100\$(Configuration);%BOOST%\lib;%(AdditionalLibraryDirectories)</AdditionalLibraryDirectories>
+ <AdditionalDependencies>libexceptions.lib;libutil.lib;libutil_unittests.lib;liblog.lib;libasiolink.lib;libdhcp.lib;log4cplus.lib;gtest.lib;%(AdditionalDependencies);iphlpapi.lib</AdditionalDependencies>
</Link>
</ItemDefinitionGroup>
<ItemGroup>
diff --git a/win32build/VS2010/libresolve_tests/libresolve_tests.vcxproj b/win32build/VS2010/libresolve_tests/libresolve_tests.vcxproj
index b27ddf8..9359e42 100755
--- a/win32build/VS2010/libresolve_tests/libresolve_tests.vcxproj
+++ b/win32build/VS2010/libresolve_tests/libresolve_tests.vcxproj
@@ -52,7 +52,7 @@
<PrecompiledHeader>NotUsing</PrecompiledHeader>
<WarningLevel>Level4</WarningLevel>
<Optimization>Disabled</Optimization>
- <PreprocessorDefinitions>WIN32;_DEBUG;_CONSOLE;%(PreprocessorDefinitions)</PreprocessorDefinitions>
+ <PreprocessorDefinitions>WIN32;GTEST_CREATE_SHARED_LIBRARY=1;_DEBUG;_CONSOLE;%(PreprocessorDefinitions)</PreprocessorDefinitions>
<AdditionalIncludeDirectories>..\..;..\..\..\src\lib;..\..\..\src\lib\dns;..\..\..\ext\asio;..\..\..\ext\coroutine;..\..\..\..\gtest\include;%BOOST%;%(AdditionalIncludeDirectories)</AdditionalIncludeDirectories>
<CompileAs>CompileAsCpp</CompileAs>
</ClCompile>
@@ -71,7 +71,7 @@
<Optimization>MaxSpeed</Optimization>
<FunctionLevelLinking>true</FunctionLevelLinking>
<IntrinsicFunctions>true</IntrinsicFunctions>
- <PreprocessorDefinitions>WIN32;NDEBUG;_CONSOLE;%(PreprocessorDefinitions)</PreprocessorDefinitions>
+ <PreprocessorDefinitions>WIN32;GTEST_CREATE_SHARED_LIBRARY=1;NDEBUG;_CONSOLE;%(PreprocessorDefinitions)</PreprocessorDefinitions>
<AdditionalIncludeDirectories>..\..;..\..\..\src\lib;..\..\..\src\lib\dns;..\..\..\ext\asio;..\..\..\ext\coroutine;..\..\..\..\gtest\include;%BOOST%;%(AdditionalIncludeDirectories)</AdditionalIncludeDirectories>
<CompileAs>CompileAsCpp</CompileAs>
</ClCompile>
diff --git a/win32build/VS2010/libserver_common/libserver_common.vcxproj b/win32build/VS2010/libserver_common/libserver_common.vcxproj
index 8ca79aa..0fdb0af 100755
--- a/win32build/VS2010/libserver_common/libserver_common.vcxproj
+++ b/win32build/VS2010/libserver_common/libserver_common.vcxproj
@@ -33,12 +33,12 @@
</PropertyGroup>
<Import Project="$(VCTargetsPath)\Microsoft.Cpp.Default.props" />
<PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'" Label="Configuration">
- <ConfigurationType>StaticLibrary</ConfigurationType>
+ <ConfigurationType>DynamicLibrary</ConfigurationType>
<UseDebugLibraries>true</UseDebugLibraries>
<CharacterSet>Unicode</CharacterSet>
</PropertyGroup>
<PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Release|Win32'" Label="Configuration">
- <ConfigurationType>StaticLibrary</ConfigurationType>
+ <ConfigurationType>DynamicLibrary</ConfigurationType>
<UseDebugLibraries>false</UseDebugLibraries>
<WholeProgramOptimization>true</WholeProgramOptimization>
<CharacterSet>Unicode</CharacterSet>
@@ -54,10 +54,11 @@
</ImportGroup>
<PropertyGroup Label="UserMacros" />
<PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">
- <OutDir>$(Configuration)\</OutDir>
+ <OutDir>$(Solutiondir)$(Configuration)\</OutDir>
+ <TargetName>$(ProjectName)d</TargetName>
</PropertyGroup>
<PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Release|Win32'">
- <OutDir>$(Configuration)\</OutDir>
+ <OutDir>$(Solutiondir)$(Configuration)\</OutDir>
</PropertyGroup>
<ItemDefinitionGroup Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">
<ClCompile>
@@ -71,6 +72,8 @@
<Link>
<SubSystem>Windows</SubSystem>
<GenerateDebugInformation>true</GenerateDebugInformation>
+ <AdditionalLibraryDirectories>..\$(Configuration);%(AdditionalLibraryDirectories)</AdditionalLibraryDirectories>
+ <AdditionalDependencies>libexceptionsd.lib;libutil_iod.lib;liblogd.lib;libdns++d.lib;libccd.lib;libcfgclientd.lib;libacld.lib;libasiolinkd.lib;%(AdditionalDependencies)</AdditionalDependencies>
</Link>
<PreBuildEvent>
<Command>cd ..\..\..\src\lib\server_common
@@ -94,6 +97,8 @@
<GenerateDebugInformation>true</GenerateDebugInformation>
<EnableCOMDATFolding>true</EnableCOMDATFolding>
<OptimizeReferences>true</OptimizeReferences>
+ <AdditionalLibraryDirectories>..\$(Configuration);%(AdditionalLibraryDirectories)</AdditionalLibraryDirectories>
+ <AdditionalDependencies>libexceptions.lib;libutil_io.lib;liblog.lib;libdns++.lib;libcc.lib;libcfgclient.lib;libacl.lib;libasiolink.lib;%(AdditionalDependencies)</AdditionalDependencies>
</Link>
<PreBuildEvent>
<Command>cd ..\..\..\src\lib\server_common
diff --git a/win32build/VS2010/libserver_common_tests/libserver_common_tests.vcxproj b/win32build/VS2010/libserver_common_tests/libserver_common_tests.vcxproj
index 928c81a..818d596 100755
--- a/win32build/VS2010/libserver_common_tests/libserver_common_tests.vcxproj
+++ b/win32build/VS2010/libserver_common_tests/libserver_common_tests.vcxproj
@@ -52,7 +52,7 @@
<PrecompiledHeader>NotUsing</PrecompiledHeader>
<WarningLevel>Level4</WarningLevel>
<Optimization>Disabled</Optimization>
- <PreprocessorDefinitions>WIN32;BIND10HOME="%BIND10HOME%";_DEBUG;_CONSOLE;%(PreprocessorDefinitions)</PreprocessorDefinitions>
+ <PreprocessorDefinitions>WIN32;GTEST_LINKED_AS_SHARED_LIBRARY=1;BIND10HOME="%BIND10HOME%";_DEBUG;_CONSOLE;%(PreprocessorDefinitions)</PreprocessorDefinitions>
<AdditionalIncludeDirectories>..\..;..\..\..\src\lib;..\..\..\src\lib\server_common;..\..\..\ext\asio;..\..\..\..\gtest\include;%BOOST%;%(AdditionalIncludeDirectories)</AdditionalIncludeDirectories>
<CompileAs>CompileAsCpp</CompileAs>
</ClCompile>
@@ -60,8 +60,8 @@
<SubSystem>Console</SubSystem>
<GenerateDebugInformation>true</GenerateDebugInformation>
<OutputFile>$(OutDir)run_unittests$(TargetExt)</OutputFile>
- <AdditionalDependencies>libexceptions.lib;libutil.lib;libutil_io.lib;libutil_unittests.lib;liblog.lib;libcryptolink.lib;libdns++.lib;libcc.lib;libcfgclient.lib;libfake_session.lib;libasiolink.lib;libasiodns.lib;libacl.lib;libserver_common.lib;log4cplusSD.lib;botan.lib;gtestd.lib;%(AdditionalDependencies)</AdditionalDependencies>
- <AdditionalLibraryDirectories>..\libexceptions\$(Configuration);..\libutil\$(Configuration);..\libutil_io\$(Configuration);..\libutil_unittests\$(Configuration);..\liblog\$(Configuration);..\libcryptolink\$(Configuration);..\libdns++\$(Configuration);..\libcc\$(Configuration);..\libcfgclient\$(Configuration);..\libfake_session\$(Configuration);..\libasiolink\$(Configuration);..\libasiodns\$(Configuration);..\libacl\$(Configuration);..\libserver_common\$(Configuration);..\..\..\..\log4cplus\md10\$(Configuration);..\..\..\..\botan\md10\$(Configuration);..\..\..\..\gtest\md10\$(Configuration);%BOOST%\lib;%(AdditionalLibraryDirectories)</AdditionalLibraryDirectories>
+ <AdditionalDependencies>libexceptionsd.lib;libutild.lib;libutil_iod.lib;libutil_unittestsd.lib;liblogd.lib;libcryptolinkd.lib;libdns++d.lib;libccd.lib;libcfgclientd.lib;libfake_sessiond.lib;libasiolinkd.lib;libasiodnsd.lib;libacld.lib;libserver_commond.lib;log4cplusD.lib;botand.lib;gtestd.lib;%(AdditionalDependencies)</AdditionalDependencies>
+ <AdditionalLibraryDirectories>..\$(Configuration);..\..\..\..\log4cplus\v100\$(Configuration);..\..\..\..\botan\v100\$(Configuration);..\..\..\..\gtest\v100\$(Configuration);%BOOST%\lib;%(AdditionalLibraryDirectories)</AdditionalLibraryDirectories>
</Link>
<PreBuildEvent>
<Command>cd ..\..\..\src\lib\server_common\tests
@@ -76,7 +76,7 @@ copy data_path.h.win32 data_path.h
<Optimization>MaxSpeed</Optimization>
<FunctionLevelLinking>true</FunctionLevelLinking>
<IntrinsicFunctions>true</IntrinsicFunctions>
- <PreprocessorDefinitions>WIN32;BIND10HOME="%BIND10HOME%";NDEBUG;_CONSOLE;%(PreprocessorDefinitions)</PreprocessorDefinitions>
+ <PreprocessorDefinitions>WIN32;GTEST_LINKED_AS_SHARED_LIBRARY=1;BIND10HOME="%BIND10HOME%";NDEBUG;_CONSOLE;%(PreprocessorDefinitions)</PreprocessorDefinitions>
<AdditionalIncludeDirectories>..\..;..\..\..\src\lib;..\..\..\src\lib\server_common;..\..\..\ext\asio;..\..\..\..\gtest\include;%BOOST%;%(AdditionalIncludeDirectories)</AdditionalIncludeDirectories>
<CompileAs>CompileAsCpp</CompileAs>
</ClCompile>
@@ -86,8 +86,8 @@ copy data_path.h.win32 data_path.h
<EnableCOMDATFolding>true</EnableCOMDATFolding>
<OptimizeReferences>true</OptimizeReferences>
<OutputFile>$(OutDir)run_unittests$(TargetExt)</OutputFile>
- <AdditionalDependencies>libexceptions.lib;libutil.lib;libutil_io.lib;libutil_unittests.lib;liblog.lib;libcryptolink.lib;libdns++.lib;libcc.lib;libcfgclient.lib;libfake_session.lib;libasiolink.lib;libasiodns.lib;libacl.lib;libserver_common.lib;log4cplusS.lib;botan.lib;gtest.lib;%(AdditionalDependencies)</AdditionalDependencies>
- <AdditionalLibraryDirectories>..\libexceptions\$(Configuration);..\libutil\$(Configuration);..\libutil_io\$(Configuration);..\libutil_unittests\$(Configuration);..\liblog\$(Configuration);..\libcryptolink\$(Configuration);..\libdns++\$(Configuration);..\libcc\$(Configuration);..\libcfgclient\$(Configuration);..\libfake_session\$(Configuration);..\libasiolink\$(Configuration);..\libasiodns\$(Configuration);..\libacl\$(Configuration);..\libserver_common\$(Configuration);..\..\..\..\log4cplus\md10\$(Configuration);..\..\..\..\botan\md10\$(Configuration);..\..\..\..\gtest\md10\$(Configuration);%BOOST%\lib;%(AdditionalLibraryDirectories)</AdditionalLibraryDirectories>
+ <AdditionalDependencies>libexceptions.lib;libutil.lib;libutil_io.lib;libutil_unittests.lib;liblog.lib;libcryptolink.lib;libdns++.lib;libcc.lib;libcfgclient.lib;libfake_session.lib;libasiolink.lib;libasiodns.lib;libacl.lib;libserver_common.lib;log4cplus.lib;botan.lib;gtest.lib;%(AdditionalDependencies)</AdditionalDependencies>
+ <AdditionalLibraryDirectories>..\$(Configuration);..\..\..\..\log4cplus\v100\$(Configuration);..\..\..\..\botan\v100\$(Configuration);..\..\..\..\gtest\v100\$(Configuration);%BOOST%\lib;%(AdditionalLibraryDirectories)</AdditionalLibraryDirectories>
</Link>
<PreBuildEvent>
<Command>cd ..\..\..\src\lib\server_common\tests
diff --git a/win32build/VS2010/libtestutils/libtestutils.vcxproj b/win32build/VS2010/libtestutils/libtestutils.vcxproj
index 1329b00..e823e8b 100755
--- a/win32build/VS2010/libtestutils/libtestutils.vcxproj
+++ b/win32build/VS2010/libtestutils/libtestutils.vcxproj
@@ -22,6 +22,7 @@
<ItemGroup>
<ClCompile Include="..\..\..\src\lib\dns\tests\unittest_util.cc" />
<ClCompile Include="..\..\..\src\lib\testutils\dnsmessage_test.cc" />
+ <ClCompile Include="..\..\..\src\lib\testutils\socket_request.cc" />
<ClCompile Include="..\..\..\src\lib\testutils\srv_test.cc" />
<ClCompile Include="..\..\dllmain.cc" />
</ItemGroup>
@@ -72,7 +73,7 @@
<SubSystem>Windows</SubSystem>
<GenerateDebugInformation>true</GenerateDebugInformation>
<AdditionalLibraryDirectories>..\$(Configuration);..\..\..\..\gtest\v100\$(Configuration);%(AdditionalLibraryDirectories)</AdditionalLibraryDirectories>
- <AdditionalDependencies>libexceptionsd.lib;libutild.lib;libdns++d.lib;libccd.lib;libxfrd.lib;libasiolinkd.lib;libasiodnsd.lib;gtestd.lib;%(AdditionalDependencies)</AdditionalDependencies>
+ <AdditionalDependencies>libexceptionsd.lib;libutild.lib;libdns++d.lib;libccd.lib;libxfrd.lib;libasiolinkd.lib;libasiodnsd.lib;libserver_commond.lib;gtestd.lib;%(AdditionalDependencies)</AdditionalDependencies>
</Link>
<PreBuildEvent>
<Command>cd ..\..\..\src\lib\testutils\testdata
@@ -108,7 +109,7 @@ python %BIND10HOME%/src/lib/util/python/gen_wiredata.py -o simpleresponse_fromWi
<EnableCOMDATFolding>true</EnableCOMDATFolding>
<OptimizeReferences>true</OptimizeReferences>
<AdditionalLibraryDirectories>..\$(Configuration);..\..\..\..\gtest\v100\$(Configuration);%(AdditionalLibraryDirectories)</AdditionalLibraryDirectories>
- <AdditionalDependencies>libexceptions.lib;libutil.lib;libdns++.lib;libcc.lib;libxfr.lib;libasiolink.lib;libasiodns.lib;gtest.lib;%(AdditionalDependencies)</AdditionalDependencies>
+ <AdditionalDependencies>libexceptions.lib;libutil.lib;libdns++.lib;libcc.lib;libxfr.lib;libasiolink.lib;libasiodns.lib;libserver_common.lib;gtest.lib;%(AdditionalDependencies)</AdditionalDependencies>
</Link>
<PreBuildEvent>
<Command>cd ..\..\..\src\lib\testutils\testdata
diff --git a/win32build/VS2010/libtestutils/libtestutils.vcxproj.filters b/win32build/VS2010/libtestutils/libtestutils.vcxproj.filters
index 79e8efd..03d6f9c 100755
--- a/win32build/VS2010/libtestutils/libtestutils.vcxproj.filters
+++ b/win32build/VS2010/libtestutils/libtestutils.vcxproj.filters
@@ -50,5 +50,8 @@
<ClCompile Include="..\..\dllmain.cc">
<Filter>Source Files</Filter>
</ClCompile>
+ <ClCompile Include="..\..\..\src\lib\testutils\socket_request.cc">
+ <Filter>Source Files</Filter>
+ </ClCompile>
</ItemGroup>
</Project>
\ No newline at end of file
diff --git a/win32build/VS2010/pydacl/pydacl.vcxproj b/win32build/VS2010/pydacl/pydacl.vcxproj
index 6d6c11d..d425ea8 100755
--- a/win32build/VS2010/pydacl/pydacl.vcxproj
+++ b/win32build/VS2010/pydacl/pydacl.vcxproj
@@ -1,4 +1,4 @@
-<?xml version="1.0" encoding="utf-8"?>
+<?xml version="1.0" encoding="utf-8"?>
<Project DefaultTargets="Build" ToolsVersion="4.0" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
<ItemGroup Label="ProjectConfigurations">
<ProjectConfiguration Include="Debug|Win32">
@@ -39,13 +39,13 @@
<PropertyGroup Label="UserMacros" />
<PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">
<LinkIncremental>true</LinkIncremental>
- <OutDir>$(Configuration)\</OutDir>
- <TargetName>acl</TargetName>
+ <OutDir>$(Solutiondir)$(Configuration)\</OutDir>
+ <TargetName>acl_d</TargetName>
<TargetExt>.pyd</TargetExt>
</PropertyGroup>
<PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Release|Win32'">
<LinkIncremental>false</LinkIncremental>
- <OutDir>$(Configuration)\</OutDir>
+ <OutDir>$(Solutiondir)$(Configuration)\</OutDir>
<TargetName>acl</TargetName>
<TargetExt>.pyd</TargetExt>
</PropertyGroup>
@@ -54,16 +54,16 @@
<PrecompiledHeader>NotUsing</PrecompiledHeader>
<WarningLevel>Level4</WarningLevel>
<Optimization>Disabled</Optimization>
- <PreprocessorDefinitions>WIN32;_DEBUG;_WINDOWS;_USRDLL;PYDACL_EXPORTS;%(PreprocessorDefinitions)</PreprocessorDefinitions>
+ <PreprocessorDefinitions>WIN32;USE_STATIC_WRAPPER;_DEBUG;_WINDOWS;_USRDLL;PYDACL_EXPORTS;%(PreprocessorDefinitions);%(PreprocessorDefinitions)</PreprocessorDefinitions>
<AdditionalIncludeDirectories>..\..;..\..\..\src\lib;%BOOST%;C:\Python32\include;%(AdditionalIncludeDirectories)</AdditionalIncludeDirectories>
<CompileAs>CompileAsCpp</CompileAs>
</ClCompile>
<Link>
<SubSystem>Windows</SubSystem>
<GenerateDebugInformation>true</GenerateDebugInformation>
- <OutputFile>$(OutDir)acl.pyd</OutputFile>
- <AdditionalLibraryDirectories>..\libexceptions\$(Configuration);..\libacl\$(Configuration);C:\Python32\libs;%(AdditionalLibraryDirectories)</AdditionalLibraryDirectories>
- <AdditionalDependencies>libexceptions.lib;libacl.lib;python32_d.lib;%(AdditionalDependencies)</AdditionalDependencies>
+ <OutputFile>$(OutDir)acl_d.pyd</OutputFile>
+ <AdditionalLibraryDirectories>..\$(Configuration);C:\Python32\libs;%(AdditionalLibraryDirectories)</AdditionalLibraryDirectories>
+ <AdditionalDependencies>libexceptionsd.lib;libacld.lib;python32_d.lib;%(AdditionalDependencies)</AdditionalDependencies>
</Link>
</ItemDefinitionGroup>
<ItemDefinitionGroup Condition="'$(Configuration)|$(Platform)'=='Release|Win32'">
@@ -73,7 +73,7 @@
<Optimization>MaxSpeed</Optimization>
<FunctionLevelLinking>true</FunctionLevelLinking>
<IntrinsicFunctions>true</IntrinsicFunctions>
- <PreprocessorDefinitions>WIN32;NDEBUG;_WINDOWS;_USRDLL;PYDACL_EXPORTS;%(PreprocessorDefinitions)</PreprocessorDefinitions>
+ <PreprocessorDefinitions>WIN32;USE_STATIC_WRAPPER;NDEBUG;_WINDOWS;_USRDLL;PYDACL_EXPORTS;%(PreprocessorDefinitions);%(PreprocessorDefinitions)</PreprocessorDefinitions>
<AdditionalIncludeDirectories>..\..;..\..\..\src\lib;%BOOST%;C:\Python32\include;%(AdditionalIncludeDirectories)</AdditionalIncludeDirectories>
<CompileAs>CompileAsCpp</CompileAs>
</ClCompile>
@@ -83,7 +83,7 @@
<EnableCOMDATFolding>true</EnableCOMDATFolding>
<OptimizeReferences>true</OptimizeReferences>
<OutputFile>$(OutDir)acl.pyd</OutputFile>
- <AdditionalLibraryDirectories>..\libexceptions\$(Configuration);..\libacl\$(Configuration);C:\Python32\libs;%(AdditionalLibraryDirectories)</AdditionalLibraryDirectories>
+ <AdditionalLibraryDirectories>..\$(Configuration);C:\Python32\libs;%(AdditionalLibraryDirectories)</AdditionalLibraryDirectories>
<AdditionalDependencies>libexceptions.lib;libacl.lib;python32.lib;%(AdditionalDependencies)</AdditionalDependencies>
</Link>
</ItemDefinitionGroup>
diff --git a/win32build/VS2010/pyddatasrc/pyddatasrc.vcxproj b/win32build/VS2010/pyddatasrc/pyddatasrc.vcxproj
index 5ad924a..6c192c1 100755
--- a/win32build/VS2010/pyddatasrc/pyddatasrc.vcxproj
+++ b/win32build/VS2010/pyddatasrc/pyddatasrc.vcxproj
@@ -39,13 +39,13 @@
<PropertyGroup Label="UserMacros" />
<PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">
<LinkIncremental>true</LinkIncremental>
- <OutDir>$(Configuration)\</OutDir>
- <TargetName>datasrc</TargetName>
+ <OutDir>$(Solutiondir)$(Configuration)\</OutDir>
+ <TargetName>datasrc_d</TargetName>
<TargetExt>.pyd</TargetExt>
</PropertyGroup>
<PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Release|Win32'">
<LinkIncremental>false</LinkIncremental>
- <OutDir>$(Configuration)\</OutDir>
+ <OutDir>$(Solutiondir)$(Configuration)\</OutDir>
<TargetName>datasrc</TargetName>
<TargetExt>.pyd</TargetExt>
</PropertyGroup>
@@ -54,16 +54,16 @@
<PrecompiledHeader>NotUsing</PrecompiledHeader>
<WarningLevel>Level4</WarningLevel>
<Optimization>Disabled</Optimization>
- <PreprocessorDefinitions>WIN32;_DEBUG;_WINDOWS;_USRDLL;PYDDATASRC_EXPORTS;%(PreprocessorDefinitions)</PreprocessorDefinitions>
+ <PreprocessorDefinitions>WIN32;USE_STATIC_WRAPPER;_DEBUG;_WINDOWS;_USRDLL;PYDDATASRC_EXPORTS;%(PreprocessorDefinitions);%(PreprocessorDefinitions)</PreprocessorDefinitions>
<AdditionalIncludeDirectories>..\..;..\..\..\src\lib;..\..\..\src\lib\python\isc\datasrc;%BOOST%;C:\Python32\include;C:\sqlite3;%(AdditionalIncludeDirectories)</AdditionalIncludeDirectories>
<CompileAs>CompileAsCpp</CompileAs>
</ClCompile>
<Link>
<SubSystem>Windows</SubSystem>
<GenerateDebugInformation>true</GenerateDebugInformation>
- <OutputFile>$(OutDir)datasrc.pyd</OutputFile>
- <AdditionalLibraryDirectories>..\libexceptions\$(Configuration);..\libutil\$(Configuration);..\liblog\$(Configuration);..\libcryptolink\$(Configuration);..\libdns++\$(Configuration);..\libdns++_python\$(Configuration);..\libcc\$(Configuration);..\libdatasrc\$(Configuration);..\..\..\..\botan\md10\$(Configuration);..\..\..\..\log4cplus\md10\$(Configuration);C:\Python32\libs;C:\sqlite3;%(AdditionalLibraryDirectories)</AdditionalLibraryDirectories>
- <AdditionalDependencies>libexceptions.lib;libutil.lib;liblog.lib;libcryptolink.lib;libdns++.lib;libdns++_python.lib;libcc.lib;libdatasrc.lib;botan.lib;log4cplusSD.lib;sqlite3.lib;%(AdditionalDependencies)</AdditionalDependencies>
+ <OutputFile>$(OutDir)datasrc_d.pyd</OutputFile>
+ <AdditionalLibraryDirectories>..\$(Configuration);..\..\..\..\botan\v100\$(Configuration);..\..\..\..\log4cplus\v100\$(Configuration);C:\Python32\libs;C:\sqlite3;%(AdditionalLibraryDirectories)</AdditionalLibraryDirectories>
+ <AdditionalDependencies>libexceptionsd.lib;libutild.lib;liblogd.lib;libcryptolinkd.lib;libdns++d.lib;libdns++_pythond.lib;libccd.lib;libdatasrcd.lib;botand.lib;log4cplusD.lib;sqlite3.lib;%(AdditionalDependencies)</AdditionalDependencies>
</Link>
</ItemDefinitionGroup>
<ItemDefinitionGroup Condition="'$(Configuration)|$(Platform)'=='Release|Win32'">
@@ -73,7 +73,7 @@
<Optimization>MaxSpeed</Optimization>
<FunctionLevelLinking>true</FunctionLevelLinking>
<IntrinsicFunctions>true</IntrinsicFunctions>
- <PreprocessorDefinitions>WIN32;NDEBUG;_WINDOWS;_USRDLL;PYDDATASRC_EXPORTS;%(PreprocessorDefinitions)</PreprocessorDefinitions>
+ <PreprocessorDefinitions>WIN32;USE_STATIC_WRAPPER;NDEBUG;_WINDOWS;_USRDLL;PYDDATASRC_EXPORTS;%(PreprocessorDefinitions);%(PreprocessorDefinitions)</PreprocessorDefinitions>
<AdditionalIncludeDirectories>..\..;..\..\..\src\lib;..\..\..\src\lib\python\isc\datasrc;%BOOST%;C:\Python32\include;C:\sqlite3;%(AdditionalIncludeDirectories)</AdditionalIncludeDirectories>
<CompileAs>CompileAsCpp</CompileAs>
</ClCompile>
@@ -83,8 +83,8 @@
<EnableCOMDATFolding>true</EnableCOMDATFolding>
<OptimizeReferences>true</OptimizeReferences>
<OutputFile>$(OutDir)datasrc.pyd</OutputFile>
- <AdditionalLibraryDirectories>..\libexceptions\$(Configuration);..\libutil\$(Configuration);..\liblog\$(Configuration);..\libcryptolink\$(Configuration);..\libdns++\$(Configuration);..\libdns++_python\$(Configuration);..\libcc\$(Configuration);..\libdatasrc\$(Configuration);..\..\..\..\botan\md10\$(Configuration);..\..\..\..\log4cplus\md10\$(Configuration);C:\Python32\libs;C:\sqlite3;%(AdditionalLibraryDirectories)</AdditionalLibraryDirectories>
- <AdditionalDependencies>libexceptions.lib;libutil.lib;liblog.lib;libcryptolink.lib;libdns++.lib;libdns++_python.lib;libcc.lib;libdatasrc.lib;botan.lib;log4cplusS.lib;sqlite3.lib;%(AdditionalDependencies)</AdditionalDependencies>
+ <AdditionalLibraryDirectories>..\$(Configuration);..\..\..\..\botan\v100\$(Configuration);..\..\..\..\log4cplus\v100\$(Configuration);C:\Python32\libs;C:\sqlite3;%(AdditionalLibraryDirectories)</AdditionalLibraryDirectories>
+ <AdditionalDependencies>libexceptions.lib;libutil.lib;liblog.lib;libcryptolink.lib;libdns++.lib;libdns++_python.lib;libcc.lib;libdatasrc.lib;botan.lib;log4cplus.lib;sqlite3.lib;%(AdditionalDependencies)</AdditionalDependencies>
</Link>
</ItemDefinitionGroup>
<ItemGroup>
diff --git a/win32build/VS2010/pyddns++/pyddns++.vcxproj b/win32build/VS2010/pyddns++/pyddns++.vcxproj
index cff2242..7805dbd 100755
--- a/win32build/VS2010/pyddns++/pyddns++.vcxproj
+++ b/win32build/VS2010/pyddns++/pyddns++.vcxproj
@@ -55,7 +55,7 @@
<PrecompiledHeader>NotUsing</PrecompiledHeader>
<WarningLevel>Level4</WarningLevel>
<Optimization>Disabled</Optimization>
- <PreprocessorDefinitions>WIN32;_DEBUG;_WINDOWS;_USRDLL;PYDDNSPP_EXPORTS;%(PreprocessorDefinitions)</PreprocessorDefinitions>
+ <PreprocessorDefinitions>WIN32;_DEBUG;_WINDOWS;_USRDLL;PYDDNSPP_EXPORTS;%(PreprocessorDefinitions);%(PreprocessorDefinitions)</PreprocessorDefinitions>
<AdditionalIncludeDirectories>..\..;..\..\..\src\lib;..\..\..\src\lib\dns\python;%BOOST%;C:\Python32\include;%(AdditionalIncludeDirectories)</AdditionalIncludeDirectories>
<CompileAs>CompileAsCpp</CompileAs>
</ClCompile>
@@ -83,7 +83,7 @@ copy bind10_config.py.win32 bind10_config.py
<Optimization>MaxSpeed</Optimization>
<FunctionLevelLinking>true</FunctionLevelLinking>
<IntrinsicFunctions>true</IntrinsicFunctions>
- <PreprocessorDefinitions>WIN32;NDEBUG;_WINDOWS;_USRDLL;PYDDNSPP_EXPORTS;%(PreprocessorDefinitions)</PreprocessorDefinitions>
+ <PreprocessorDefinitions>WIN32;NDEBUG;_WINDOWS;_USRDLL;PYDDNSPP_EXPORTS;%(PreprocessorDefinitions);%(PreprocessorDefinitions)</PreprocessorDefinitions>
<AdditionalIncludeDirectories>..\..;..\..\..\src\lib;..\..\..\src\lib\dns\python;%BOOST%;C:\Python32\include;%(AdditionalIncludeDirectories)</AdditionalIncludeDirectories>
<CompileAs>CompileAsCpp</CompileAs>
</ClCompile>
diff --git a/win32build/VS2010/pyddnsacl/pyddnsacl.vcxproj b/win32build/VS2010/pyddnsacl/pyddnsacl.vcxproj
index 878e5e5..86e22dd 100755
--- a/win32build/VS2010/pyddnsacl/pyddnsacl.vcxproj
+++ b/win32build/VS2010/pyddnsacl/pyddnsacl.vcxproj
@@ -1,4 +1,4 @@
-<?xml version="1.0" encoding="utf-8"?>
+<?xml version="1.0" encoding="utf-8"?>
<Project DefaultTargets="Build" ToolsVersion="4.0" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
<ItemGroup Label="ProjectConfigurations">
<ProjectConfiguration Include="Debug|Win32">
@@ -39,13 +39,13 @@
<PropertyGroup Label="UserMacros" />
<PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">
<LinkIncremental>true</LinkIncremental>
- <OutDir>$(Configuration)\</OutDir>
- <TargetName>_dns</TargetName>
+ <OutDir>$(Solutiondir)$(Configuration)\</OutDir>
+ <TargetName>_dns_d</TargetName>
<TargetExt>.pyd</TargetExt>
</PropertyGroup>
<PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Release|Win32'">
<LinkIncremental>false</LinkIncremental>
- <OutDir>$(Configuration)\</OutDir>
+ <OutDir>$(Solutiondir)$(Configuration)\</OutDir>
<TargetName>_dns</TargetName>
<TargetExt>.pyd</TargetExt>
</PropertyGroup>
@@ -54,16 +54,16 @@
<PrecompiledHeader>NotUsing</PrecompiledHeader>
<WarningLevel>Level4</WarningLevel>
<Optimization>Disabled</Optimization>
- <PreprocessorDefinitions>WIN32;_DEBUG;_WINDOWS;_USRDLL;PYDDNSACL_EXPORTS;%(PreprocessorDefinitions)</PreprocessorDefinitions>
+ <PreprocessorDefinitions>WIN32;USE_STATIC_WRAPPER;_DEBUG;_WINDOWS;_USRDLL;PYDDNSACL_EXPORTS;%(PreprocessorDefinitions);%(PreprocessorDefinitions)</PreprocessorDefinitions>
<AdditionalIncludeDirectories>..\..;..\..\..\src\lib;%BOOST%;C:\Python32\include;%(AdditionalIncludeDirectories)</AdditionalIncludeDirectories>
<CompileAs>CompileAsCpp</CompileAs>
</ClCompile>
<Link>
<SubSystem>Windows</SubSystem>
<GenerateDebugInformation>true</GenerateDebugInformation>
- <OutputFile>$(OutDir)_dns.pyd</OutputFile>
- <AdditionalLibraryDirectories>..\libexceptions\$(Configuration);..\libutil\$(Configuration);..\libdns++\$(Configuration);..\libcc\$(Configuration);..\libacl\$(Configuration);..\libdnsacl\$(Configuration);C:\Python32\libs;%(AdditionalLibraryDirectories)</AdditionalLibraryDirectories>
- <AdditionalDependencies>libexceptions.lib;libutil.lib;libdns++.lib;libcc.lib;libacl.lib;libdnsacl.lib;python32_d.lib;ws2_32.lib;%(AdditionalDependencies)</AdditionalDependencies>
+ <OutputFile>$(OutDir)_dns_d.pyd</OutputFile>
+ <AdditionalLibraryDirectories>..\$(Configuration);C:\Python32\libs;%(AdditionalLibraryDirectories)</AdditionalLibraryDirectories>
+ <AdditionalDependencies>libexceptionsd.lib;libutild.lib;libdns++d.lib;libccd.lib;libacld.lib;libdnsacld.lib;python32_d.lib;ws2_32.lib;%(AdditionalDependencies)</AdditionalDependencies>
</Link>
</ItemDefinitionGroup>
<ItemDefinitionGroup Condition="'$(Configuration)|$(Platform)'=='Release|Win32'">
@@ -73,7 +73,7 @@
<Optimization>MaxSpeed</Optimization>
<FunctionLevelLinking>true</FunctionLevelLinking>
<IntrinsicFunctions>true</IntrinsicFunctions>
- <PreprocessorDefinitions>WIN32;NDEBUG;_WINDOWS;_USRDLL;PYDDNSACL_EXPORTS;%(PreprocessorDefinitions)</PreprocessorDefinitions>
+ <PreprocessorDefinitions>WIN32;USE_STATIC_WRAPPER;NDEBUG;_WINDOWS;_USRDLL;PYDDNSACL_EXPORTS;%(PreprocessorDefinitions);%(PreprocessorDefinitions)</PreprocessorDefinitions>
<AdditionalIncludeDirectories>..\..;..\..\..\src\lib;%BOOST%;C:\Python32\include;%(AdditionalIncludeDirectories)</AdditionalIncludeDirectories>
<CompileAs>CompileAsCpp</CompileAs>
</ClCompile>
@@ -83,7 +83,7 @@
<EnableCOMDATFolding>true</EnableCOMDATFolding>
<OptimizeReferences>true</OptimizeReferences>
<OutputFile>$(OutDir)_dns.pyd</OutputFile>
- <AdditionalLibraryDirectories>..\libexceptions\$(Configuration);..\libutil\$(Configuration);..\libdns++\$(Configuration);..\libcc\$(Configuration);..\libacl\$(Configuration);..\libdnsacl\$(Configuration);C:\Python32\libs;%(AdditionalLibraryDirectories)</AdditionalLibraryDirectories>
+ <AdditionalLibraryDirectories>..\$(Configuration);C:\Python32\libs;%(AdditionalLibraryDirectories)</AdditionalLibraryDirectories>
<AdditionalDependencies>libexceptions.lib;libutil.lib;libdns++.lib;libcc.lib;libacl.lib;libdnsacl.lib;python32.lib;ws2_32.lib;%(AdditionalDependencies)</AdditionalDependencies>
</Link>
</ItemDefinitionGroup>
diff --git a/win32build/VS2010/pydlog/pydlog.vcxproj b/win32build/VS2010/pydlog/pydlog.vcxproj
index 771fe3a..27ebbee 100755
--- a/win32build/VS2010/pydlog/pydlog.vcxproj
+++ b/win32build/VS2010/pydlog/pydlog.vcxproj
@@ -1,4 +1,4 @@
-<?xml version="1.0" encoding="utf-8"?>
+<?xml version="1.0" encoding="utf-8"?>
<Project DefaultTargets="Build" ToolsVersion="4.0" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
<ItemGroup Label="ProjectConfigurations">
<ProjectConfiguration Include="Debug|Win32">
@@ -39,13 +39,13 @@
<PropertyGroup Label="UserMacros" />
<PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">
<LinkIncremental>true</LinkIncremental>
- <OutDir>$(Configuration)\</OutDir>
- <TargetName>log</TargetName>
+ <OutDir>$(Solutiondir)$(Configuration)\</OutDir>
+ <TargetName>log_d</TargetName>
<TargetExt>.pyd</TargetExt>
</PropertyGroup>
<PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Release|Win32'">
<LinkIncremental>false</LinkIncremental>
- <OutDir>$(Configuration)\</OutDir>
+ <OutDir>$(Solutiondir)$(Configuration)\</OutDir>
<TargetName>log</TargetName>
<TargetExt>.pyd</TargetExt>
</PropertyGroup>
@@ -54,16 +54,16 @@
<PrecompiledHeader>NotUsing</PrecompiledHeader>
<WarningLevel>Level4</WarningLevel>
<Optimization>Disabled</Optimization>
- <PreprocessorDefinitions>WIN32;_DEBUG;_WINDOWS;_USRDLL;PYDLOG_EXPORTS;%(PreprocessorDefinitions)</PreprocessorDefinitions>
+ <PreprocessorDefinitions>WIN32;USE_STATIC_WRAPPER;_DEBUG;_WINDOWS;_USRDLL;PYDLOG_EXPORTS;%(PreprocessorDefinitions);%(PreprocessorDefinitions)</PreprocessorDefinitions>
<AdditionalIncludeDirectories>..\..;..\..\..\src\lib;%BOOST%;C:\Python32\include;%(AdditionalIncludeDirectories)</AdditionalIncludeDirectories>
<CompileAs>CompileAsCpp</CompileAs>
</ClCompile>
<Link>
<SubSystem>Windows</SubSystem>
<GenerateDebugInformation>true</GenerateDebugInformation>
- <OutputFile>$(OutDir)log.pyd</OutputFile>
- <AdditionalLibraryDirectories>..\libexceptions\$(Configuration);..\libutil\$(Configuration);..\liblog\$(Configuration);..\libcc\$(Configuration);..\libcfgclient\$(Configuration);..\..\..\..\log4cplus\md10\$(Configuration);C:\Python32\libs;%(AdditionalLibraryDirectories)</AdditionalLibraryDirectories>
- <AdditionalDependencies>libexceptions.lib;libutil.lib;liblog.lib;libcc.lib;libcfgclient.lib;log4cplusSD.lib;python32_d.lib;%(AdditionalDependencies)</AdditionalDependencies>
+ <OutputFile>$(OutDir)log_d.pyd</OutputFile>
+ <AdditionalLibraryDirectories>..\$(Configuration);..\..\..\..\log4cplus\v100\$(Configuration);C:\Python32\libs;%(AdditionalLibraryDirectories)</AdditionalLibraryDirectories>
+ <AdditionalDependencies>libexceptionsd.lib;libutild.lib;liblogd.lib;libccd.lib;libcfgclientd.lib;log4cplusD.lib;python32_d.lib;%(AdditionalDependencies)</AdditionalDependencies>
</Link>
</ItemDefinitionGroup>
<ItemDefinitionGroup Condition="'$(Configuration)|$(Platform)'=='Release|Win32'">
@@ -73,7 +73,7 @@
<Optimization>MaxSpeed</Optimization>
<FunctionLevelLinking>true</FunctionLevelLinking>
<IntrinsicFunctions>true</IntrinsicFunctions>
- <PreprocessorDefinitions>WIN32;NDEBUG;_WINDOWS;_USRDLL;PYDLOG_EXPORTS;%(PreprocessorDefinitions)</PreprocessorDefinitions>
+ <PreprocessorDefinitions>WIN32;USE_STATIC_WRAPPER;NDEBUG;_WINDOWS;_USRDLL;PYDLOG_EXPORTS;%(PreprocessorDefinitions);%(PreprocessorDefinitions)</PreprocessorDefinitions>
<AdditionalIncludeDirectories>..\..;..\..\..\src\lib;%BOOST%;C:\Python32\include;%(AdditionalIncludeDirectories)</AdditionalIncludeDirectories>
<CompileAs>CompileAsCpp</CompileAs>
</ClCompile>
@@ -83,8 +83,8 @@
<EnableCOMDATFolding>true</EnableCOMDATFolding>
<OptimizeReferences>true</OptimizeReferences>
<OutputFile>$(OutDir)log.pyd</OutputFile>
- <AdditionalLibraryDirectories>..\libexceptions\$(Configuration);..\libutil\$(Configuration);..\liblog\$(Configuration);..\libcc\$(Configuration);..\libcfgclient\$(Configuration);..\..\..\..\log4cplus\md10\$(Configuration);C:\Python32\libs;%(AdditionalLibraryDirectories)</AdditionalLibraryDirectories>
- <AdditionalDependencies>libexceptions.lib;libutil.lib;liblog.lib;libcc.lib;libcfgclient.lib;log4cplusS.lib;python32.lib;%(AdditionalDependencies)</AdditionalDependencies>
+ <AdditionalLibraryDirectories>..\$(Configuration);..\..\..\..\log4cplus\v100\$(Configuration);C:\Python32\libs;%(AdditionalLibraryDirectories)</AdditionalLibraryDirectories>
+ <AdditionalDependencies>libexceptions.lib;libutil.lib;liblog.lib;libcc.lib;libcfgclient.lib;log4cplus.lib;python32.lib;%(AdditionalDependencies)</AdditionalDependencies>
</Link>
</ItemDefinitionGroup>
<ItemGroup>
diff --git a/win32build/VS2010/pydutil_io/pydutil_io.vcxproj b/win32build/VS2010/pydutil_io/pydutil_io.vcxproj
index 82dabe5..562fef2 100755
--- a/win32build/VS2010/pydutil_io/pydutil_io.vcxproj
+++ b/win32build/VS2010/pydutil_io/pydutil_io.vcxproj
@@ -54,7 +54,7 @@
<PrecompiledHeader>NotUsing</PrecompiledHeader>
<WarningLevel>Level4</WarningLevel>
<Optimization>Disabled</Optimization>
- <PreprocessorDefinitions>WIN32;_DEBUG;_WINDOWS;_USRDLL;PYDUTIL_IO_EXPORTS;%(PreprocessorDefinitions)</PreprocessorDefinitions>
+ <PreprocessorDefinitions>WIN32;_DEBUG;_WINDOWS;_USRDLL;PYDUTIL_IO_EXPORTS;%(PreprocessorDefinitions);%(PreprocessorDefinitions)</PreprocessorDefinitions>
<AdditionalIncludeDirectories>..\..;..\..\..\src\lib;C:\Python32\include;%(AdditionalIncludeDirectories)</AdditionalIncludeDirectories>
<CompileAs>CompileAsCpp</CompileAs>
</ClCompile>
@@ -73,7 +73,7 @@
<Optimization>MaxSpeed</Optimization>
<FunctionLevelLinking>true</FunctionLevelLinking>
<IntrinsicFunctions>true</IntrinsicFunctions>
- <PreprocessorDefinitions>WIN32;NDEBUG;_WINDOWS;_USRDLL;PYDUTIL_IO_EXPORTS;%(PreprocessorDefinitions)</PreprocessorDefinitions>
+ <PreprocessorDefinitions>WIN32;NDEBUG;_WINDOWS;_USRDLL;PYDUTIL_IO_EXPORTS;%(PreprocessorDefinitions);%(PreprocessorDefinitions)</PreprocessorDefinitions>
<AdditionalIncludeDirectories>..\..;..\..\..\src\lib;C:\Python32\include;%(AdditionalIncludeDirectories)</AdditionalIncludeDirectories>
<CompileAs>CompileAsCpp</CompileAs>
</ClCompile>
diff --git a/win32build/VS2010/pydutil_unittests/pydutil_unittests.vcxproj b/win32build/VS2010/pydutil_unittests/pydutil_unittests.vcxproj
index c1db6cb..6869473 100755
--- a/win32build/VS2010/pydutil_unittests/pydutil_unittests.vcxproj
+++ b/win32build/VS2010/pydutil_unittests/pydutil_unittests.vcxproj
@@ -55,7 +55,7 @@
<PrecompiledHeader>NotUsing</PrecompiledHeader>
<WarningLevel>Level4</WarningLevel>
<Optimization>Disabled</Optimization>
- <PreprocessorDefinitions>WIN32;GTEST_LINKED_AS_SHARED_LIBRARY=1;_DEBUG;_WINDOWS;_USRDLL;PYDUTIL_UNITTESTS_EXPORTS;%(PreprocessorDefinitions)</PreprocessorDefinitions>
+ <PreprocessorDefinitions>WIN32;GTEST_LINKED_AS_SHARED_LIBRARY=1;_DEBUG;_WINDOWS;_USRDLL;PYDUTIL_UNITTESTS_EXPORTS;%(PreprocessorDefinitions);%(PreprocessorDefinitions)</PreprocessorDefinitions>
<AdditionalIncludeDirectories>..\..;..\..\..\src\lib;C:\Python32\include;%(AdditionalIncludeDirectories)</AdditionalIncludeDirectories>
<CompileAs>CompileAsCpp</CompileAs>
</ClCompile>
@@ -74,7 +74,7 @@
<Optimization>MaxSpeed</Optimization>
<FunctionLevelLinking>true</FunctionLevelLinking>
<IntrinsicFunctions>true</IntrinsicFunctions>
- <PreprocessorDefinitions>WIN32;GTEST_LINKED_AS_SHARED_LIBRARY=1;NDEBUG;_WINDOWS;_USRDLL;PYDUTIL_UNITTESTS_EXPORTS;%(PreprocessorDefinitions)</PreprocessorDefinitions>
+ <PreprocessorDefinitions>WIN32;GTEST_LINKED_AS_SHARED_LIBRARY=1;NDEBUG;_WINDOWS;_USRDLL;PYDUTIL_UNITTESTS_EXPORTS;%(PreprocessorDefinitions);%(PreprocessorDefinitions)</PreprocessorDefinitions>
<AdditionalIncludeDirectories>..\..;..\..\..\src\lib;C:\Python32\include;%(AdditionalIncludeDirectories)</AdditionalIncludeDirectories>
<CompileAs>CompileAsCpp</CompileAs>
</ClCompile>
diff --git a/win32build/VS2010/tt-badpacket/tt-badpacket.vcxproj b/win32build/VS2010/tt-badpacket/tt-badpacket.vcxproj
index 18b9956..6761e8c 100755
--- a/win32build/VS2010/tt-badpacket/tt-badpacket.vcxproj
+++ b/win32build/VS2010/tt-badpacket/tt-badpacket.vcxproj
@@ -1,4 +1,4 @@
-<?xml version="1.0" encoding="utf-8"?>
+<?xml version="1.0" encoding="utf-8"?>
<Project DefaultTargets="Build" ToolsVersion="4.0" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
<ItemGroup Label="ProjectConfigurations">
<ProjectConfiguration Include="Debug|Win32">
@@ -60,8 +60,8 @@
<SubSystem>Console</SubSystem>
<GenerateDebugInformation>true</GenerateDebugInformation>
<OutputFile>$(OutDir)badpacket.exe</OutputFile>
- <AdditionalLibraryDirectories>..\libexceptions\$(Configuration);..\libutil\$(Configuration);..\liblog\$(Configuration);..\libcryptolink\$(Configuration);..\libdns++\$(Configuration);..\libasiolink\$(Configuration);..\libasiodns\$(Configuration);..\..\..\..\botan\md10\$(Configuration);..\..\..\..\log4cplus\md10\$(Configuration);%BOOST%\lib;%(AdditionalLibraryDirectories)</AdditionalLibraryDirectories>
- <AdditionalDependencies>libexceptions.lib;libutil.lib;liblog.lib;libcryptolink.lib;libdns++.lib;libasiolink.lib;libasiodns.lib;botan.lib;log4cplusSD.lib;%(AdditionalDependencies)</AdditionalDependencies>
+ <AdditionalLibraryDirectories>..\$(Configuration);..\..\..\..\botan\v100\$(Configuration);..\..\..\..\log4cplus\v100\$(Configuration);%BOOST%\lib;%(AdditionalLibraryDirectories)</AdditionalLibraryDirectories>
+ <AdditionalDependencies>libexceptionsd.lib;libutild.lib;liblogd.lib;libcryptolinkd.lib;libdns++d.lib;libasiolinkd.lib;libasiodnsd.lib;botand.lib;log4cplusD.lib;%(AdditionalDependencies)</AdditionalDependencies>
</Link>
</ItemDefinitionGroup>
<ItemDefinitionGroup Condition="'$(Configuration)|$(Platform)'=='Release|Win32'">
@@ -81,8 +81,8 @@
<EnableCOMDATFolding>true</EnableCOMDATFolding>
<OptimizeReferences>true</OptimizeReferences>
<OutputFile>$(OutDir)badpacket.exe</OutputFile>
- <AdditionalLibraryDirectories>..\libexceptions\$(Configuration);..\libutil\$(Configuration);..\liblog\$(Configuration);..\libcryptolink\$(Configuration);..\libdns++\$(Configuration);..\libasiolink\$(Configuration);..\libasiodns\$(Configuration);..\..\..\..\botan\md10\$(Configuration);..\..\..\..\log4cplus\md10\$(Configuration);%BOOST%\lib;%(AdditionalLibraryDirectories)</AdditionalLibraryDirectories>
- <AdditionalDependencies>libexceptions.lib;libutil.lib;liblog.lib;libcryptolink.lib;libdns++.lib;libasiolink.lib;libasiodns.lib;botan.lib;log4cplusS.lib;%(AdditionalDependencies)</AdditionalDependencies>
+ <AdditionalLibraryDirectories>..\$(Configuration);..\..\..\..\botan\v100\$(Configuration);..\..\..\..\log4cplus\v100\$(Configuration);%BOOST%\lib;%(AdditionalLibraryDirectories)</AdditionalLibraryDirectories>
+ <AdditionalDependencies>libexceptions.lib;libutil.lib;liblog.lib;libcryptolink.lib;libdns++.lib;libasiolink.lib;libasiodns.lib;botan.lib;log4cplus.lib;%(AdditionalDependencies)</AdditionalDependencies>
</Link>
</ItemDefinitionGroup>
<ItemGroup>
diff --git a/win32build/VS2010/tt-badpacket_tests/tt-badpacket_tests.vcxproj b/win32build/VS2010/tt-badpacket_tests/tt-badpacket_tests.vcxproj
index d9558f4..a820e0b 100755
--- a/win32build/VS2010/tt-badpacket_tests/tt-badpacket_tests.vcxproj
+++ b/win32build/VS2010/tt-badpacket_tests/tt-badpacket_tests.vcxproj
@@ -1,4 +1,4 @@
-<?xml version="1.0" encoding="utf-8"?>
+<?xml version="1.0" encoding="utf-8"?>
<Project DefaultTargets="Build" ToolsVersion="4.0" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
<ItemGroup Label="ProjectConfigurations">
<ProjectConfiguration Include="Debug|Win32">
@@ -52,7 +52,7 @@
<PrecompiledHeader>NotUsing</PrecompiledHeader>
<WarningLevel>Level4</WarningLevel>
<Optimization>Disabled</Optimization>
- <PreprocessorDefinitions>WIN32;_DEBUG;_CONSOLE;%(PreprocessorDefinitions)</PreprocessorDefinitions>
+ <PreprocessorDefinitions>WIN32;GTEST_CREATE_SHARED_LIBRARY=1;_DEBUG;_CONSOLE;%(PreprocessorDefinitions)</PreprocessorDefinitions>
<AdditionalIncludeDirectories>..\..;..\..\..\src\lib;..\..\..\..\gtest\include;%BOOST%;%(AdditionalIncludeDirectories)</AdditionalIncludeDirectories>
<CompileAs>CompileAsCpp</CompileAs>
</ClCompile>
@@ -60,8 +60,8 @@
<SubSystem>Console</SubSystem>
<GenerateDebugInformation>true</GenerateDebugInformation>
<OutputFile>$(OutDir)run_unittests.exe</OutputFile>
- <AdditionalLibraryDirectories>..\libexceptions\$(Configuration);..\libutil\$(Configuration);..\libutil_unittests\$(Configuration);..\..\..\..\gtest\md10\$(Configuration);%(AdditionalLibraryDirectories)</AdditionalLibraryDirectories>
- <AdditionalDependencies>libexceptions.lib;libutil.lib;libutil_unittests.lib;gtestd.lib;%(AdditionalDependencies)</AdditionalDependencies>
+ <AdditionalLibraryDirectories>..\$(Configuration);..\..\..\..\gtest\v100\$(Configuration);%(AdditionalLibraryDirectories)</AdditionalLibraryDirectories>
+ <AdditionalDependencies>libexceptionsd.lib;libutild.lib;libutil_unittestsd.lib;gtestd.lib;%(AdditionalDependencies)</AdditionalDependencies>
</Link>
</ItemDefinitionGroup>
<ItemDefinitionGroup Condition="'$(Configuration)|$(Platform)'=='Release|Win32'">
@@ -71,7 +71,7 @@
<Optimization>MaxSpeed</Optimization>
<FunctionLevelLinking>true</FunctionLevelLinking>
<IntrinsicFunctions>true</IntrinsicFunctions>
- <PreprocessorDefinitions>WIN32;NDEBUG;_CONSOLE;%(PreprocessorDefinitions)</PreprocessorDefinitions>
+ <PreprocessorDefinitions>WIN32;GTEST_CREATE_SHARED_LIBRARY=1;NDEBUG;_CONSOLE;%(PreprocessorDefinitions)</PreprocessorDefinitions>
<AdditionalIncludeDirectories>..\..;..\..\..\src\lib;..\..\..\..\gtest\include;%BOOST%;%(AdditionalIncludeDirectories)</AdditionalIncludeDirectories>
<CompileAs>CompileAsCpp</CompileAs>
</ClCompile>
@@ -81,7 +81,7 @@
<EnableCOMDATFolding>true</EnableCOMDATFolding>
<OptimizeReferences>true</OptimizeReferences>
<OutputFile>$(OutDir)run_unittests.exe</OutputFile>
- <AdditionalLibraryDirectories>..\libexceptions\$(Configuration);..\libutil\$(Configuration);..\libutil_unittests\$(Configuration);..\..\..\..\gtest\md10\$(Configuration);%(AdditionalLibraryDirectories)</AdditionalLibraryDirectories>
+ <AdditionalLibraryDirectories>..\$(Configuration);..\..\..\..\gtest\v100\$(Configuration);%(AdditionalLibraryDirectories)</AdditionalLibraryDirectories>
<AdditionalDependencies>libexceptions.lib;libutil.lib;libutil_unittests.lib;gtest.lib;%(AdditionalDependencies)</AdditionalDependencies>
</Link>
</ItemDefinitionGroup>
More information about the bind10-changes
mailing list