pkgsrc/net/irrtoolset-nox11/patches/patch-an
spz 950a1c977c make compilation with gcc 2.95.* work (mostly by rolling back includes
changes from IRRToolSet 4.8.1 within #if (__GNUC__ > 2) .. #else)
also incidentially fixes a bug in rusage.cc
2005-03-06 11:40:21 +00:00

95 lines
2.2 KiB
Text

$NetBSD: patch-an,v 1.2 2005/03/06 11:40:21 spz Exp $
--- src/normalform/RadixSet.hh.orig 2004-07-30 12:58:13.000000000 +0200
+++ src/normalform/RadixSet.hh
@@ -76,7 +76,12 @@ extern FixedSizeAllocator RadixTreeAlloc
class RadixTree {
public:
+#if (__GNUC__ > 2)
+ friend class Iterator;
+ class Iterator {
+#else
friend class Iterator {
+#endif
private:
const RadixTree* last;
const RadixTree* root;
@@ -155,7 +160,12 @@ class RadixSet {
public:
static bool compressedPrint;
+#if (__GNUC__ > 2)
+ friend class Iterator;
+ class Iterator {
+#else
friend class Iterator {
+#endif
private:
RadixTree::Iterator itr;
const RadixTree *now; // points to current node during iteration
@@ -166,7 +176,12 @@ public:
bool next(u_int &_addr, u_int &_leng, u_int64_t &rngs);
};
+#if (__GNUC__ > 2)
+ friend class SortedIterator;
+ class SortedIterator {
+#else
friend class SortedIterator {
+#endif
private:
class PrefixLNode : public ListNode {
public:
@@ -189,7 +204,12 @@ public:
bool next(u_int &_addr, u_int &_leng, u_int64_t &_rngs);
};
+#if (__GNUC__ > 2)
+ friend class PrefixIterator;
+ class PrefixIterator {
+#else
friend class PrefixIterator {
+#endif
private:
RadixTree::Iterator itr;
const RadixTree *current;
@@ -206,7 +226,12 @@ public:
bool next(u_int &_addr, u_int &_leng);
};
+#if (__GNUC__ > 2)
+ friend class SortedPrefixIterator;
+ class SortedPrefixIterator {
+#else
friend class SortedPrefixIterator {
+#endif
private:
class PrefixLNode : public ListNode {
public:
@@ -228,7 +253,12 @@ public:
bool next(u_int &_addr, u_int &_leng);
};
+#if (__GNUC__ > 2)
+ friend class PrefixRangeIterator;
+ class PrefixRangeIterator {
+#else
friend class PrefixRangeIterator {
+#endif
private:
RadixTree::Iterator itr;
const RadixTree *current;
@@ -259,7 +289,12 @@ public:
}
};
+#if (__GNUC__ > 2)
+ friend class SortedPrefixRangeIterator;
+ class SortedPrefixRangeIterator {
+#else
friend class SortedPrefixRangeIterator {
+#endif
private:
class PrefixLNode : public ListNode {
public: