summaryrefslogtreecommitdiff
path: root/net
diff options
context:
space:
mode:
authorjoerg <joerg@pkgsrc.org>2013-05-09 20:06:53 +0000
committerjoerg <joerg@pkgsrc.org>2013-05-09 20:06:53 +0000
commit852cb38f7121c1711fc26226e8a8b8b4e822ea4c (patch)
tree224dbf0b675e1b2ebffc54288990c70b7568ebb5 /net
parent0b40f9b9b8250e6b0ea77f89496381c1648150da (diff)
downloadpkgsrc-852cb38f7121c1711fc26226e8a8b8b4e822ea4c.tar.gz
Fix overlap between boost and C++11 STL
Diffstat (limited to 'net')
-rw-r--r--net/powerdns/distinfo20
-rw-r--r--net/powerdns/patches/patch-modules_pipebackend_pipebackend.cc13
-rw-r--r--net/powerdns/patches/patch-modules_pipebackend_pipebackend.hh13
-rw-r--r--net/powerdns/patches/patch-pdns_backends_bind_bindbackend2.cc234
-rw-r--r--net/powerdns/patches/patch-pdns_backends_bind_bindbackend2.hh44
-rw-r--r--net/powerdns/patches/patch-pdns_dnspacket.cc13
-rw-r--r--net/powerdns/patches/patch-pdns_dnsparser.cc22
-rw-r--r--net/powerdns/patches/patch-pdns_dnsparser.hh25
-rw-r--r--net/powerdns/patches/patch-pdns_dnspbench.cc13
-rw-r--r--net/powerdns/patches/patch-pdns_dynloader.cc25
-rw-r--r--net/powerdns/patches/patch-pdns_htimer.cc13
-rw-r--r--net/powerdns/patches/patch-pdns_nameserver.cc13
-rw-r--r--net/powerdns/patches/patch-pdns_pdns_recursor.cc55
-rw-r--r--net/powerdns/patches/patch-pdns_recursor__cache.cc22
-rw-r--r--net/powerdns/patches/patch-pdns_resolver.cc26
-rw-r--r--net/powerdns/patches/patch-pdns_tcpreceiver.cc121
16 files changed, 661 insertions, 11 deletions
diff --git a/net/powerdns/distinfo b/net/powerdns/distinfo
index a22660a6c6d..b9cd3eb62a1 100644
--- a/net/powerdns/distinfo
+++ b/net/powerdns/distinfo
@@ -1,4 +1,4 @@
-$NetBSD: distinfo,v 1.12 2012/10/02 12:20:47 jperkin Exp $
+$NetBSD: distinfo,v 1.13 2013/05/09 20:06:53 joerg Exp $
SHA1 (pdns-2.9.22.5.tar.gz) = 7a514fe624c110afb8a262f4d76376d0f8e17bea
RMD160 (pdns-2.9.22.5.tar.gz) = 8be76a7a63c3366d55724815245e2f955ec0adda
@@ -6,12 +6,24 @@ Size (pdns-2.9.22.5.tar.gz) = 1077617 bytes
SHA1 (patch-aa) = e31080087d9369349e912c94e7dbfce72c9fc629
SHA1 (patch-ab) = f54ace6ff60162e50119eb11bcb2f5db5e1ea480
SHA1 (patch-configure) = 2a0beb262c421d7887dcabc56102c04b340a920b
+SHA1 (patch-modules_pipebackend_pipebackend.cc) = 760d8035e99faadfbb90ee31230e43c5157aecb4
+SHA1 (patch-modules_pipebackend_pipebackend.hh) = 7451c14660674210ca2024767e5cd44f7ec9da54
SHA1 (patch-pdns_aes_brg_endian.h) = f7e5294251cd0d89e8ff802292f27b0c4cb50be7
-SHA1 (patch-pdns_backends_bind_bindbackend2.cc) = d6d5d2c4a726f19c8846d7f0c96a45bd5f2e3a8a
+SHA1 (patch-pdns_backends_bind_bindbackend2.cc) = 46fdd94323cd2ecb914e30db4560495cc8efd660
+SHA1 (patch-pdns_backends_bind_bindbackend2.hh) = 0cc15f8d7c53cc5dd2b81c4e2e67601a5192ab54
SHA1 (patch-pdns_dns.hh) = f7d95f4c28fd986e76b4c25333b1b063992aa0c5
+SHA1 (patch-pdns_dnspacket.cc) = 659f6511b2fabfebb48fd9472a5e43fc42c0f356
+SHA1 (patch-pdns_dnsparser.cc) = 895e66ce1afb5f5af4bcb367a8946ab3d4eb5703
+SHA1 (patch-pdns_dnsparser.hh) = cd39fda0d7952bd9858f28eac750c7c05be08ced
+SHA1 (patch-pdns_dnspbench.cc) = 91670ad952f185c325270d977545425ef86dffe9
+SHA1 (patch-pdns_dynloader.cc) = 26743b3465fccb8a013790dcdc64d195af0666da
SHA1 (patch-pdns_dynmessenger.cc) = df89ba91abc96319b323fc19b413b127112f4afb
SHA1 (patch-pdns_ext_nedmalloc_malloc.c) = 979ccbf76edf9ff8ceeded0cf6fc1e401d1c1504
+SHA1 (patch-pdns_htimer.cc) = 3e984f93da7b7be3f309e45ba1182d75c3980769
+SHA1 (patch-pdns_nameserver.cc) = 5ff1dd6d419c4cbbf3e12bcfca22164dafcc3df6
SHA1 (patch-pdns_packethandler.cc) = db36bf022ebf1e27f52e2e5f05f5fb81783f2288
-SHA1 (patch-pdns_pdns_recursor.cc) = f8dff83d9153d8c1eef2aeda23bf9338f9319b1a
+SHA1 (patch-pdns_pdns_recursor.cc) = 03b012eab35dd4b83602151736cf61bdd74f14ef
SHA1 (patch-pdns_receiver.cc) = 8a9932413f5c8234478cd9d5b3f5237fcf9ac087
-SHA1 (patch-pdns_resolver.cc) = fec1bfc0083c59963c1bfa44210fe84266b4bb56
+SHA1 (patch-pdns_recursor__cache.cc) = 242bff58eff98ee943a7fb599a6590f079328251
+SHA1 (patch-pdns_resolver.cc) = 4a73c460abbbd223109ec119c6280f19d7402956
+SHA1 (patch-pdns_tcpreceiver.cc) = 836a1a114a8a6fdf67335db64909882ca498096a
diff --git a/net/powerdns/patches/patch-modules_pipebackend_pipebackend.cc b/net/powerdns/patches/patch-modules_pipebackend_pipebackend.cc
new file mode 100644
index 00000000000..060c0478139
--- /dev/null
+++ b/net/powerdns/patches/patch-modules_pipebackend_pipebackend.cc
@@ -0,0 +1,13 @@
+$NetBSD: patch-modules_pipebackend_pipebackend.cc,v 1.1 2013/05/09 20:06:53 joerg Exp $
+
+--- modules/pipebackend/pipebackend.cc.orig 2013-05-09 15:20:34.000000000 +0000
++++ modules/pipebackend/pipebackend.cc
+@@ -91,7 +91,7 @@ PipeBackend::PipeBackend(const string &s
+ signal(SIGCHLD, SIG_IGN);
+ setArgPrefix("pipe"+suffix);
+ try {
+- d_coproc=shared_ptr<CoWrapper>(new CoWrapper(getArg("command"), getArgAsNum("timeout")));
++ d_coproc=boost::shared_ptr<CoWrapper>(new CoWrapper(getArg("command"), getArgAsNum("timeout")));
+ d_regex=getArg("regex").empty() ? 0 : new Regex(getArg("regex"));
+ d_regexstr=getArg("regex");
+ }
diff --git a/net/powerdns/patches/patch-modules_pipebackend_pipebackend.hh b/net/powerdns/patches/patch-modules_pipebackend_pipebackend.hh
new file mode 100644
index 00000000000..3729122cfb4
--- /dev/null
+++ b/net/powerdns/patches/patch-modules_pipebackend_pipebackend.hh
@@ -0,0 +1,13 @@
+$NetBSD: patch-modules_pipebackend_pipebackend.hh,v 1.1 2013/05/09 20:06:53 joerg Exp $
+
+--- modules/pipebackend/pipebackend.hh.orig 2013-05-09 15:20:14.000000000 +0000
++++ modules/pipebackend/pipebackend.hh
+@@ -68,7 +68,7 @@ public:
+ static DNSBackend *maker();
+
+ private:
+- shared_ptr<CoWrapper> d_coproc;
++ boost::shared_ptr<CoWrapper> d_coproc;
+ string d_qname;
+ QType d_qtype;
+ Regex* d_regex;
diff --git a/net/powerdns/patches/patch-pdns_backends_bind_bindbackend2.cc b/net/powerdns/patches/patch-pdns_backends_bind_bindbackend2.cc
index 6b2688c75b7..032014353b8 100644
--- a/net/powerdns/patches/patch-pdns_backends_bind_bindbackend2.cc
+++ b/net/powerdns/patches/patch-pdns_backends_bind_bindbackend2.cc
@@ -1,10 +1,10 @@
-$NetBSD: patch-pdns_backends_bind_bindbackend2.cc,v 1.1 2012/10/02 12:20:47 jperkin Exp $
+$NetBSD: patch-pdns_backends_bind_bindbackend2.cc,v 1.2 2013/05/09 20:06:53 joerg Exp $
Limit inclusion of boost headers to only those necessary to avoid conflicting
types errors on Solaris.
--- pdns/backends/bind/bindbackend2.cc.orig 2012-01-05 13:54:51.000000000 +0000
-+++ pdns/backends/bind/bindbackend2.cc 2012-10-02 10:41:01.017473672 +0000
++++ pdns/backends/bind/bindbackend2.cc
@@ -26,8 +26,8 @@
#include <fstream>
#include <fcntl.h>
@@ -16,3 +16,233 @@ types errors on Solaris.
using namespace std;
#include "dns.hh"
+@@ -51,15 +51,15 @@ using namespace std;
+ */
+
+ // this map contains BB2DomainInfo structs, each of which contains a *pointer* to domain data
+-shared_ptr<Bind2Backend::State> Bind2Backend::s_state;
++boost::shared_ptr<Bind2Backend::State> Bind2Backend::s_state;
+ pthread_mutex_t Bind2Backend::s_state_swap_lock=PTHREAD_MUTEX_INITIALIZER;
+
+
+ /* the model is that all our state hides in s_state. This State instance consists of the id_zone_map, which contains all our zone information, indexed by id.
+ Then there is the name_id_map, which allows us to map a query to a zone id.
+
+- The s_state is never written to, and it is a reference counted shared_ptr. Any function which needs to access the state
+- should do so by making a shared_ptr copy of it, and do all its work on that copy.
++ The s_state is never written to, and it is a reference counted boost::shared_ptr. Any function which needs to access the state
++ should do so by making a boost::shared_ptr copy of it, and do all its work on that copy.
+
+ When I said s_state is never written to, I lied. No elements are ever added to it, or removed from it.
+ Its values however may be changed, but not the keys.
+@@ -67,8 +67,8 @@ pthread_mutex_t Bind2Backend::s_state_sw
+ When it is necessary to change the State, a deep copy is made, which is changed. Afterwards,
+ the s_state pointer is made to point to the new State.
+
+- Anybody who is currently accessing the original holds a reference counted handle (shared_ptr) to it, which means it will stay around
+- To save memory, we hold the records as a shared_ptr as well.
++ Anybody who is currently accessing the original holds a reference counted handle (boost::shared_ptr) to it, which means it will stay around
++ To save memory, we hold the records as a boost::shared_ptr as well.
+
+ Changes made to s_state directly should take the s_state_lock, so as to prevent writing to a stale copy.
+ */
+@@ -140,9 +140,9 @@ void Bind2Backend::setFresh(uint32_t dom
+ s_state->id_zone_map[domain_id].d_lastcheck=time(0);
+ }
+
+-shared_ptr<Bind2Backend::State> Bind2Backend::getState()
++boost::shared_ptr<Bind2Backend::State> Bind2Backend::getState()
+ {
+- shared_ptr<State> ret;
++ boost::shared_ptr<State> ret;
+ {
+ Lock l(&s_state_swap_lock);
+ ret = s_state; // is only read from
+@@ -153,7 +153,7 @@ shared_ptr<Bind2Backend::State> Bind2Bac
+
+ bool Bind2Backend::startTransaction(const string &qname, int id)
+ {
+- shared_ptr<State> state = getState();
++ boost::shared_ptr<State> state = getState();
+
+ const BB2DomainInfo &bbd=state->id_zone_map[d_transaction_id=id];
+
+@@ -177,7 +177,7 @@ bool Bind2Backend::commitTransaction()
+ delete d_of;
+ d_of=0;
+
+- shared_ptr<State> state = getState();
++ boost::shared_ptr<State> state = getState();
+
+ // this might fail if s_state was cycled during the AXFR
+ if(rename(d_transaction_tmpname.c_str(), state->id_zone_map[d_transaction_id].d_filename.c_str())<0)
+@@ -206,7 +206,7 @@ bool Bind2Backend::feedRecord(const DNSR
+ {
+ string qname=r.qname;
+
+- shared_ptr<State> state = getState();
++ boost::shared_ptr<State> state = getState();
+ string domain = state->id_zone_map[d_transaction_id].d_name;
+
+ if(!stripDomainSuffix(&qname,domain))
+@@ -239,7 +239,7 @@ bool Bind2Backend::feedRecord(const DNSR
+ void Bind2Backend::getUpdatedMasters(vector<DomainInfo> *changedDomains)
+ {
+ SOAData soadata;
+- shared_ptr<State> state = getState();
++ boost::shared_ptr<State> state = getState();
+
+ for(id_zone_map_t::const_iterator i = state->id_zone_map.begin(); i != state->id_zone_map.end() ; ++i) {
+ if(!i->second.d_masters.empty())
+@@ -268,7 +268,7 @@ void Bind2Backend::getUpdatedMasters(vec
+
+ void Bind2Backend::getUnfreshSlaveInfos(vector<DomainInfo> *unfreshDomains)
+ {
+- shared_ptr<State> state = getState();
++ boost::shared_ptr<State> state = getState();
+ for(id_zone_map_t::const_iterator i = state->id_zone_map.begin(); i != state->id_zone_map.end() ; ++i) {
+ if(i->second.d_masters.empty())
+ continue;
+@@ -296,7 +296,7 @@ void Bind2Backend::getUnfreshSlaveInfos(
+
+ bool Bind2Backend::getDomainInfo(const string &domain, DomainInfo &di)
+ {
+- shared_ptr<State> state = getState();
++ boost::shared_ptr<State> state = getState();
+ for(id_zone_map_t::const_iterator i = state->id_zone_map.begin(); i != state->id_zone_map.end() ; ++i) {
+ if(i->second.d_name==domain) {
+ di.id=i->first;
+@@ -341,7 +341,7 @@ static string canonic(string ret)
+ /** THIS IS AN INTERNAL FUNCTION! It does moadnsparser prio impedence matching
+ This function adds a record to a domain with a certain id.
+ Much of the complication is due to the efforts to benefit from std::string reference counting copy on write semantics */
+-void Bind2Backend::insert(shared_ptr<State> stage, int id, const string &qnameu, const QType &qtype, const string &content, int ttl=300, int prio=25)
++void Bind2Backend::insert(boost::shared_ptr<State> stage, int id, const string &qnameu, const QType &qtype, const string &content, int ttl=300, int prio=25)
+ {
+ BB2DomainInfo bb2 = stage->id_zone_map[id];
+ Bind2DNSRecord bdr;
+@@ -393,7 +393,7 @@ void Bind2Backend::reload()
+
+ string Bind2Backend::DLReloadNowHandler(const vector<string>&parts, Utility::pid_t ppid)
+ {
+- shared_ptr<State> state = getState();
++ boost::shared_ptr<State> state = getState();
+ ostringstream ret;
+
+ for(vector<string>::const_iterator i=parts.begin()+1;i<parts.end();++i) {
+@@ -415,7 +415,7 @@ string Bind2Backend::DLReloadNowHandler(
+ string Bind2Backend::DLDomStatusHandler(const vector<string>&parts, Utility::pid_t ppid)
+ {
+ ostringstream ret;
+- shared_ptr<State> state = getState();
++ boost::shared_ptr<State> state = getState();
+
+ if(parts.size() > 1) {
+ for(vector<string>::const_iterator i=parts.begin()+1;i<parts.end();++i) {
+@@ -440,7 +440,7 @@ string Bind2Backend::DLDomStatusHandler(
+
+ string Bind2Backend::DLListRejectsHandler(const vector<string>&parts, Utility::pid_t ppid)
+ {
+- shared_ptr<State> state = getState();
++ boost::shared_ptr<State> state = getState();
+
+ ostringstream ret;
+ for(id_zone_map_t::iterator j = state->id_zone_map.begin(); j != state->id_zone_map.end(); ++j)
+@@ -464,7 +464,7 @@ Bind2Backend::Bind2Backend(const string
+ return;
+ }
+ s_first=0;
+- s_state = shared_ptr<State>(new State);
++ s_state = boost::shared_ptr<State>(new State);
+ loadConfig();
+
+ extern DynListener *dl;
+@@ -504,7 +504,7 @@ void Bind2Backend::loadConfig(string* st
+
+ static int domain_id=1;
+
+- shared_ptr<State> staging = shared_ptr<State>(new State);
++ boost::shared_ptr<State> staging = boost::shared_ptr<State>(new State);
+
+ if(!getArg("config").empty()) {
+ BindParser BP;
+@@ -555,7 +555,7 @@ void Bind2Backend::loadConfig(string* st
+ bbd->d_id=domain_id++;
+
+ // this isn't necessary, we do this on the actual load
+- // bbd->d_records=shared_ptr<vector<Bind2DNSRecord> > (new vector<Bind2DNSRecord>);
++ // bbd->d_records=boost::shared_ptr<vector<Bind2DNSRecord> > (new vector<Bind2DNSRecord>);
+
+ bbd->setCheckInterval(getArgAsNum("check-interval"));
+ bbd->d_lastnotified=0;
+@@ -578,7 +578,7 @@ void Bind2Backend::loadConfig(string* st
+
+ try {
+ // we need to allocate a new vector so we don't kill the original, which is still in use!
+- bbd->d_records=shared_ptr<vector<Bind2DNSRecord> > (new vector<Bind2DNSRecord>);
++ bbd->d_records=boost::shared_ptr<vector<Bind2DNSRecord> > (new vector<Bind2DNSRecord>);
+
+ ZoneParserTNG zpt(i->filename, i->name, BP.getDirectory());
+ DNSResourceRecord rr;
+@@ -681,7 +681,7 @@ void Bind2Backend::loadConfig(string* st
+ void Bind2Backend::nukeZoneRecords(BB2DomainInfo *bbd)
+ {
+ bbd->d_loaded=0; // block further access
+- bbd->d_records = shared_ptr<vector<Bind2DNSRecord> > (new vector<Bind2DNSRecord>);
++ bbd->d_records = boost::shared_ptr<vector<Bind2DNSRecord> > (new vector<Bind2DNSRecord>);
+ }
+
+
+@@ -689,14 +689,14 @@ void Bind2Backend::queueReload(BB2Domain
+ {
+ Lock l(&s_state_lock);
+
+- shared_ptr<State> staging(new State);
++ boost::shared_ptr<State> staging(new State);
+
+ // we reload *now* for the time being
+
+ try {
+ nukeZoneRecords(bbd); // ? do we need this?
+ staging->id_zone_map[bbd->d_id]=s_state->id_zone_map[bbd->d_id];
+- staging->id_zone_map[bbd->d_id].d_records=shared_ptr<vector<Bind2DNSRecord> > (new vector<Bind2DNSRecord>); // nuke it
++ staging->id_zone_map[bbd->d_id].d_records=boost::shared_ptr<vector<Bind2DNSRecord> > (new vector<Bind2DNSRecord>); // nuke it
+
+ ZoneParserTNG zpt(bbd->d_filename, bbd->d_name, s_binddirectory);
+ DNSResourceRecord rr;
+@@ -740,7 +740,7 @@ void Bind2Backend::lookup(const QType &q
+ if(mustlog)
+ L<<Logger::Warning<<"Lookup for '"<<qtype.getName()<<"' of '"<<domain<<"'"<<endl;
+
+- shared_ptr<State> state = getState();
++ boost::shared_ptr<State> state = getState();
+
+ name_id_map_t::const_iterator iditer;
+ while((iditer=state->name_id_map.find(domain)) == state->name_id_map.end() && chopOff(domain))
+@@ -873,7 +873,7 @@ bool Bind2Backend::handle::get_normal(DN
+
+ bool Bind2Backend::list(const string &target, int id)
+ {
+- shared_ptr<State> state = getState();
++ boost::shared_ptr<State> state = getState();
+ if(!state->id_zone_map.count(id))
+ return false;
+
+@@ -908,7 +908,7 @@ bool Bind2Backend::handle::get_list(DNSR
+
+ bool Bind2Backend::isMaster(const string &name, const string &ip)
+ {
+- shared_ptr<State> state = getState();
++ boost::shared_ptr<State> state = getState();
+ for(id_zone_map_t::iterator j=state->id_zone_map.begin();j!=state->id_zone_map.end();++j) {
+ if(j->second.d_name==name) {
+ for(vector<string>::const_iterator iter = j->second.d_masters.begin(); iter != j->second.d_masters.end(); ++iter)
+@@ -992,7 +992,7 @@ bool Bind2Backend::createSlaveDomain(con
+
+ BB2DomainInfo &bbd = s_state->id_zone_map[newid];
+
+- bbd.d_records = shared_ptr<vector<Bind2DNSRecord> >(new vector<Bind2DNSRecord>);
++ bbd.d_records = boost::shared_ptr<vector<Bind2DNSRecord> >(new vector<Bind2DNSRecord>);
+ bbd.d_name = domain;
+ bbd.setCheckInterval(getArgAsNum("check-interval"));
+ bbd.d_masters.push_back(ip);
diff --git a/net/powerdns/patches/patch-pdns_backends_bind_bindbackend2.hh b/net/powerdns/patches/patch-pdns_backends_bind_bindbackend2.hh
new file mode 100644
index 00000000000..576d6eedd8d
--- /dev/null
+++ b/net/powerdns/patches/patch-pdns_backends_bind_bindbackend2.hh
@@ -0,0 +1,44 @@
+$NetBSD: patch-pdns_backends_bind_bindbackend2.hh,v 1.1 2013/05/09 20:06:53 joerg Exp $
+
+--- pdns/backends/bind/bindbackend2.hh.orig 2013-05-09 15:23:01.000000000 +0000
++++ pdns/backends/bind/bindbackend2.hh
+@@ -90,7 +90,7 @@ public:
+ //! configure how often this domain should be checked for changes (on disk)
+ void setCheckInterval(time_t seconds);
+
+- shared_ptr<vector<Bind2DNSRecord> > d_records; //!< the actual records belonging to this domain
++ boost::shared_ptr<vector<Bind2DNSRecord> > d_records; //!< the actual records belonging to this domain
+ private:
+ time_t getCtime();
+ time_t d_checkinterval;
+@@ -130,7 +130,7 @@ public:
+ id_zone_map_t id_zone_map;
+ };
+
+- static void insert(shared_ptr<State> stage, int id, const string &qname, const QType &qtype, const string &content, int ttl, int prio);
++ static void insert(boost::shared_ptr<State> stage, int id, const string &qname, const QType &qtype, const string &content, int ttl, int prio);
+ void rediscover(string *status=0);
+
+ bool isMaster(const string &name, const string &ip);
+@@ -153,7 +153,7 @@ private:
+
+ handle();
+
+- shared_ptr<vector<Bind2DNSRecord> > d_records;
++ boost::shared_ptr<vector<Bind2DNSRecord> > d_records;
+ vector<Bind2DNSRecord>::const_iterator d_iter, d_end_iter;
+
+ vector<Bind2DNSRecord>::const_iterator d_qname_iter;
+@@ -176,10 +176,10 @@ private:
+ };
+
+
+- static shared_ptr<State> s_state;
++ static boost::shared_ptr<State> s_state;
+ static pthread_mutex_t s_state_lock; //!< lock protecting ???
+ static pthread_mutex_t s_state_swap_lock; //!< lock protecting ???
+- static shared_ptr<State> getState();
++ static boost::shared_ptr<State> getState();
+
+ static int s_first; //!< this is raised on construction to prevent multiple instances of us being generated
+
diff --git a/net/powerdns/patches/patch-pdns_dnspacket.cc b/net/powerdns/patches/patch-pdns_dnspacket.cc
new file mode 100644
index 00000000000..eada0abfe91
--- /dev/null
+++ b/net/powerdns/patches/patch-pdns_dnspacket.cc
@@ -0,0 +1,13 @@
+$NetBSD: patch-pdns_dnspacket.cc,v 1.1 2013/05/09 20:06:53 joerg Exp $
+
+--- pdns/dnspacket.cc.orig 2013-05-09 15:25:33.000000000 +0000
++++ pdns/dnspacket.cc
+@@ -335,7 +335,7 @@ void DNSPacket::wrapup(void)
+ }
+ if(pos->content.empty()) // empty contents confuse the MOADNS setup
+ pos->content=".";
+- shared_ptr<DNSRecordContent> drc(DNSRecordContent::mastermake(pos->qtype.getCode(), 1, pos->content));
++ boost::shared_ptr<DNSRecordContent> drc(DNSRecordContent::mastermake(pos->qtype.getCode(), 1, pos->content));
+ drc->toPacket(pw);
+ }
+ if(!opts.empty())
diff --git a/net/powerdns/patches/patch-pdns_dnsparser.cc b/net/powerdns/patches/patch-pdns_dnsparser.cc
new file mode 100644
index 00000000000..fa7fbe48b2b
--- /dev/null
+++ b/net/powerdns/patches/patch-pdns_dnsparser.cc
@@ -0,0 +1,22 @@
+$NetBSD: patch-pdns_dnsparser.cc,v 1.1 2013/05/09 20:06:53 joerg Exp $
+
+--- pdns/dnsparser.cc.orig 2013-05-09 15:25:35.000000000 +0000
++++ pdns/dnsparser.cc
+@@ -88,7 +88,7 @@ static const string EncodeDNSLabel(const
+ return ret;
+ }
+
+-shared_ptr<DNSRecordContent> DNSRecordContent::unserialize(const string& qname, uint16_t qtype, const string& serialized)
++boost::shared_ptr<DNSRecordContent> DNSRecordContent::unserialize(const string& qname, uint16_t qtype, const string& serialized)
+ {
+ dnsheader dnsheader;
+ memset(&dnsheader, 0, sizeof(dnsheader));
+@@ -122,7 +122,7 @@ shared_ptr<DNSRecordContent> DNSRecordCo
+ memcpy(&packet[pos], serialized.c_str(), serialized.size()); pos+=(uint16_t)serialized.size();
+
+ MOADNSParser mdp((char*)&*packet.begin(), (unsigned int)packet.size());
+- shared_ptr<DNSRecordContent> ret= mdp.d_answers.begin()->first.d_content;
++ boost::shared_ptr<DNSRecordContent> ret= mdp.d_answers.begin()->first.d_content;
+ ret->header.d_type=ret->d_qtype;
+ ret->label=mdp.d_answers.begin()->first.d_label;
+ ret->header.d_ttl=mdp.d_answers.begin()->first.d_ttl;
diff --git a/net/powerdns/patches/patch-pdns_dnsparser.hh b/net/powerdns/patches/patch-pdns_dnsparser.hh
new file mode 100644
index 00000000000..c477b30895e
--- /dev/null
+++ b/net/powerdns/patches/patch-pdns_dnsparser.hh
@@ -0,0 +1,25 @@
+$NetBSD: patch-pdns_dnsparser.hh,v 1.1 2013/05/09 20:06:53 joerg Exp $
+
+--- pdns/dnsparser.hh.orig 2013-05-09 15:25:37.000000000 +0000
++++ pdns/dnsparser.hh
+@@ -164,7 +164,7 @@ public:
+ return record;
+ }
+
+- static shared_ptr<DNSRecordContent> unserialize(const string& qname, uint16_t qtype, const string& serialized);
++ static boost::shared_ptr<DNSRecordContent> unserialize(const string& qname, uint16_t qtype, const string& serialized);
+
+ void doRecordCheck(const struct DNSRecord&){}
+
+@@ -291,9 +291,9 @@ public:
+ //! All answers contained in this packet
+ answers_t d_answers;
+
+- shared_ptr<PacketReader> getPacketReader(uint16_t offset)
++ boost::shared_ptr<PacketReader> getPacketReader(uint16_t offset)
+ {
+- shared_ptr<PacketReader> pr(new PacketReader(d_content));
++ boost::shared_ptr<PacketReader> pr(new PacketReader(d_content));
+ pr->d_pos=offset;
+ return pr;
+ }
diff --git a/net/powerdns/patches/patch-pdns_dnspbench.cc b/net/powerdns/patches/patch-pdns_dnspbench.cc
new file mode 100644
index 00000000000..948c00feb2a
--- /dev/null
+++ b/net/powerdns/patches/patch-pdns_dnspbench.cc
@@ -0,0 +1,13 @@
+$NetBSD: patch-pdns_dnspbench.cc,v 1.1 2013/05/09 20:06:53 joerg Exp $
+
+--- pdns/dnspbench.cc.orig 2013-05-09 15:25:39.000000000 +0000
++++ pdns/dnspbench.cc
+@@ -85,7 +85,7 @@ try
+ cerr<<"hexdump: "<<makeHexDump(record)<<"\n";
+ // cerr<<"record: "<<record<<"\n";
+
+- shared_ptr<DNSRecordContent> regen=DNSRecordContent::unserialize(argv[1], type, record);
++ boost::shared_ptr<DNSRecordContent> regen=DNSRecordContent::unserialize(argv[1], type, record);
+ cerr<<"Out: "<<argv[1]<<" IN "<<argv[2]<<" "<<regen->getZoneRepresentation()<<endl;
+ #endif
+ }
diff --git a/net/powerdns/patches/patch-pdns_dynloader.cc b/net/powerdns/patches/patch-pdns_dynloader.cc
new file mode 100644
index 00000000000..49522623386
--- /dev/null
+++ b/net/powerdns/patches/patch-pdns_dynloader.cc
@@ -0,0 +1,25 @@
+$NetBSD: patch-pdns_dynloader.cc,v 1.1 2013/05/09 20:06:53 joerg Exp $
+
+--- pdns/dynloader.cc.orig 2013-05-09 15:25:44.000000000 +0000
++++ pdns/dynloader.cc
+@@ -95,9 +95,9 @@ int main(int argc, char **argv)
+
+ try {
+ string command=commands[0];
+- shared_ptr<DynMessenger> D;
++ boost::shared_ptr<DynMessenger> D;
+ if(::arg()["remote-address"].empty())
+- D=shared_ptr<DynMessenger>(new DynMessenger(localdir,socketname));
++ D=boost::shared_ptr<DynMessenger>(new DynMessenger(localdir,socketname));
+ else {
+ uint16_t port;
+ try {
+@@ -108,7 +108,7 @@ int main(int argc, char **argv)
+ exit(99);
+ }
+
+- D=shared_ptr<DynMessenger>(new DynMessenger(ComboAddress(::arg()["remote-address"], port), ::arg()["secret"]));
++ D=boost::shared_ptr<DynMessenger>(new DynMessenger(ComboAddress(::arg()["remote-address"], port), ::arg()["secret"]));
+ }
+
+ string message;
diff --git a/net/powerdns/patches/patch-pdns_htimer.cc b/net/powerdns/patches/patch-pdns_htimer.cc
new file mode 100644
index 00000000000..5666d426d7d
--- /dev/null
+++ b/net/powerdns/patches/patch-pdns_htimer.cc
@@ -0,0 +1,13 @@
+$NetBSD: patch-pdns_htimer.cc,v 1.1 2013/05/09 20:06:53 joerg Exp $
+
+--- pdns/htimer.cc.orig 2013-05-09 15:25:46.000000000 +0000
++++ pdns/htimer.cc
+@@ -132,7 +132,7 @@ int main()
+ HTimerSentinel hts=htloop.getSentinel();
+ for(int i=0; i < 1000; ++i)
+ {
+- shared_ptr<char> p(shared_ptr<char>(new char));
++ boost::shared_ptr<char> p(boost::shared_ptr<char>(new char));
+ }
+ }
+
diff --git a/net/powerdns/patches/patch-pdns_nameserver.cc b/net/powerdns/patches/patch-pdns_nameserver.cc
new file mode 100644
index 00000000000..2a70fe47cf2
--- /dev/null
+++ b/net/powerdns/patches/patch-pdns_nameserver.cc
@@ -0,0 +1,13 @@
+$NetBSD: patch-pdns_nameserver.cc,v 1.1 2013/05/09 20:06:53 joerg Exp $
+
+--- pdns/nameserver.cc.orig 2013-05-09 15:25:50.000000000 +0000
++++ pdns/nameserver.cc
+@@ -181,7 +181,7 @@ void UDPNameserver::send(DNSPacket *p)
+ const char *buffer=p->getData();
+ DLOG(L<<Logger::Notice<<"Sending a packet to "<< p->remote.toString() <<" ("<<p->len<<" octets)"<<endl);
+ if(p->len > p->getMaxReplyLen()) {
+- shared_ptr<DNSPacket> sharedp(new DNSPacket(*p));
++ boost::shared_ptr<DNSPacket> sharedp(new DNSPacket(*p));
+ sharedp->truncate(p->getMaxReplyLen());
+ buffer=sharedp->getData();
+ if(sendto(sharedp->getSocket(),buffer,sharedp->len,0,(struct sockaddr *)(&sharedp->remote), sharedp->remote.getSocklen())<0)
diff --git a/net/powerdns/patches/patch-pdns_pdns_recursor.cc b/net/powerdns/patches/patch-pdns_pdns_recursor.cc
index 1c9a9f73b45..14832a4a5a9 100644
--- a/net/powerdns/patches/patch-pdns_pdns_recursor.cc
+++ b/net/powerdns/patches/patch-pdns_pdns_recursor.cc
@@ -1,9 +1,13 @@
-$NetBSD: patch-pdns_pdns_recursor.cc,v 1.1 2012/05/20 19:37:49 marino Exp $
+$NetBSD: patch-pdns_pdns_recursor.cc,v 1.2 2013/05/09 20:06:53 joerg Exp $
--- pdns/pdns_recursor.cc.orig 2012-01-05 13:54:51.000000000 +0000
+++ pdns/pdns_recursor.cc
-@@ -70,7 +70,8 @@ bool g_logCommonErrors;
- shared_ptr<PowerDNSLua> g_pdl;
+@@ -67,10 +67,11 @@ StatBag S;
+ FDMultiplexer* g_fdm;
+ unsigned int g_maxTCPPerClient;
+ bool g_logCommonErrors;
+-shared_ptr<PowerDNSLua> g_pdl;
++boost::shared_ptr<PowerDNSLua> g_pdl;
using namespace boost;
-#ifdef __FreeBSD__ // see cvstrac ticket #26
@@ -12,3 +16,48 @@ $NetBSD: patch-pdns_pdns_recursor.cc,v 1.1 2012/05/20 19:37:49 marino Exp $
#include <pthread.h>
#include <semaphore.h>
#endif
+@@ -578,7 +579,7 @@ void startDoResolve(void *p)
+ IpToU32(i->content, &ip);
+ pw.xfr32BitInt(htonl(ip));
+ } else {
+- shared_ptr<DNSRecordContent> drc(DNSRecordContent::mastermake(i->qtype.getCode(), i->qclass, i->content));
++ boost::shared_ptr<DNSRecordContent> drc(DNSRecordContent::mastermake(i->qtype.getCode(), i->qclass, i->content));
+ drc->toPacket(pw);
+ }
+ if(!dc->d_tcp && pw.size() > maxudpsize) {
+@@ -1553,7 +1554,7 @@ void parseAuthAndForwards()
+ if(!rfp)
+ throw AhuException("Error opening forward-zones-file '"+::arg()["forward-zones-file"]+"': "+stringerror());
+
+- shared_ptr<FILE> fp=shared_ptr<FILE>(rfp, fclose);
++ boost::shared_ptr<FILE> fp=boost::shared_ptr<FILE>(rfp, fclose);
+
+ char line[1024];
+ int linenum=0;
+@@ -1630,7 +1631,7 @@ string doReloadLuaScript(vector<string>:
+ try {
+ if(begin==end) {
+ if(!fname.empty())
+- g_pdl = shared_ptr<PowerDNSLua>(new PowerDNSLua(fname));
++ g_pdl = boost::shared_ptr<PowerDNSLua>(new PowerDNSLua(fname));
+ else
+ throw runtime_error("Asked to reload lua scripts, but no name passed and no default ('lua-dns-script') defined");
+ }
+@@ -1642,7 +1643,7 @@ string doReloadLuaScript(vector<string>:
+ return "unloaded current lua script\n";
+ }
+ else {
+- g_pdl = shared_ptr<PowerDNSLua>(new PowerDNSLua(fname));
++ g_pdl = boost::shared_ptr<PowerDNSLua>(new PowerDNSLua(fname));
+ ::arg().set("lua-dns-script")=fname;
+ }
+ }
+@@ -1766,7 +1767,7 @@ int serviceMain(int argc, char*argv[])
+
+ try {
+ if(!::arg()["lua-dns-script"].empty()) {
+- g_pdl = shared_ptr<PowerDNSLua>(new PowerDNSLua(::arg()["lua-dns-script"]));
++ g_pdl = boost::shared_ptr<PowerDNSLua>(new PowerDNSLua(::arg()["lua-dns-script"]));
+ L<<Logger::Warning<<"Loaded 'lua' script from '"<<::arg()["lua-dns-script"]<<"'"<<endl;
+ }
+
diff --git a/net/powerdns/patches/patch-pdns_recursor__cache.cc b/net/powerdns/patches/patch-pdns_recursor__cache.cc
new file mode 100644
index 00000000000..20248355c22
--- /dev/null
+++ b/net/powerdns/patches/patch-pdns_recursor__cache.cc
@@ -0,0 +1,22 @@
+$NetBSD: patch-pdns_recursor__cache.cc,v 1.1 2013/05/09 20:06:53 joerg Exp $
+
+--- pdns/recursor_cache.cc.orig 2013-05-09 15:25:53.000000000 +0000
++++ pdns/recursor_cache.cc
+@@ -74,7 +74,7 @@ DNSResourceRecord String2DNSRR(const str
+ rr.content=".";
+ }
+ else {
+- shared_ptr<DNSRecordContent> regen=DNSRecordContent::unserialize(qname, qt.getCode(), serial);
++ boost::shared_ptr<DNSRecordContent> regen=DNSRecordContent::unserialize(qname, qt.getCode(), serial);
+ rr.content=regen->getZoneRepresentation();
+ }
+ rr.content.reserve(0);
+@@ -99,7 +99,7 @@ string DNSRR2String(const DNSResourceRec
+ return simpleCompress(rr.content, rr.qname);
+ else {
+ string ret;
+- shared_ptr<DNSRecordContent> drc(DNSRecordContent::mastermake(type, 1, rr.content));
++ boost::shared_ptr<DNSRecordContent> drc(DNSRecordContent::mastermake(type, 1, rr.content));
+ ret=drc->serialize(rr.qname);
+ // cerr<<"stored '"<<rr.qname<<" '"<<rr.qtype.getName()<<"' '"<<rr.content<<"' as "<<ret.size()<<" bytes"<<endl;
+ return ret;
diff --git a/net/powerdns/patches/patch-pdns_resolver.cc b/net/powerdns/patches/patch-pdns_resolver.cc
index 490bb091825..d49d31dd865 100644
--- a/net/powerdns/patches/patch-pdns_resolver.cc
+++ b/net/powerdns/patches/patch-pdns_resolver.cc
@@ -1,10 +1,10 @@
-$NetBSD: patch-pdns_resolver.cc,v 1.1 2012/10/02 12:20:47 jperkin Exp $
+$NetBSD: patch-pdns_resolver.cc,v 1.2 2013/05/09 20:06:53 joerg Exp $
Limit inclusion of boost headers to only those necessary to avoid conflicting
types errors on Solaris.
--- pdns/resolver.cc.orig 2012-01-05 13:54:51.000000000 +0000
-+++ pdns/resolver.cc 2012-10-02 10:39:23.879764460 +0000
++++ pdns/resolver.cc
@@ -29,7 +29,7 @@
#include <cstring>
#include <string>
@@ -14,3 +14,25 @@ types errors on Solaris.
#include "dns.hh"
#include "qtype.hh"
#include "tcpreceiver.hh"
+@@ -183,7 +183,7 @@ bool Resolver::tryGetSOASerial(string* d
+ if(mdp.d_qtype != QType::SOA || mdp.d_answers.begin()->first.d_type != QType::SOA)
+ throw ResolverException("Query to '" + fromaddr.toString() + "' for SOA of '" + *domain + "' returned wrong record type");
+
+- shared_ptr<SOARecordContent> rrc=boost::dynamic_pointer_cast<SOARecordContent>(mdp.d_answers.begin()->first.d_content);
++ boost::shared_ptr<SOARecordContent> rrc=boost::dynamic_pointer_cast<SOARecordContent>(mdp.d_answers.begin()->first.d_content);
+
+ *theirSerial=rrc->d_st.serial;
+
+@@ -383,10 +383,10 @@ int Resolver::axfrChunk(Resolver::res_t
+
+ Resolver::res_t Resolver::result()
+ {
+- shared_ptr<MOADNSParser> mdp;
++ boost::shared_ptr<MOADNSParser> mdp;
+
+ try {
+- mdp=shared_ptr<MOADNSParser>(new MOADNSParser((char*)d_buf, d_len));
++ mdp=boost::shared_ptr<MOADNSParser>(new MOADNSParser((char*)d_buf, d_len));
+ }
+ catch(...) {
+ throw ResolverException("resolver: unable to parse packet of "+itoa(d_len)+" bytes");
diff --git a/net/powerdns/patches/patch-pdns_tcpreceiver.cc b/net/powerdns/patches/patch-pdns_tcpreceiver.cc
new file mode 100644
index 00000000000..faf3f1b93ee
--- /dev/null
+++ b/net/powerdns/patches/patch-pdns_tcpreceiver.cc
@@ -0,0 +1,121 @@
+$NetBSD: patch-pdns_tcpreceiver.cc,v 1.1 2013/05/09 20:06:53 joerg Exp $
+
+--- pdns/tcpreceiver.cc.orig 2013-05-09 15:25:58.000000000 +0000
++++ pdns/tcpreceiver.cc
+@@ -170,7 +170,7 @@ void connectWithTimeout(int fd, struct s
+ ;
+ }
+
+-void TCPNameserver::sendPacket(shared_ptr<DNSPacket> p, int outsock)
++void TCPNameserver::sendPacket(boost::shared_ptr<DNSPacket> p, int outsock)
+ {
+ const char *buf=p->getData();
+ uint16_t len=htons(p->len);
+@@ -188,7 +188,7 @@ catch(NetworkError& ae) {
+ throw NetworkError("Error reading DNS data from TCP client "+remote.toString()+": "+ae.what());
+ }
+
+-static void proxyQuestion(shared_ptr<DNSPacket> packet)
++static void proxyQuestion(boost::shared_ptr<DNSPacket> packet)
+ {
+ int sock=socket(AF_INET, SOCK_STREAM, 0);
+ if(sock < 0)
+@@ -232,7 +232,7 @@ static void proxyQuestion(shared_ptr<DNS
+
+ void *TCPNameserver::doConnection(void *data)
+ {
+- shared_ptr<DNSPacket> packet;
++ boost::shared_ptr<DNSPacket> packet;
+ // Fix gcc-4.0 error (on AMD64)
+ int fd=(int)(long)data; // gotta love C (generates a harmless warning on opteron)
+ pthread_detach(pthread_self());
+@@ -264,7 +264,7 @@ void *TCPNameserver::doConnection(void *
+ getQuestion(fd,mesg,pktlen,remote);
+ S.inc("tcp-queries");
+
+- packet=shared_ptr<DNSPacket>(new DNSPacket);
++ packet=boost::shared_ptr<DNSPacket>(new DNSPacket);
+ packet->setRemote(&remote);
+ packet->d_tcp=true;
+ packet->setSocket(fd);
+@@ -277,8 +277,8 @@ void *TCPNameserver::doConnection(void *
+ continue;
+ }
+
+- shared_ptr<DNSPacket> reply;
+- shared_ptr<DNSPacket> cached= shared_ptr<DNSPacket>(new DNSPacket);
++ boost::shared_ptr<DNSPacket> reply;
++ boost::shared_ptr<DNSPacket> cached= boost::shared_ptr<DNSPacket>(new DNSPacket);
+
+ if(!packet->d.rd && (PC.get(packet.get(), cached.get()))) { // short circuit - does the PacketCache recognize this question?
+ cached->setRemote(&packet->remote);
+@@ -299,7 +299,7 @@ void *TCPNameserver::doConnection(void *
+ }
+ bool shouldRecurse;
+
+- reply=shared_ptr<DNSPacket>(s_P->questionOrRecurse(packet.get(), &shouldRecurse)); // we really need to ask the backend :-)
++ reply=boost::shared_ptr<DNSPacket>(s_P->questionOrRecurse(packet.get(), &shouldRecurse)); // we really need to ask the backend :-)
+
+ if(shouldRecurse) {
+ proxyQuestion(packet);
+@@ -344,7 +344,7 @@ void *TCPNameserver::doConnection(void *
+ return 0;
+ }
+
+-bool TCPNameserver::canDoAXFR(shared_ptr<DNSPacket> q)
++bool TCPNameserver::canDoAXFR(boost::shared_ptr<DNSPacket> q)
+ {
+ if(::arg().mustDo("disable-axfr"))
+ return false;
+@@ -363,20 +363,20 @@ bool TCPNameserver::canDoAXFR(shared_ptr
+ }
+
+ /** do the actual zone transfer. Return 0 in case of error, 1 in case of success */
+-int TCPNameserver::doAXFR(const string &target, shared_ptr<DNSPacket> q, int outsock)
++int TCPNameserver::doAXFR(const string &target, boost::shared_ptr<DNSPacket> q, int outsock)
+ {
+- shared_ptr<DNSPacket> outpacket;
++ boost::shared_ptr<DNSPacket> outpacket;
+ if(!canDoAXFR(q)) {
+ L<<Logger::Error<<"AXFR of domain '"<<target<<"' denied to "<<q->getRemote()<<endl;
+
+- outpacket=shared_ptr<DNSPacket>(q->replyPacket());
++ outpacket=boost::shared_ptr<DNSPacket>(q->replyPacket());
+ outpacket->setRcode(RCode::Refused);
+ // FIXME: should actually figure out if we are auth over a zone, and send out 9 if we aren't
+ sendPacket(outpacket,outsock);
+ return 0;
+ }
+ L<<Logger::Error<<"AXFR of domain '"<<target<<"' initiated by "<<q->getRemote()<<endl;
+- outpacket=shared_ptr<DNSPacket>(q->replyPacket());
++ outpacket=boost::shared_ptr<DNSPacket>(q->replyPacket());
+
+ DNSResourceRecord soa;
+ DNSResourceRecord rr;
+@@ -450,7 +450,7 @@ int TCPNameserver::doAXFR(const string &
+ if(::arg().mustDo("strict-rfc-axfrs"))
+ chunk=1;
+
+- outpacket=shared_ptr<DNSPacket>(q->replyPacket());
++ outpacket=boost::shared_ptr<DNSPacket>(q->replyPacket());
+ outpacket->setCompress(false);
+
+ while(B->get(rr)) {
+@@ -464,7 +464,7 @@ int TCPNameserver::doAXFR(const string &
+
+ sendPacket(outpacket, outsock);
+
+- outpacket=shared_ptr<DNSPacket>(q->replyPacket());
++ outpacket=boost::shared_ptr<DNSPacket>(q->replyPacket());
+ outpacket->setCompress(false);
+ // FIXME: Subsequent messages SHOULD NOT have a question section, though the final message MAY.
+ }
+@@ -475,7 +475,7 @@ int TCPNameserver::doAXFR(const string &
+
+ DLOG(L<<"Done writing out records"<<endl);
+ /* and terminate with yet again the SOA record */
+- outpacket=shared_ptr<DNSPacket>(q->replyPacket());
++ outpacket=boost::shared_ptr<DNSPacket>(q->replyPacket());
+ outpacket->addRecord(soa);
+ sendPacket(outpacket, outsock);
+ DLOG(L<<"last packet - close"<<endl);