[packages] rtorrent: update to 0.8.6_r1130 (#6685)

git-svn-id: svn://svn.openwrt.org/openwrt/packages@19651 3c298f89-4303-0410-b956-a3cf2f4a3e73
This commit is contained in:
swalker
2010-02-16 03:06:27 +00:00
parent 5f05a363e8
commit 5c992a98e5
4 changed files with 33 additions and 42 deletions

View File

@ -1,8 +1,14 @@
Index: rtorrent/rak/allocators.h
===================================================================
--- rtorrent/rak/allocators.h (revision 1121)
+++ rtorrent/rak/allocators.h (working copy)
@@ -74,17 +74,13 @@
--- a/rak/allocators.h
+++ b/rak/allocators.h
@@ -42,6 +42,7 @@
#include <cstddef>
#include <limits>
#include <stdlib.h>
+#include <stdint.h>
#include <sys/types.h>
namespace rak {
@@ -74,17 +75,13 @@ public:
size_type max_size () const throw() { return std::numeric_limits<size_t>::max() / sizeof(T); }
pointer allocate(size_type num, const_void_pointer hint = 0) { return alloc_size(num*sizeof(T)); }
@ -11,19 +17,19 @@ Index: rtorrent/rak/allocators.h
- static pointer alloc_size(size_type size) {
- pointer ptr = NULL;
- int __UNUSED result = posix_memalign((void**)&ptr, LT_SMP_CACHE_BYTES, size);
-
- return ptr;
- }
+ static pointer alloc_size(size_type size);
+ static void dealloc_size(pointer p, size_type size);
- return ptr;
- }
-
void construct (pointer p, const T& value) { new((void*)p)T(value); }
void destroy (pointer p) { p->~T(); }
- void deallocate (pointer p, size_type num) { ::operator delete((void*)p); }
};
@@ -98,8 +94,38 @@
@@ -98,6 +95,36 @@ bool operator!= (const cacheline_allocat
return false;
}
@ -46,8 +52,8 @@ Index: rtorrent/rak/allocators.h
+#endif
+
+ return ptr;
}
+}
+
+template <class T>
+inline void cacheline_allocator<T>::dealloc_size(pointer p, size_type size) {
+#if HAVE_POSIX_MEMALIGN
@ -57,8 +63,6 @@ Index: rtorrent/rak/allocators.h
+#endif
+}
+
+}
+
//
// Operator new with custom allocators:
}
//