]> git.ipfire.org Git - thirdparty/kea.git/commitdiff
[5066] Enforced C++11 following #4631 discussion
authorFrancis Dupont <fdupont@isc.org>
Wed, 30 Nov 2016 14:39:42 +0000 (15:39 +0100)
committerFrancis Dupont <fdupont@isc.org>
Wed, 30 Nov 2016 14:39:42 +0000 (15:39 +0100)
16 files changed:
configure.ac
src/lib/dns/master_loader.cc
src/lib/dns/rdata.cc
src/lib/dns/rdata/any_255/tsig_250.cc
src/lib/dns/rdata/generic/caa_257.cc
src/lib/dns/rdata/generic/dnskey_48.cc
src/lib/dns/rdata/generic/nsec3_50.cc
src/lib/dns/rdata/generic/nsec3param_51.cc
src/lib/dns/rdata/generic/opt_41.cc
src/lib/dns/rdata/generic/rrsig_46.cc
src/lib/dns/rdata/generic/sshfp_44.cc
src/lib/dns/rdataclass.cc
src/lib/log/Makefile.am
src/lib/util/threads/sync.cc
src/lib/util/threads/sync.h
src/lib/util/threads/thread.cc

index c6918d1a1e0c9bb2a83a323d1cffece66093b7d8..a2ef3fadc0c3238f40fce9245bd9fc2b72b37fb4 100644 (file)
@@ -117,6 +117,48 @@ AC_CHECK_DECL([__clang__], [CLANGPP="yes"], [CLANGPP="no"])
 # USE_CLANGPP is no longer used, keep it by summetry with USE_GXX?
 AM_CONDITIONAL(USE_CLANGPP, test "X${CLANGPP}" = "Xyes")
 
+# Check for std::unique_ptr and aggregate initialization (aka C++11) support
+retried=0
+CXX_SAVED=$CXX
+for retry in "--std=c++11" "--std=c++0x" "--std=c++1x"; do
+       AC_MSG_CHECKING(std::unique_ptr support)
+       AC_COMPILE_IFELSE(
+               [AC_LANG_PROGRAM(
+                       [#include <memory>],
+                       [std::unique_ptr<int> a;])],
+               [AC_MSG_RESULT([yes])],
+               [AC_MSG_RESULT([no])
+                if test $retried -eq 0; then
+                       AC_MSG_WARN([unsupported C++11 feature])
+                fi
+                if test $retried -ge 3; then
+                       AC_MSG_ERROR([std::unique_ptr (a C++11 feature) is not supported])
+                fi
+                AC_MSG_NOTICE([retrying by adding $retry to $CXX])
+                retried=`expr $retried + 1`
+                CXX="$CXX_SAVED $retry"
+                continue])
+
+       AC_MSG_CHECKING(aggregate initialization support)
+       AC_COMPILE_IFELSE(
+               [AC_LANG_PROGRAM(
+                       [#include <vector>],
+                       [std::vector<int> foo = { 1, 2, 3};])],
+               [AC_MSG_RESULT([yes])
+                break],
+               [AC_MSG_RESULT([no])
+                if test $retried -eq 0; then
+                       AC_MSG_WARN([unsupported C++11 feature])
+                fi
+                if test $retried -ge 3; then
+                       AC_MSG_ERROR([aggregate initialization (a C++11 feature) is not supported])
+                fi
+                AC_MSG_NOTICE([retrying by adding $retry to $CXX])
+                retried=`expr $retried + 1`
+                CXX="$CXX_SAVED $retry"
+                continue])
+done
+
 dnl Determine if we are using GNU sed
 GNU_SED=no
 $SED --version 2> /dev/null | grep GNU > /dev/null 2>&1
index 0e932b25054e3e6a5f9e241613b8aeb83f66950d..54bcc91a1bd047b2344f8bdff7224f4065ac3536 100644 (file)
@@ -1,9 +1,11 @@
-// Copyright (C) 2012-2015 Internet Systems Consortium, Inc. ("ISC")
+// Copyright (C) 2012-2016 Internet Systems Consortium, Inc. ("ISC")
 //
 // This Source Code Form is subject to the terms of the Mozilla Public
 // License, v. 2.0. If a copy of the MPL was not distributed with this
 // file, You can obtain one at http://mozilla.org/MPL/2.0/.
 
+#include <config.h>
+
 #include <dns/master_loader.h>
 #include <dns/master_lexer.h>
 #include <dns/name.h>
@@ -25,7 +27,7 @@
 #include <cstdio> // for sscanf()
 
 using std::string;
-using std::auto_ptr;
+using std::unique_ptr;
 using std::vector;
 using std::pair;
 using boost::algorithm::iequals;
@@ -1034,10 +1036,9 @@ MasterLoader::MasterLoader(std::istream& stream,
     if (add_callback.empty()) {
         isc_throw(isc::InvalidParameter, "Empty add RR callback");
     }
-    auto_ptr<MasterLoaderImpl> impl(new MasterLoaderImpl("", zone_origin,
-                                                         zone_class, callbacks,
-                                                         add_callback,
-                                                         options));
+    unique_ptr<MasterLoaderImpl>
+        impl(new MasterLoaderImpl("", zone_origin, zone_class,
+                                  callbacks, add_callback, options));
     impl->pushStreamSource(stream);
     impl_ = impl.release();
 }
index d2ce5b8ead66450ae02be3917587a49072ab75e9..357ccc7cdf0b4933c90a7cdcc962334576db3b8e 100644 (file)
@@ -1,9 +1,11 @@
-// Copyright (C) 2010-2015 Internet Systems Consortium, Inc. ("ISC")
+// Copyright (C) 2010-2016 Internet Systems Consortium, Inc. ("ISC")
 //
 // This Source Code Form is subject to the terms of the Mozilla Public
 // License, v. 2.0. If a copy of the MPL was not distributed with this
 // file, You can obtain one at http://mozilla.org/MPL/2.0/.
 
+#include <config.h>
+
 #include <exceptions/exceptions.h>
 
 #include <util/buffer.h>
@@ -278,10 +280,10 @@ Generic::constructFromLexer(MasterLexer& lexer) {
 Generic::Generic(const std::string& rdata_string) :
     impl_(NULL)
 {
-    // We use auto_ptr here because if there is an exception in this
+    // We use unique_ptr here because if there is an exception in this
     // constructor, the destructor is not called and there could be a
     // leak of the GenericImpl that constructFromLexer() returns.
-    std::auto_ptr<GenericImpl> impl_ptr(NULL);
+    std::unique_ptr<GenericImpl> impl_ptr;
 
     try {
         std::istringstream ss(rdata_string);
index d8e7224e4c6411bd8456b959ceb43ae693bd9ed0..a80d742d097cc9b95534eba9bd45c076cfd83345 100644 (file)
@@ -1,9 +1,11 @@
-// Copyright (C) 2010-2015 Internet Systems Consortium, Inc. ("ISC")
+// Copyright (C) 2010-2016 Internet Systems Consortium, Inc. ("ISC")
 //
 // This Source Code Form is subject to the terms of the Mozilla Public
 // License, v. 2.0. If a copy of the MPL was not distributed with this
 // file, You can obtain one at http://mozilla.org/MPL/2.0/.
 
+#include <config.h>
+
 #include <string>
 #include <sstream>
 #include <vector>
@@ -208,10 +210,10 @@ TSIG::constructFromLexer(MasterLexer& lexer, const Name* origin) {
 ///
 /// \param tsig_str A string containing the RDATA to be created
 TSIG::TSIG(const std::string& tsig_str) : impl_(NULL) {
-    // We use auto_ptr here because if there is an exception in this
+    // We use unique_ptr here because if there is an exception in this
     // constructor, the destructor is not called and there could be a
     // leak of the TSIGImpl that constructFromLexer() returns.
-    std::auto_ptr<TSIGImpl> impl_ptr(NULL);
+    std::unique_ptr<TSIGImpl> impl_ptr;
 
     try {
         std::istringstream ss(tsig_str);
index 378c1cac07e164fab45cfdad2e4e5fe1e3661a0f..7f8b455687570d9cf8e6069274da6bae57423fc0 100644 (file)
@@ -1,4 +1,4 @@
-// Copyright (C) 2014-2015 Internet Systems Consortium, Inc. ("ISC")
+// Copyright (C) 2014-2016 Internet Systems Consortium, Inc. ("ISC")
 //
 // This Source Code Form is subject to the terms of the Mozilla Public
 // License, v. 2.0. If a copy of the MPL was not distributed with this
@@ -95,10 +95,10 @@ CAA::constructFromLexer(MasterLexer& lexer) {
 CAA::CAA(const string& caa_str) :
     impl_(NULL)
 {
-    // We use auto_ptr here because if there is an exception in this
+    // We use unique_ptr here because if there is an exception in this
     // constructor, the destructor is not called and there could be a
     // leak of the CAAImpl that constructFromLexer() returns.
-    std::auto_ptr<CAAImpl> impl_ptr(NULL);
+    std::unique_ptr<CAAImpl> impl_ptr;
 
     try {
         std::istringstream ss(caa_str);
index 3bdb93ee78b9d1106e1a44ae058159f2553ee4ee..7bea8474279c9f93d71a69828dfdb62584d20807 100644 (file)
@@ -1,9 +1,11 @@
-// Copyright (C) 2010-2015 Internet Systems Consortium, Inc. ("ISC")
+// Copyright (C) 2010-2016 Internet Systems Consortium, Inc. ("ISC")
 //
 // This Source Code Form is subject to the terms of the Mozilla Public
 // License, v. 2.0. If a copy of the MPL was not distributed with this
 // file, You can obtain one at http://mozilla.org/MPL/2.0/.
 
+#include <config.h>
+
 #include <iostream>
 #include <string>
 #include <sstream>
@@ -70,10 +72,10 @@ struct DNSKEYImpl {
 DNSKEY::DNSKEY(const std::string& dnskey_str) :
     impl_(NULL)
 {
-    // We use auto_ptr here because if there is an exception in this
+    // We use unique_ptr here because if there is an exception in this
     // constructor, the destructor is not called and there could be a
     // leak of the DNSKEYImpl that constructFromLexer() returns.
-    std::auto_ptr<DNSKEYImpl> impl_ptr(NULL);
+    std::unique_ptr<DNSKEYImpl> impl_ptr;
 
     try {
         std::istringstream ss(dnskey_str);
index e6b9208094f20f40c8ec78d7bf2964f7e04a7b6a..e99c109807bff0528b638a45dad1dc3149ee4450 100644 (file)
@@ -1,9 +1,11 @@
-// Copyright (C) 2010-2015 Internet Systems Consortium, Inc. ("ISC")
+// Copyright (C) 2010-2016 Internet Systems Consortium, Inc. ("ISC")
 //
 // This Source Code Form is subject to the terms of the Mozilla Public
 // License, v. 2.0. If a copy of the MPL was not distributed with this
 // file, You can obtain one at http://mozilla.org/MPL/2.0/.
 
+#include <config.h>
+
 #include <iostream>
 #include <iomanip>
 #include <string>
@@ -79,10 +81,10 @@ struct NSEC3Impl {
 NSEC3::NSEC3(const std::string& nsec3_str) :
     impl_(NULL)
 {
-    // We use auto_ptr here because if there is an exception in this
+    // We use unique_ptr here because if there is an exception in this
     // constructor, the destructor is not called and there could be a
     // leak of the NSEC3Impl that constructFromLexer() returns.
-    std::auto_ptr<NSEC3Impl> impl_ptr(NULL);
+    std::unique_ptr<NSEC3Impl> impl_ptr;
 
     try {
         std::istringstream ss(nsec3_str);
index 444701a37465e0cd036954f3ca3561a7f67d8b59..2d28a6988581f945fd9a97e185b6222848928ba7 100644 (file)
@@ -1,9 +1,11 @@
-// Copyright (C) 2010-2015 Internet Systems Consortium, Inc. ("ISC")
+// Copyright (C) 2010-2016 Internet Systems Consortium, Inc. ("ISC")
 //
 // This Source Code Form is subject to the terms of the Mozilla Public
 // License, v. 2.0. If a copy of the MPL was not distributed with this
 // file, You can obtain one at http://mozilla.org/MPL/2.0/.
 
+#include <config.h>
+
 #include <util/buffer.h>
 #include <util/encode/hex.h>
 
@@ -57,10 +59,10 @@ struct NSEC3PARAMImpl {
 NSEC3PARAM::NSEC3PARAM(const std::string& nsec3param_str) :
     impl_(NULL)
 {
-    // We use auto_ptr here because if there is an exception in this
+    // We use unique_ptr here because if there is an exception in this
     // constructor, the destructor is not called and there could be a
     // leak of the NSEC3PARAMImpl that constructFromLexer() returns.
-    std::auto_ptr<NSEC3PARAMImpl> impl_ptr(NULL);
+    std::unique_ptr<NSEC3PARAMImpl> impl_ptr;
 
     try {
         std::istringstream ss(nsec3param_str);
index 460b3666aeca8118d050bb8cd3c324ab9410e073..40cb1c73ae4214bac678c8a5e29a6e03c9eef24c 100644 (file)
@@ -1,4 +1,4 @@
-// Copyright (C) 2010-2015 Internet Systems Consortium, Inc. ("ISC")
+// Copyright (C) 2010-2016 Internet Systems Consortium, Inc. ("ISC")
 //
 // This Source Code Form is subject to the terms of the Mozilla Public
 // License, v. 2.0. If a copy of the MPL was not distributed with this
@@ -86,7 +86,7 @@ OPT::OPT(MasterLexer&, const Name*,
 OPT::OPT(InputBuffer& buffer, size_t rdata_len) :
     impl_(NULL)
 {
-    std::auto_ptr<OPTImpl> impl_ptr(new OPTImpl);
+    std::unique_ptr<OPTImpl> impl_ptr(new OPTImpl);
 
     while (true) {
         if (rdata_len == 0) {
index 856539299625c7a07598f32fa28ad20a675975b2..de92c67c3469f348e51639c6508a0edcca022c14 100644 (file)
@@ -1,9 +1,11 @@
-// Copyright (C) 2010-2015 Internet Systems Consortium, Inc. ("ISC")
+// Copyright (C) 2010-2016 Internet Systems Consortium, Inc. ("ISC")
 //
 // This Source Code Form is subject to the terms of the Mozilla Public
 // License, v. 2.0. If a copy of the MPL was not distributed with this
 // file, You can obtain one at http://mozilla.org/MPL/2.0/.
 
+#include <config.h>
+
 #include <string>
 #include <iomanip>
 #include <iostream>
@@ -137,10 +139,10 @@ RRSIG::constructFromLexer(MasterLexer& lexer, const Name* origin) {
 RRSIG::RRSIG(const std::string& rrsig_str) :
     impl_(NULL)
 {
-    // We use auto_ptr here because if there is an exception in this
+    // We use unique_ptr here because if there is an exception in this
     // constructor, the destructor is not called and there could be a
     // leak of the RRSIGImpl that constructFromLexer() returns.
-    std::auto_ptr<RRSIGImpl> impl_ptr(NULL);
+    std::unique_ptr<RRSIGImpl> impl_ptr;
 
     try {
         std::istringstream iss(rrsig_str);
index 5aa7bdd4454768ac612a33c1b54de98aa191a45e..a08a17fcb0c453f07324a9c4db15f61a2e6819b7 100644 (file)
@@ -1,4 +1,4 @@
-// Copyright (C) 2012-2015 Internet Systems Consortium, Inc. ("ISC")
+// Copyright (C) 2012-2016 Internet Systems Consortium, Inc. ("ISC")
 //
 // This Source Code Form is subject to the terms of the Mozilla Public
 // License, v. 2.0. If a copy of the MPL was not distributed with this
@@ -104,10 +104,10 @@ SSHFP::constructFromLexer(MasterLexer& lexer) {
 SSHFP::SSHFP(const string& sshfp_str) :
     impl_(NULL)
 {
-    // We use auto_ptr here because if there is an exception in this
+    // We use unique_ptr here because if there is an exception in this
     // constructor, the destructor is not called and there could be a
     // leak of the SSHFPImpl that constructFromLexer() returns.
-    std::auto_ptr<SSHFPImpl> impl_ptr(NULL);
+    std::unique_ptr<SSHFPImpl> impl_ptr;
 
     try {
         std::istringstream ss(sshfp_str);
index 4a9bf3662e6e4c1e99858f47c33e96348e5ec4f5..b5c6107b851217206b65731e43960e24545e6048 100644 (file)
@@ -5,12 +5,14 @@
 ///////////////
 ///////////////
 
-// Copyright (C) 2010-2015 Internet Systems Consortium, Inc. ("ISC")
+// Copyright (C) 2010-2016 Internet Systems Consortium, Inc. ("ISC")
 //
 // This Source Code Form is subject to the terms of the Mozilla Public
 // License, v. 2.0. If a copy of the MPL was not distributed with this
 // file, You can obtain one at http://mozilla.org/MPL/2.0/.
 
+#include <config.h>
+
 #include <string>
 #include <sstream>
 #include <vector>
@@ -217,10 +219,10 @@ TSIG::constructFromLexer(MasterLexer& lexer, const Name* origin) {
 ///
 /// \param tsig_str A string containing the RDATA to be created
 TSIG::TSIG(const std::string& tsig_str) : impl_(NULL) {
-    // We use auto_ptr here because if there is an exception in this
+    // We use unique_ptr here because if there is an exception in this
     // constructor, the destructor is not called and there could be a
     // leak of the TSIGImpl that constructFromLexer() returns.
-    std::auto_ptr<TSIGImpl> impl_ptr(NULL);
+    std::unique_ptr<TSIGImpl> impl_ptr;
 
     try {
         std::istringstream ss(tsig_str);
@@ -843,7 +845,7 @@ AFSDB::getSubtype() const {
 } // end of namespace "rdata"
 } // end of namespace "dns"
 } // end of namespace "isc"
-// Copyright (C) 2014-2015 Internet Systems Consortium, Inc. ("ISC")
+// Copyright (C) 2014-2016 Internet Systems Consortium, Inc. ("ISC")
 //
 // This Source Code Form is subject to the terms of the Mozilla Public
 // License, v. 2.0. If a copy of the MPL was not distributed with this
@@ -942,10 +944,10 @@ CAA::constructFromLexer(MasterLexer& lexer) {
 CAA::CAA(const string& caa_str) :
     impl_(NULL)
 {
-    // We use auto_ptr here because if there is an exception in this
+    // We use unique_ptr here because if there is an exception in this
     // constructor, the destructor is not called and there could be a
     // leak of the CAAImpl that constructFromLexer() returns.
-    std::auto_ptr<CAAImpl> impl_ptr(NULL);
+    std::unique_ptr<CAAImpl> impl_ptr;
 
     try {
         std::istringstream ss(caa_str);
@@ -1527,12 +1529,14 @@ DNAME::getDname() const {
 } // end of namespace "rdata"
 } // end of namespace "dns"
 } // end of namespace "isc"
-// Copyright (C) 2010-2015 Internet Systems Consortium, Inc. ("ISC")
+// Copyright (C) 2010-2016 Internet Systems Consortium, Inc. ("ISC")
 //
 // This Source Code Form is subject to the terms of the Mozilla Public
 // License, v. 2.0. If a copy of the MPL was not distributed with this
 // file, You can obtain one at http://mozilla.org/MPL/2.0/.
 
+#include <config.h>
+
 #include <iostream>
 #include <string>
 #include <sstream>
@@ -1601,10 +1605,10 @@ struct DNSKEYImpl {
 DNSKEY::DNSKEY(const std::string& dnskey_str) :
     impl_(NULL)
 {
-    // We use auto_ptr here because if there is an exception in this
+    // We use unique_ptr here because if there is an exception in this
     // constructor, the destructor is not called and there could be a
     // leak of the DNSKEYImpl that constructFromLexer() returns.
-    std::auto_ptr<DNSKEYImpl> impl_ptr(NULL);
+    std::unique_ptr<DNSKEYImpl> impl_ptr;
 
     try {
         std::istringstream ss(dnskey_str);
@@ -2816,12 +2820,14 @@ NS::getNSName() const {
 } // end of namespace "rdata"
 } // end of namespace "dns"
 } // end of namespace "isc"
-// Copyright (C) 2010-2015 Internet Systems Consortium, Inc. ("ISC")
+// Copyright (C) 2010-2016 Internet Systems Consortium, Inc. ("ISC")
 //
 // This Source Code Form is subject to the terms of the Mozilla Public
 // License, v. 2.0. If a copy of the MPL was not distributed with this
 // file, You can obtain one at http://mozilla.org/MPL/2.0/.
 
+#include <config.h>
+
 #include <iostream>
 #include <iomanip>
 #include <string>
@@ -2899,10 +2905,10 @@ struct NSEC3Impl {
 NSEC3::NSEC3(const std::string& nsec3_str) :
     impl_(NULL)
 {
-    // We use auto_ptr here because if there is an exception in this
+    // We use unique_ptr here because if there is an exception in this
     // constructor, the destructor is not called and there could be a
     // leak of the NSEC3Impl that constructFromLexer() returns.
-    std::auto_ptr<NSEC3Impl> impl_ptr(NULL);
+    std::unique_ptr<NSEC3Impl> impl_ptr;
 
     try {
         std::istringstream ss(nsec3_str);
@@ -3161,12 +3167,14 @@ NSEC3::getNext() const {
 } // end of namespace "rdata"
 } // end of namespace "dns"
 } // end of namespace "isc"
-// Copyright (C) 2010-2015 Internet Systems Consortium, Inc. ("ISC")
+// Copyright (C) 2010-2016 Internet Systems Consortium, Inc. ("ISC")
 //
 // This Source Code Form is subject to the terms of the Mozilla Public
 // License, v. 2.0. If a copy of the MPL was not distributed with this
 // file, You can obtain one at http://mozilla.org/MPL/2.0/.
 
+#include <config.h>
+
 #include <util/buffer.h>
 #include <util/encode/hex.h>
 
@@ -3222,10 +3230,10 @@ struct NSEC3PARAMImpl {
 NSEC3PARAM::NSEC3PARAM(const std::string& nsec3param_str) :
     impl_(NULL)
 {
-    // We use auto_ptr here because if there is an exception in this
+    // We use unique_ptr here because if there is an exception in this
     // constructor, the destructor is not called and there could be a
     // leak of the NSEC3PARAMImpl that constructFromLexer() returns.
-    std::auto_ptr<NSEC3PARAMImpl> impl_ptr(NULL);
+    std::unique_ptr<NSEC3PARAMImpl> impl_ptr;
 
     try {
         std::istringstream ss(nsec3param_str);
@@ -3613,7 +3621,7 @@ NSEC::compare(const Rdata& other) const {
 } // end of namespace "rdata"
 } // end of namespace "dns"
 } // end of namespace "isc"
-// Copyright (C) 2010-2015 Internet Systems Consortium, Inc. ("ISC")
+// Copyright (C) 2010-2016 Internet Systems Consortium, Inc. ("ISC")
 //
 // This Source Code Form is subject to the terms of the Mozilla Public
 // License, v. 2.0. If a copy of the MPL was not distributed with this
@@ -3703,7 +3711,7 @@ OPT::OPT(MasterLexer&, const Name*,
 OPT::OPT(InputBuffer& buffer, size_t rdata_len) :
     impl_(NULL)
 {
-    std::auto_ptr<OPTImpl> impl_ptr(new OPTImpl);
+    std::unique_ptr<OPTImpl> impl_ptr(new OPTImpl);
 
     while (true) {
         if (rdata_len == 0) {
@@ -4125,12 +4133,14 @@ RP::compare(const Rdata& other) const {
 } // end of namespace "rdata"
 } // end of namespace "dns"
 } // end of namespace "isc"
-// Copyright (C) 2010-2015 Internet Systems Consortium, Inc. ("ISC")
+// Copyright (C) 2010-2016 Internet Systems Consortium, Inc. ("ISC")
 //
 // This Source Code Form is subject to the terms of the Mozilla Public
 // License, v. 2.0. If a copy of the MPL was not distributed with this
 // file, You can obtain one at http://mozilla.org/MPL/2.0/.
 
+#include <config.h>
+
 #include <string>
 #include <iomanip>
 #include <iostream>
@@ -4266,10 +4276,10 @@ RRSIG::constructFromLexer(MasterLexer& lexer, const Name* origin) {
 RRSIG::RRSIG(const std::string& rrsig_str) :
     impl_(NULL)
 {
-    // We use auto_ptr here because if there is an exception in this
+    // We use unique_ptr here because if there is an exception in this
     // constructor, the destructor is not called and there could be a
     // leak of the RRSIGImpl that constructFromLexer() returns.
-    std::auto_ptr<RRSIGImpl> impl_ptr(NULL);
+    std::unique_ptr<RRSIGImpl> impl_ptr;
 
     try {
         std::istringstream iss(rrsig_str);
@@ -4816,7 +4826,7 @@ SPF::compare(const Rdata& other) const {
 } // end of namespace "rdata"
 } // end of namespace "dns"
 } // end of namespace "isc"
-// Copyright (C) 2012-2015 Internet Systems Consortium, Inc. ("ISC")
+// Copyright (C) 2012-2016 Internet Systems Consortium, Inc. ("ISC")
 //
 // This Source Code Form is subject to the terms of the Mozilla Public
 // License, v. 2.0. If a copy of the MPL was not distributed with this
@@ -4924,10 +4934,10 @@ SSHFP::constructFromLexer(MasterLexer& lexer) {
 SSHFP::SSHFP(const string& sshfp_str) :
     impl_(NULL)
 {
-    // We use auto_ptr here because if there is an exception in this
+    // We use unique_ptr here because if there is an exception in this
     // constructor, the destructor is not called and there could be a
     // leak of the SSHFPImpl that constructFromLexer() returns.
-    std::auto_ptr<SSHFPImpl> impl_ptr(NULL);
+    std::unique_ptr<SSHFPImpl> impl_ptr;
 
     try {
         std::istringstream ss(sshfp_str);
index e1185cd1f0dcde713fe516a2926467f33fd00d77..ebf531c0ad43ab0ac0645deba15152c6e1473014 100644 (file)
@@ -40,7 +40,7 @@ EXTRA_DIST += log_messages.mes
 # KEA_CXXFLAGS)
 libkea_log_la_CXXFLAGS = $(AM_CXXFLAGS)
 if USE_GXX
-libkea_log_la_CXXFLAGS += -Wno-unused-parameter
+libkea_log_la_CXXFLAGS += -Wno-unused-parameter -Wno-deprecated-declarations
 endif
 libkea_log_la_CPPFLAGS = $(AM_CPPFLAGS) $(LOG4CPLUS_INCLUDES)
 libkea_log_la_LIBADD   = $(top_builddir)/src/lib/log/interprocess/libkea-log_interprocess.la
index 50c7bf88ef0a34f27ba7ad217e835b831c230c94..06463f95e9641fd2bf8997c53fd5e0f37f36d43b 100644 (file)
@@ -1,4 +1,4 @@
-// Copyright (C) 2012-2015 Internet Systems Consortium, Inc. ("ISC")
+// Copyright (C) 2012-2016 Internet Systems Consortium, Inc. ("ISC")
 //
 // This Source Code Form is subject to the terms of the Mozilla Public
 // License, v. 2.0. If a copy of the MPL was not distributed with this
@@ -17,7 +17,7 @@
 
 #include <pthread.h>
 
-using std::auto_ptr;
+using std::unique_ptr;
 
 namespace isc {
 namespace util {
@@ -82,7 +82,7 @@ Mutex::Mutex() :
         isc_throw(isc::InvalidOperation, std::strerror(result));
     }
 
-    auto_ptr<Impl> impl(new Impl);
+    unique_ptr<Impl> impl(new Impl);
     result = pthread_mutex_init(&impl->mutex, &attributes);
     switch (result) {
         case 0: // All 0K
index 6306078be8f4425c2b951a3d15cf0ad723e95ca2..15e78fcb6e5a95016cc46ecaf0125d097263f10d 100644 (file)
@@ -1,4 +1,4 @@
-// Copyright (C) 2012-2015 Internet Systems Consortium, Inc. ("ISC")
+// Copyright (C) 2012-2016 Internet Systems Consortium, Inc. ("ISC")
 //
 // This Source Code Form is subject to the terms of the Mozilla Public
 // License, v. 2.0. If a copy of the MPL was not distributed with this
@@ -66,7 +66,7 @@ public:
     /// is destroyed.
     ///
     /// If you create the locker on the stack or using some other "garbage
-    /// collecting" mechanism (auto_ptr, for example), it ensures exception
+    /// collecting" mechanism (unique_ptr, for example), it ensures exception
     /// safety with regards to the mutex - it'll get released on the exit
     /// of function no matter by what means.
     class Locker : boost::noncopyable {
index 2154af553937498910b07a875dd1136a5bcbdc2b..54f67da6c86974e337592998b24f352bdaefafa3 100644 (file)
@@ -4,6 +4,8 @@
 // License, v. 2.0. If a copy of the MPL was not distributed with this
 // file, You can obtain one at http://mozilla.org/MPL/2.0/.
 
+#include <config.h>
+
 #include <util/threads/thread.h>
 #include <util/threads/sync.h>
 
@@ -20,7 +22,7 @@
 
 using std::string;
 using std::exception;
-using std::auto_ptr;
+using std::unique_ptr;
 using boost::scoped_ptr;
 
 namespace isc {
@@ -123,7 +125,7 @@ public:
 Thread::Thread(const boost::function<void ()>& main) :
     impl_(NULL)
 {
-    auto_ptr<Impl> impl(new Impl(main));
+    unique_ptr<Impl> impl(new Impl(main));
     Blocker blocker;
     const int result = pthread_create(&impl->tid_, NULL, &Impl::run,
                                       impl.get());