Browse Source

[1470] replaced shared_ptr by boost::shared_ptr

shared_ptr is a candidates for the next STL version and Windows has
already adopted it.  This change removes ambiguity between the Boost
and Windows versions of the class.
Stephen Morris 13 years ago
parent
commit
f1f4ce3e30

+ 5 - 7
src/bin/resolver/resolver.cc

@@ -57,8 +57,6 @@
 #include "resolver_log.h"
 #include "resolver_log.h"
 
 
 using namespace std;
 using namespace std;
-using boost::shared_ptr;
-
 using namespace isc;
 using namespace isc;
 using namespace isc::util;
 using namespace isc::util;
 using namespace isc::acl;
 using namespace isc::acl;
@@ -167,7 +165,7 @@ public:
         return (*query_acl_);
         return (*query_acl_);
     }
     }
 
 
-    void setQueryACL(shared_ptr<const RequestACL> new_acl) {
+    void setQueryACL(boost::shared_ptr<const RequestACL> new_acl) {
         query_acl_ = new_acl;
         query_acl_ = new_acl;
     }
     }
 
 
@@ -195,7 +193,7 @@ public:
 
 
 private:
 private:
     /// ACL on incoming queries
     /// ACL on incoming queries
-    shared_ptr<const RequestACL> query_acl_;
+    boost::shared_ptr<const RequestACL> query_acl_;
 
 
     /// Object to handle upstream queries
     /// Object to handle upstream queries
     RecursiveQuery* rec_query_;
     RecursiveQuery* rec_query_;
@@ -603,9 +601,9 @@ Resolver::updateConfig(ConstElementPtr config) {
         AddressList listenAddresses(parseAddresses(listenAddressesE,
         AddressList listenAddresses(parseAddresses(listenAddressesE,
                                                       "listen_on"));
                                                       "listen_on"));
         const ConstElementPtr query_acl_cfg(config->get("query_acl"));
         const ConstElementPtr query_acl_cfg(config->get("query_acl"));
-        const shared_ptr<const RequestACL> query_acl =
+        const boost::shared_ptr<const RequestACL> query_acl =
             query_acl_cfg ? acl::dns::getRequestLoader().load(query_acl_cfg) :
             query_acl_cfg ? acl::dns::getRequestLoader().load(query_acl_cfg) :
-            shared_ptr<RequestACL>();
+            boost::shared_ptr<RequestACL>();
         bool set_timeouts(false);
         bool set_timeouts(false);
         int qtimeout = impl_->query_timeout_;
         int qtimeout = impl_->query_timeout_;
         int ctimeout = impl_->client_timeout_;
         int ctimeout = impl_->client_timeout_;
@@ -771,7 +769,7 @@ Resolver::getQueryACL() const {
 }
 }
 
 
 void
 void
-Resolver::setQueryACL(shared_ptr<const RequestACL> new_acl) {
+Resolver::setQueryACL(boost::shared_ptr<const RequestACL> new_acl) {
     if (!new_acl) {
     if (!new_acl) {
         isc_throw(InvalidParameter, "NULL pointer is passed to setQueryACL");
         isc_throw(InvalidParameter, "NULL pointer is passed to setQueryACL");
     }
     }

+ 9 - 9
src/lib/acl/dns.cc

@@ -32,7 +32,6 @@
 #include <acl/logic_check.h>
 #include <acl/logic_check.h>
 
 
 using namespace std;
 using namespace std;
-using boost::shared_ptr;
 using namespace isc::dns;
 using namespace isc::dns;
 using namespace isc::data;
 using namespace isc::data;
 
 
@@ -78,7 +77,7 @@ internal::RequestCheckCreator::names() const {
     return (supported_names);
     return (supported_names);
 }
 }
 
 
-shared_ptr<RequestCheck>
+boost::shared_ptr<RequestCheck>
 internal::RequestCheckCreator::create(const string& name,
 internal::RequestCheckCreator::create(const string& name,
                                       ConstElementPtr definition,
                                       ConstElementPtr definition,
                                       // unused:
                                       // unused:
@@ -90,10 +89,10 @@ internal::RequestCheckCreator::create(const string& name,
     }
     }
 
 
     if (name == "from") {
     if (name == "from") {
-        return (shared_ptr<internal::RequestIPCheck>(
+        return (boost::shared_ptr<internal::RequestIPCheck>(
                     new internal::RequestIPCheck(definition->stringValue())));
                     new internal::RequestIPCheck(definition->stringValue())));
     } else if (name == "key") {
     } else if (name == "key") {
-        return (shared_ptr<internal::RequestKeyCheck>(
+        return (boost::shared_ptr<internal::RequestKeyCheck>(
                     new internal::RequestKeyCheck(
                     new internal::RequestKeyCheck(
                         Name(definition->stringValue()))));
                         Name(definition->stringValue()))));
     } else {
     } else {
@@ -116,16 +115,17 @@ getRequestLoader() {
             auto_ptr<RequestLoader>(new RequestLoader(REJECT));
             auto_ptr<RequestLoader>(new RequestLoader(REJECT));
 
 
         // Register default check creator(s)
         // Register default check creator(s)
-        loader_ptr->registerCreator(shared_ptr<internal::RequestCheckCreator>(
-                                        new internal::RequestCheckCreator()));
         loader_ptr->registerCreator(
         loader_ptr->registerCreator(
-            shared_ptr<NotCreator<RequestContext> >(
+            boost::shared_ptr<internal::RequestCheckCreator>(
+                new internal::RequestCheckCreator()));
+        loader_ptr->registerCreator(
+            boost::shared_ptr<NotCreator<RequestContext> >(
                 new NotCreator<RequestContext>("NOT")));
                 new NotCreator<RequestContext>("NOT")));
         loader_ptr->registerCreator(
         loader_ptr->registerCreator(
-            shared_ptr<LogicCreator<AnyOfSpec, RequestContext> >(
+            boost::shared_ptr<LogicCreator<AnyOfSpec, RequestContext> >(
                 new LogicCreator<AnyOfSpec, RequestContext>("ANY")));
                 new LogicCreator<AnyOfSpec, RequestContext>("ANY")));
         loader_ptr->registerCreator(
         loader_ptr->registerCreator(
-            shared_ptr<LogicCreator<AllOfSpec, RequestContext> >(
+            boost::shared_ptr<LogicCreator<AllOfSpec, RequestContext> >(
                 new LogicCreator<AllOfSpec, RequestContext>("ALL")));
                 new LogicCreator<AllOfSpec, RequestContext>("ALL")));
 
 
         // From this point there shouldn't be any exception thrown
         // From this point there shouldn't be any exception thrown

+ 26 - 25
src/lib/acl/tests/loader_test.cc

@@ -70,31 +70,30 @@ public:
     // Some convenience functions to set up
     // Some convenience functions to set up
 
 
     // Create a NamedCreator, convert to shared pointer
     // Create a NamedCreator, convert to shared pointer
-    shared_ptr<NamedCreator> namedCreator(const string& name,
+    boost::shared_ptr<NamedCreator> namedCreator(const string& name,
                                           bool abbreviatedList = true)
                                           bool abbreviatedList = true)
     {
     {
-        return (shared_ptr<NamedCreator>(new NamedCreator(name,
-                                                          abbreviatedList)));
+        return (boost::shared_ptr<NamedCreator>(new NamedCreator(name,
+                                                    abbreviatedList)));
     }
     }
     // Create and add a NamedCreator
     // Create and add a NamedCreator
     void addNamed(const string& name, bool abbreviatedList = true) {
     void addNamed(const string& name, bool abbreviatedList = true) {
         EXPECT_NO_THROW(loader_.registerCreator(
         EXPECT_NO_THROW(loader_.registerCreator(
             namedCreator(name, abbreviatedList)));
             namedCreator(name, abbreviatedList)));
     }
     }
-    template<class Result> shared_ptr<Result> loadCheckAny(const string&
-                                                               definition)
+    template<class Result> boost::shared_ptr<Result> loadCheckAny(
+        const string& definition)
     {
     {
         SCOPED_TRACE("Loading check " + definition);
         SCOPED_TRACE("Loading check " + definition);
-        shared_ptr<Check<Log> > loaded;
+        boost::shared_ptr<Check<Log> > loaded;
         EXPECT_NO_THROW(loaded = loader_.loadCheck(
         EXPECT_NO_THROW(loaded = loader_.loadCheck(
                             Element::fromJSON(definition)));
                             Element::fromJSON(definition)));
-        shared_ptr<Result> result(dynamic_pointer_cast<Result>(
-            loaded));
+        boost::shared_ptr<Result> result(dynamic_pointer_cast<Result>(loaded));
         EXPECT_TRUE(result);
         EXPECT_TRUE(result);
         return (result);
         return (result);
     }
     }
     // Load a check and convert it to named check to examine it
     // Load a check and convert it to named check to examine it
-    shared_ptr<NamedCheck> loadCheck(const string& definition) {
+    boost::shared_ptr<NamedCheck> loadCheck(const string& definition) {
         return (loadCheckAny<NamedCheck>(definition));
         return (loadCheckAny<NamedCheck>(definition));
     }
     }
     // The loadCheck throws an exception
     // The loadCheck throws an exception
@@ -114,11 +113,12 @@ public:
     // Insert the throw, throwcheck and logcheck checks into the loader
     // Insert the throw, throwcheck and logcheck checks into the loader
     void aclSetup() {
     void aclSetup() {
         try {
         try {
-            loader_.registerCreator(shared_ptr<ThrowCreator>(new
-                                                             ThrowCreator()));
-            loader_.registerCreator(shared_ptr<ThrowCheckCreator>(
+            loader_.registerCreator(boost::shared_ptr<ThrowCreator>(
+                new ThrowCreator()));
+            loader_.registerCreator(boost::shared_ptr<ThrowCheckCreator>(
                 new ThrowCheckCreator()));
                 new ThrowCheckCreator()));
-            loader_.registerCreator(shared_ptr<LogCreator>(new LogCreator()));
+            loader_.registerCreator(boost::shared_ptr<LogCreator>(
+                new LogCreator()));
         }
         }
         // We ignore this exception here, because it happens when we try to
         // We ignore this exception here, because it happens when we try to
         // insert the creators multiple times. This is harmless.
         // insert the creators multiple times. This is harmless.
@@ -133,7 +133,7 @@ public:
     {
     {
         SCOPED_TRACE("Running ACL for " + JSON);
         SCOPED_TRACE("Running ACL for " + JSON);
         aclSetup();
         aclSetup();
-        shared_ptr<ACL<Log> > acl;
+        boost::shared_ptr<ACL<Log> > acl;
         EXPECT_NO_THROW(acl = loader_.load(Element::fromJSON(JSON)));
         EXPECT_NO_THROW(acl = loader_.load(Element::fromJSON(JSON)));
         EXPECT_EQ(expectedResult, acl->execute(log_));
         EXPECT_EQ(expectedResult, acl->execute(log_));
         log_.checkFirst(logged);
         log_.checkFirst(logged);
@@ -174,7 +174,7 @@ TEST_F(LoaderTest, CreatorDuplicateUnchanged) {
     names.push_back("name1");
     names.push_back("name1");
     names.push_back("name3");
     names.push_back("name3");
     EXPECT_THROW(loader_.registerCreator(
     EXPECT_THROW(loader_.registerCreator(
-        shared_ptr<NamedCreator>(new NamedCreator(names))), LoaderError);
+        boost::shared_ptr<NamedCreator>(new NamedCreator(names))), LoaderError);
     // It should now reject both name2 and name3 as not known
     // It should now reject both name2 and name3 as not known
     checkException("{\"name2\": null}");
     checkException("{\"name2\": null}");
     checkException("{\"name3\": null}");
     checkException("{\"name3\": null}");
@@ -183,7 +183,7 @@ TEST_F(LoaderTest, CreatorDuplicateUnchanged) {
 // Test that we can register a creator and load a check with the name
 // Test that we can register a creator and load a check with the name
 TEST_F(LoaderTest, SimpleCheckLoad) {
 TEST_F(LoaderTest, SimpleCheckLoad) {
     addNamed("name");
     addNamed("name");
-    shared_ptr<NamedCheck> check(loadCheck("{\"name\": 42}"));
+    boost::shared_ptr<NamedCheck> check(loadCheck("{\"name\": 42}"));
     EXPECT_EQ("name", check->name_);
     EXPECT_EQ("name", check->name_);
     EXPECT_TRUE(check->data_->equals(*Element::fromJSON("42")));
     EXPECT_TRUE(check->data_->equals(*Element::fromJSON("42")));
 }
 }
@@ -192,7 +192,7 @@ TEST_F(LoaderTest, SimpleCheckLoad) {
 TEST_F(LoaderTest, MultiCreatorCheckLoad) {
 TEST_F(LoaderTest, MultiCreatorCheckLoad) {
     addNamed("name1");
     addNamed("name1");
     addNamed("name2");
     addNamed("name2");
-    shared_ptr<NamedCheck> check(loadCheck("{\"name2\": 42}"));
+    boost::shared_ptr<NamedCheck> check(loadCheck("{\"name2\": 42}"));
     EXPECT_EQ("name2", check->name_);
     EXPECT_EQ("name2", check->name_);
     EXPECT_TRUE(check->data_->equals(*Element::fromJSON("42")));
     EXPECT_TRUE(check->data_->equals(*Element::fromJSON("42")));
 }
 }
@@ -203,9 +203,9 @@ TEST_F(LoaderTest, MultiNameCheckLoad) {
     vector<string> names;
     vector<string> names;
     names.push_back("name2");
     names.push_back("name2");
     names.push_back("name3");
     names.push_back("name3");
-    EXPECT_NO_THROW(loader_.registerCreator(shared_ptr<NamedCreator>(
+    EXPECT_NO_THROW(loader_.registerCreator(boost::shared_ptr<NamedCreator>(
         new NamedCreator(names))));
         new NamedCreator(names))));
-    shared_ptr<NamedCheck> check(loadCheck("{\"name3\": 42}"));
+    boost::shared_ptr<NamedCheck> check(loadCheck("{\"name3\": 42}"));
     EXPECT_EQ("name3", check->name_);
     EXPECT_EQ("name3", check->name_);
     EXPECT_TRUE(check->data_->equals(*Element::fromJSON("42")));
     EXPECT_TRUE(check->data_->equals(*Element::fromJSON("42")));
 }
 }
@@ -230,7 +230,8 @@ TEST_F(LoaderTest, UnkownName) {
 
 
 // Exception from the creator is propagated
 // Exception from the creator is propagated
 TEST_F(LoaderTest, CheckPropagate) {
 TEST_F(LoaderTest, CheckPropagate) {
-    loader_.registerCreator(shared_ptr<ThrowCreator>(new ThrowCreator()));
+    loader_.registerCreator(boost::shared_ptr<ThrowCreator>(
+                                new ThrowCreator()));
     EXPECT_THROW(loader_.loadCheck(Element::fromJSON("{\"throw\": null}")),
     EXPECT_THROW(loader_.loadCheck(Element::fromJSON("{\"throw\": null}")),
                  TestCreatorError);
                  TestCreatorError);
 }
 }
@@ -239,7 +240,7 @@ TEST_F(LoaderTest, CheckPropagate) {
 TEST_F(LoaderTest, AndAbbrev) {
 TEST_F(LoaderTest, AndAbbrev) {
     addNamed("name1");
     addNamed("name1");
     addNamed("name2");
     addNamed("name2");
-    shared_ptr<LogicOperator<AllOfSpec, Log> > oper(
+    boost::shared_ptr<LogicOperator<AllOfSpec, Log> > oper(
         loadCheckAny<LogicOperator<AllOfSpec, Log> >("{\"name1\": 1, \"name2\": 2}"));
         loadCheckAny<LogicOperator<AllOfSpec, Log> >("{\"name1\": 1, \"name2\": 2}"));
     // If we don't have anything loaded, the rest would crash. It is already
     // If we don't have anything loaded, the rest would crash. It is already
     // reported from within loadCheckAny if it isn't loaded.
     // reported from within loadCheckAny if it isn't loaded.
@@ -258,7 +259,7 @@ TEST_F(LoaderTest, AndAbbrev) {
 // The abbreviated form of parameters
 // The abbreviated form of parameters
 TEST_F(LoaderTest, OrAbbrev) {
 TEST_F(LoaderTest, OrAbbrev) {
     addNamed("name1");
     addNamed("name1");
-    shared_ptr<LogicOperator<AnyOfSpec, Log> > oper(
+    boost::shared_ptr<LogicOperator<AnyOfSpec, Log> > oper(
         loadCheckAny<LogicOperator<AnyOfSpec, Log> >("{\"name1\": [1, 2]}"));
         loadCheckAny<LogicOperator<AnyOfSpec, Log> >("{\"name1\": [1, 2]}"));
     // If we don't have anything loaded, the rest would crash. It is already
     // If we don't have anything loaded, the rest would crash. It is already
     // reported from within loadCheckAny if it isn't loaded.
     // reported from within loadCheckAny if it isn't loaded.
@@ -276,7 +277,7 @@ TEST_F(LoaderTest, OrAbbrev) {
 TEST_F(LoaderTest, BothAbbrev) {
 TEST_F(LoaderTest, BothAbbrev) {
     addNamed("name1");
     addNamed("name1");
     addNamed("name2");
     addNamed("name2");
-    shared_ptr<LogicOperator<AllOfSpec, Log> > oper(
+    boost::shared_ptr<LogicOperator<AllOfSpec, Log> > oper(
         loadCheckAny<LogicOperator<AllOfSpec, Log> >("{\"name1\": 1, \"name2\": [3, 4]}"));
         loadCheckAny<LogicOperator<AllOfSpec, Log> >("{\"name1\": 1, \"name2\": [3, 4]}"));
     // If we don't have anything loaded, the rest would crash. It is already
     // If we don't have anything loaded, the rest would crash. It is already
     // reported from within loadCheckAny if it isn't loaded.
     // reported from within loadCheckAny if it isn't loaded.
@@ -302,7 +303,7 @@ TEST_F(LoaderTest, BothAbbrev) {
 // creator
 // creator
 TEST_F(LoaderTest, ListCheck) {
 TEST_F(LoaderTest, ListCheck) {
     addNamed("name1", false);
     addNamed("name1", false);
-    shared_ptr<NamedCheck> check(loadCheck("{\"name1\": [1, 2]}"));
+    boost::shared_ptr<NamedCheck> check(loadCheck("{\"name1\": [1, 2]}"));
     EXPECT_EQ("name1", check->name_);
     EXPECT_EQ("name1", check->name_);
     EXPECT_TRUE(check->data_->equals(*Element::fromJSON("[1, 2]")));
     EXPECT_TRUE(check->data_->equals(*Element::fromJSON("[1, 2]")));
 }
 }
@@ -310,7 +311,7 @@ TEST_F(LoaderTest, ListCheck) {
 // Check the action key is ignored as it should be
 // Check the action key is ignored as it should be
 TEST_F(LoaderTest, CheckNoAction) {
 TEST_F(LoaderTest, CheckNoAction) {
     addNamed("name1");
     addNamed("name1");
-    shared_ptr<NamedCheck> check(loadCheck("{\"name1\": 1, \"action\": 2}"));
+    boost::shared_ptr<NamedCheck> check(loadCheck("{\"name1\": 1, \"action\": 2}"));
     EXPECT_EQ("name1", check->name_);
     EXPECT_EQ("name1", check->name_);
     EXPECT_TRUE(check->data_->equals(*Element::fromJSON("1")));
     EXPECT_TRUE(check->data_->equals(*Element::fromJSON("1")));
 }
 }

+ 11 - 10
src/lib/acl/tests/logic_check_test.cc

@@ -52,7 +52,7 @@ testCheck(bool emptyResult) {
     EXPECT_EQ(emptyResult, oper.matches(log));
     EXPECT_EQ(emptyResult, oper.matches(log));
     log.checkFirst(0);
     log.checkFirst(0);
     // Fill it with some subexpressions
     // Fill it with some subexpressions
-    typedef shared_ptr<ConstCheck> CheckPtr;
+    typedef boost::shared_ptr<ConstCheck> CheckPtr;
     oper.addSubexpression(CheckPtr(new ConstCheck(emptyResult, 0)));
     oper.addSubexpression(CheckPtr(new ConstCheck(emptyResult, 0)));
     oper.addSubexpression(CheckPtr(new ConstCheck(emptyResult, 1)));
     oper.addSubexpression(CheckPtr(new ConstCheck(emptyResult, 1)));
     // Check what happens when only the default-valued are there
     // Check what happens when only the default-valued are there
@@ -80,7 +80,7 @@ TEST(LogicOperators, AnyOf) {
 // Fixture for the tests of the creators
 // Fixture for the tests of the creators
 class LogicCreatorTest : public ::testing::Test {
 class LogicCreatorTest : public ::testing::Test {
 private:
 private:
-    typedef shared_ptr<Loader<Log>::CheckCreator> CreatorPtr;
+    typedef boost::shared_ptr<Loader<Log>::CheckCreator> CreatorPtr;
 public:
 public:
     // Register some creators, both tested ones and some auxiliary ones for
     // Register some creators, both tested ones and some auxiliary ones for
     // help
     // help
@@ -102,12 +102,12 @@ public:
     // Some convenience shortcut names
     // Some convenience shortcut names
     typedef LogicOperator<AnyOfSpec, Log> AnyOf;
     typedef LogicOperator<AnyOfSpec, Log> AnyOf;
     typedef LogicOperator<AllOfSpec, Log> AllOf;
     typedef LogicOperator<AllOfSpec, Log> AllOf;
-    typedef shared_ptr<AnyOf> AnyOfPtr;
-    typedef shared_ptr<AllOf> AllOfPtr;
+    typedef boost::shared_ptr<AnyOf> AnyOfPtr;
+    typedef boost::shared_ptr<AllOf> AllOfPtr;
     // Loads the JSON as a check and tries to convert it to the given check
     // Loads the JSON as a check and tries to convert it to the given check
     // subclass
     // subclass
-    template<typename Result> shared_ptr<Result> load(const string& JSON) {
-        shared_ptr<Check<Log> > result;
+    template<typename Result> boost::shared_ptr<Result> load(const string& JSON) {
+        boost::shared_ptr<Check<Log> > result;
         EXPECT_NO_THROW(result = loader_.loadCheck(Element::fromJSON(JSON)));
         EXPECT_NO_THROW(result = loader_.loadCheck(Element::fromJSON(JSON)));
         /*
         /*
          * Optimally, we would use a dynamic_pointer_cast here to both
          * Optimally, we would use a dynamic_pointer_cast here to both
@@ -122,9 +122,9 @@ public:
          * multiple inheritance.
          * multiple inheritance.
          */
          */
         EXPECT_STREQ(typeid(Result).name(), typeid(*result.get()).name());
         EXPECT_STREQ(typeid(Result).name(), typeid(*result.get()).name());
-        shared_ptr<Result>
+        boost::shared_ptr<Result>
             resultConverted(static_pointer_cast<Result>(result));
             resultConverted(static_pointer_cast<Result>(result));
-        EXPECT_NE(shared_ptr<Result>(), resultConverted);
+        EXPECT_NE(boost::shared_ptr<Result>(), resultConverted);
         return (resultConverted);
         return (resultConverted);
     }
     }
 };
 };
@@ -244,7 +244,8 @@ TEST_F(LogicCreatorTest, nested) {
 }
 }
 
 
 void notTest(bool value) {
 void notTest(bool value) {
-    NotOperator<Log> notOp(shared_ptr<Check<Log> >(new ConstCheck(value, 0)));
+    NotOperator<Log> notOp(boost::shared_ptr<Check<Log> >(
+                                new ConstCheck(value, 0)));
     Log log;
     Log log;
     // It returns negated value
     // It returns negated value
     EXPECT_EQ(!value, notOp.matches(log));
     EXPECT_EQ(!value, notOp.matches(log));
@@ -281,7 +282,7 @@ TEST_F(LogicCreatorTest, notInvalid) {
 }
 }
 
 
 TEST_F(LogicCreatorTest, notValid) {
 TEST_F(LogicCreatorTest, notValid) {
-    shared_ptr<NotOperator<Log> > notOp(load<NotOperator<Log> >("{\"NOT\":"
+    boost::shared_ptr<NotOperator<Log> > notOp(load<NotOperator<Log> >("{\"NOT\":"
                                                                 "  {\"logcheck\":"
                                                                 "  {\"logcheck\":"
                                                                 "     [0, true]}}"));
                                                                 "     [0, true]}}"));
     EXPECT_FALSE(notOp->matches(log_));
     EXPECT_FALSE(notOp->matches(log_));

+ 8 - 9
src/lib/datasrc/database.cc

@@ -35,7 +35,6 @@
 
 
 using namespace isc::dns;
 using namespace isc::dns;
 using namespace std;
 using namespace std;
-using boost::shared_ptr;
 using namespace isc::dns::rdata;
 using namespace isc::dns::rdata;
 
 
 namespace isc {
 namespace isc {
@@ -874,7 +873,7 @@ namespace {
 /// for next time.
 /// for next time.
 class DatabaseIterator : public ZoneIterator {
 class DatabaseIterator : public ZoneIterator {
 public:
 public:
-    DatabaseIterator(shared_ptr<DatabaseAccessor> accessor,
+    DatabaseIterator(boost::shared_ptr<DatabaseAccessor> accessor,
                      const Name& zone_name,
                      const Name& zone_name,
                      const RRClass& rrclass,
                      const RRClass& rrclass,
                      bool separate_rrs) :
                      bool separate_rrs) :
@@ -970,7 +969,7 @@ private:
     }
     }
 
 
     // The dedicated accessor
     // The dedicated accessor
-    shared_ptr<DatabaseAccessor> accessor_;
+    boost::shared_ptr<DatabaseAccessor> accessor_;
     // The context
     // The context
     DatabaseAccessor::IteratorContextPtr context_;
     DatabaseAccessor::IteratorContextPtr context_;
     // Class of the zone
     // Class of the zone
@@ -1006,7 +1005,7 @@ DatabaseClient::getIterator(const isc::dns::Name& name,
 //
 //
 class DatabaseUpdater : public ZoneUpdater {
 class DatabaseUpdater : public ZoneUpdater {
 public:
 public:
-    DatabaseUpdater(shared_ptr<DatabaseAccessor> accessor, int zone_id,
+    DatabaseUpdater(boost::shared_ptr<DatabaseAccessor> accessor, int zone_id,
             const Name& zone_name, const RRClass& zone_class,
             const Name& zone_name, const RRClass& zone_class,
             bool journaling) :
             bool journaling) :
         committed_(false), accessor_(accessor), zone_id_(zone_id),
         committed_(false), accessor_(accessor), zone_id_(zone_id),
@@ -1052,7 +1051,7 @@ private:
     typedef DatabaseAccessor Accessor;
     typedef DatabaseAccessor Accessor;
 
 
     bool committed_;
     bool committed_;
-    shared_ptr<DatabaseAccessor> accessor_;
+    boost::shared_ptr<DatabaseAccessor> accessor_;
     const int zone_id_;
     const int zone_id_;
     const string db_name_;
     const string db_name_;
     const string zone_name_;
     const string zone_name_;
@@ -1229,7 +1228,7 @@ DatabaseClient::getUpdater(const isc::dns::Name& name, bool replace,
         isc_throw(isc::BadValue, "Can't store journal and replace the whole "
         isc_throw(isc::BadValue, "Can't store journal and replace the whole "
                   "zone at the same time");
                   "zone at the same time");
     }
     }
-    shared_ptr<DatabaseAccessor> update_accessor(accessor_->clone());
+    boost::shared_ptr<DatabaseAccessor> update_accessor(accessor_->clone());
     const std::pair<bool, int> zone(update_accessor->startUpdateZone(
     const std::pair<bool, int> zone(update_accessor->startUpdateZone(
                                         name.toText(), replace));
                                         name.toText(), replace));
     if (!zone.first) {
     if (!zone.first) {
@@ -1249,7 +1248,7 @@ private:
     // A shortcut typedef to keep the code concise.
     // A shortcut typedef to keep the code concise.
     typedef DatabaseAccessor Accessor;
     typedef DatabaseAccessor Accessor;
 public:
 public:
-    DatabaseJournalReader(shared_ptr<Accessor> accessor, const Name& zone,
+    DatabaseJournalReader(boost::shared_ptr<Accessor> accessor, const Name& zone,
                           int zone_id, const RRClass& rrclass, uint32_t begin,
                           int zone_id, const RRClass& rrclass, uint32_t begin,
                           uint32_t end) :
                           uint32_t end) :
         accessor_(accessor), zone_(zone), rrclass_(rrclass),
         accessor_(accessor), zone_(zone), rrclass_(rrclass),
@@ -1297,7 +1296,7 @@ public:
     }
     }
 
 
 private:
 private:
-    shared_ptr<Accessor> accessor_;
+    boost::shared_ptr<Accessor> accessor_;
     const Name zone_;
     const Name zone_;
     const RRClass rrclass_;
     const RRClass rrclass_;
     Accessor::IteratorContextPtr context_;
     Accessor::IteratorContextPtr context_;
@@ -1312,7 +1311,7 @@ DatabaseClient::getJournalReader(const isc::dns::Name& zone,
                                  uint32_t begin_serial,
                                  uint32_t begin_serial,
                                  uint32_t end_serial) const
                                  uint32_t end_serial) const
 {
 {
-    shared_ptr<DatabaseAccessor> jnl_accessor(accessor_->clone());
+    boost::shared_ptr<DatabaseAccessor> jnl_accessor(accessor_->clone());
     const pair<bool, int> zoneinfo(jnl_accessor->getZone(zone.toText()));
     const pair<bool, int> zoneinfo(jnl_accessor->getZone(zone.toText()));
     if (!zoneinfo.first) {
     if (!zoneinfo.first) {
         return (pair<ZoneJournalReader::Result, ZoneJournalReaderPtr>(
         return (pair<ZoneJournalReader::Result, ZoneJournalReaderPtr>(

+ 36 - 36
src/lib/datasrc/tests/database_unittest.cc

@@ -41,7 +41,6 @@ using namespace isc::datasrc;
 using namespace std;
 using namespace std;
 // don't import the entire boost namespace.  It will unexpectedly hide uint32_t
 // don't import the entire boost namespace.  It will unexpectedly hide uint32_t
 // for some systems.
 // for some systems.
-using boost::shared_ptr;
 using boost::dynamic_pointer_cast;
 using boost::dynamic_pointer_cast;
 using boost::lexical_cast;
 using boost::lexical_cast;
 using namespace isc::dns;
 using namespace isc::dns;
@@ -229,9 +228,9 @@ public:
         }
         }
     }
     }
 
 
-    virtual shared_ptr<DatabaseAccessor> clone() {
+    virtual boost::shared_ptr<DatabaseAccessor> clone() {
         // This accessor is stateless, so we can simply return a new instance.
         // This accessor is stateless, so we can simply return a new instance.
-        return (shared_ptr<DatabaseAccessor>(new NopAccessor));
+        return (boost::shared_ptr<DatabaseAccessor>(new NopAccessor));
     }
     }
 
 
     virtual std::pair<bool, int> startUpdateZone(const std::string&, bool) {
     virtual std::pair<bool, int> startUpdateZone(const std::string&, bool) {
@@ -350,8 +349,8 @@ public:
         fillData();
         fillData();
     }
     }
 
 
-    virtual shared_ptr<DatabaseAccessor> clone() {
-        shared_ptr<MockAccessor> cloned_accessor(new MockAccessor());
+    virtual boost::shared_ptr<DatabaseAccessor> clone() {
+        boost::shared_ptr<MockAccessor> cloned_accessor(new MockAccessor());
         cloned_accessor->readonly_records_ = &readonly_records_master_;
         cloned_accessor->readonly_records_ = &readonly_records_master_;
         cloned_accessor->update_records_ = &update_records_master_;
         cloned_accessor->update_records_ = &update_records_master_;
         cloned_accessor->empty_records_ = &empty_records_master_;
         cloned_accessor->empty_records_ = &empty_records_master_;
@@ -706,7 +705,7 @@ public:
     }
     }
 
 
     // This allows the test code to get the accessor used in an update context
     // This allows the test code to get the accessor used in an update context
-    shared_ptr<const MockAccessor> getLatestClone() const {
+    boost::shared_ptr<const MockAccessor> getLatestClone() const {
         return (latest_clone_);
         return (latest_clone_);
     }
     }
 
 
@@ -992,7 +991,7 @@ public:
         current_accessor_ = new ACCESSOR_TYPE();
         current_accessor_ = new ACCESSOR_TYPE();
         is_mock_ = (dynamic_cast<MockAccessor*>(current_accessor_) != NULL);
         is_mock_ = (dynamic_cast<MockAccessor*>(current_accessor_) != NULL);
         client_.reset(new DatabaseClient(qclass_,
         client_.reset(new DatabaseClient(qclass_,
-                                         shared_ptr<ACCESSOR_TYPE>(
+                                         boost::shared_ptr<ACCESSOR_TYPE>(
                                              current_accessor_)));
                                              current_accessor_)));
     }
     }
 
 
@@ -1002,9 +1001,9 @@ public:
      */
      */
     void checkZoneFinder(const DataSourceClient::FindResult& zone) {
     void checkZoneFinder(const DataSourceClient::FindResult& zone) {
         ASSERT_NE(ZoneFinderPtr(), zone.zone_finder) << "No zone finder";
         ASSERT_NE(ZoneFinderPtr(), zone.zone_finder) << "No zone finder";
-        shared_ptr<DatabaseClient::Finder> finder(
+        boost::shared_ptr<DatabaseClient::Finder> finder(
             dynamic_pointer_cast<DatabaseClient::Finder>(zone.zone_finder));
             dynamic_pointer_cast<DatabaseClient::Finder>(zone.zone_finder));
-        ASSERT_NE(shared_ptr<DatabaseClient::Finder>(), finder) <<
+        ASSERT_NE(boost::shared_ptr<DatabaseClient::Finder>(), finder) <<
             "Wrong type of finder";
             "Wrong type of finder";
         if (is_mock_) {
         if (is_mock_) {
             EXPECT_EQ(READONLY_ZONE_ID, finder->zone_id());
             EXPECT_EQ(READONLY_ZONE_ID, finder->zone_id());
@@ -1012,10 +1011,10 @@ public:
         EXPECT_EQ(current_accessor_, &finder->getAccessor());
         EXPECT_EQ(current_accessor_, &finder->getAccessor());
     }
     }
 
 
-    shared_ptr<DatabaseClient::Finder> getFinder() {
+    boost::shared_ptr<DatabaseClient::Finder> getFinder() {
         DataSourceClient::FindResult zone(client_->findZone(zname_));
         DataSourceClient::FindResult zone(client_->findZone(zname_));
         EXPECT_EQ(result::SUCCESS, zone.code);
         EXPECT_EQ(result::SUCCESS, zone.code);
-        shared_ptr<DatabaseClient::Finder> finder(
+        boost::shared_ptr<DatabaseClient::Finder> finder(
             dynamic_pointer_cast<DatabaseClient::Finder>(zone.zone_finder));
             dynamic_pointer_cast<DatabaseClient::Finder>(zone.zone_finder));
         if (is_mock_) {
         if (is_mock_) {
             EXPECT_EQ(READONLY_ZONE_ID, finder->zone_id());
             EXPECT_EQ(READONLY_ZONE_ID, finder->zone_id());
@@ -1102,11 +1101,11 @@ public:
 
 
     // Will be deleted by client_, just keep the current value for comparison.
     // Will be deleted by client_, just keep the current value for comparison.
     ACCESSOR_TYPE* current_accessor_;
     ACCESSOR_TYPE* current_accessor_;
-    shared_ptr<DatabaseClient> client_;
+    boost::shared_ptr<DatabaseClient> client_;
     const std::string database_name_;
     const std::string database_name_;
 
 
     // The zone finder of the test zone commonly used in various tests.
     // The zone finder of the test zone commonly used in various tests.
-    shared_ptr<DatabaseClient::Finder> finder_;
+    boost::shared_ptr<DatabaseClient::Finder> finder_;
 
 
     // Some shortcut variables for commonly used test parameters
     // Some shortcut variables for commonly used test parameters
     const Name zname_; // the zone name stored in the test data source
     const Name zname_; // the zone name stored in the test data source
@@ -1120,7 +1119,7 @@ public:
 
 
     // update related objects to be tested
     // update related objects to be tested
     ZoneUpdaterPtr updater_;
     ZoneUpdaterPtr updater_;
-    shared_ptr<const DatabaseAccessor> update_accessor_;
+    boost::shared_ptr<const DatabaseAccessor> update_accessor_;
 
 
     // placeholders
     // placeholders
     const std::vector<std::string> empty_rdatas_; // for NXRRSET/NXDOMAIN
     const std::vector<std::string> empty_rdatas_; // for NXRRSET/NXDOMAIN
@@ -1194,7 +1193,7 @@ TEST(GenericDatabaseClientTest, noAccessorException) {
     // We need a dummy variable here; some compiler would regard it a mere
     // We need a dummy variable here; some compiler would regard it a mere
     // declaration instead of an instantiation and make the test fail.
     // declaration instead of an instantiation and make the test fail.
     EXPECT_THROW(DatabaseClient dummy(RRClass::IN(),
     EXPECT_THROW(DatabaseClient dummy(RRClass::IN(),
-                                      shared_ptr<DatabaseAccessor>()),
+                                      boost::shared_ptr<DatabaseAccessor>()),
                  isc::InvalidParameter);
                  isc::InvalidParameter);
 }
 }
 
 
@@ -1215,8 +1214,9 @@ TEST(GenericDatabaseClientTest, noZoneNotImplementedIterator) {
 }
 }
 
 
 TEST(GenericDatabaseClientTest, notImplementedIterator) {
 TEST(GenericDatabaseClientTest, notImplementedIterator) {
-    EXPECT_THROW(DatabaseClient(RRClass::IN(), shared_ptr<DatabaseAccessor>(
-        new NopAccessor())).getIterator(Name("example.org")),
+    EXPECT_THROW(DatabaseClient(RRClass::IN(),
+                    boost::shared_ptr<DatabaseAccessor>(
+                        new NopAccessor())).getIterator(Name("example.org")),
                  isc::NotImplemented);
                  isc::NotImplemented);
 }
 }
 
 
@@ -1499,7 +1499,7 @@ TEST_F(MockDatabaseClientTest, ttldiff_separate_rrs) {
 }
 }
 
 
 TYPED_TEST(DatabaseClientTest, find) {
 TYPED_TEST(DatabaseClientTest, find) {
-    shared_ptr<DatabaseClient::Finder> finder(this->getFinder());
+    boost::shared_ptr<DatabaseClient::Finder> finder(this->getFinder());
 
 
     this->expected_rdatas_.clear();
     this->expected_rdatas_.clear();
     this->expected_sig_rdatas_.clear();
     this->expected_sig_rdatas_.clear();
@@ -1738,7 +1738,7 @@ TYPED_TEST(DatabaseClientTest, find) {
 }
 }
 
 
 TYPED_TEST(DatabaseClientTest, findDelegation) {
 TYPED_TEST(DatabaseClientTest, findDelegation) {
-    shared_ptr<DatabaseClient::Finder> finder(this->getFinder());
+    boost::shared_ptr<DatabaseClient::Finder> finder(this->getFinder());
 
 
     // The apex should not be considered delegation point and we can access
     // The apex should not be considered delegation point and we can access
     // data
     // data
@@ -1856,7 +1856,7 @@ TYPED_TEST(DatabaseClientTest, findDelegation) {
 }
 }
 
 
 TYPED_TEST(DatabaseClientTest, emptyDomain) {
 TYPED_TEST(DatabaseClientTest, emptyDomain) {
-    shared_ptr<DatabaseClient::Finder> finder(this->getFinder());
+    boost::shared_ptr<DatabaseClient::Finder> finder(this->getFinder());
 
 
     // This domain doesn't exist, but a subdomain of it does.
     // This domain doesn't exist, but a subdomain of it does.
     // Therefore we should pretend the domain is there, but contains no RRsets
     // Therefore we should pretend the domain is there, but contains no RRsets
@@ -1868,7 +1868,7 @@ TYPED_TEST(DatabaseClientTest, emptyDomain) {
 // Glue-OK mode. Just go through NS delegations down (but not through
 // Glue-OK mode. Just go through NS delegations down (but not through
 // DNAME) and pretend it is not there.
 // DNAME) and pretend it is not there.
 TYPED_TEST(DatabaseClientTest, glueOK) {
 TYPED_TEST(DatabaseClientTest, glueOK) {
-    shared_ptr<DatabaseClient::Finder> finder(this->getFinder());
+    boost::shared_ptr<DatabaseClient::Finder> finder(this->getFinder());
 
 
     this->expected_rdatas_.clear();
     this->expected_rdatas_.clear();
     this->expected_sig_rdatas_.clear();
     this->expected_sig_rdatas_.clear();
@@ -1925,7 +1925,7 @@ TYPED_TEST(DatabaseClientTest, glueOK) {
 }
 }
 
 
 TYPED_TEST(DatabaseClientTest, wildcard) {
 TYPED_TEST(DatabaseClientTest, wildcard) {
-    shared_ptr<DatabaseClient::Finder> finder(this->getFinder());
+    boost::shared_ptr<DatabaseClient::Finder> finder(this->getFinder());
 
 
     // First, simple wildcard match
     // First, simple wildcard match
     // Check also that the RRSIG is added from the wildcard (not modified)
     // Check also that the RRSIG is added from the wildcard (not modified)
@@ -2098,7 +2098,7 @@ TYPED_TEST(DatabaseClientTest, wildcard) {
 TYPED_TEST(DatabaseClientTest, noWildcard) {
 TYPED_TEST(DatabaseClientTest, noWildcard) {
     // Tests with the NO_WILDCARD flag.
     // Tests with the NO_WILDCARD flag.
 
 
-    shared_ptr<DatabaseClient::Finder> finder(this->getFinder());
+    boost::shared_ptr<DatabaseClient::Finder> finder(this->getFinder());
 
 
     // This would match *.wild.example.org, but with NO_WILDCARD should
     // This would match *.wild.example.org, but with NO_WILDCARD should
     // result in NXDOMAIN.
     // result in NXDOMAIN.
@@ -2159,7 +2159,7 @@ TYPED_TEST(DatabaseClientTest, noWildcard) {
 TYPED_TEST(DatabaseClientTest, NXRRSET_NSEC) {
 TYPED_TEST(DatabaseClientTest, NXRRSET_NSEC) {
     // The domain exists, but doesn't have this RRType
     // The domain exists, but doesn't have this RRType
     // So we should get its NSEC
     // So we should get its NSEC
-    shared_ptr<DatabaseClient::Finder> finder(this->getFinder());
+    boost::shared_ptr<DatabaseClient::Finder> finder(this->getFinder());
 
 
     this->expected_rdatas_.push_back("www2.example.org. A AAAA NSEC RRSIG");
     this->expected_rdatas_.push_back("www2.example.org. A AAAA NSEC RRSIG");
     this->expected_sig_rdatas_.push_back("NSEC 5 3 3600 20000101000000 "
     this->expected_sig_rdatas_.push_back("NSEC 5 3 3600 20000101000000 "
@@ -2178,7 +2178,7 @@ TYPED_TEST(DatabaseClientTest, wildcardNXRRSET_NSEC) {
     //
     //
     // The user will have to query us again to get the correct
     // The user will have to query us again to get the correct
     // answer (eg. prove there's not an exact match)
     // answer (eg. prove there's not an exact match)
-    shared_ptr<DatabaseClient::Finder> finder(this->getFinder());
+    boost::shared_ptr<DatabaseClient::Finder> finder(this->getFinder());
 
 
     this->expected_rdatas_.push_back("cancel.here.wild.example.org. A NSEC "
     this->expected_rdatas_.push_back("cancel.here.wild.example.org. A NSEC "
                                      "RRSIG");
                                      "RRSIG");
@@ -2195,7 +2195,7 @@ TYPED_TEST(DatabaseClientTest, wildcardNXRRSET_NSEC) {
 
 
 TYPED_TEST(DatabaseClientTest, NXDOMAIN_NSEC) {
 TYPED_TEST(DatabaseClientTest, NXDOMAIN_NSEC) {
     // The domain doesn't exist, so we must get the right NSEC
     // The domain doesn't exist, so we must get the right NSEC
-    shared_ptr<DatabaseClient::Finder> finder(this->getFinder());
+    boost::shared_ptr<DatabaseClient::Finder> finder(this->getFinder());
 
 
     this->expected_rdatas_.push_back("www2.example.org. A AAAA NSEC RRSIG");
     this->expected_rdatas_.push_back("www2.example.org. A AAAA NSEC RRSIG");
     this->expected_sig_rdatas_.push_back("NSEC 5 3 3600 20000101000000 "
     this->expected_sig_rdatas_.push_back("NSEC 5 3 3600 20000101000000 "
@@ -2232,7 +2232,7 @@ TYPED_TEST(DatabaseClientTest, NXDOMAIN_NSEC) {
 
 
 TYPED_TEST(DatabaseClientTest, emptyNonterminalNSEC) {
 TYPED_TEST(DatabaseClientTest, emptyNonterminalNSEC) {
     // Same as NXDOMAIN_NSEC, but with empty non-terminal
     // Same as NXDOMAIN_NSEC, but with empty non-terminal
-    shared_ptr<DatabaseClient::Finder> finder(this->getFinder());
+    boost::shared_ptr<DatabaseClient::Finder> finder(this->getFinder());
 
 
     this->expected_rdatas_.push_back("empty.nonterminal.example.org. NSEC");
     this->expected_rdatas_.push_back("empty.nonterminal.example.org. NSEC");
     doFindTest(*finder, isc::dns::Name("nonterminal.example.org."),
     doFindTest(*finder, isc::dns::Name("nonterminal.example.org."),
@@ -2259,7 +2259,7 @@ TYPED_TEST(DatabaseClientTest, getOrigin) {
     DataSourceClient::FindResult
     DataSourceClient::FindResult
         zone(this->client_->findZone(Name("example.org")));
         zone(this->client_->findZone(Name("example.org")));
     ASSERT_EQ(result::SUCCESS, zone.code);
     ASSERT_EQ(result::SUCCESS, zone.code);
-    shared_ptr<DatabaseClient::Finder> finder(
+    boost::shared_ptr<DatabaseClient::Finder> finder(
         dynamic_pointer_cast<DatabaseClient::Finder>(zone.zone_finder));
         dynamic_pointer_cast<DatabaseClient::Finder>(zone.zone_finder));
     if (this->is_mock_) {
     if (this->is_mock_) {
         EXPECT_EQ(READONLY_ZONE_ID, finder->zone_id());
         EXPECT_EQ(READONLY_ZONE_ID, finder->zone_id());
@@ -2301,7 +2301,7 @@ TYPED_TEST(DatabaseClientTest, updaterFinder) {
 
 
 TYPED_TEST(DatabaseClientTest, flushZone) {
 TYPED_TEST(DatabaseClientTest, flushZone) {
     // A simple update case: flush the entire zone
     // A simple update case: flush the entire zone
-    shared_ptr<DatabaseClient::Finder> finder(this->getFinder());
+    boost::shared_ptr<DatabaseClient::Finder> finder(this->getFinder());
 
 
     // Before update, the name exists.
     // Before update, the name exists.
     EXPECT_EQ(ZoneFinder::SUCCESS, finder->find(this->qname_,
     EXPECT_EQ(ZoneFinder::SUCCESS, finder->find(this->qname_,
@@ -2420,7 +2420,7 @@ TYPED_TEST(DatabaseClientTest, addRRsetToNewZone) {
 
 
 TYPED_TEST(DatabaseClientTest, addRRsetToCurrentZone) {
 TYPED_TEST(DatabaseClientTest, addRRsetToCurrentZone) {
     // Similar to the previous test, but not replacing the existing data.
     // Similar to the previous test, but not replacing the existing data.
-    shared_ptr<DatabaseClient::Finder> finder(this->getFinder());
+    boost::shared_ptr<DatabaseClient::Finder> finder(this->getFinder());
 
 
     this->updater_ = this->client_->getUpdater(this->zname_, false);
     this->updater_ = this->client_->getUpdater(this->zname_, false);
     this->updater_->addRRset(*this->rrset_);
     this->updater_->addRRset(*this->rrset_);
@@ -2577,7 +2577,7 @@ TYPED_TEST(DatabaseClientTest, addRRsetWithRRSIG) {
 }
 }
 
 
 TYPED_TEST(DatabaseClientTest, deleteRRset) {
 TYPED_TEST(DatabaseClientTest, deleteRRset) {
-    shared_ptr<DatabaseClient::Finder> finder(this->getFinder());
+    boost::shared_ptr<DatabaseClient::Finder> finder(this->getFinder());
 
 
     this->rrset_.reset(new RRset(this->qname_, this->qclass_, this->qtype_,
     this->rrset_.reset(new RRset(this->qname_, this->qclass_, this->qtype_,
                                  this->rrttl_));
                                  this->rrttl_));
@@ -2849,7 +2849,7 @@ TYPED_TEST(DatabaseClientTest, compoundUpdate) {
 
 
     // Commit the changes, confirm the entire changes applied.
     // Commit the changes, confirm the entire changes applied.
     this->updater_->commit();
     this->updater_->commit();
-    shared_ptr<DatabaseClient::Finder> finder(this->getFinder());
+    boost::shared_ptr<DatabaseClient::Finder> finder(this->getFinder());
     this->expected_rdatas_.clear();
     this->expected_rdatas_.clear();
     this->expected_rdatas_.push_back("192.0.2.2");
     this->expected_rdatas_.push_back("192.0.2.2");
     this->expected_rdatas_.push_back("192.0.2.1");
     this->expected_rdatas_.push_back("192.0.2.1");
@@ -2865,7 +2865,7 @@ TYPED_TEST(DatabaseClientTest, compoundUpdate) {
 }
 }
 
 
 TYPED_TEST(DatabaseClientTest, previous) {
 TYPED_TEST(DatabaseClientTest, previous) {
-    shared_ptr<DatabaseClient::Finder> finder(this->getFinder());
+    boost::shared_ptr<DatabaseClient::Finder> finder(this->getFinder());
 
 
     EXPECT_EQ(Name("www.example.org."),
     EXPECT_EQ(Name("www.example.org."),
               finder->findPreviousName(Name("www2.example.org.")));
               finder->findPreviousName(Name("www2.example.org.")));
@@ -2892,7 +2892,7 @@ TYPED_TEST(DatabaseClientTest, previous) {
 }
 }
 
 
 TYPED_TEST(DatabaseClientTest, invalidRdata) {
 TYPED_TEST(DatabaseClientTest, invalidRdata) {
-    shared_ptr<DatabaseClient::Finder> finder(this->getFinder());
+    boost::shared_ptr<DatabaseClient::Finder> finder(this->getFinder());
 
 
     EXPECT_THROW(finder->find(Name("invalidrdata.example.org."), RRType::A()),
     EXPECT_THROW(finder->find(Name("invalidrdata.example.org."), RRType::A()),
                  DataSourceError);
                  DataSourceError);
@@ -2901,7 +2901,7 @@ TYPED_TEST(DatabaseClientTest, invalidRdata) {
 }
 }
 
 
 TEST_F(MockDatabaseClientTest, missingNSEC) {
 TEST_F(MockDatabaseClientTest, missingNSEC) {
-    shared_ptr<DatabaseClient::Finder> finder(this->getFinder());
+    boost::shared_ptr<DatabaseClient::Finder> finder(this->getFinder());
 
 
     /*
     /*
      * FIXME: For now, we can't really distinguish this bogus input
      * FIXME: For now, we can't really distinguish this bogus input
@@ -2919,7 +2919,7 @@ TEST_F(MockDatabaseClientTest, missingNSEC) {
 }
 }
 
 
 TEST_F(MockDatabaseClientTest, badName) {
 TEST_F(MockDatabaseClientTest, badName) {
-    shared_ptr<DatabaseClient::Finder> finder(this->getFinder());
+    boost::shared_ptr<DatabaseClient::Finder> finder(this->getFinder());
 
 
     EXPECT_THROW(finder->findPreviousName(Name("brokenname.example.org.")),
     EXPECT_THROW(finder->findPreviousName(Name("brokenname.example.org.")),
                  DataSourceError);
                  DataSourceError);

+ 2 - 3
src/lib/datasrc/tests/sqlite3_accessor_unittest.cc

@@ -29,7 +29,6 @@
 
 
 using namespace std;
 using namespace std;
 using namespace isc::datasrc;
 using namespace isc::datasrc;
-using boost::shared_ptr;
 using boost::lexical_cast;
 using boost::lexical_cast;
 using isc::data::ConstElementPtr;
 using isc::data::ConstElementPtr;
 using isc::data::Element;
 using isc::data::Element;
@@ -527,7 +526,7 @@ TEST_F(SQLite3Create, lockedtest) {
 }
 }
 
 
 TEST_F(SQLite3AccessorTest, clone) {
 TEST_F(SQLite3AccessorTest, clone) {
-    shared_ptr<DatabaseAccessor> cloned = accessor->clone();
+    boost::shared_ptr<DatabaseAccessor> cloned = accessor->clone();
     EXPECT_EQ(accessor->getDBName(), cloned->getDBName());
     EXPECT_EQ(accessor->getDBName(), cloned->getDBName());
 
 
     // The cloned accessor should have a separate connection and search
     // The cloned accessor should have a separate connection and search
@@ -604,7 +603,7 @@ protected:
     vector<const char* const*> empty_stored; // indicate no corresponding data
     vector<const char* const*> empty_stored; // indicate no corresponding data
 
 
     // Another accessor, emulating one running on a different process/thread
     // Another accessor, emulating one running on a different process/thread
-    shared_ptr<SQLite3Accessor> another_accessor;
+    boost::shared_ptr<SQLite3Accessor> another_accessor;
     DatabaseAccessor::IteratorContextPtr iterator;
     DatabaseAccessor::IteratorContextPtr iterator;
 };
 };
 
 

+ 3 - 3
src/lib/dns/rrparamregistry-placeholder.cc

@@ -77,7 +77,7 @@ struct RRTypeParam {
     static size_t UNKNOWN_MAXLEN();
     static size_t UNKNOWN_MAXLEN();
 };
 };
 
 
-typedef shared_ptr<RRTypeParam> RRTypeParamPtr;
+typedef boost::shared_ptr<RRTypeParam> RRTypeParamPtr;
 typedef map<string, RRTypeParamPtr, CIStringLess> StrRRTypeMap;
 typedef map<string, RRTypeParamPtr, CIStringLess> StrRRTypeMap;
 typedef map<uint16_t, RRTypeParamPtr> CodeRRTypeMap;
 typedef map<uint16_t, RRTypeParamPtr> CodeRRTypeMap;
 
 
@@ -119,7 +119,7 @@ struct RRClassParam {
     static size_t UNKNOWN_MAXLEN();
     static size_t UNKNOWN_MAXLEN();
 };
 };
 
 
-typedef shared_ptr<RRClassParam> RRClassParamPtr;
+typedef boost::shared_ptr<RRClassParam> RRClassParamPtr;
 typedef map<string, RRClassParamPtr, CIStringLess> StrRRClassMap;
 typedef map<string, RRClassParamPtr, CIStringLess> StrRRClassMap;
 typedef map<uint16_t, RRClassParamPtr> CodeRRClassMap;
 typedef map<uint16_t, RRClassParamPtr> CodeRRClassMap;
 
 
@@ -342,7 +342,7 @@ addParam(const string& code_string, uint16_t code, MC& codemap, MS& stringmap)
         return (false);
         return (false);
     }
     }
 
 
-    typedef shared_ptr<PT> ParamPtr;
+    typedef boost::shared_ptr<PT> ParamPtr;
     typedef pair<string, ParamPtr> StrParamPair;
     typedef pair<string, ParamPtr> StrParamPair;
     typedef pair<uint16_t, ParamPtr> CodeParamPair;
     typedef pair<uint16_t, ParamPtr> CodeParamPair;
     ParamPtr param = ParamPtr(new PT(code_string, code));
     ParamPtr param = ParamPtr(new PT(code_string, code));

+ 3 - 4
src/lib/nsas/tests/hash_table_unittest.cc

@@ -30,7 +30,6 @@
 #include "nsas_test.h"
 #include "nsas_test.h"
 
 
 using namespace std;
 using namespace std;
-using boost::shared_ptr;
 using namespace isc::dns;
 using namespace isc::dns;
 
 
 namespace isc {
 namespace isc {
@@ -180,8 +179,8 @@ TEST_F(HashTableTest, GetTest) {
     EXPECT_TRUE(value.get() == NULL);
     EXPECT_TRUE(value.get() == NULL);
 }
 }
 
 
-shared_ptr<TestEntry>
-pass(shared_ptr<TestEntry> value) {
+boost::shared_ptr<TestEntry>
+pass(boost::shared_ptr<TestEntry> value) {
     return (value);
     return (value);
 }
 }
 
 
@@ -190,7 +189,7 @@ TEST_F(HashTableTest, GetOrAddTest) {
     EXPECT_TRUE(table_.add(dummy1_, dummy1_->hashKey()));
     EXPECT_TRUE(table_.add(dummy1_, dummy1_->hashKey()));
 
 
     // Check it looks it up
     // Check it looks it up
-    std::pair<bool, shared_ptr<TestEntry> > result = table_.getOrAdd(
+    std::pair<bool, boost::shared_ptr<TestEntry> > result = table_.getOrAdd(
         dummy1_->hashKey(), boost::bind(pass, dummy3_));
         dummy1_->hashKey(), boost::bind(pass, dummy3_));
     EXPECT_FALSE(result.first);
     EXPECT_FALSE(result.first);
     EXPECT_EQ(dummy1_.get(), result.second.get());
     EXPECT_EQ(dummy1_.get(), result.second.get());

+ 1 - 2
src/lib/python/isc/acl/dns_requestloader_python.cc

@@ -36,7 +36,6 @@
 #include "dns_requestloader_python.h"
 #include "dns_requestloader_python.h"
 
 
 using namespace std;
 using namespace std;
-using boost::shared_ptr;
 using namespace isc::util::python;
 using namespace isc::util::python;
 using namespace isc::data;
 using namespace isc::data;
 using namespace isc::acl::dns;
 using namespace isc::acl::dns;
@@ -121,7 +120,7 @@ RequestLoader_load(PyObject* po_self, PyObject* args) {
             }
             }
         }
         }
         if (py_result) {
         if (py_result) {
-            shared_ptr<RequestACL> acl(
+            boost::shared_ptr<RequestACL> acl(
                 self->cppobj->load(Element::fromJSON(acl_config)));
                 self->cppobj->load(Element::fromJSON(acl_config)));
             s_RequestACL* py_acl = static_cast<s_RequestACL*>(
             s_RequestACL* py_acl = static_cast<s_RequestACL*>(
                 requestacl_type.tp_alloc(&requestacl_type, 0));
                 requestacl_type.tp_alloc(&requestacl_type, 0));