- Fix build on FreeBSD 6

PR:		ports/77480
Submitted by:	Ralf van der Enden <tremere@cainites.net> (maintainer)
This commit is contained in:
Pav Lucistnik 2005-02-14 21:41:38 +00:00
parent 19fae4d1f7
commit 1c651cda9c
Notes: svn2git 2021-03-31 03:12:20 +00:00
svn path=/head/; revision=128856
6 changed files with 78 additions and 8 deletions

View file

@ -32,10 +32,6 @@ LIBMAP_CONF= /etc/libmap.conf
.include <bsd.port.pre.mk>
.if ${OSVERSION} >= 600000
BROKEN= "Does not compile on FreeBSD 6.0"
.endif
# use user config if possible
.if exists(${WRKDIRPREFIX}${.CURDIR}/Makefile.inc)
.include "${WRKDIRPREFIX}${.CURDIR}/Makefile.inc"

View file

@ -0,0 +1,28 @@
--- pdns/logger.cc.orig Fri Feb 11 12:49:28 2005
+++ pdns/logger.cc Fri Feb 11 12:51:16 2005
@@ -131,6 +131,25 @@
return *this;
}
+Logger& Logger::operator<<(long i)
+{
+ ostringstream tmp;
+ tmp<<i;
+
+ *this<<tmp.str();
+
+ return *this;
+}
+
+Logger& Logger::operator<<(unsigned long i)
+{
+ ostringstream tmp;
+ tmp<<i;
+
+ *this<<tmp.str();
+
+ return *this;
+}
Logger& Logger::operator<<(ostream & (&)(ostream &))
{

View file

@ -0,0 +1,11 @@
--- pdns/logger.hh.orig Sat Jan 29 12:51:20 2005
+++ pdns/logger.hh Sat Jan 29 12:52:22 2005
@@ -111,6 +111,8 @@
Logger& operator<<(const string &s); //!< log a string
Logger& operator<<(int); //!< log an int
Logger& operator<<(unsigned int); //!< log an unsigned int
+ Logger& operator<<(long); //!< log a long
+ Logger& operator<<(unsigned long); //!< log an unsigned long
Logger& operator<<(Urgency); //!< set the urgency, << style
#ifndef WIN32

View file

@ -32,10 +32,6 @@ LIBMAP_CONF= /etc/libmap.conf
.include <bsd.port.pre.mk>
.if ${OSVERSION} >= 600000
BROKEN= "Does not compile on FreeBSD 6.0"
.endif
# use user config if possible
.if exists(${WRKDIRPREFIX}${.CURDIR}/Makefile.inc)
.include "${WRKDIRPREFIX}${.CURDIR}/Makefile.inc"

View file

@ -0,0 +1,28 @@
--- pdns/logger.cc.orig Fri Feb 11 12:49:28 2005
+++ pdns/logger.cc Fri Feb 11 12:51:16 2005
@@ -131,6 +131,25 @@
return *this;
}
+Logger& Logger::operator<<(long i)
+{
+ ostringstream tmp;
+ tmp<<i;
+
+ *this<<tmp.str();
+
+ return *this;
+}
+
+Logger& Logger::operator<<(unsigned long i)
+{
+ ostringstream tmp;
+ tmp<<i;
+
+ *this<<tmp.str();
+
+ return *this;
+}
Logger& Logger::operator<<(ostream & (&)(ostream &))
{

View file

@ -0,0 +1,11 @@
--- pdns/logger.hh.orig Sat Jan 29 12:51:20 2005
+++ pdns/logger.hh Sat Jan 29 12:52:22 2005
@@ -111,6 +111,8 @@
Logger& operator<<(const string &s); //!< log a string
Logger& operator<<(int); //!< log an int
Logger& operator<<(unsigned int); //!< log an unsigned int
+ Logger& operator<<(long); //!< log a long
+ Logger& operator<<(unsigned long); //!< log an unsigned long
Logger& operator<<(Urgency); //!< set the urgency, << style
#ifndef WIN32