diff options
author | Carlos Silva <r3pek@gentoo.org> | 2007-07-30 21:34:10 +0000 |
---|---|---|
committer | Carlos Silva <r3pek@gentoo.org> | 2007-07-30 21:34:10 +0000 |
commit | bb47f6978f8a3b13b7d17c617e61ac46472f48f3 (patch) | |
tree | 7c0b2ef55b8e65e3a7e60a78087f8ff503f0e865 /net-libs/libfwbuilder/files | |
parent | USE32 is redundent with elf (diff) | |
download | gentoo-2-bb47f6978f8a3b13b7d17c617e61ac46472f48f3.tar.gz gentoo-2-bb47f6978f8a3b13b7d17c617e61ac46472f48f3.tar.bz2 gentoo-2-bb47f6978f8a3b13b7d17c617e61ac46472f48f3.zip |
Fix compilation with gcc 4.2. Closes bug #186706. Thanks to Tiziano for the patch.
(Portage version: 2.1.2.9)
Diffstat (limited to 'net-libs/libfwbuilder/files')
-rw-r--r-- | net-libs/libfwbuilder/files/digest-libfwbuilder-2.1.13-r1 (renamed from net-libs/libfwbuilder/files/digest-libfwbuilder-2.1.13) | 0 | ||||
-rw-r--r-- | net-libs/libfwbuilder/files/libfwbuilder-2.1.13-gcc42.patch | 366 |
2 files changed, 366 insertions, 0 deletions
diff --git a/net-libs/libfwbuilder/files/digest-libfwbuilder-2.1.13 b/net-libs/libfwbuilder/files/digest-libfwbuilder-2.1.13-r1 index 90435f59c38d..90435f59c38d 100644 --- a/net-libs/libfwbuilder/files/digest-libfwbuilder-2.1.13 +++ b/net-libs/libfwbuilder/files/digest-libfwbuilder-2.1.13-r1 diff --git a/net-libs/libfwbuilder/files/libfwbuilder-2.1.13-gcc42.patch b/net-libs/libfwbuilder/files/libfwbuilder-2.1.13-gcc42.patch new file mode 100644 index 000000000000..10e73cc895eb --- /dev/null +++ b/net-libs/libfwbuilder/files/libfwbuilder-2.1.13-gcc42.patch @@ -0,0 +1,366 @@ +diff -Naurdb libfwbuilder-2.1.13.orig/src/fwbuilder/BackgroundOp.cpp libfwbuilder-2.1.13/src/fwbuilder/BackgroundOp.cpp +--- libfwbuilder-2.1.13.orig/src/fwbuilder/BackgroundOp.cpp 2007-07-26 17:33:28.000000000 +0200 ++++ libfwbuilder-2.1.13/src/fwbuilder/BackgroundOp.cpp 2007-07-26 17:35:40.000000000 +0200 +@@ -142,7 +142,9 @@ + stop_program->unlock(); + } + +-void *libfwbuilder::background_thread(void *args) ++namespace libfwbuilder ++{ ++void *background_thread(void *args) + { + void **void_pair=(void**)args; + +@@ -212,6 +214,7 @@ + return(NULL); + } + ++} + + + +diff -Naurdb libfwbuilder-2.1.13.orig/src/fwbuilder/crypto.cpp libfwbuilder-2.1.13/src/fwbuilder/crypto.cpp +--- libfwbuilder-2.1.13.orig/src/fwbuilder/crypto.cpp 2007-07-26 17:33:28.000000000 +0200 ++++ libfwbuilder-2.1.13/src/fwbuilder/crypto.cpp 2007-07-26 17:36:19.000000000 +0200 +@@ -35,7 +35,10 @@ + // # warning "openssl library not present - all crypto code is disabled." + // #endif + +-void libfwbuilder::init_ssl() ++namespace libfwbuilder ++{ ++ ++void init_ssl() + { + #ifdef HAVE_LIBSSL + /* Initialize OpenSSL library */ +@@ -49,7 +52,7 @@ + * This is quick and dirty implementation using OpenSSL BIO + * API. + */ +-int libfwbuilder::unbase64(const char *in, char **out) throw(libfwbuilder::FWException) ++int unbase64(const char *in, char **out) throw(libfwbuilder::FWException) + { + #ifdef HAVE_LIBSSL + char *ncin=cxx_strdup(in); +@@ -80,6 +83,7 @@ + #endif + } + ++} + + #ifdef HAVE_LIBSSL + +diff -Naurdb libfwbuilder-2.1.13.orig/src/fwbuilder/dns.cpp libfwbuilder-2.1.13/src/fwbuilder/dns.cpp +--- libfwbuilder-2.1.13.orig/src/fwbuilder/dns.cpp 2007-07-26 17:33:28.000000000 +0200 ++++ libfwbuilder-2.1.13/src/fwbuilder/dns.cpp 2007-07-26 17:47:12.000000000 +0200 +@@ -67,7 +67,10 @@ + Mutex *DNS::gethostbyname_mutex; + Mutex *DNS::gethostbyaddr_mutex; + +-void libfwbuilder::init_dns() throw(FWException) ++namespace libfwbuilder
++{
++
++void init_dns() throw(FWException)
+ { + DNS::init(); + +@@ -88,6 +91,8 @@ + + } + ++}
++
+ void DNS::init() + { + gethostbyname_mutex = new Mutex(); +@@ -814,7 +819,10 @@ + pthread_attr_destroy(&tattr); + } + +-void* libfwbuilder::DNS_bulkBackResolve_Thread(void *args) ++namespace libfwbuilder
++{
++
++void* DNS_bulkBackResolve_Thread(void *args)
+ { + std::ostringstream str; + void **void_pair=(void**)args; +@@ -892,6 +900,8 @@ + return NULL; + } + ++}
++
+ void DNS_bulkBackResolve_query::run_impl(Logger *logger,SyncFlag *stop_program) throw(FWException) + { + queue_mutex.lock(); +diff -Naurdb libfwbuilder-2.1.13.orig/src/fwbuilder/IPAddress.cpp libfwbuilder-2.1.13/src/fwbuilder/IPAddress.cpp +--- libfwbuilder-2.1.13.orig/src/fwbuilder/IPAddress.cpp 2007-07-26 17:33:28.000000000 +0200 ++++ libfwbuilder-2.1.13/src/fwbuilder/IPAddress.cpp 2007-07-26 17:53:20.000000000 +0200 +@@ -100,7 +100,10 @@ + return x; + } + +-bool libfwbuilder::operator<(const IPAddress &a, const IPAddress &b) ++namespace libfwbuilder
++{
++
++bool operator<(const IPAddress &a, const IPAddress &b)
+ { + guint32 a1=ntohl( a.to32BitInt() ); + guint32 a2=ntohl( b.to32BitInt() ); +@@ -113,7 +116,7 @@ + #endif + } + +-bool libfwbuilder::operator==(const IPAddress &a, const IPAddress &b) ++bool operator==(const IPAddress &a, const IPAddress &b)
+ { + for(int i=0;i<4;i++) + if(a.octets[i]!=b.octets[i]) +@@ -121,7 +124,7 @@ + return true; + } + +-bool libfwbuilder::operator==(const Netmask &a, const Netmask &b) ++bool operator==(const Netmask &a, const Netmask &b)
+ { + for(int i=0;i<4;i++) + if(a.octets[i]!=b.octets[i]) +@@ -129,6 +132,7 @@ + return true; + } + ++}
+ + IPAddress::IPAddress(const string &s) throw(FWException, FWNotSupportedException) + { +@@ -147,8 +151,11 @@ + return *this; + } + ++namespace libfwbuilder
++{
++
+ /* TODO: use operator ulong() when it is fixed */ +-IPAddress libfwbuilder::operator+(const IPAddress &a,const IPAddress &b) ++IPAddress operator+(const IPAddress &a,const IPAddress &b)
+ { + guint32 x=0l; + int i;
+@@ -165,7 +172,7 @@ + } + + /* TODO: use operator ulong() when it is fixed */ +-IPAddress libfwbuilder::operator-(const IPAddress &a,const IPAddress &b) ++IPAddress operator-(const IPAddress &a,const IPAddress &b)
+ { + guint32 x=0l; + int i;
+@@ -181,7 +188,7 @@ + return IPAddress(&na); + } + +-IPAddress libfwbuilder::operator+(const IPAddress &addr,int increment) ++IPAddress operator+(const IPAddress &addr,int increment)
+ { + guint32 a= ntohl( addr.to32BitInt() ); + a++; +@@ -191,7 +198,7 @@ + return IPAddress(&na); + } + +-IPAddress libfwbuilder::operator-(const IPAddress &addr,int decrement) ++IPAddress operator-(const IPAddress &addr,int decrement)
+ { + guint32 a=ntohl( addr.to32BitInt() ); + a--; +@@ -201,6 +208,8 @@ + return IPAddress(&na); + } + ++}
++
+ IPAddress& IPAddress::addMask(const Netmask &nm) + { + for (int i=0; i<4; i++) +@@ -286,7 +295,10 @@ + return *this; + } + +-Netmask libfwbuilder::operator~(const Netmask &nm) ++namespace libfwbuilder
++{
++
++Netmask operator~(const Netmask &nm)
+ { + Netmask res; + for (int i=0; i<4; i++) +@@ -295,6 +307,8 @@ + return res; + } + ++}
++
+ Netmask::Netmask(const IPAddress &a) + { + octets[0]=255; +@@ -409,18 +423,21 @@ + return *this; + } + +-bool libfwbuilder::operator==(const IPNetwork &a, const IPNetwork &b) ++namespace libfwbuilder
++{
++
++bool operator==(const IPNetwork &a, const IPNetwork &b)
+ { + return a.getNetmask()==b.getNetmask() && a.getAddress()==b.getAddress(); + } + +-bool libfwbuilder::operator<(const IPNetwork &a, const IPNetwork &b) ++bool operator<(const IPNetwork &a, const IPNetwork &b)
+ { + return a.getAddress()<b.getAddress(); + } + + /* this is just a better interface to _convert_range_to_networks */ +-vector<IPNetwork> libfwbuilder::convertAddressRange(const IPAddress &start, ++vector<IPNetwork> convertAddressRange(const IPAddress &start,
+ const IPAddress &end) + { + vector<IPNetwork> res; +@@ -428,6 +445,8 @@ + return res; + } + ++}
++
+ bool IPNetwork::_convert_range_to_networks(const IPAddress &start, + const IPAddress &end, + vector<IPNetwork> &res) +@@ -512,8 +531,10 @@ + return false; + } + ++namespace libfwbuilder
++{
+ +-vector<IPNetwork> libfwbuilder::getOverlap(const IPNetwork &n1,const IPNetwork &n2) ++vector<IPNetwork> getOverlap(const IPNetwork &n1,const IPNetwork &n2)
+ { + IPAddress s1 = n1.getAddress(); + IPAddress s2 = n2.getAddress(); +@@ -558,7 +579,7 @@ + return res; + } + +-vector<IPNetwork> libfwbuilder::substract(const IPNetwork &n1,const IPNetwork &n2) ++vector<IPNetwork> substract(const IPNetwork &n1,const IPNetwork &n2)
+ { + IPAddress n1s = n1.getAddress(); + IPAddress n2s = n2.getAddress(); +@@ -623,6 +644,8 @@ + return res; + } + ++}
++
+ IPRoute::IPRoute(const IPRoute &o) + { + nm = o.nm ; +diff -Naurdb libfwbuilder-2.1.13.orig/src/fwbuilder/Tools.cpp libfwbuilder-2.1.13/src/fwbuilder/Tools.cpp +--- libfwbuilder-2.1.13.orig/src/fwbuilder/Tools.cpp 2007-07-26 17:33:28.000000000 +0200 ++++ libfwbuilder-2.1.13/src/fwbuilder/Tools.cpp 2007-07-26 17:48:41.000000000 +0200 +@@ -59,14 +59,17 @@ + + using namespace std; + +-char *libfwbuilder::cxx_strdup(const string &x) ++namespace libfwbuilder ++{ ++ ++char *cxx_strdup(const string &x) + { + char *res=new char[x.length()+1]; + strcpy(res, x.c_str()); + return res; + } + +-char *libfwbuilder::cxx_strdup(const char *x) ++char *cxx_strdup(const char *x) + { + if(!x) + return (char*)NULL; +@@ -76,14 +79,14 @@ + return res; + } + +-string libfwbuilder::int2string(int n) ++string int2string(int n) + { + char x[32]; + sprintf(x,"%d", n); + return x; + } + +-string libfwbuilder::substituteMacros(const string &source, const map<string, string> ¯os, bool strict) throw(libfwbuilder::FWException) ++string substituteMacros(const string &source, const map<string, string> ¯os, bool strict) throw(libfwbuilder::FWException) + { + string name; + string res; +@@ -141,7 +144,7 @@ + return res; + } + +-char *libfwbuilder::cxx_strtok_r(char *s, const char *delim, char **save_ptr) ++char *cxx_strtok_r(char *s, const char *delim, char **save_ptr) + { + #ifndef HAVE_STRTOK_R + char *token; +@@ -173,7 +176,7 @@ + #endif + } + +-int libfwbuilder::cxx_strcasecmp(const char *s1, const char *s2) ++int cxx_strcasecmp(const char *s1, const char *s2) + { + #ifndef _WIN32 + return ::strcasecmp(s1,s2); +@@ -183,7 +186,7 @@ + } + + +-void libfwbuilder::init() ++void init() + { + #ifdef _WIN32 + WORD wVersionRequested; +@@ -230,7 +233,7 @@ + * dir - directory + * ext - file extension mask, should be just "xml" rather than "*.xml" + */ +-list<string> libfwbuilder::getDirList(const std::string &dir, ++list<string> getDirList(const std::string &dir, + const std::string &ext) + { + list<string> res; +@@ -273,7 +276,7 @@ + return res; + } + +-unsigned int libfwbuilder::cxx_sleep(unsigned int seconds) ++unsigned int cxx_sleep(unsigned int seconds) + { + #ifndef _WIN32 + return sleep(seconds); +@@ -283,5 +286,4 @@ + #endif + } + +- +- ++} |