patch from #744; thanks Tristan
authorMike Baker <mbm@openwrt.org>
Wed, 6 Sep 2006 17:19:25 +0000 (17:19 +0000)
committerMike Baker <mbm@openwrt.org>
Wed, 6 Sep 2006 17:19:25 +0000 (17:19 +0000)
SVN-Revision: 4762

libs/uclibc++/patches/001-lower_bound.patch [new file with mode: 0644]

diff --git a/libs/uclibc++/patches/001-lower_bound.patch b/libs/uclibc++/patches/001-lower_bound.patch
new file mode 100644 (file)
index 0000000..9780b97
--- /dev/null
@@ -0,0 +1,157 @@
+diff -Nur uClibc++-0.2.0/include/map uClibc++-0.2.0-patched/include/map
+--- uClibc++-0.2.0/include/map 2006-02-28 17:35:16.000000000 -0800
++++ uClibc++-0.2.0-patched/include/map 2006-09-06 00:42:25.000000000 -0700
+@@ -599,7 +599,7 @@
+                       return retval;
+                 }
+-              retval.first = lower_bound(x.first);
++              retval.first = __base_map<Key, T, Compare, Allocator>::lower_bound(x.first);
+               //No match - this should never happen
+               if(retval.first == end()){
+@@ -616,7 +616,7 @@
+               typename deque<pair<Key, T>, allocator<pair<Key, T> > >::iterator q(&data, retval.first.element);
+               data.insert(q, x);
+-              retval.first = lower_bound(x.first);        //Need to refind because insert can move data around
++              retval.first = __base_map<Key, T, Compare, Allocator>::lower_bound(x.first);        //Need to refind because insert can move data around
+               retval.second = true;
+               return retval;
+@@ -680,7 +680,7 @@
+                       return end();
+               }
+-              iterator retval = lower_bound(x);
++              iterator retval = __base_map<Key, T, Compare, Allocator>::lower_bound(x);
+               if(retval == end()){
+                       return retval;
+@@ -702,7 +702,7 @@
+                       return end();
+               }
+-              const_iterator retval = lower_bound(x);
++              const_iterator retval = __base_map<Key, T, Compare, Allocator>::lower_bound(x);
+               if(retval == end()){
+                       return retval;
+@@ -730,7 +730,7 @@
+               typename map<Key, T, Compare, Allocator>::iterator
+               map<Key, T, Compare, Allocator>::upper_bound(const key_type& x)
+       {
+-              typename map<Key, T, Compare, Allocator>::iterator i = lower_bound(x);
++              typename map<Key, T, Compare, Allocator>::iterator i = __base_map<Key, T, Compare, Allocator>::lower_bound(x);
+               if( i != end() && !c(x, i->first) ){
+                       ++i;
+               }
+@@ -741,7 +741,7 @@
+               typename map<Key, T, Compare, Allocator>::const_iterator
+               map<Key, T, Compare, Allocator>::upper_bound(const key_type& x) const
+       {
+-              typename map<Key, T, Compare, Allocator>::const_iterator i = lower_bound(x);
++              typename map<Key, T, Compare, Allocator>::const_iterator i = __base_map<Key, T, Compare, Allocator>::lower_bound(x);
+               if(i != end() && !c(x, i->first)){
+                       ++i;
+               }
+@@ -757,8 +757,8 @@
+               pair<   typename map<Key, T, Compare, Allocator>::iterator,
+                         typename map<Key, T, Compare, Allocator>::iterator
+                 > retval;
+-              retval.first = lower_bound(x);
+-              retval.second = upper_bound(x);
++              retval.first = __base_map<Key, T, Compare, Allocator>::lower_bound(x);
++              retval.second = __base_map<Key, T, Compare, Allocator>::upper_bound(x);
+               return retval;          
+       }
+@@ -770,8 +770,8 @@
+               pair<   typename map<Key, T, Compare, Allocator>::const_iterator,
+                         typename map<Key, T, Compare, Allocator>::const_iterator
+                 > retval;
+-              retval.first = lower_bound(x);
+-              retval.second = upper_bound(x);
++              retval.first = __base_map<Key, T, Compare, Allocator>::lower_bound(x);
++              retval.second = __base_map<Key, T, Compare, Allocator>::upper_bound(x);
+               return retval;          
+       }
+@@ -902,7 +902,7 @@
+                       return end();
+                 }
+-              retval = lower_bound(x.first);
++              retval = __base_map<Key, T, Compare, Allocator>::lower_bound(x.first);
+               //No match - this should never happen
+               if(retval == end()){
+@@ -973,8 +973,8 @@
+               typename multimap<Key, T, Compare, Allocator>::size_type
+               multimap<Key, T, Compare, Allocator>::erase(const key_type& x)
+       {
+-              typename multimap<Key, T, Compare, Allocator>::iterator f = lower_bound(x);
+-              typename multimap<Key, T, Compare, Allocator>::iterator l = upper_bound(x);
++              typename multimap<Key, T, Compare, Allocator>::iterator f = __base_map<Key, T, Compare, Allocator>::lower_bound(x);
++              typename multimap<Key, T, Compare, Allocator>::iterator l = __base_map<Key, T, Compare, Allocator>::upper_bound(x);
+               size_type t = l.element - f.element;
+               erase(f, l);
+               return t;
+@@ -999,7 +999,7 @@
+                       return end();
+               }
+-              iterator retval = lower_bound(x);
++              iterator retval = __base_map<Key, T, Compare, Allocator>::lower_bound(x);
+               if(retval == end()){
+                       return retval;
+@@ -1027,7 +1027,7 @@
+               if(data.size() == 0){
+                       return end();
+               }
+-              const_iterator retval = lower_bound(x);
++              const_iterator retval = __base_map<Key, T, Compare, Allocator>::lower_bound(x);
+               if(retval == end()){
+                       return retval;
+@@ -1065,7 +1065,7 @@
+               typename multimap<Key, T, Compare, Allocator>::iterator
+               multimap<Key, T, Compare, Allocator>::upper_bound(const key_type& x)
+       {
+-              typename multimap<Key, T, Compare, Allocator>::iterator i = lower_bound(x);
++              typename multimap<Key, T, Compare, Allocator>::iterator i = __base_map<Key, T, Compare, Allocator>::lower_bound(x);
+               while(i != end() && !c(x, i->first)){
+                       ++i;
+@@ -1077,7 +1077,7 @@
+               typename multimap<Key, T, Compare, Allocator>::const_iterator
+               multimap<Key, T, Compare, Allocator>::upper_bound(const key_type& x) const
+       {
+-              typename multimap<Key, T, Compare, Allocator>::const_iterator i = lower_bound(x);
++              typename multimap<Key, T, Compare, Allocator>::const_iterator i = __base_map<Key, T, Compare, Allocator>::lower_bound(x);
+               while(i != end() && !c(x, i->first)){
+                       ++i;
+@@ -1094,8 +1094,8 @@
+               pair<   typename multimap<Key, T, Compare, Allocator>::iterator,
+                         typename multimap<Key, T, Compare, Allocator>::iterator
+                 > retval;
+-              retval.first = lower_bound(x);
+-              retval.second = upper_bound(x);
++              retval.first = __base_map<Key, T, Compare, Allocator>::lower_bound(x);
++              retval.second = __base_map<Key, T, Compare, Allocator>::upper_bound(x);
+               return retval;          
+       }
+@@ -1107,8 +1107,8 @@
+               pair<   typename multimap<Key, T, Compare, Allocator>::const_iterator,
+                         typename multimap<Key, T, Compare, Allocator>::const_iterator
+                 > retval;
+-              retval.first = lower_bound(x);
+-              retval.second = upper_bound(x);
++              retval.first = __base_map<Key, T, Compare, Allocator>::lower_bound(x);
++              retval.second = __base_map<Key, T, Compare, Allocator>::upper_bound(x);
+               return retval;          
+       }