From: Aki Tuomi Date: Tue, 4 Nov 2014 08:44:58 +0000 (+0200) Subject: Renamed strtoui to pdns_strtoui, requested by @ahu X-Git-Tag: rec-3.7.0-rc1~173^2 X-Git-Url: http://git.ipfire.org/?a=commitdiff_plain;h=refs%2Fpull%2F1864%2Fhead;p=thirdparty%2Fpdns.git Renamed strtoui to pdns_strtoui, requested by @ahu --- diff --git a/pdns/dns.cc b/pdns/dns.cc index d168351921..42a3cafcd6 100644 --- a/pdns/dns.cc +++ b/pdns/dns.cc @@ -197,7 +197,7 @@ void fillSOAData(const string &content, SOAData &data) if(pleft>1) data.hostmaster=attodot(parts[1]); // ahu@ds9a.nl -> ahu.ds9a.nl, piet.puk@ds9a.nl -> piet\.puk.ds9a.nl - data.serial = pleft > 2 ? strtoui(parts[2].c_str(), NULL, 10) : 0; + data.serial = pleft > 2 ? pdns_strtoui(parts[2].c_str(), NULL, 10) : 0; if (data.serial == UINT_MAX && errno == ERANGE) throw PDNSException("serial number too large in '"+parts[2]+"'"); data.refresh = pleft > 3 ? atoi(parts[3].c_str()) diff --git a/pdns/misc.cc b/pdns/misc.cc index bc063f66da..af5d89cdb9 100644 --- a/pdns/misc.cc +++ b/pdns/misc.cc @@ -917,7 +917,7 @@ void setSocketTimestamps(int fd) #endif } -uint32_t strtoui(const char *nptr, char **endptr, int base) +uint32_t pdns_strtoui(const char *nptr, char **endptr, int base) { unsigned long val = strtoul(nptr, endptr, base); if (val > UINT_MAX) { diff --git a/pdns/misc.hh b/pdns/misc.hh index d760f6b9a8..803532df6e 100644 --- a/pdns/misc.hh +++ b/pdns/misc.hh @@ -87,7 +87,7 @@ uint16_t getShort(const unsigned char *p); uint16_t getShort(const char *p); uint32_t getLong(const unsigned char *p); uint32_t getLong(const char *p); -uint32_t strtoui(const char *nptr, char **endptr, int base); +uint32_t pdns_strtoui(const char *nptr, char **endptr, int base); int logFacilityToLOG(unsigned int facility); diff --git a/pdns/rcpgenerator.cc b/pdns/rcpgenerator.cc index a5b04c4e5d..b088b100e9 100644 --- a/pdns/rcpgenerator.cc +++ b/pdns/rcpgenerator.cc @@ -62,7 +62,7 @@ void RecordTextReader::xfr32BitInt(uint32_t &val) throw RecordTextException("expected digits at position "+lexical_cast(d_pos)+" in '"+d_string+"'"); char *endptr; - unsigned long ret=strtoui(d_string.c_str() + d_pos, &endptr, 10); + unsigned long ret=pdns_strtoui(d_string.c_str() + d_pos, &endptr, 10); if (ret == UINT_MAX && errno == ERANGE) throw RecordTextException("serial number too large in '"+d_string+"'"); val=ret;