diff options
author | tron <tron> | 2013-06-02 22:52:14 +0000 |
---|---|---|
committer | tron <tron> | 2013-06-02 22:52:14 +0000 |
commit | 72519d0e9c24bb69323ddf6568217d4e77e19e78 (patch) | |
tree | 86e2b39c908d7baf103be2df1bdde7af58dadbb4 /net | |
parent | 222c2e25a8a050857e7fd06c52dfc88506274afc (diff) | |
download | pkgsrc-72519d0e9c24bb69323ddf6568217d4e77e19e78.tar.gz |
Back out all of the C++11 related patches. They don't only break the
build under Mac OS X but also under NetBSD/amd64 6.1 with the default
G++ compiler.
This fixes PR pkg/47873 by myself.
Diffstat (limited to 'net')
90 files changed, 8 insertions, 4163 deletions
diff --git a/net/libtorrent/Makefile b/net/libtorrent/Makefile index afa68adf9ef..7ff5aff43ef 100644 --- a/net/libtorrent/Makefile +++ b/net/libtorrent/Makefile @@ -1,7 +1,7 @@ -# $NetBSD: Makefile,v 1.48 2013/05/09 14:26:41 joerg Exp $ +# $NetBSD: Makefile,v 1.49 2013/06/02 22:52:14 tron Exp $ DISTNAME= libtorrent-0.13.2 -PKGREVISION= 3 +PKGREVISION= 4 CATEGORIES= net MASTER_SITES= ${HOMEPAGE:=downloads/} diff --git a/net/libtorrent/distinfo b/net/libtorrent/distinfo index dde01e26b69..8eb6cdf1a9b 100644 --- a/net/libtorrent/distinfo +++ b/net/libtorrent/distinfo @@ -1,48 +1,6 @@ -$NetBSD: distinfo,v 1.31 2013/05/12 11:30:13 tron Exp $ +$NetBSD: distinfo,v 1.32 2013/06/02 22:52:14 tron Exp $ SHA1 (libtorrent-0.13.2.tar.gz) = 4f34a744fbe10c54aaf53d34681fabc1a49d7257 RMD160 (libtorrent-0.13.2.tar.gz) = 090e6af9b4318a6176064159f6a8f70ab708c7fe Size (libtorrent-0.13.2.tar.gz) = 725088 bytes SHA1 (patch-rak_priority__queue__default.h) = 2eee25447516efd1ac13d1a35232c29a7457c0df -SHA1 (patch-src_Makefile.am) = e69dd1da8a9736fa45af71cfc167c8b89a7fe648 -SHA1 (patch-src_Makefile.in) = 522fbdb8da913d351fd86aface86aa2d1d86b5cc -SHA1 (patch-src_data_chunk__list.cpp) = 4b09b093ca5f2abdb7e4d3c1c0bdb9fdfcd4f981 -SHA1 (patch-src_data_chunk__list.h) = 124832de1fd5ccaa1f89ba8b6d26fd74373e619e -SHA1 (patch-src_data_hash__check__queue.h) = a0f2118ca92309472e402e441fa6f37706a4e1b8 -SHA1 (patch-src_data_hash__queue.cc) = c0a7395f76df2db73315e4cae5b8729c4af29d67 -SHA1 (patch-src_data_hash__queue.h) = 273cdd39bf3f0a33f0f29fd38e11c43861a5fc35 -SHA1 (patch-src_data_hash__queue__node.h) = 9a08d707b264fd1a766dfb2838754aeccb9cce78 -SHA1 (patch-src_data_memory__chunk.h) = 56d8abd0ccb45a1ede73d419fbf719acf9032064 -SHA1 (patch-src_dht_dht__router.cc) = c93ca74a9ce0c967c0787729699ed7e83b869a1d -SHA1 (patch-src_dht_dht__server.cc) = c68de65ab4fe70dfb9774b68a49481afd766bea0 -SHA1 (patch-src_download_download__main.cc) = 8db4a0cf50b9cf1653ebc4712f22089cad60da67 -SHA1 (patch-src_download_download__wrapper.cc) = 1b31c8a081bcd89cb2c808f94812e6a121a993ae -SHA1 (patch-src_manager.cc) = 045b6400168f5b75e18a11385d9d2aa84e28b266 -SHA1 (patch-src_net_socket__set.h) = d605091efa57560177a647d18f29edd375b18663 -SHA1 (patch-src_net_throttle__internal.cc) = fc7517ec4e54298003d7bd6d07f3e6cc7a4e6e17 -SHA1 (patch-src_protocol_handshake.cc) = 55ae0d5e14b87a32de6acfc8c414efa8e2f65ce9 -SHA1 (patch-src_torrent_data_download__data.h) = 78146905e0e2c9889bab242364c6b9896c3bf6f5 -SHA1 (patch-src_torrent_data_file.h) = 905dde7e6319db95f378668180b7f34083dc0e85 -SHA1 (patch-src_torrent_download__info.h) = e8c2a4b4e473340f938526870abb32a6a0a3a002 -SHA1 (patch-src_torrent_download_choke__group.cc) = 53e0928681faaea968a6f7bb995d5a05b27cc8d8 -SHA1 (patch-src_torrent_download_choke__queue.cc) = 23c4ad6ae1fb69ff864e115a1b062df96ba0aedb -SHA1 (patch-src_torrent_download_choke__queue.h) = b8c0aea053129e155cf789ab3822cd4911150ca1 -SHA1 (patch-src_torrent_download_group__entry.h) = b21eb5ac05f84131a73443cfee86bbf9414b8642 -SHA1 (patch-src_torrent_download_resource__manager.cc) = 9c89fba82dfc47c6f9c1fbc29b97a4bd74fc7331 -SHA1 (patch-src_torrent_http.h) = 576af4dd1c966f5292d0623bf258a7990c525e65 -SHA1 (patch-src_torrent_peer_client__list.cc) = c36735fff0e8f56c2b0b45652707250551e6fd4b -SHA1 (patch-src_torrent_peer_connection__list.h) = f7e5a568476bbc9668757ffd1929773048d07c4e -SHA1 (patch-src_torrent_poll.h) = cbe839e43820eb5af0e47c4231d79c6852d8b54c -SHA1 (patch-src_torrent_tracker__controller.cc) = f0a3805da9c8639269c3e777e48b112849625280 -SHA1 (patch-src_torrent_tracker__controller.h) = 549006debffac8431567bae01b59f0c30fda54c9 -SHA1 (patch-src_torrent_tracker__list.cc) = 3c66814bf6bd4764b9c48bfc50571f94741e6662 -SHA1 (patch-src_torrent_tracker__list.h) = 5365b610fcebe333a9c71a088db950dd4148756f -SHA1 (patch-src_torrent_utils_extents.h) = 37e69944bdb63e831ecf07a7a6316bf7d1bd7e24 -SHA1 (patch-src_torrent_utils_log.cc) = 80006a0bcd010d2870f6a3c90d35fa52d812a841 -SHA1 (patch-src_torrent_utils_log.h) = 6bf8633d1470a9577c320333051aa80bb6713cbf -SHA1 (patch-src_torrent_utils_log__buffer.cc) = 091ad4d5dd054eff06f26a872478cedf5450c77d -SHA1 (patch-src_torrent_utils_log__buffer.h) = b91d080d4be115bd957a7697cc9321c830796a87 -SHA1 (patch-src_torrent_utils_signal__bitfield.h) = f595be6dd9c5026cc895a40656f94dfe1976bfa5 -SHA1 (patch-src_torrent_utils_thread__base.h) = 01e3d26607bf14c27c56769ba7ed5b3fa2ff2da9 -SHA1 (patch-src_tracker_tracker__http.cc) = 913dc141d0a472dc1aa7b5bbceab6f60263b18fa -SHA1 (patch-src_tracker_tracker__udp.cc) = 073dd75f224a23869b2fd33e513e8e12931814c0 diff --git a/net/libtorrent/patches/patch-src_Makefile.am b/net/libtorrent/patches/patch-src_Makefile.am deleted file mode 100644 index 5c0a9e9a881..00000000000 --- a/net/libtorrent/patches/patch-src_Makefile.am +++ /dev/null @@ -1,13 +0,0 @@ -$NetBSD: patch-src_Makefile.am,v 1.1 2013/05/09 14:26:41 joerg Exp $ - ---- src/Makefile.am.orig 2012-02-14 03:39:45.000000000 +0000 -+++ src/Makefile.am -@@ -10,7 +10,7 @@ SUBDIRS = \ - - lib_LTLIBRARIES = libtorrent.la - --libtorrent_la_LDFLAGS = -version-info $(LIBTORRENT_INTERFACE_VERSION_INFO) -+libtorrent_la_LDFLAGS = -version-info $(LIBTORRENT_INTERFACE_VERSION_INFO) -no-undefined -lcrypto - libtorrent_la_LIBADD = \ - torrent/libsub_torrent.la \ - torrent/data/libsub_torrentdata.la \ diff --git a/net/libtorrent/patches/patch-src_Makefile.in b/net/libtorrent/patches/patch-src_Makefile.in deleted file mode 100644 index fc53a0c55a4..00000000000 --- a/net/libtorrent/patches/patch-src_Makefile.in +++ /dev/null @@ -1,13 +0,0 @@ -$NetBSD: patch-src_Makefile.in,v 1.1 2013/05/09 14:26:41 joerg Exp $ - ---- src/Makefile.in.orig 2012-04-20 06:56:14.000000000 +0000 -+++ src/Makefile.in -@@ -309,7 +309,7 @@ SUBDIRS = \ - utils - - lib_LTLIBRARIES = libtorrent.la --libtorrent_la_LDFLAGS = -version-info $(LIBTORRENT_INTERFACE_VERSION_INFO) -+libtorrent_la_LDFLAGS = -version-info $(LIBTORRENT_INTERFACE_VERSION_INFO) -no-undefined -lcrypto - libtorrent_la_LIBADD = \ - torrent/libsub_torrent.la \ - torrent/data/libsub_torrentdata.la \ diff --git a/net/libtorrent/patches/patch-src_data_chunk__list.cpp b/net/libtorrent/patches/patch-src_data_chunk__list.cpp deleted file mode 100644 index dbb9c56377f..00000000000 --- a/net/libtorrent/patches/patch-src_data_chunk__list.cpp +++ /dev/null @@ -1,29 +0,0 @@ -$NetBSD: patch-src_data_chunk__list.cpp,v 1.1 2013/05/12 11:30:13 tron Exp $ - ---- src/data/chunk_list.cc.orig 2012-02-22 07:50:27.000000000 +0000 -+++ src/data/chunk_list.cc 2013-05-12 12:25:45.000000000 +0100 -@@ -368,19 +368,19 @@ - if (flags & sync_force) { - - if (flags & sync_safe) -- return std::make_pair(MemoryChunk::sync_sync, true); -+ return std::make_pair((int)MemoryChunk::sync_sync, true); - else -- return std::make_pair(MemoryChunk::sync_async, true); -+ return std::make_pair((int)MemoryChunk::sync_async, true); - - } else if (flags & sync_safe) { - - if (node->sync_triggered()) -- return std::make_pair(MemoryChunk::sync_sync, true); -+ return std::make_pair((int)MemoryChunk::sync_sync, true); - else -- return std::make_pair(MemoryChunk::sync_async, false); -+ return std::make_pair((int)MemoryChunk::sync_async, false); - - } else { -- return std::make_pair(MemoryChunk::sync_async, true); -+ return std::make_pair((int)MemoryChunk::sync_async, true); - } - } - diff --git a/net/libtorrent/patches/patch-src_data_chunk__list.h b/net/libtorrent/patches/patch-src_data_chunk__list.h deleted file mode 100644 index 81be028db0a..00000000000 --- a/net/libtorrent/patches/patch-src_data_chunk__list.h +++ /dev/null @@ -1,31 +0,0 @@ -$NetBSD: patch-src_data_chunk__list.h,v 1.1 2013/05/09 14:26:41 joerg Exp $ - ---- src/data/chunk_list.h.orig 2012-02-19 09:28:55.000000000 +0000 -+++ src/data/chunk_list.h -@@ -39,7 +39,13 @@ - - #include <string> - #include <vector> -+#if __cplusplus >= 201103L -+#include <functional> -+using std::function; -+#else - #include <tr1/functional> -+using std::tr1::function; -+#endif - - #include "chunk.h" - #include "chunk_handle.h" -@@ -59,9 +65,9 @@ public: - typedef std::vector<ChunkListNode> base_type; - typedef std::vector<ChunkListNode*> Queue; - -- typedef std::tr1::function<Chunk* (uint32_t, int)> slot_chunk_index; -- typedef std::tr1::function<uint64_t ()> slot_value; -- typedef std::tr1::function<void (const std::string&)> slot_string; -+ typedef function<Chunk* (uint32_t, int)> slot_chunk_index; -+ typedef function<uint64_t ()> slot_value; -+ typedef function<void (const std::string&)> slot_string; - - using base_type::value_type; - using base_type::reference; diff --git a/net/libtorrent/patches/patch-src_data_hash__check__queue.h b/net/libtorrent/patches/patch-src_data_hash__check__queue.h deleted file mode 100644 index 341c9efb845..00000000000 --- a/net/libtorrent/patches/patch-src_data_hash__check__queue.h +++ /dev/null @@ -1,27 +0,0 @@ -$NetBSD: patch-src_data_hash__check__queue.h,v 1.1 2013/05/09 14:26:41 joerg Exp $ - ---- src/data/hash_check_queue.h.orig 2012-02-14 03:15:27.000000000 +0000 -+++ src/data/hash_check_queue.h -@@ -39,7 +39,13 @@ - - #include <deque> - #include <pthread.h> -+#if __cplusplus >= 201103L -+#include <functional> -+using std::function; -+#else - #include <tr1/functional> -+using std::tr1::function; -+#endif - - #include "rak/allocators.h" - -@@ -51,7 +57,7 @@ class HashChunk; - class lt_cacheline_aligned HashCheckQueue : private std::deque<HashChunk*, rak::cacheline_allocator<HashChunk*> > { - public: - typedef std::deque<HashChunk*, rak::cacheline_allocator<HashChunk*> > base_type; -- typedef std::tr1::function<void (HashChunk*, const HashString&)> slot_chunk_handle; -+ typedef function<void (HashChunk*, const HashString&)> slot_chunk_handle; - - using base_type::iterator; - diff --git a/net/libtorrent/patches/patch-src_data_hash__queue.cc b/net/libtorrent/patches/patch-src_data_hash__queue.cc deleted file mode 100644 index 4d3076e3969..00000000000 --- a/net/libtorrent/patches/patch-src_data_hash__queue.cc +++ /dev/null @@ -1,45 +0,0 @@ -$NetBSD: patch-src_data_hash__queue.cc,v 1.1 2013/05/09 14:26:41 joerg Exp $ - ---- src/data/hash_queue.cc.orig 2012-04-02 07:04:22.000000000 +0000 -+++ src/data/hash_queue.cc -@@ -54,11 +54,17 @@ - #include "globals.h" - #include "thread_disk.h" - -+#if __cplusplus >= 201103L -+using std::bind; -+#define STD_PLACEHOLDERS std::placeholders -+#else -+using std::tr1::bind; -+#define STD_PLACEHOLDERS std::tr1::placeholders -+#endif -+ - #define LT_LOG_DATA(data, log_level, log_fmt, ...) \ - lt_log_print_data(LOG_STORAGE_##log_level, data, "hash_queue", log_fmt, __VA_ARGS__); - --namespace tr1 { using namespace std::tr1; } -- - namespace torrent { - - struct HashQueueEqual { -@@ -87,7 +93,7 @@ HashQueue::HashQueue(thread_disk* thread - m_thread_disk(thread) { - - pthread_mutex_init(&m_done_chunks_lock, NULL); -- m_thread_disk->hash_queue()->slot_chunk_done() = tr1::bind(&HashQueue::chunk_done, this, tr1::placeholders::_1, tr1::placeholders::_2); -+ m_thread_disk->hash_queue()->slot_chunk_done() = bind(&HashQueue::chunk_done, this, STD_PLACEHOLDERS::_1, STD_PLACEHOLDERS::_2); - } - - -@@ -176,9 +182,9 @@ HashQueue::work() { - // TODO: This is not optimal as we jump around... Check for front - // of HashQueue in done_chunks instead. - -- iterator itr = std::find_if(begin(), end(), tr1::bind(std::equal_to<HashChunk*>(), -+ iterator itr = std::find_if(begin(), end(), bind(std::equal_to<HashChunk*>(), - hash_chunk, -- tr1::bind(&HashQueueNode::get_chunk, tr1::placeholders::_1))); -+ bind(&HashQueueNode::get_chunk, STD_PLACEHOLDERS::_1))); - - // TODO: Fix this... - if (itr == end()) diff --git a/net/libtorrent/patches/patch-src_data_hash__queue.h b/net/libtorrent/patches/patch-src_data_hash__queue.h deleted file mode 100644 index 48cfc85fe08..00000000000 --- a/net/libtorrent/patches/patch-src_data_hash__queue.h +++ /dev/null @@ -1,27 +0,0 @@ -$NetBSD: patch-src_data_hash__queue.h,v 1.1 2013/05/09 14:26:41 joerg Exp $ - ---- src/data/hash_queue.h.orig 2012-02-17 05:00:42.000000000 +0000 -+++ src/data/hash_queue.h -@@ -40,7 +40,13 @@ - #include <deque> - #include <map> - #include <pthread.h> -+#if __cplusplus >= 201103L -+#include <functional> -+using std::function; -+#else - #include <tr1/functional> -+using std::tr1::function; -+#endif - - #include "torrent/hash_string.h" - #include "hash_queue_node.h" -@@ -63,7 +69,7 @@ public: - typedef std::map<HashChunk*, torrent::HashString> done_chunks_type; - - typedef HashQueueNode::slot_done_type slot_done_type; -- typedef std::tr1::function<void (bool)> slot_bool; -+ typedef function<void (bool)> slot_bool; - - using base_type::iterator; - diff --git a/net/libtorrent/patches/patch-src_data_hash__queue__node.h b/net/libtorrent/patches/patch-src_data_hash__queue__node.h deleted file mode 100644 index f7ab1fb3f0e..00000000000 --- a/net/libtorrent/patches/patch-src_data_hash__queue__node.h +++ /dev/null @@ -1,27 +0,0 @@ -$NetBSD: patch-src_data_hash__queue__node.h,v 1.1 2013/05/09 14:26:41 joerg Exp $ - ---- src/data/hash_queue_node.h.orig 2012-03-20 15:10:16.000000000 +0000 -+++ src/data/hash_queue_node.h -@@ -38,7 +38,13 @@ - #define LIBTORRENT_DATA_HASH_QUEUE_NODE_H - - #include <string> -+#if __cplusplus >= 201103L -+#include <functional> -+using std::function; -+#else - #include <tr1/functional> -+using std::tr1::function; -+#endif - #include <inttypes.h> - - #include "chunk_handle.h" -@@ -50,7 +56,7 @@ class download_data; - - class HashQueueNode { - public: -- typedef std::tr1::function<void (ChunkHandle, const char*)> slot_done_type; -+ typedef function<void (ChunkHandle, const char*)> slot_done_type; - typedef download_data* id_type; - - HashQueueNode(id_type id, HashChunk* c, slot_done_type d) : diff --git a/net/libtorrent/patches/patch-src_data_memory__chunk.h b/net/libtorrent/patches/patch-src_data_memory__chunk.h deleted file mode 100644 index a8eb70a6636..00000000000 --- a/net/libtorrent/patches/patch-src_data_memory__chunk.h +++ /dev/null @@ -1,53 +0,0 @@ -$NetBSD: patch-src_data_memory__chunk.h,v 1.1 2013/05/09 14:26:41 joerg Exp $ - ---- src/data/memory_chunk.h.orig 2012-01-19 10:19:26.000000000 +0000 -+++ src/data/memory_chunk.h -@@ -49,28 +49,30 @@ class MemoryChunk { - // Consider information about whetever the memory maps to a file or - // not, since mincore etc can only be called on files. - -- static const int prot_exec = PROT_EXEC; -- static const int prot_read = PROT_READ; -- static const int prot_write = PROT_WRITE; -- static const int prot_none = PROT_NONE; -- static const int map_shared = MAP_SHARED; -+ enum { -+ prot_exec = PROT_EXEC, -+ prot_read = PROT_READ, -+ prot_write = PROT_WRITE, -+ prot_none = PROT_NONE, -+ map_shared = MAP_SHARED, - - #ifdef USE_MADVISE -- static const int advice_normal = MADV_NORMAL; -- static const int advice_random = MADV_RANDOM; -- static const int advice_sequential = MADV_SEQUENTIAL; -- static const int advice_willneed = MADV_WILLNEED; -- static const int advice_dontneed = MADV_DONTNEED; -+ advice_normal = MADV_NORMAL, -+ advice_random = MADV_RANDOM, -+ advice_sequential = MADV_SEQUENTIAL, -+ advice_willneed = MADV_WILLNEED, -+ advice_dontneed = MADV_DONTNEED, - #else -- static const int advice_normal = 0; -- static const int advice_random = 1; -- static const int advice_sequential = 2; -- static const int advice_willneed = 3; -- static const int advice_dontneed = 4; -+ advice_normal = 0, -+ advice_random = 1, -+ advice_sequential = 2, -+ advice_willneed = 3, -+ advice_dontneed = 4, - #endif -- static const int sync_sync = MS_SYNC; -- static const int sync_async = MS_ASYNC; -- static const int sync_invalidate = MS_INVALIDATE; -+ sync_sync = MS_SYNC, -+ sync_async = MS_ASYNC, -+ sync_invalidate = MS_INVALIDATE -+ }; - - MemoryChunk() { clear(); } - ~MemoryChunk() { clear(); } diff --git a/net/libtorrent/patches/patch-src_dht_dht__router.cc b/net/libtorrent/patches/patch-src_dht_dht__router.cc deleted file mode 100644 index 86716e82ffc..00000000000 --- a/net/libtorrent/patches/patch-src_dht_dht__router.cc +++ /dev/null @@ -1,35 +0,0 @@ -$NetBSD: patch-src_dht_dht__router.cc,v 1.1 2013/05/09 14:26:41 joerg Exp $ - ---- src/dht/dht_router.cc.orig 2012-02-14 03:15:27.000000000 +0000 -+++ src/dht/dht_router.cc -@@ -51,6 +51,12 @@ - #include "dht_tracker.h" - #include "dht_transaction.h" - -+#if __cplusplus >= 201103L -+using std::bind; -+#else -+using std::tr1::bind; -+#endif -+ - namespace torrent { - - HashString DhtRouter::zero_id; -@@ -131,7 +137,7 @@ DhtRouter::start(int port) { - m_server.start(port); - - // Set timeout slot and schedule it to be called immediately for initial bootstrapping if necessary. -- m_taskTimeout.slot() = std::tr1::bind(&DhtRouter::receive_timeout_bootstrap, this); -+ m_taskTimeout.slot() = bind(&DhtRouter::receive_timeout_bootstrap, this); - priority_queue_insert(&taskScheduler, &m_taskTimeout, (cachedTime + rak::timer::from_seconds(1)).round_seconds()); - } - -@@ -410,7 +416,7 @@ DhtRouter::receive_timeout_bootstrap() { - delete m_contacts; - m_contacts = NULL; - -- m_taskTimeout.slot() = std::tr1::bind(&DhtRouter::receive_timeout, this); -+ m_taskTimeout.slot() = bind(&DhtRouter::receive_timeout, this); - - if (!m_numRefresh) { - // If we're still in the startup, do the usual refreshing too. diff --git a/net/libtorrent/patches/patch-src_dht_dht__server.cc b/net/libtorrent/patches/patch-src_dht_dht__server.cc deleted file mode 100644 index ddf97e50452..00000000000 --- a/net/libtorrent/patches/patch-src_dht_dht__server.cc +++ /dev/null @@ -1,26 +0,0 @@ -$NetBSD: patch-src_dht_dht__server.cc,v 1.1 2013/05/09 14:26:41 joerg Exp $ - ---- src/dht/dht_server.cc.orig 2012-02-14 03:15:27.000000000 +0000 -+++ src/dht/dht_server.cc -@@ -56,6 +56,12 @@ - - #include "manager.h" - -+#if __cplusplus >= 201103L -+using std::bind; -+#else -+using std::tr1::bind; -+#endif -+ - namespace torrent { - - const char* DhtServer::queries[] = { -@@ -154,7 +160,7 @@ DhtServer::start(int port) { - throw; - } - -- m_taskTimeout.slot() = std::tr1::bind(&DhtServer::receive_timeout, this); -+ m_taskTimeout.slot() = bind(&DhtServer::receive_timeout, this); - - m_uploadNode.set_list_iterator(m_uploadThrottle->end()); - m_uploadNode.slot_activate(rak::make_mem_fun(static_cast<SocketBase*>(this), &SocketBase::receive_throttle_up_activate)); diff --git a/net/libtorrent/patches/patch-src_download_download__main.cc b/net/libtorrent/patches/patch-src_download_download__main.cc deleted file mode 100644 index d23dcc8b3e9..00000000000 --- a/net/libtorrent/patches/patch-src_download_download__main.cc +++ /dev/null @@ -1,53 +0,0 @@ -$NetBSD: patch-src_download_download__main.cc,v 1.1 2013/05/09 14:26:41 joerg Exp $ - ---- src/download/download_main.cc.orig 2012-04-20 06:42:32.000000000 +0000 -+++ src/download/download_main.cc -@@ -64,7 +64,13 @@ - #include "download_main.h" - #include "download_wrapper.h" - --namespace tr1 { using namespace std::tr1; } -+#if __cplusplus >= 201103L -+using std::bind; -+#define STD_PLACEHOLDERS std::placeholders -+#else -+using std::tr1::bind; -+#define STD_PLACEHOLDERS std::tr1::placeholders -+#endif - - namespace torrent { - -@@ -103,11 +109,11 @@ DownloadMain::DownloadMain() : - m_tracker_list = new TrackerList(); - m_tracker_controller = new TrackerController(m_tracker_list); - -- m_tracker_list->slot_success() = tr1::bind(&TrackerController::receive_success, m_tracker_controller, tr1::placeholders::_1, tr1::placeholders::_2); -- m_tracker_list->slot_failure() = tr1::bind(&TrackerController::receive_failure, m_tracker_controller, tr1::placeholders::_1, tr1::placeholders::_2); -- m_tracker_list->slot_scrape_success() = tr1::bind(&TrackerController::receive_scrape, m_tracker_controller, tr1::placeholders::_1); -- m_tracker_list->slot_tracker_enabled() = tr1::bind(&TrackerController::receive_tracker_enabled, m_tracker_controller, tr1::placeholders::_1); -- m_tracker_list->slot_tracker_disabled() = tr1::bind(&TrackerController::receive_tracker_disabled, m_tracker_controller, tr1::placeholders::_1); -+ m_tracker_list->slot_success() = bind(&TrackerController::receive_success, m_tracker_controller, STD_PLACEHOLDERS::_1, STD_PLACEHOLDERS::_2); -+ m_tracker_list->slot_failure() = bind(&TrackerController::receive_failure, m_tracker_controller, STD_PLACEHOLDERS::_1, STD_PLACEHOLDERS::_2); -+ m_tracker_list->slot_scrape_success() = bind(&TrackerController::receive_scrape, m_tracker_controller, STD_PLACEHOLDERS::_1); -+ m_tracker_list->slot_tracker_enabled() = bind(&TrackerController::receive_tracker_enabled, m_tracker_controller, STD_PLACEHOLDERS::_1); -+ m_tracker_list->slot_tracker_disabled() = bind(&TrackerController::receive_tracker_disabled, m_tracker_controller, STD_PLACEHOLDERS::_1); - - m_connectionList = new ConnectionList(this); - -@@ -119,12 +125,12 @@ DownloadMain::DownloadMain() : - m_delegator.transfer_list()->slot_completed(std::bind1st(std::mem_fun(&DownloadMain::receive_chunk_done), this)); - m_delegator.transfer_list()->slot_corrupt(std::bind1st(std::mem_fun(&DownloadMain::receive_corrupt_chunk), this)); - -- m_delayDisconnectPeers.slot() = std::tr1::bind(&ConnectionList::disconnect_queued, m_connectionList); -- m_taskTrackerRequest.slot() = std::tr1::bind(&DownloadMain::receive_tracker_request, this); -+ m_delayDisconnectPeers.slot() = bind(&ConnectionList::disconnect_queued, m_connectionList); -+ m_taskTrackerRequest.slot() = bind(&DownloadMain::receive_tracker_request, this); - - m_chunkList->set_data(file_list()->mutable_data()); -- m_chunkList->slot_create_chunk() = tr1::bind(&FileList::create_chunk_index, file_list(), tr1::placeholders::_1, tr1::placeholders::_2); -- m_chunkList->slot_free_diskspace() = tr1::bind(&FileList::free_diskspace, file_list()); -+ m_chunkList->slot_create_chunk() = bind(&FileList::create_chunk_index, file_list(), STD_PLACEHOLDERS::_1, STD_PLACEHOLDERS::_2); -+ m_chunkList->slot_free_diskspace() = bind(&FileList::free_diskspace, file_list()); - } - - DownloadMain::~DownloadMain() { diff --git a/net/libtorrent/patches/patch-src_download_download__wrapper.cc b/net/libtorrent/patches/patch-src_download_download__wrapper.cc deleted file mode 100644 index a3d37425cef..00000000000 --- a/net/libtorrent/patches/patch-src_download_download__wrapper.cc +++ /dev/null @@ -1,55 +0,0 @@ -$NetBSD: patch-src_download_download__wrapper.cc,v 1.1 2013/05/09 14:26:41 joerg Exp $ - ---- src/download/download_wrapper.cc.orig 2012-04-20 06:42:32.000000000 +0000 -+++ src/download/download_wrapper.cc -@@ -62,7 +62,13 @@ - - #include "download_wrapper.h" - --namespace tr1 { using namespace std::tr1; } -+#if __cplusplus >= 201103L -+using std::bind; -+#define STD_PLACEHOLDERS std::placeholders -+#else -+using std::tr1::bind; -+#define STD_PLACEHOLDERS std::tr1::placeholders -+#endif - - namespace torrent { - -@@ -73,13 +79,13 @@ DownloadWrapper::DownloadWrapper() : - m_hashChecker(NULL), - m_connectionType(0) { - -- m_main->delay_download_done().slot() = std::tr1::bind(&download_data::call_download_done, data()); -+ m_main->delay_download_done().slot() = bind(&download_data::call_download_done, data()); - - m_main->tracker_list()->set_info(info()); -- m_main->tracker_controller()->slot_success() = tr1::bind(&DownloadWrapper::receive_tracker_success, this, tr1::placeholders::_1); -- m_main->tracker_controller()->slot_failure() = tr1::bind(&DownloadWrapper::receive_tracker_failed, this, tr1::placeholders::_1); -+ m_main->tracker_controller()->slot_success() = bind(&DownloadWrapper::receive_tracker_success, this, STD_PLACEHOLDERS::_1); -+ m_main->tracker_controller()->slot_failure() = bind(&DownloadWrapper::receive_tracker_failed, this, STD_PLACEHOLDERS::_1); - -- m_main->chunk_list()->slot_storage_error() = tr1::bind(&DownloadWrapper::receive_storage_error, this, tr1::placeholders::_1); -+ m_main->chunk_list()->slot_storage_error() = bind(&DownloadWrapper::receive_storage_error, this, STD_PLACEHOLDERS::_1); - } - - DownloadWrapper::~DownloadWrapper() { -@@ -122,7 +128,7 @@ DownloadWrapper::initialize(const std::s - m_hashChecker->slot_check(rak::make_mem_fun(this, &DownloadWrapper::check_chunk_hash)); - // m_hashChecker->slot_storage_error(rak::make_mem_fun(this, &DownloadWrapper::receive_storage_error)); - -- m_hashChecker->delay_checked().slot() = std::tr1::bind(&DownloadWrapper::receive_initial_hash, this); -+ m_hashChecker->delay_checked().slot() = bind(&DownloadWrapper::receive_initial_hash, this); - } - - void -@@ -241,7 +247,7 @@ DownloadWrapper::check_chunk_hash(ChunkH - ChunkHandle new_handle = m_main->chunk_list()->get(handle.index(), ChunkList::get_blocking); - m_main->chunk_list()->release(&handle); - -- hash_queue()->push_back(new_handle, data(), tr1::bind(&DownloadWrapper::receive_hash_done, this, tr1::placeholders::_1, tr1::placeholders::_2)); -+ hash_queue()->push_back(new_handle, data(), bind(&DownloadWrapper::receive_hash_done, this, STD_PLACEHOLDERS::_1, STD_PLACEHOLDERS::_2)); - } - - void diff --git a/net/libtorrent/patches/patch-src_manager.cc b/net/libtorrent/patches/patch-src_manager.cc deleted file mode 100644 index a9275bef65f..00000000000 --- a/net/libtorrent/patches/patch-src_manager.cc +++ /dev/null @@ -1,36 +0,0 @@ -$NetBSD: patch-src_manager.cc,v 1.1 2013/05/09 14:26:41 joerg Exp $ - ---- src/manager.cc.orig 2012-04-20 06:41:42.000000000 +0000 -+++ src/manager.cc -@@ -59,7 +59,13 @@ - - #include "manager.h" - --namespace tr1 { using namespace std::tr1; } -+#if __cplusplus >= 201103L -+using std::bind; -+#define STD_PLACEHOLDERS std::placeholders -+#else -+using std::tr1::bind; -+#define STD_PLACEHOLDERS std::tr1::placeholders -+#endif - - namespace torrent { - -@@ -83,12 +89,12 @@ Manager::Manager() : - - m_hashQueue = new HashQueue(&m_main_thread_disk); - m_hashQueue->slot_has_work() = -- tr1::bind(&thread_base::send_event_signal, -+ bind(&thread_base::send_event_signal, - &m_main_thread_main, -- m_main_thread_main.signal_bitfield()->add_signal(tr1::bind(&HashQueue::work, m_hashQueue)), -- tr1::placeholders::_1); -+ m_main_thread_main.signal_bitfield()->add_signal(bind(&HashQueue::work, m_hashQueue)), -+ STD_PLACEHOLDERS::_1); - -- m_taskTick.slot() = std::tr1::bind(&Manager::receive_tick, this); -+ m_taskTick.slot() = bind(&Manager::receive_tick, this); - - priority_queue_insert(&taskScheduler, &m_taskTick, cachedTime.round_seconds()); - diff --git a/net/libtorrent/patches/patch-src_net_socket__set.h b/net/libtorrent/patches/patch-src_net_socket__set.h deleted file mode 100644 index fff8b593298..00000000000 --- a/net/libtorrent/patches/patch-src_net_socket__set.h +++ /dev/null @@ -1,20 +0,0 @@ -$NetBSD: patch-src_net_socket__set.h,v 1.1 2013/05/09 14:26:41 joerg Exp $ - ---- src/net/socket_set.h.orig 2012-01-19 10:19:26.000000000 +0000 -+++ src/net/socket_set.h -@@ -53,12 +53,12 @@ namespace torrent { - - // Propably should rename to EventSet... - --class SocketSet : private std::vector<Event*, rak::cacheline_allocator<> > { -+class SocketSet : private std::vector<Event*, rak::cacheline_allocator<Event *> > { - public: - typedef uint32_t size_type; - -- typedef std::vector<Event*, rak::cacheline_allocator<> > base_type; -- typedef std::vector<size_type, rak::cacheline_allocator<> > Table; -+ typedef std::vector<Event*, rak::cacheline_allocator<Event *> > base_type; -+ typedef std::vector<size_type, rak::cacheline_allocator<size_type> > Table; - - static const size_type npos = static_cast<size_type>(-1); - diff --git a/net/libtorrent/patches/patch-src_net_throttle__internal.cc b/net/libtorrent/patches/patch-src_net_throttle__internal.cc deleted file mode 100644 index b16c942f54b..00000000000 --- a/net/libtorrent/patches/patch-src_net_throttle__internal.cc +++ /dev/null @@ -1,26 +0,0 @@ -$NetBSD: patch-src_net_throttle__internal.cc,v 1.1 2013/05/09 14:26:41 joerg Exp $ - ---- src/net/throttle_internal.cc.orig 2012-02-14 03:15:27.000000000 +0000 -+++ src/net/throttle_internal.cc -@@ -47,6 +47,12 @@ - - #include "globals.h" - -+#if __cplusplus >= 201103L -+using std::bind; -+#else -+using std::tr1::bind; -+#endif -+ - namespace torrent { - - // Plans: -@@ -62,7 +68,7 @@ ThrottleInternal::ThrottleInternal(int f - m_timeLastTick(cachedTime) { - - if (is_root()) -- m_taskTick.slot() = std::tr1::bind(&ThrottleInternal::receive_tick, this); -+ m_taskTick.slot() = bind(&ThrottleInternal::receive_tick, this); - } - - ThrottleInternal::~ThrottleInternal() { diff --git a/net/libtorrent/patches/patch-src_protocol_handshake.cc b/net/libtorrent/patches/patch-src_protocol_handshake.cc deleted file mode 100644 index e0fb1ddaa4d..00000000000 --- a/net/libtorrent/patches/patch-src_protocol_handshake.cc +++ /dev/null @@ -1,26 +0,0 @@ -$NetBSD: patch-src_protocol_handshake.cc,v 1.1 2013/05/09 14:26:41 joerg Exp $ - ---- src/protocol/handshake.cc.orig 2012-02-14 03:15:27.000000000 +0000 -+++ src/protocol/handshake.cc -@@ -55,6 +55,12 @@ - #include "handshake.h" - #include "handshake_manager.h" - -+#if __cplusplus >= 201103L -+using std::bind; -+#else -+using std::tr1::bind; -+#endif -+ - namespace torrent { - - const char* Handshake::m_protocol = "BitTorrent protocol"; -@@ -100,7 +106,7 @@ Handshake::Handshake(SocketFd fd, Handsh - m_writeBuffer.reset(); - - m_taskTimeout.clear_time(); -- m_taskTimeout.slot() = std::tr1::bind(&HandshakeManager::receive_timeout, m, this); -+ m_taskTimeout.slot() = bind(&HandshakeManager::receive_timeout, m, this); - } - - Handshake::~Handshake() { diff --git a/net/libtorrent/patches/patch-src_torrent_data_download__data.h b/net/libtorrent/patches/patch-src_torrent_data_download__data.h deleted file mode 100644 index 13a90d7c1e4..00000000000 --- a/net/libtorrent/patches/patch-src_torrent_data_download__data.h +++ /dev/null @@ -1,27 +0,0 @@ -$NetBSD: patch-src_torrent_data_download__data.h,v 1.1 2013/05/09 14:26:41 joerg Exp $ - ---- src/torrent/data/download_data.h.orig 2012-02-19 09:28:55.000000000 +0000 -+++ src/torrent/data/download_data.h -@@ -37,7 +37,13 @@ - #ifndef LIBTORRENT_DATA_DOWNLOAD_DATA_H - #define LIBTORRENT_DATA_DOWNLOAD_DATA_H - -+#if __cplusplus >= 201103L -+#include <functional> -+using std::function; -+#else - #include <tr1/functional> -+using std::tr1::function; -+#endif - - #include <torrent/common.h> - #include <torrent/bitfield.h> -@@ -57,7 +63,7 @@ public: - - typedef void (function_void)(void); - -- typedef std::tr1::function<function_void> slot_void; -+ typedef function<function_void> slot_void; - - download_data() : m_wanted_chunks(0) {} - diff --git a/net/libtorrent/patches/patch-src_torrent_data_file.h b/net/libtorrent/patches/patch-src_torrent_data_file.h deleted file mode 100644 index 4981a274d2f..00000000000 --- a/net/libtorrent/patches/patch-src_torrent_data_file.h +++ /dev/null @@ -1,29 +0,0 @@ -$NetBSD: patch-src_torrent_data_file.h,v 1.1 2013/05/09 14:26:41 joerg Exp $ - ---- src/torrent/data/file.h.orig 2012-01-19 10:19:26.000000000 +0000 -+++ src/torrent/data/file.h -@@ -48,14 +48,16 @@ public: - - typedef std::pair<uint32_t, uint32_t> range_type; - -- static const int flag_active = (1 << 0); -- static const int flag_create_queued = (1 << 1); -- static const int flag_resize_queued = (1 << 2); -- static const int flag_fallocate = (1 << 3); -- static const int flag_previously_created = (1 << 4); -- -- static const int flag_prioritize_first = (1 << 5); -- static const int flag_prioritize_last = (1 << 6); -+ enum { -+ flag_active = (1 << 0), -+ flag_create_queued = (1 << 1), -+ flag_resize_queued = (1 << 2), -+ flag_fallocate = (1 << 3), -+ flag_previously_created = (1 << 4), -+ -+ flag_prioritize_first = (1 << 5), -+ flag_prioritize_last = (1 << 6) -+ }; - - File(); - ~File(); diff --git a/net/libtorrent/patches/patch-src_torrent_download__info.h b/net/libtorrent/patches/patch-src_torrent_download__info.h deleted file mode 100644 index 5c1b2a802ea..00000000000 --- a/net/libtorrent/patches/patch-src_torrent_download__info.h +++ /dev/null @@ -1,67 +0,0 @@ -$NetBSD: patch-src_torrent_download__info.h,v 1.1 2013/05/09 14:26:41 joerg Exp $ - ---- src/torrent/download_info.h.orig 2012-04-09 06:38:58.000000000 +0000 -+++ src/torrent/download_info.h -@@ -40,7 +40,13 @@ - #include <list> - #include <string> - #include <inttypes.h> -+#if __cplusplus >= 201103L -+#include <functional> -+using std::function; -+#else - #include <tr1/functional> -+using std::tr1::function; -+#endif - - #include <torrent/rate.h> - #include <torrent/hash_string.h> -@@ -54,13 +60,13 @@ class DownloadMain; - - class DownloadInfo { - public: -- typedef std::tr1::function<uint64_t ()> slot_stat_type; -- typedef std::tr1::function<void (uint32_t)> slot_chunk_type; -+ typedef function<uint64_t ()> slot_stat_type; -+ typedef function<void (uint32_t)> slot_chunk_type; - -- typedef std::list<std::tr1::function<void ()> > signal_void_type; -- typedef std::list<std::tr1::function<void (const std::string&)> > signal_string_type; -+ typedef std::list<function<void ()> > signal_void_type; -+ typedef std::list<function<void (const std::string&)> > signal_string_type; - typedef std::list<slot_chunk_type> signal_chunk_type; -- typedef std::list<std::tr1::function<void (const std::string&, const char*, size_t)> > signal_dump_type; -+ typedef std::list<function<void (const std::string&, const char*, size_t)> > signal_dump_type; - - enum State { - NONE, -@@ -69,17 +75,19 @@ public: - STOPPED - }; - -- static const int flag_open = (1 << 0); -- static const int flag_active = (1 << 1); -- static const int flag_compact = (1 << 2); -- static const int flag_accepting_new_peers = (1 << 3); -- static const int flag_accepting_seeders = (1 << 4); // Only used during leeching. -- static const int flag_private = (1 << 5); -- static const int flag_meta_download = (1 << 6); -- static const int flag_pex_enabled = (1 << 7); -- static const int flag_pex_active = (1 << 8); -+ enum { -+ flag_open = (1 << 0), -+ flag_active = (1 << 1), -+ flag_compact = (1 << 2), -+ flag_accepting_new_peers = (1 << 3), -+ flag_accepting_seeders = (1 << 4), // Only used during leeching. -+ flag_private = (1 << 5), -+ flag_meta_download = (1 << 6), -+ flag_pex_enabled = (1 << 7), -+ flag_pex_active = (1 << 8), - -- static const int public_flags = flag_accepting_seeders; -+ public_flags = flag_accepting_seeders -+ }; - - static const uint32_t unlimited = ~uint32_t(); - diff --git a/net/libtorrent/patches/patch-src_torrent_download_choke__group.cc b/net/libtorrent/patches/patch-src_torrent_download_choke__group.cc deleted file mode 100644 index 26b1eefbb76..00000000000 --- a/net/libtorrent/patches/patch-src_torrent_download_choke__group.cc +++ /dev/null @@ -1,46 +0,0 @@ -$NetBSD: patch-src_torrent_download_choke__group.cc,v 1.1 2013/05/09 14:26:41 joerg Exp $ - ---- src/torrent/download/choke_group.cc.orig 2012-03-20 16:33:27.000000000 +0000 -+++ src/torrent/download/choke_group.cc -@@ -37,7 +37,15 @@ - #include "config.h" - - #include <algorithm> -+#if __cplusplus >= 201103L -+#include <functional> -+using std::bind; -+#define STD_PLACEHOLDERS std::placeholders -+#else - #include <tr1/functional> -+using std::tr1::bind; -+#define STD_PLACEHOLDERS std::tr1::placeholders -+#endif - - #include "choke_group.h" - #include "choke_queue.h" -@@ -48,8 +56,6 @@ - #include "torrent/exceptions.h" - #include "download/download_main.h" - --namespace tr1 { using namespace std::tr1; } -- - namespace torrent { - - choke_group::choke_group() : -@@ -61,14 +67,14 @@ uint64_t - choke_group::up_rate() const { - return - std::for_each(m_first, m_last, -- rak::accumulate((uint64_t)0, tr1::bind(&Rate::rate, tr1::bind(&resource_manager_entry::up_rate, tr1::placeholders::_1)))).result; -+ rak::accumulate((uint64_t)0, bind(&Rate::rate, bind(&resource_manager_entry::up_rate, STD_PLACEHOLDERS::_1)))).result; - } - - uint64_t - choke_group::down_rate() const { - return - std::for_each(m_first, m_last, -- rak::accumulate((uint64_t)0, tr1::bind(&Rate::rate, tr1::bind(&resource_manager_entry::down_rate, tr1::placeholders::_1)))).result; -+ rak::accumulate((uint64_t)0, bind(&Rate::rate, bind(&resource_manager_entry::down_rate, STD_PLACEHOLDERS::_1)))).result; - } - - } diff --git a/net/libtorrent/patches/patch-src_torrent_download_choke__queue.cc b/net/libtorrent/patches/patch-src_torrent_download_choke__queue.cc deleted file mode 100644 index ddabd2161f2..00000000000 --- a/net/libtorrent/patches/patch-src_torrent_download_choke__queue.cc +++ /dev/null @@ -1,12 +0,0 @@ -$NetBSD: patch-src_torrent_download_choke__queue.cc,v 1.1 2013/05/09 14:26:41 joerg Exp $ - ---- src/torrent/download/choke_queue.cc.orig 2012-04-20 06:41:42.000000000 +0000 -+++ src/torrent/download/choke_queue.cc -@@ -40,7 +40,6 @@ - #include <functional> - #include <numeric> - #include <cstdlib> --#include <tr1/functional> - - #include "protocol/peer_connection_base.h" - #include "torrent/download/group_entry.h" diff --git a/net/libtorrent/patches/patch-src_torrent_download_choke__queue.h b/net/libtorrent/patches/patch-src_torrent_download_choke__queue.h deleted file mode 100644 index 7ee14fabd05..00000000000 --- a/net/libtorrent/patches/patch-src_torrent_download_choke__queue.h +++ /dev/null @@ -1,31 +0,0 @@ -$NetBSD: patch-src_torrent_download_choke__queue.h,v 1.1 2013/05/09 14:26:41 joerg Exp $ - ---- src/torrent/download/choke_queue.h.orig 2012-04-20 06:41:42.000000000 +0000 -+++ src/torrent/download/choke_queue.h -@@ -42,7 +42,13 @@ - #include <list> - #include <vector> - #include <inttypes.h> -+#if __cplusplus >= 201103L -+#include <functional> -+using std::function; -+#else - #include <tr1/functional> -+using std::tr1::function; -+#endif - #include <torrent/download/group_entry.h> - - namespace torrent { -@@ -66,9 +72,9 @@ struct group_stats { - - class LIBTORRENT_EXPORT choke_queue { - public: -- typedef std::tr1::function<void (int)> slot_unchoke; -- typedef std::tr1::function<int ()> slot_can_unchoke; -- typedef std::tr1::function<bool (PeerConnectionBase*, bool)> slot_connection; -+ typedef function<void (int)> slot_unchoke; -+ typedef function<int ()> slot_can_unchoke; -+ typedef function<bool (PeerConnectionBase*, bool)> slot_connection; - - typedef std::vector<weighted_connection> container_type; - typedef container_type::value_type value_type; diff --git a/net/libtorrent/patches/patch-src_torrent_download_group__entry.h b/net/libtorrent/patches/patch-src_torrent_download_group__entry.h deleted file mode 100644 index a95b71c598e..00000000000 --- a/net/libtorrent/patches/patch-src_torrent_download_group__entry.h +++ /dev/null @@ -1,58 +0,0 @@ -$NetBSD: patch-src_torrent_download_group__entry.h,v 1.1 2013/05/09 14:26:41 joerg Exp $ - ---- src/torrent/download/group_entry.h.orig 2012-01-19 10:19:26.000000000 +0000 -+++ src/torrent/download/group_entry.h -@@ -39,7 +39,17 @@ - - #include <algorithm> - #include <vector> -+#if __cplusplus >= 201103L -+#include <functional> -+using std::function; -+using std::bind; -+#define STD_PLACEHOLDERS std::placeholders -+#else - #include <tr1/functional> -+using std::tr1::bind; -+#define STD_PLACEHOLDERS std::tr1::placeholders -+using std::tr1::function; -+#endif - #include <torrent/common.h> - #include <torrent/exceptions.h> - -@@ -104,7 +114,7 @@ private: - - inline void group_entry::connection_unchoked(PeerConnectionBase* pcb) { - container_type::iterator itr = std::find_if(m_unchoked.begin(), m_unchoked.end(), -- std::tr1::bind(&weighted_connection::operator==, std::tr1::placeholders::_1, pcb)); -+ bind(&weighted_connection::operator==, STD_PLACEHOLDERS::_1, pcb)); - - if (itr != m_unchoked.end()) throw internal_error("group_entry::connection_unchoked(pcb) failed."); - -@@ -113,7 +123,7 @@ inline void group_entry::connection_unch - - inline void group_entry::connection_queued(PeerConnectionBase* pcb) { - container_type::iterator itr = std::find_if(m_queued.begin(), m_queued.end(), -- std::tr1::bind(&weighted_connection::operator==, std::tr1::placeholders::_1, pcb)); -+ bind(&weighted_connection::operator==, STD_PLACEHOLDERS::_1, pcb)); - - if (itr != m_queued.end()) throw internal_error("group_entry::connection_queued(pcb) failed."); - -@@ -123,7 +133,7 @@ inline void group_entry::connection_queu - inline void - group_entry::connection_choked(PeerConnectionBase* pcb) { - container_type::iterator itr = std::find_if(m_unchoked.begin(), m_unchoked.end(), -- std::tr1::bind(&weighted_connection::operator==, std::tr1::placeholders::_1, pcb)); -+ bind(&weighted_connection::operator==, STD_PLACEHOLDERS::_1, pcb)); - - if (itr == m_unchoked.end()) throw internal_error("group_entry::connection_choked(pcb) failed."); - -@@ -134,7 +144,7 @@ group_entry::connection_choked(PeerConne - inline void - group_entry::connection_unqueued(PeerConnectionBase* pcb) { - container_type::iterator itr = std::find_if(m_queued.begin(), m_queued.end(), -- std::tr1::bind(&weighted_connection::operator==, std::tr1::placeholders::_1, pcb)); -+ bind(&weighted_connection::operator==, STD_PLACEHOLDERS::_1, pcb)); - - if (itr == m_queued.end()) throw internal_error("group_entry::connection_unqueued(pcb) failed."); - diff --git a/net/libtorrent/patches/patch-src_torrent_download_resource__manager.cc b/net/libtorrent/patches/patch-src_torrent_download_resource__manager.cc deleted file mode 100644 index 8809df49082..00000000000 --- a/net/libtorrent/patches/patch-src_torrent_download_resource__manager.cc +++ /dev/null @@ -1,50 +0,0 @@ -$NetBSD: patch-src_torrent_download_resource__manager.cc,v 1.1 2013/05/09 14:26:41 joerg Exp $ - ---- src/torrent/download/resource_manager.cc.orig 2012-04-20 06:41:43.000000000 +0000 -+++ src/torrent/download/resource_manager.cc -@@ -38,8 +38,16 @@ - - #include <algorithm> - #include <functional> --#include <tr1/functional> - #include <limits> -+#if __cplusplus >= 201103L -+#include <functional> -+using std::bind; -+#define STD_PLACEHOLDERS std::placeholders -+#else -+#include <tr1/functional> -+using std::tr1::bind; -+#define STD_PLACEHOLDERS std::tr1::placeholders -+#endif - #include <rak/functional.h> - - #include "torrent/exceptions.h" -@@ -51,8 +59,6 @@ - #include "choke_queue.h" - #include "resource_manager.h" - --namespace tr1 { using namespace std::tr1; } -- - namespace torrent { - - const Rate* resource_manager_entry::up_rate() const { return m_download->info()->up_rate(); } -@@ -73,12 +79,12 @@ ResourceManager::ResourceManager() : - choke_base_type::back()->up_queue()->set_heuristics(choke_queue::HEURISTICS_UPLOAD_LEECH); - choke_base_type::back()->down_queue()->set_heuristics(choke_queue::HEURISTICS_DOWNLOAD_LEECH); - -- choke_base_type::back()->up_queue()->set_slot_unchoke(tr1::bind(&ResourceManager::receive_upload_unchoke, this, tr1::placeholders::_1)); -- choke_base_type::back()->down_queue()->set_slot_unchoke(tr1::bind(&ResourceManager::receive_download_unchoke, this, tr1::placeholders::_1)); -- choke_base_type::back()->up_queue()->set_slot_can_unchoke(tr1::bind(&ResourceManager::retrieve_upload_can_unchoke, this)); -- choke_base_type::back()->down_queue()->set_slot_can_unchoke(tr1::bind(&ResourceManager::retrieve_download_can_unchoke, this)); -- choke_base_type::back()->up_queue()->set_slot_connection(tr1::bind(&PeerConnectionBase::receive_upload_choke, tr1::placeholders::_1, tr1::placeholders::_2)); -- choke_base_type::back()->down_queue()->set_slot_connection(tr1::bind(&PeerConnectionBase::receive_download_choke, tr1::placeholders::_1, tr1::placeholders::_2)); -+ choke_base_type::back()->up_queue()->set_slot_unchoke(bind(&ResourceManager::receive_upload_unchoke, this, STD_PLACEHOLDERS::_1)); -+ choke_base_type::back()->down_queue()->set_slot_unchoke(bind(&ResourceManager::receive_download_unchoke, this, STD_PLACEHOLDERS::_1)); -+ choke_base_type::back()->up_queue()->set_slot_can_unchoke(bind(&ResourceManager::retrieve_upload_can_unchoke, this)); -+ choke_base_type::back()->down_queue()->set_slot_can_unchoke(bind(&ResourceManager::retrieve_download_can_unchoke, this)); -+ choke_base_type::back()->up_queue()->set_slot_connection(bind(&PeerConnectionBase::receive_upload_choke, STD_PLACEHOLDERS::_1, STD_PLACEHOLDERS::_2)); -+ choke_base_type::back()->down_queue()->set_slot_connection(bind(&PeerConnectionBase::receive_download_choke, STD_PLACEHOLDERS::_1, STD_PLACEHOLDERS::_2)); - } - - ResourceManager::~ResourceManager() { diff --git a/net/libtorrent/patches/patch-src_torrent_http.h b/net/libtorrent/patches/patch-src_torrent_http.h deleted file mode 100644 index b95f0cfd457..00000000000 --- a/net/libtorrent/patches/patch-src_torrent_http.h +++ /dev/null @@ -1,31 +0,0 @@ -$NetBSD: patch-src_torrent_http.h,v 1.1 2013/05/09 14:26:41 joerg Exp $ - ---- src/torrent/http.h.orig 2012-02-14 03:15:27.000000000 +0000 -+++ src/torrent/http.h -@@ -40,7 +40,13 @@ - #include <string> - #include <iosfwd> - #include <list> -+#if __cplusplus >= 201103L -+#include <functional> -+using std::function; -+#else - #include <tr1/functional> -+using std::tr1::function; -+#endif - #include <torrent/common.h> - - namespace torrent { -@@ -51,9 +57,9 @@ namespace torrent { - // Keep in mind that these objects get reused. - class LIBTORRENT_EXPORT Http { - public: -- typedef std::tr1::function<void ()> slot_void; -- typedef std::tr1::function<void (const std::string&)> slot_string; -- typedef std::tr1::function<Http* (void)> slot_http; -+ typedef function<void ()> slot_void; -+ typedef function<void (const std::string&)> slot_string; -+ typedef function<Http* (void)> slot_http; - - typedef std::list<slot_void> signal_void; - typedef std::list<slot_string> signal_string; diff --git a/net/libtorrent/patches/patch-src_torrent_peer_client__list.cc b/net/libtorrent/patches/patch-src_torrent_peer_client__list.cc deleted file mode 100644 index fa13396909b..00000000000 --- a/net/libtorrent/patches/patch-src_torrent_peer_client__list.cc +++ /dev/null @@ -1,29 +0,0 @@ -$NetBSD: patch-src_torrent_peer_client__list.cc,v 1.1 2013/05/09 14:26:41 joerg Exp $ - ---- src/torrent/peer/client_list.cc.orig 2012-02-14 03:15:27.000000000 +0000 -+++ src/torrent/peer/client_list.cc -@@ -38,7 +38,15 @@ - - #include <algorithm> - #include <rak/string_manip.h> -+#if __cplusplus >= 201103L -+#include <functional> -+using std::bind; -+#define STD_PLACEHOLDERS std::placeholders -+#else - #include <tr1/functional> -+using std::tr1::bind; -+#define STD_PLACEHOLDERS std::tr1::placeholders -+#endif - - #include "client_list.h" - #include "exceptions.h" -@@ -227,7 +235,7 @@ ClientList::retrieve_id(ClientInfo* dest - return false; - } - -- const_iterator itr = std::find_if(begin() + 1, end(), std::tr1::bind(&ClientInfo::intersects, *dest, std::tr1::placeholders::_1)); -+ const_iterator itr = std::find_if(begin() + 1, end(), bind(&ClientInfo::intersects, *dest, STD_PLACEHOLDERS::_1)); - - if (itr == end()) - dest->set_info(begin()->info()); diff --git a/net/libtorrent/patches/patch-src_torrent_peer_connection__list.h b/net/libtorrent/patches/patch-src_torrent_peer_connection__list.h deleted file mode 100644 index a8c98205f61..00000000000 --- a/net/libtorrent/patches/patch-src_torrent_peer_connection__list.h +++ /dev/null @@ -1,44 +0,0 @@ -$NetBSD: patch-src_torrent_peer_connection__list.h,v 1.1 2013/05/09 14:26:41 joerg Exp $ - ---- src/torrent/peer/connection_list.h.orig 2012-04-09 06:38:58.000000000 +0000 -+++ src/torrent/peer/connection_list.h -@@ -39,7 +39,13 @@ - - #include <list> - #include <vector> -+#if __cplusplus >= 201103L -+#include <functional> -+using std::function; -+#else - #include <tr1/functional> -+using std::tr1::function; -+#endif - #include <torrent/common.h> - #include <torrent/hash_string.h> - -@@ -66,7 +72,7 @@ public: - typedef std::vector<Peer*> base_type; - typedef std::vector<HashString> queue_type; - typedef uint32_t size_type; -- typedef std::tr1::function<void (Peer*)> slot_peer_type; -+ typedef function<void (Peer*)> slot_peer_type; - typedef std::list<slot_peer_type> signal_peer_type; - - typedef PeerConnectionBase* (*slot_new_conn_type)(bool encrypted); -@@ -90,10 +96,12 @@ public: - using base_type::rend; - - // Make sure any change here match PeerList's flags. -- static const int disconnect_available = (1 << 0); -- static const int disconnect_quick = (1 << 1); -- static const int disconnect_unwanted = (1 << 2); -- static const int disconnect_delayed = (1 << 3); -+ enum { -+ disconnect_available = (1 << 0), -+ disconnect_quick = (1 << 1), -+ disconnect_unwanted = (1 << 2), -+ disconnect_delayed = (1 << 3) -+ }; - - ConnectionList(DownloadMain* download); - diff --git a/net/libtorrent/patches/patch-src_torrent_poll.h b/net/libtorrent/patches/patch-src_torrent_poll.h deleted file mode 100644 index b29a06070f8..00000000000 --- a/net/libtorrent/patches/patch-src_torrent_poll.h +++ /dev/null @@ -1,27 +0,0 @@ -$NetBSD: patch-src_torrent_poll.h,v 1.1 2013/05/09 14:26:41 joerg Exp $ - ---- src/torrent/poll.h.orig 2012-02-14 04:05:05.000000000 +0000 -+++ src/torrent/poll.h -@@ -37,7 +37,13 @@ - #ifndef LIBTORRENT_TORRENT_POLL_H - #define LIBTORRENT_TORRENT_POLL_H - -+#if __cplusplus >= 201103L -+#include <functional> -+using std::function; -+#else - #include <tr1/functional> -+using std::tr1::function; -+#endif - #include <torrent/common.h> - - namespace torrent { -@@ -46,7 +52,7 @@ class Event; - - class LIBTORRENT_EXPORT Poll { - public: -- typedef std::tr1::function<Poll* ()> slot_poll; -+ typedef function<Poll* ()> slot_poll; - - static const int poll_worker_thread = 0x1; - static const uint32_t flag_waive_global_lock = 0x1; diff --git a/net/libtorrent/patches/patch-src_torrent_tracker__controller.cc b/net/libtorrent/patches/patch-src_torrent_tracker__controller.cc deleted file mode 100644 index e63bb80bd7f..00000000000 --- a/net/libtorrent/patches/patch-src_torrent_tracker__controller.cc +++ /dev/null @@ -1,28 +0,0 @@ -$NetBSD: patch-src_torrent_tracker__controller.cc,v 1.1 2013/05/09 14:26:41 joerg Exp $ - ---- src/torrent/tracker_controller.cc.orig 2012-04-10 12:46:33.000000000 +0000 -+++ src/torrent/tracker_controller.cc -@@ -50,7 +50,11 @@ - #define LT_LOG_TRACKER(log_level, log_fmt, ...) \ - lt_log_print_info(LOG_TRACKER_##log_level, m_tracker_list->info(), "tracker_controller", log_fmt, __VA_ARGS__); - --namespace tr1 { using namespace std::tr1; } -+#if __cplusplus >= 201103L -+using std::bind; -+#else -+using std::tr1::bind; -+#endif - - namespace torrent { - -@@ -91,8 +95,8 @@ TrackerController::TrackerController(Tra - m_tracker_list(trackers), - m_private(new tracker_controller_private) { - -- m_private->task_timeout.slot() = std::tr1::bind(&TrackerController::do_timeout, this); -- m_private->task_scrape.slot() = std::tr1::bind(&TrackerController::do_scrape, this); -+ m_private->task_timeout.slot() = bind(&TrackerController::do_timeout, this); -+ m_private->task_scrape.slot() = bind(&TrackerController::do_scrape, this); - } - - TrackerController::~TrackerController() { diff --git a/net/libtorrent/patches/patch-src_torrent_tracker__controller.h b/net/libtorrent/patches/patch-src_torrent_tracker__controller.h deleted file mode 100644 index a944a98488d..00000000000 --- a/net/libtorrent/patches/patch-src_torrent_tracker__controller.h +++ /dev/null @@ -1,33 +0,0 @@ -$NetBSD: patch-src_torrent_tracker__controller.h,v 1.1 2013/05/09 14:26:41 joerg Exp $ - ---- src/torrent/tracker_controller.h.orig 2012-03-19 11:36:45.000000000 +0000 -+++ src/torrent/tracker_controller.h -@@ -38,7 +38,13 @@ - #define LIBTORRENT_TRACKER_CONTROLLER_H - - #include <string> -+#if __cplusplus >= 201103L -+#include <functional> -+using std::function; -+#else - #include <tr1/functional> -+using std::tr1::function; -+#endif - #include <torrent/common.h> - #include <torrent/tracker.h> - -@@ -55,10 +61,10 @@ class LIBTORRENT_EXPORT TrackerControlle - public: - typedef AddressList address_list; - -- typedef std::tr1::function<void (void)> slot_void; -- typedef std::tr1::function<void (const std::string&)> slot_string; -- typedef std::tr1::function<uint32_t (AddressList*)> slot_address_list; -- typedef std::tr1::function<void (Tracker*)> slot_tracker; -+ typedef function<void (void)> slot_void; -+ typedef function<void (const std::string&)> slot_string; -+ typedef function<uint32_t (AddressList*)> slot_address_list; -+ typedef function<void (Tracker*)> slot_tracker; - - static const int flag_send_update = 0x1; - static const int flag_send_completed = 0x2; diff --git a/net/libtorrent/patches/patch-src_torrent_tracker__list.cc b/net/libtorrent/patches/patch-src_torrent_tracker__list.cc deleted file mode 100644 index 29771711fbd..00000000000 --- a/net/libtorrent/patches/patch-src_torrent_tracker__list.cc +++ /dev/null @@ -1,30 +0,0 @@ -$NetBSD: patch-src_torrent_tracker__list.cc,v 1.1 2013/05/09 14:26:41 joerg Exp $ - ---- src/torrent/tracker_list.cc.orig 2012-04-09 06:38:58.000000000 +0000 -+++ src/torrent/tracker_list.cc -@@ -56,7 +56,13 @@ - #define LT_LOG_TRACKER(log_level, log_fmt, ...) \ - lt_log_print_info(LOG_TRACKER_##log_level, info(), "tracker_list", log_fmt, __VA_ARGS__); - --namespace tr1 { using namespace std::tr1; } -+#if __cplusplus >= 201103L -+using std::bind; -+#define STD_PLACEHOLDERS std::placeholders -+#else -+using std::tr1::bind; -+#define STD_PLACEHOLDERS std::tr1::placeholders -+#endif - - namespace torrent { - -@@ -221,8 +227,8 @@ TrackerList::insert_url(unsigned int gro - - TrackerList::iterator - TrackerList::find_url(const std::string& url) { -- return std::find_if(begin(), end(), tr1::bind(std::equal_to<std::string>(), url, -- tr1::bind(&Tracker::url, tr1::placeholders::_1))); -+ return std::find_if(begin(), end(), bind(std::equal_to<std::string>(), url, -+ bind(&Tracker::url, STD_PLACEHOLDERS::_1))); - } - - TrackerList::iterator diff --git a/net/libtorrent/patches/patch-src_torrent_tracker__list.h b/net/libtorrent/patches/patch-src_torrent_tracker__list.h deleted file mode 100644 index 3ef6a6c1e35..00000000000 --- a/net/libtorrent/patches/patch-src_torrent_tracker__list.h +++ /dev/null @@ -1,31 +0,0 @@ -$NetBSD: patch-src_torrent_tracker__list.h,v 1.1 2013/05/09 14:26:41 joerg Exp $ - ---- src/torrent/tracker_list.h.orig 2012-04-09 06:38:58.000000000 +0000 -+++ src/torrent/tracker_list.h -@@ -41,7 +41,13 @@ - #include <string> - #include <vector> - #include <torrent/common.h> -+#if __cplusplus >= 201103L -+#include <functional> -+using std::function; -+#else - #include <tr1/functional> -+using std::tr1::function; -+#endif - - namespace torrent { - -@@ -64,9 +70,9 @@ public: - typedef std::vector<Tracker*> base_type; - typedef AddressList address_list; - -- typedef std::tr1::function<void (Tracker*)> slot_tracker; -- typedef std::tr1::function<void (Tracker*, const std::string&)> slot_string; -- typedef std::tr1::function<uint32_t (Tracker*, AddressList*)> slot_address_list; -+ typedef function<void (Tracker*)> slot_tracker; -+ typedef function<void (Tracker*, const std::string&)> slot_string; -+ typedef function<uint32_t (Tracker*, AddressList*)> slot_address_list; - - using base_type::value_type; - diff --git a/net/libtorrent/patches/patch-src_torrent_utils_extents.h b/net/libtorrent/patches/patch-src_torrent_utils_extents.h deleted file mode 100644 index c541a73c0a4..00000000000 --- a/net/libtorrent/patches/patch-src_torrent_utils_extents.h +++ /dev/null @@ -1,46 +0,0 @@ -$NetBSD: patch-src_torrent_utils_extents.h,v 1.1 2013/05/09 14:26:41 joerg Exp $ - ---- src/torrent/utils/extents.h.orig 2012-02-24 06:24:02.000000000 +0000 -+++ src/torrent/utils/extents.h -@@ -37,7 +37,13 @@ - #ifndef LIBTORRENT_UTILS_EXTENTS_H - #define LIBTORRENT_UTILS_EXTENTS_H - -+#if __cplusplus >= 201103L -+#include <array> -+using std::array; -+#else - #include <tr1/array> -+using std::tr1::array; -+#endif - - namespace torrent { - -@@ -48,12 +54,24 @@ struct extents_base { - typedef std::pair<extents_base*, Tp> mapped_type; - typedef Tp mapped_value_type; - -- typedef std::tr1::array<mapped_type, TableSize> table_type; -+ typedef array<mapped_type, TableSize> table_type; - - extents_base(key_type pos, unsigned int mb, mapped_value_type val) : -- mask_bits(mb), position(pos) { table.assign(mapped_type(NULL, mapped_value_type())); } -+ mask_bits(mb), position(pos) { -+#if __cplusplus >= 201103L -+ table.fill(mapped_type(NULL, mapped_value_type())); -+#else -+ table.assign(mapped_type(NULL, mapped_value_type())); -+#endif -+ } - extents_base(extents_base* parent, typename table_type::const_iterator itr) : -- mask_bits(parent->mask_bits - TableBits), position(parent->partition_pos(itr)) { table.assign(mapped_type(NULL, itr->second)); } -+ mask_bits(parent->mask_bits - TableBits), position(parent->partition_pos(itr)) { -+#if __cplusplus >= 201103L -+ table.fill(mapped_type(NULL, itr->second)); -+#else -+ table.assign(mapped_type(NULL, itr->second)); -+#endif -+ } - ~extents_base(); - - bool is_divisible(key_type key) const { return key % mask_bits == 0; } diff --git a/net/libtorrent/patches/patch-src_torrent_utils_log.cc b/net/libtorrent/patches/patch-src_torrent_utils_log.cc deleted file mode 100644 index 0b7e9562d9a..00000000000 --- a/net/libtorrent/patches/patch-src_torrent_utils_log.cc +++ /dev/null @@ -1,50 +0,0 @@ -$NetBSD: patch-src_torrent_utils_log.cc,v 1.1 2013/05/09 14:26:41 joerg Exp $ - ---- src/torrent/utils/log.cc.orig 2012-03-20 15:10:16.000000000 +0000 -+++ src/torrent/utils/log.cc -@@ -54,10 +54,15 @@ - #include <fstream> - #include <functional> - #include <memory> -+#if __cplusplus >= 201103L -+#include <memory> -+#include <functional> -+namespace tr1 { using namespace std; } -+#else - #include <tr1/functional> - #include <tr1/memory> -- - namespace tr1 { using namespace std::tr1; } -+#endif - - namespace torrent { - -@@ -158,6 +163,7 @@ log_group::internal_print(const HashStri - va_list ap; - unsigned int buffer_size = 4096; - char buffer[buffer_size]; -+ char *bufp = buffer; - char* first = buffer; - - if (hash != NULL && subsystem != NULL) { -@@ -176,7 +182,7 @@ log_group::internal_print(const HashStri - pthread_mutex_lock(&log_mutex); - std::for_each(m_first, m_last, tr1::bind(&log_slot::operator(), - tr1::placeholders::_1, -- buffer, -+ bufp, - std::distance(buffer, first), - std::distance(log_groups.begin(), this))); - if (dump_data != NULL) -@@ -238,7 +244,11 @@ void - log_cleanup() { - pthread_mutex_lock(&log_mutex); - -+#if __cplusplus >= 201103L -+ log_groups.fill(log_group()); -+#else - log_groups.assign(log_group()); -+#endif - log_outputs.clear(); - log_children.clear(); - diff --git a/net/libtorrent/patches/patch-src_torrent_utils_log.h b/net/libtorrent/patches/patch-src_torrent_utils_log.h deleted file mode 100644 index d028d069a7a..00000000000 --- a/net/libtorrent/patches/patch-src_torrent_utils_log.h +++ /dev/null @@ -1,40 +0,0 @@ -$NetBSD: patch-src_torrent_utils_log.h,v 1.1 2013/05/09 14:26:41 joerg Exp $ - ---- src/torrent/utils/log.h.orig 2012-04-20 06:41:43.000000000 +0000 -+++ src/torrent/utils/log.h -@@ -39,8 +39,17 @@ - - #include <string> - #include <vector> -+#if __cplusplus >= 201103L -+#include <array> -+#include <functional> -+using std::array; -+using std::function; -+#else - #include <tr1/array> - #include <tr1/functional> -+using std::tr1::array; -+using std::tr1::function; -+#endif - #include <torrent/common.h> - - namespace torrent { -@@ -147,7 +156,7 @@ class DownloadInfo; - class download_data; - class log_buffer; - --typedef std::tr1::function<void (const char*, unsigned int, int)> log_slot; -+typedef function<void (const char*, unsigned int, int)> log_slot; - typedef std::vector<std::pair<std::string, log_slot> > log_output_list; - - class LIBTORRENT_EXPORT log_group { -@@ -185,7 +194,7 @@ private: - log_slot* m_last; - }; - --typedef std::tr1::array<log_group, LOG_GROUP_MAX_SIZE> log_group_list; -+typedef array<log_group, LOG_GROUP_MAX_SIZE> log_group_list; - - extern log_group_list log_groups LIBTORRENT_EXPORT; - extern log_output_list log_outputs LIBTORRENT_EXPORT; diff --git a/net/libtorrent/patches/patch-src_torrent_utils_log__buffer.cc b/net/libtorrent/patches/patch-src_torrent_utils_log__buffer.cc deleted file mode 100644 index d5eac2a0a71..00000000000 --- a/net/libtorrent/patches/patch-src_torrent_utils_log__buffer.cc +++ /dev/null @@ -1,20 +0,0 @@ -$NetBSD: patch-src_torrent_utils_log__buffer.cc,v 1.1 2013/05/09 14:26:41 joerg Exp $ - ---- src/torrent/utils/log_buffer.cc.orig 2012-03-13 12:09:16.000000000 +0000 -+++ src/torrent/utils/log_buffer.cc -@@ -39,11 +39,14 @@ - #include "log_buffer.h" - - #include <functional> --#include <tr1/functional> - - #include "globals.h" - -+#if __cplusplus >= 201103L -+namespace tr1 { using namespace std; } -+#else - namespace tr1 { using namespace std::tr1; } -+#endif - - namespace torrent { - diff --git a/net/libtorrent/patches/patch-src_torrent_utils_log__buffer.h b/net/libtorrent/patches/patch-src_torrent_utils_log__buffer.h deleted file mode 100644 index ee218c70c0f..00000000000 --- a/net/libtorrent/patches/patch-src_torrent_utils_log__buffer.h +++ /dev/null @@ -1,27 +0,0 @@ -$NetBSD: patch-src_torrent_utils_log__buffer.h,v 1.1 2013/05/09 14:26:41 joerg Exp $ - ---- src/torrent/utils/log_buffer.h.orig 2012-03-13 12:09:16.000000000 +0000 -+++ src/torrent/utils/log_buffer.h -@@ -40,7 +40,13 @@ - #include <string> - #include <deque> - #include <pthread.h> -+#if __cplusplus >= 201103L -+#include <functional> -+using std::function; -+#else - #include <tr1/functional> -+using std::tr1::function; -+#endif - #include <torrent/common.h> - - namespace torrent { -@@ -60,7 +66,7 @@ struct log_entry { - class LIBTORRENT_EXPORT log_buffer : private std::deque<log_entry> { - public: - typedef std::deque<log_entry> base_type; -- typedef std::tr1::function<void ()> slot_void; -+ typedef function<void ()> slot_void; - - using base_type::iterator; - using base_type::const_iterator; diff --git a/net/libtorrent/patches/patch-src_torrent_utils_signal__bitfield.h b/net/libtorrent/patches/patch-src_torrent_utils_signal__bitfield.h deleted file mode 100644 index ca26b5bd79f..00000000000 --- a/net/libtorrent/patches/patch-src_torrent_utils_signal__bitfield.h +++ /dev/null @@ -1,27 +0,0 @@ -$NetBSD: patch-src_torrent_utils_signal__bitfield.h,v 1.1 2013/05/09 14:26:41 joerg Exp $ - ---- src/torrent/utils/signal_bitfield.h.orig 2012-04-20 06:41:43.000000000 +0000 -+++ src/torrent/utils/signal_bitfield.h -@@ -37,7 +37,13 @@ - #ifndef LIBTORRENT_UTILS_SIGNAL_BITFIELD_H - #define LIBTORRENT_UTILS_SIGNAL_BITFIELD_H - -+#if __cplusplus >= 201103L -+#include <functional> -+using std::function; -+#else - #include <tr1/functional> -+using std::tr1::function; -+#endif - #include <torrent/common.h> - - namespace torrent { -@@ -45,7 +51,7 @@ namespace torrent { - class LIBTORRENT_EXPORT lt_cacheline_aligned signal_bitfield { - public: - typedef uint32_t bitfield_type; -- typedef std::tr1::function<void ()> slot_type; -+ typedef function<void ()> slot_type; - - static const unsigned int max_size = 32; - diff --git a/net/libtorrent/patches/patch-src_torrent_utils_thread__base.h b/net/libtorrent/patches/patch-src_torrent_utils_thread__base.h deleted file mode 100644 index 5d6cf5ef6d6..00000000000 --- a/net/libtorrent/patches/patch-src_torrent_utils_thread__base.h +++ /dev/null @@ -1,29 +0,0 @@ -$NetBSD: patch-src_torrent_utils_thread__base.h,v 1.1 2013/05/09 14:26:41 joerg Exp $ - ---- src/torrent/utils/thread_base.h.orig 2012-03-05 12:18:18.000000000 +0000 -+++ src/torrent/utils/thread_base.h -@@ -41,7 +41,13 @@ - #include <sys/types.h> - #include <torrent/common.h> - #include <torrent/utils/signal_bitfield.h> -+#if __cplusplus >= 201103L -+#include <functional> -+using std::function; -+#else - #include <tr1/functional> -+using std::tr1::function; -+#endif - - namespace torrent { - -@@ -50,8 +56,8 @@ class Poll; - class LIBTORRENT_EXPORT lt_cacheline_aligned thread_base { - public: - typedef void* (*pthread_func)(void*); -- typedef std::tr1::function<void ()> slot_void; -- typedef std::tr1::function<uint64_t ()> slot_timer; -+ typedef function<void ()> slot_void; -+ typedef function<uint64_t ()> slot_timer; - typedef class signal_bitfield signal_type; - - enum state_type { diff --git a/net/libtorrent/patches/patch-src_tracker_tracker__http.cc b/net/libtorrent/patches/patch-src_tracker_tracker__http.cc deleted file mode 100644 index 13f7495ed48..00000000000 --- a/net/libtorrent/patches/patch-src_tracker_tracker__http.cc +++ /dev/null @@ -1,38 +0,0 @@ -$NetBSD: patch-src_tracker_tracker__http.cc,v 1.1 2013/05/09 14:26:41 joerg Exp $ - ---- src/tracker/tracker_http.cc.orig 2012-03-19 11:36:45.000000000 +0000 -+++ src/tracker/tracker_http.cc -@@ -58,14 +58,20 @@ - #include "globals.h" - #include "manager.h" - -+#if __cplusplus >= 201103L -+using std::bind; -+#define STD_PLACEHOLDERS std::placeholders -+#else -+using std::tr1::bind; -+#define STD_PLACEHOLDERS std::tr1::placeholders -+#endif -+ - #define LT_LOG_TRACKER(log_level, log_fmt, ...) \ - lt_log_print_info(LOG_TRACKER_##log_level, m_parent->info(), "tracker", "[%u] " log_fmt, group(), __VA_ARGS__); - - #define LT_LOG_TRACKER_DUMP(log_level, log_dump_data, log_dump_size, log_fmt, ...) \ - lt_log_print_info_dump(LOG_TRACKER_##log_level, log_dump_data, log_dump_size, m_parent->info(), "tracker", "[%u] " log_fmt, group(), __VA_ARGS__); - --namespace tr1 { using namespace std::tr1; } -- - namespace torrent { - - TrackerHttp::TrackerHttp(TrackerList* parent, const std::string& url, int flags) : -@@ -74,8 +80,8 @@ TrackerHttp::TrackerHttp(TrackerList* pa - m_get(Http::slot_factory()()), - m_data(NULL) { - -- m_get->signal_done().push_back(tr1::bind(&TrackerHttp::receive_done, this)); -- m_get->signal_failed().push_back(tr1::bind(&TrackerHttp::receive_failed, this, tr1::placeholders::_1)); -+ m_get->signal_done().push_back(bind(&TrackerHttp::receive_done, this)); -+ m_get->signal_failed().push_back(bind(&TrackerHttp::receive_failed, this, STD_PLACEHOLDERS::_1)); - - // Haven't considered if this needs any stronger error detection, - // can dropping the '?' be used for malicious purposes? diff --git a/net/libtorrent/patches/patch-src_tracker_tracker__udp.cc b/net/libtorrent/patches/patch-src_tracker_tracker__udp.cc deleted file mode 100644 index 17d2eef6c39..00000000000 --- a/net/libtorrent/patches/patch-src_tracker_tracker__udp.cc +++ /dev/null @@ -1,26 +0,0 @@ -$NetBSD: patch-src_tracker_tracker__udp.cc,v 1.1 2013/05/09 14:26:41 joerg Exp $ - ---- src/tracker/tracker_udp.cc.orig 2012-04-20 06:42:32.000000000 +0000 -+++ src/tracker/tracker_udp.cc -@@ -56,6 +56,12 @@ - #include "tracker_udp.h" - #include "manager.h" - -+#if __cplusplus >= 201103L -+using std::bind; -+#else -+using std::tr1::bind; -+#endif -+ - #define LT_LOG_TRACKER(log_level, log_fmt, ...) \ - lt_log_print_info(LOG_TRACKER_##log_level, m_parent->info(), "tracker", "[%u] " log_fmt, group(), __VA_ARGS__); - -@@ -71,7 +77,7 @@ TrackerUdp::TrackerUdp(TrackerList* pare - m_readBuffer(NULL), - m_writeBuffer(NULL) { - -- m_taskTimeout.slot() = std::tr1::bind(&TrackerUdp::receive_timeout, this); -+ m_taskTimeout.slot() = bind(&TrackerUdp::receive_timeout, this); - } - - TrackerUdp::~TrackerUdp() { diff --git a/net/rtorrent/distinfo b/net/rtorrent/distinfo index 07da46fa6ca..e53a386c05e 100644 --- a/net/rtorrent/distinfo +++ b/net/rtorrent/distinfo @@ -1,4 +1,4 @@ -$NetBSD: distinfo,v 1.31 2013/05/09 14:28:25 joerg Exp $ +$NetBSD: distinfo,v 1.32 2013/06/02 22:52:14 tron Exp $ SHA1 (rtorrent-0.9.2.tar.gz) = 2a642d722745091265037ed8929a23c237a3b99f RMD160 (rtorrent-0.9.2.tar.gz) = 130a4c7f3bd018f7247d4561170d6878ab7a120f @@ -7,48 +7,6 @@ SHA1 (patch-ab) = 87873bb32166d00398ab0ef6421a6fe85a55c914 SHA1 (patch-ad) = f993340975dca61d5f7d7014b6959ee50b12a7b4 SHA1 (patch-ae) = a370881bfdd8534eb25fcbcff8d258b19797941f SHA1 (patch-af) = 842a01cbc75e61092b4d33fe9155a728e7c502e6 -SHA1 (patch-ag) = 30b3613f009a68266d82215ce0aea5ab370389ab +SHA1 (patch-ag) = b7e5fe242b19f994f013acc9ec54a65fed729c29 SHA1 (patch-rak_functional__fun.h) = b495de4d2a3c2ef0ba3caaf8dd8dede7f322de91 SHA1 (patch-rak_priority__queue__default.h) = 551bebdce83b2d84c31bafdb9f02217ea0df3a86 -SHA1 (patch-src_command__download.cc) = 95df3310ebf9e1aae4d46527bf7231d14824f2cf -SHA1 (patch-src_command__dynamic.cc) = 1008ace9f654deea91be1ed6f9d2b9fef837de57 -SHA1 (patch-src_command__events.cc) = 680648dddb15f65e6a572aed24343b1f4cba816d -SHA1 (patch-src_command__file.cc) = 1ceef7bdc5ccaec7d88ec8d1fc16e2ad613110f7 -SHA1 (patch-src_command__groups.cc) = 1c2c8cd2450281e1953bf21f1e431e8313aac9b0 -SHA1 (patch-src_command__helpers.h) = 95532bf8d42dc1779a50014bcc3a82126ca51e4f -SHA1 (patch-src_command__ip.cc) = 370e91d7659514a4a0f431dea76718264ceec540 -SHA1 (patch-src_command__local.cc) = cb8f647e1964682bc4dbdb6816d39afe6548e206 -SHA1 (patch-src_command__network.cc) = f068eee63fe4a21402da52cb8d7b8bd1987b3dcf -SHA1 (patch-src_command__peer.cc) = d47190cf3cde5da21066b440cc368f21ddddd3cd -SHA1 (patch-src_command__scheduler.cc) = 87496e0ec21d398db6560870866881b901e5c398 -SHA1 (patch-src_command__throttle.cc) = 39f47456ad9be5336d68009066b3a9592e7c4a45 -SHA1 (patch-src_command__tracker.cc) = 404981b7920c70b5d7dd72d18cdbd015e7b8d43f -SHA1 (patch-src_command__ui.cc) = 437a8ee38a1a4ff3c279b0d1228d6f4b44fdf0b9 -SHA1 (patch-src_control.cc) = 57a12b53d874bf452ba3fe015867f407ac1b2548 -SHA1 (patch-src_core_curl__get.cc) = e4d3c43c2ad25405e2cd4cfd79f13f41afa74afe -SHA1 (patch-src_core_curl__stack.cc) = b171cd66d2b97e447a2dcb8c251e0a0f2665148d -SHA1 (patch-src_core_dht__manager.cc) = 13d88e128b3e95871f0df2005d635c3d32f1ffc6 -SHA1 (patch-src_core_download.cc) = 07095401885edcaef27ee98ab61a414ea51ca18d -SHA1 (patch-src_core_download__factory.cc) = 8db74e2d8a45c6b4575414df3aa030d3890cf140 -SHA1 (patch-src_core_download__list.cc) = 6b3e104e514ec86a5d3622b3719aae7d9617d7b0 -SHA1 (patch-src_core_http__queue.cc) = 2d74ce666e0dc415ac89d08ccc747c258541b504 -SHA1 (patch-src_core_manager.cc) = 767880f4d6d2183fbc3f9914926db11c57b72281 -SHA1 (patch-src_core_manager.h) = 256c12d550d7834892b7d6c2623b4219da6e79b5 -SHA1 (patch-src_core_view.cc) = 0ef92b1fe3b9fcb341327046251997b58ebcf050 -SHA1 (patch-src_display_frame.cc) = 2003fbb6679fca5e7d241375650e60a73fb6cd53 -SHA1 (patch-src_display_manager.cc) = 12a21935186ad3a2eb3287d9999c03b795fd6549 -SHA1 (patch-src_display_window.cc) = 73ddd33a509e95f3f276a58e0bd2ecc4d660409c -SHA1 (patch-src_display_window__file__list.cc) = fe996ced6a519e8e84ef149a167f688ab2517a83 -SHA1 (patch-src_display_window__log.cc) = b916f37534c53867f9c8ffb2116ef42ef60e5cd7 -SHA1 (patch-src_rpc_command.h) = 87289f32efa98bd2fdd0093f5ffcb1d98ba11422 -SHA1 (patch-src_rpc_command__scheduler.cc) = 01be783401c822fb59201215b5596eecfce3cc3c -SHA1 (patch-src_rpc_command__scheduler__item.h) = 727443c2601cbaf2037a933ea6dbfb1b0ff83c77 -SHA1 (patch-src_rpc_exec__file.cc) = 22bbbfabf60761196258ddefec90f9f53d9738e8 -SHA1 (patch-src_rpc_exec__file.h) = 39dd7648d2192bb228f641abfeb2b67fd0a6bf91 -SHA1 (patch-src_rpc_object__storage.cc) = da39a3ee5e6b4b0d3255bfef95601890afd80709 -SHA1 (patch-src_rpc_object__storage.h) = e338ddc4c918aac11ee0367b951e6946e6157430 -SHA1 (patch-src_rpc_xmlrpc.h) = d50426a6b1337005084b9b1fcb5eb52ae2c407d8 -SHA1 (patch-src_signal__handler.cc) = 9d83800266a8d11d6fb605b45dc431ee3adda7b2 -SHA1 (patch-src_thread__base.cc) = cf685d201d57ffe368fcdd348ae6bcb8655ccfb7 -SHA1 (patch-src_ui_element__log__complete.cc) = a8f72b8d16259224163bdcd51ce506c67c141272 -SHA1 (patch-src_ui_element__peer__list.cc) = 3e32fb4139062274252e799b8c5f4110075923d9 diff --git a/net/rtorrent/patches/patch-ag b/net/rtorrent/patches/patch-ag index bf315b4c07c..1bc8cc400b1 100644 --- a/net/rtorrent/patches/patch-ag +++ b/net/rtorrent/patches/patch-ag @@ -1,42 +1,12 @@ -$NetBSD: patch-ag,v 1.3 2013/05/09 14:28:25 joerg Exp $ +$NetBSD: patch-ag,v 1.4 2013/06/02 22:52:14 tron Exp $ Fix handling of command line options. Please look here for details: http://libtorrent.rakshasa.no/ticket/2657 --- src/main.cc.orig 2012-03-20 15:09:58.000000000 +0000 -+++ src/main.cc -@@ -79,6 +79,14 @@ - - #include "thread_worker.h" - -+#if __cplusplus >= 201103L -+#include <functional> -+using std::bind; -+#else -+#include <tr1/functional> -+using std::tr1::bind; -+#endif -+ - void handle_sigbus(int signum, siginfo_t* sa, void* ptr); - void do_panic(int signum); - void print_help(); -@@ -208,11 +216,11 @@ main(int argc, char** argv) { - torrent::log_add_group_output(torrent::LOG_NOTICE, "important"); - torrent::log_add_group_output(torrent::LOG_INFO, "complete"); - -- torrent::Poll::slot_create_poll() = std::tr1::bind(&core::create_poll); -+ torrent::Poll::slot_create_poll() = std::bind(&core::create_poll); - - torrent::initialize(); -- torrent::main_thread()->slot_do_work() = tr1::bind(&client_perform); -- torrent::main_thread()->slot_next_timeout() = tr1::bind(&client_next_timeout, control); -+ torrent::main_thread()->slot_do_work() = bind(&client_perform); -+ torrent::main_thread()->slot_next_timeout() = bind(&client_next_timeout, control); - - worker_thread = new ThreadWorker(); - worker_thread->init_thread(); -@@ -843,14 +851,14 @@ main(int argc, char** argv) { ++++ src/main.cc 2012-05-14 23:44:41.000000000 +0100 +@@ -843,14 +843,14 @@ } #endif diff --git a/net/rtorrent/patches/patch-rak_functional__fun.h b/net/rtorrent/patches/patch-rak_functional__fun.h deleted file mode 100644 index 50a186a0fad..00000000000 --- a/net/rtorrent/patches/patch-rak_functional__fun.h +++ /dev/null @@ -1,102 +0,0 @@ -$NetBSD: patch-rak_functional__fun.h,v 1.1 2013/05/09 14:28:25 joerg Exp $ - ---- rak/functional_fun.h.orig 2013-05-03 22:36:30.000000000 +0000 -+++ rak/functional_fun.h -@@ -53,8 +53,13 @@ - - #include <memory> - #include <functional> --#include <tr1/functional> --#include <tr1/memory> -+#if __cplusplus >= 201103L -+#include <memory> -+using std::shared_ptr; -+#else -+#include <memory> -+using std::tr1::shared_ptr; -+#endif - - namespace rak { - -@@ -98,13 +103,13 @@ public: - - bool is_valid() const { return m_base.get() != NULL; } - -- void set(base_type* base) { m_base = std::tr1::shared_ptr<base_type>(base); } -+ void set(base_type* base) { m_base = shared_ptr<base_type>(base); } - base_type* release() { return m_base.release(); } - - Result operator () () { return (*m_base)(); } - - private: -- std::tr1::shared_ptr<base_type> m_base; -+ shared_ptr<base_type> m_base; - }; - - template <typename Result, typename Arg1> -@@ -115,13 +120,13 @@ public: - - bool is_valid() const { return m_base.get() != NULL; } - -- void set(base_type* base) { m_base = std::tr1::shared_ptr<base_type>(base); } -+ void set(base_type* base) { m_base = shared_ptr<base_type>(base); } - base_type* release() { return m_base.release(); } - - Result operator () (Arg1 arg1) { return (*m_base)(arg1); } - - private: -- std::tr1::shared_ptr<base_type> m_base; -+ shared_ptr<base_type> m_base; - }; - - template <typename Result, typename Arg1, typename Arg2> -@@ -132,13 +137,13 @@ public: - - bool is_valid() const { return m_base.get() != NULL; } - -- void set(base_type* base) { m_base = std::tr1::shared_ptr<base_type>(base); } -+ void set(base_type* base) { m_base = shared_ptr<base_type>(base); } - base_type* release() { return m_base.release(); } - - Result operator () (Arg1 arg1, Arg2 arg2) { return (*m_base)(arg1, arg2); } - - private: -- std::tr1::shared_ptr<base_type> m_base; -+ shared_ptr<base_type> m_base; - }; - - template <typename Result, typename Arg2> -@@ -149,7 +154,7 @@ public: - - bool is_valid() const { return m_base.get() != NULL; } - -- void set(base_type* base) { m_base = std::tr1::shared_ptr<base_type>(base); } -+ void set(base_type* base) { m_base = shared_ptr<base_type>(base); } - base_type* release() { return m_base.release(); } - - Result operator () (Arg2 arg2) { return (*m_base)(arg2); } -@@ -158,7 +163,7 @@ public: - Result operator () (Discard discard, Arg2 arg2) { return (*m_base)(arg2); } - - private: -- std::tr1::shared_ptr<base_type> m_base; -+ shared_ptr<base_type> m_base; - }; - - template <typename Result, typename Arg1, typename Arg2, typename Arg3> -@@ -169,13 +174,13 @@ public: - - bool is_valid() const { return m_base.get() != NULL; } - -- void set(base_type* base) { m_base = std::tr1::shared_ptr<base_type>(base); } -+ void set(base_type* base) { m_base = shared_ptr<base_type>(base); } - base_type* release() { return m_base.release(); } - - Result operator () (Arg1 arg1, Arg2 arg2, Arg3 arg3) { return (*m_base)(arg1, arg2, arg3); } - - private: -- std::tr1::shared_ptr<base_type> m_base; -+ shared_ptr<base_type> m_base; - }; - - template <typename Result> diff --git a/net/rtorrent/patches/patch-rak_priority__queue__default.h b/net/rtorrent/patches/patch-rak_priority__queue__default.h deleted file mode 100644 index 239cca4bc67..00000000000 --- a/net/rtorrent/patches/patch-rak_priority__queue__default.h +++ /dev/null @@ -1,27 +0,0 @@ -$NetBSD: patch-rak_priority__queue__default.h,v 1.1 2013/05/09 14:28:25 joerg Exp $ - ---- rak/priority_queue_default.h.orig 2012-02-14 03:32:01.000000000 +0000 -+++ rak/priority_queue_default.h -@@ -38,7 +38,13 @@ - #define RAK_PRIORITY_QUEUE_DEFAULT_H - - #include <stdexcept> -+#if __cplusplus >= 201103L -+#include <functional> -+using std::function; -+#else - #include <tr1/functional> -+using std::tr1::function; -+#endif - #include <rak/allocators.h> - #include <rak/priority_queue.h> - #include <rak/timer.h> -@@ -47,7 +53,7 @@ namespace rak { - - class priority_item { - public: -- typedef std::tr1::function<void (void)> slot_void; -+ typedef function<void (void)> slot_void; - - priority_item() {} - ~priority_item() { diff --git a/net/rtorrent/patches/patch-src_command__download.cc b/net/rtorrent/patches/patch-src_command__download.cc deleted file mode 100644 index be4260b5aef..00000000000 --- a/net/rtorrent/patches/patch-src_command__download.cc +++ /dev/null @@ -1,420 +0,0 @@ -$NetBSD: patch-src_command__download.cc,v 1.1 2013/05/09 14:28:25 joerg Exp $ - ---- src/command_download.cc.orig 2013-05-03 22:57:06.000000000 +0000 -+++ src/command_download.cc -@@ -69,6 +69,16 @@ - #include "control.h" - #include "command_helpers.h" - -+#if __cplusplus >= 201103L -+#include <functional> -+using std::bind; -+#define STD_PLACEHOLDERS std::placeholders -+#else -+#include <tr1/functional> -+using std::tr1::bind; -+#define STD_PLACEHOLDERS std::tr1::placeholders -+#endif -+ - std::string - retrieve_d_base_path(core::Download* download) { - if (download->file_list()->is_multi_file()) -@@ -285,8 +295,8 @@ retrieve_d_bitfield(core::Download* down - // Just a helper function atm. - torrent::Object - cmd_d_initialize_logs(core::Download* download) { -- download->info()->signal_network_log().push_back(tr1::bind(&core::Manager::push_log_complete, control->core(), tr1::placeholders::_1)); -- download->info()->signal_storage_error().push_back(tr1::bind(&core::Manager::push_log_complete, control->core(), tr1::placeholders::_1)); -+ download->info()->signal_network_log().push_back(bind(&core::Manager::push_log_complete, control->core(), STD_PLACEHOLDERS::_1)); -+ download->info()->signal_storage_error().push_back(bind(&core::Manager::push_log_complete, control->core(), STD_PLACEHOLDERS::_1)); - - return torrent::Object(); - } -@@ -363,7 +373,7 @@ f_multicall(core::Download* download, co - if (args.front().is_list()) - std::transform(args.front().as_list().begin(), args.front().as_list().end(), - std::back_inserter(regex_list), -- tr1::bind(&torrent::Object::as_string_c, tr1::placeholders::_1)); -+ bind(&torrent::Object::as_string_c, STD_PLACEHOLDERS::_1)); - else if (args.front().is_string() && !args.front().as_string().empty()) - regex_list.push_back(args.front().as_string()); - else -@@ -372,7 +382,7 @@ f_multicall(core::Download* download, co - for (torrent::FileList::const_iterator itr = download->file_list()->begin(), last = download->file_list()->end(); itr != last; itr++) { - if (use_regex && - std::find_if(regex_list.begin(), regex_list.end(), -- tr1::bind(&rak::regex::operator(), tr1::placeholders::_1, (*itr)->path()->as_string())) == regex_list.end()) -+ bind(&rak::regex::operator(), STD_PLACEHOLDERS::_1, (*itr)->path()->as_string())) == regex_list.end()) - continue; - - torrent::Object::list_type& row = result.insert(result.end(), torrent::Object::create_list())->as_list(); -@@ -588,52 +598,52 @@ d_list_remove(core::Download* download, - return torrent::Object(); - } - --#define CMD2_ON_INFO(func) tr1::bind(&torrent::DownloadInfo::func, tr1::bind(&core::Download::info, tr1::placeholders::_1)) --#define CMD2_ON_DATA(func) tr1::bind(&torrent::download_data::func, tr1::bind(&core::Download::data, tr1::placeholders::_1)) --#define CMD2_ON_DL(func) tr1::bind(&torrent::Download::func, tr1::bind(&core::Download::download, tr1::placeholders::_1)) --#define CMD2_ON_FL(func) tr1::bind(&torrent::FileList::func, tr1::bind(&core::Download::file_list, tr1::placeholders::_1)) -- --#define CMD2_BIND_DL tr1::bind(&core::Download::download, tr1::placeholders::_1) --#define CMD2_BIND_CL tr1::bind(&core::Download::connection_list, tr1::placeholders::_1) --#define CMD2_BIND_FL tr1::bind(&core::Download::file_list, tr1::placeholders::_1) --#define CMD2_BIND_PL tr1::bind(&core::Download::c_peer_list, tr1::placeholders::_1) --#define CMD2_BIND_TL tr1::bind(&core::Download::tracker_list, tr1::placeholders::_1) --#define CMD2_BIND_TC tr1::bind(&core::Download::tracker_controller, tr1::placeholders::_1) -+#define CMD2_ON_INFO(func) bind(&torrent::DownloadInfo::func, bind(&core::Download::info, STD_PLACEHOLDERS::_1)) -+#define CMD2_ON_DATA(func) bind(&torrent::download_data::func, bind(&core::Download::data, STD_PLACEHOLDERS::_1)) -+#define CMD2_ON_DL(func) bind(&torrent::Download::func, bind(&core::Download::download, STD_PLACEHOLDERS::_1)) -+#define CMD2_ON_FL(func) bind(&torrent::FileList::func, bind(&core::Download::file_list, STD_PLACEHOLDERS::_1)) -+ -+#define CMD2_BIND_DL bind(&core::Download::download, STD_PLACEHOLDERS::_1) -+#define CMD2_BIND_CL bind(&core::Download::connection_list, STD_PLACEHOLDERS::_1) -+#define CMD2_BIND_FL bind(&core::Download::file_list, STD_PLACEHOLDERS::_1) -+#define CMD2_BIND_PL bind(&core::Download::c_peer_list, STD_PLACEHOLDERS::_1) -+#define CMD2_BIND_TL bind(&core::Download::tracker_list, STD_PLACEHOLDERS::_1) -+#define CMD2_BIND_TC bind(&core::Download::tracker_controller, STD_PLACEHOLDERS::_1) - --#define CMD2_BIND_INFO tr1::bind(&core::Download::info, tr1::placeholders::_1) --#define CMD2_BIND_DATA tr1::bind(&core::Download::data, tr1::placeholders::_1) -+#define CMD2_BIND_INFO bind(&core::Download::info, STD_PLACEHOLDERS::_1) -+#define CMD2_BIND_DATA bind(&core::Download::data, STD_PLACEHOLDERS::_1) - - #define CMD2_DL_VAR_VALUE(key, first_key, second_key) \ -- CMD2_DL(key, tr1::bind(&download_get_variable, tr1::placeholders::_1, first_key, second_key)); \ -- CMD2_DL_VALUE_P(key ".set", tr1::bind(&download_set_variable_value, \ -- tr1::placeholders::_1, tr1::placeholders::_2, \ -+ CMD2_DL(key, bind(&download_get_variable, STD_PLACEHOLDERS::_1, first_key, second_key)); \ -+ CMD2_DL_VALUE_P(key ".set", bind(&download_set_variable_value, \ -+ STD_PLACEHOLDERS::_1, STD_PLACEHOLDERS::_2, \ - first_key, second_key)); - - #define CMD2_DL_VAR_VALUE_PUBLIC(key, first_key, second_key) \ -- CMD2_DL(key, tr1::bind(&download_get_variable, tr1::placeholders::_1, first_key, second_key)); \ -- CMD2_DL_VALUE(key ".set", tr1::bind(&download_set_variable_value, \ -- tr1::placeholders::_1, tr1::placeholders::_2, \ -+ CMD2_DL(key, bind(&download_get_variable, STD_PLACEHOLDERS::_1, first_key, second_key)); \ -+ CMD2_DL_VALUE(key ".set", bind(&download_set_variable_value, \ -+ STD_PLACEHOLDERS::_1, STD_PLACEHOLDERS::_2, \ - first_key, second_key)); - - #define CMD2_DL_TIMESTAMP(key, first_key, second_key) \ -- CMD2_DL(key, tr1::bind(&download_get_variable, tr1::placeholders::_1, first_key, second_key)); \ -- CMD2_DL_VALUE_P(key ".set", tr1::bind(&download_set_variable_value, \ -- tr1::placeholders::_1, tr1::placeholders::_2, \ -+ CMD2_DL(key, bind(&download_get_variable, STD_PLACEHOLDERS::_1, first_key, second_key)); \ -+ CMD2_DL_VALUE_P(key ".set", bind(&download_set_variable_value, \ -+ STD_PLACEHOLDERS::_1, STD_PLACEHOLDERS::_2, \ - first_key, second_key)); \ -- CMD2_DL_VALUE_P(key ".set_if_z", tr1::bind(&download_set_variable_value_ifz, \ -- tr1::placeholders::_1, tr1::placeholders::_2, \ -+ CMD2_DL_VALUE_P(key ".set_if_z", bind(&download_set_variable_value_ifz, \ -+ STD_PLACEHOLDERS::_1, STD_PLACEHOLDERS::_2, \ - first_key, second_key)); \ - - #define CMD2_DL_VAR_STRING(key, first_key, second_key) \ -- CMD2_DL(key, tr1::bind(&download_get_variable, tr1::placeholders::_1, first_key, second_key)); \ -- CMD2_DL_STRING_P(key ".set", tr1::bind(&download_set_variable_string, \ -- tr1::placeholders::_1, tr1::placeholders::_2, \ -+ CMD2_DL(key, bind(&download_get_variable, STD_PLACEHOLDERS::_1, first_key, second_key)); \ -+ CMD2_DL_STRING_P(key ".set", bind(&download_set_variable_string, \ -+ STD_PLACEHOLDERS::_1, STD_PLACEHOLDERS::_2, \ - first_key, second_key)); - - #define CMD2_DL_VAR_STRING_PUBLIC(key, first_key, second_key) \ -- CMD2_DL(key, tr1::bind(&download_get_variable, tr1::placeholders::_1, first_key, second_key)); \ -- CMD2_DL_STRING(key ".set", tr1::bind(&download_set_variable_string, \ -- tr1::placeholders::_1, tr1::placeholders::_2, \ -+ CMD2_DL(key, bind(&download_get_variable, STD_PLACEHOLDERS::_1, first_key, second_key)); \ -+ CMD2_DL_STRING(key ".set", bind(&download_set_variable_string, \ -+ STD_PLACEHOLDERS::_1, STD_PLACEHOLDERS::_2, \ - first_key, second_key)); - - int64_t cg_d_group(core::Download* download); -@@ -642,12 +652,12 @@ void cg_d_group_set(core:: - - void - initialize_command_download() { -- CMD2_DL("d.hash", tr1::bind(&rak::transform_hex_str<torrent::HashString>, CMD2_ON_INFO(hash))); -- CMD2_DL("d.local_id", tr1::bind(&rak::transform_hex_str<torrent::HashString>, CMD2_ON_INFO(local_id))); -- CMD2_DL("d.local_id_html", tr1::bind(&rak::copy_escape_html_str<torrent::HashString>, CMD2_ON_INFO(local_id))); -- CMD2_DL("d.bitfield", tr1::bind(&retrieve_d_bitfield, tr1::placeholders::_1)); -- CMD2_DL("d.base_path", tr1::bind(&retrieve_d_base_path, tr1::placeholders::_1)); -- CMD2_DL("d.base_filename", tr1::bind(&retrieve_d_base_filename, tr1::placeholders::_1)); -+ CMD2_DL("d.hash", bind(&rak::transform_hex_str<torrent::HashString>, CMD2_ON_INFO(hash))); -+ CMD2_DL("d.local_id", bind(&rak::transform_hex_str<torrent::HashString>, CMD2_ON_INFO(local_id))); -+ CMD2_DL("d.local_id_html", bind(&rak::copy_escape_html_str<torrent::HashString>, CMD2_ON_INFO(local_id))); -+ CMD2_DL("d.bitfield", bind(&retrieve_d_bitfield, STD_PLACEHOLDERS::_1)); -+ CMD2_DL("d.base_path", bind(&retrieve_d_base_path, STD_PLACEHOLDERS::_1)); -+ CMD2_DL("d.base_filename", bind(&retrieve_d_base_filename, STD_PLACEHOLDERS::_1)); - - CMD2_DL("d.name", CMD2_ON_INFO(name)); - CMD2_DL("d.creation_date", CMD2_ON_INFO(creation_date)); -@@ -657,19 +667,19 @@ initialize_command_download() { - // Network related: - // - -- CMD2_DL ("d.up.rate", tr1::bind(&torrent::Rate::rate, CMD2_ON_INFO(up_rate))); -- CMD2_DL ("d.up.total", tr1::bind(&torrent::Rate::total, CMD2_ON_INFO(up_rate))); -- CMD2_DL ("d.down.rate", tr1::bind(&torrent::Rate::rate, CMD2_ON_INFO(down_rate))); -- CMD2_DL ("d.down.total", tr1::bind(&torrent::Rate::total, CMD2_ON_INFO(down_rate))); -- CMD2_DL ("d.skip.rate", tr1::bind(&torrent::Rate::rate, CMD2_ON_INFO(skip_rate))); -- CMD2_DL ("d.skip.total", tr1::bind(&torrent::Rate::total, CMD2_ON_INFO(skip_rate))); -+ CMD2_DL ("d.up.rate", bind(&torrent::Rate::rate, CMD2_ON_INFO(up_rate))); -+ CMD2_DL ("d.up.total", bind(&torrent::Rate::total, CMD2_ON_INFO(up_rate))); -+ CMD2_DL ("d.down.rate", bind(&torrent::Rate::rate, CMD2_ON_INFO(down_rate))); -+ CMD2_DL ("d.down.total", bind(&torrent::Rate::total, CMD2_ON_INFO(down_rate))); -+ CMD2_DL ("d.skip.rate", bind(&torrent::Rate::rate, CMD2_ON_INFO(skip_rate))); -+ CMD2_DL ("d.skip.total", bind(&torrent::Rate::total, CMD2_ON_INFO(skip_rate))); - - CMD2_DL ("d.peer_exchange", CMD2_ON_INFO(is_pex_enabled)); -- CMD2_DL_VALUE_V ("d.peer_exchange.set", tr1::bind(&torrent::Download::set_pex_enabled, CMD2_BIND_DL, tr1::placeholders::_2)); -+ CMD2_DL_VALUE_V ("d.peer_exchange.set", bind(&torrent::Download::set_pex_enabled, CMD2_BIND_DL, STD_PLACEHOLDERS::_2)); - -- CMD2_DL_LIST ("d.create_link", tr1::bind(&apply_d_change_link, tr1::placeholders::_1, tr1::placeholders::_2, 0)); -- CMD2_DL_LIST ("d.delete_link", tr1::bind(&apply_d_change_link, tr1::placeholders::_1, tr1::placeholders::_2, 1)); -- CMD2_DL ("d.delete_tied", tr1::bind(&apply_d_delete_tied, tr1::placeholders::_1)); -+ CMD2_DL_LIST ("d.create_link", bind(&apply_d_change_link, STD_PLACEHOLDERS::_1, STD_PLACEHOLDERS::_2, 0)); -+ CMD2_DL_LIST ("d.delete_link", bind(&apply_d_change_link, STD_PLACEHOLDERS::_1, STD_PLACEHOLDERS::_2, 1)); -+ CMD2_DL ("d.delete_tied", bind(&apply_d_delete_tied, STD_PLACEHOLDERS::_1)); - - CMD2_FUNC_SINGLE("d.start", "d.hashing_failed.set=0 ;view.set_visible=started"); - CMD2_FUNC_SINGLE("d.stop", "view.set_visible=stopped"); -@@ -683,36 +693,36 @@ initialize_command_download() { - - CMD2_DL ("d.is_open", CMD2_ON_INFO(is_open)); - CMD2_DL ("d.is_active", CMD2_ON_INFO(is_active)); -- CMD2_DL ("d.is_hash_checked", tr1::bind(&torrent::Download::is_hash_checked, CMD2_BIND_DL)); -- CMD2_DL ("d.is_hash_checking", tr1::bind(&torrent::Download::is_hash_checking, CMD2_BIND_DL)); -- CMD2_DL ("d.is_multi_file", tr1::bind(&torrent::FileList::is_multi_file, CMD2_BIND_FL)); -+ CMD2_DL ("d.is_hash_checked", bind(&torrent::Download::is_hash_checked, CMD2_BIND_DL)); -+ CMD2_DL ("d.is_hash_checking", bind(&torrent::Download::is_hash_checking, CMD2_BIND_DL)); -+ CMD2_DL ("d.is_multi_file", bind(&torrent::FileList::is_multi_file, CMD2_BIND_FL)); - CMD2_DL ("d.is_private", CMD2_ON_INFO(is_private)); - CMD2_DL ("d.is_pex_active", CMD2_ON_INFO(is_pex_active)); - CMD2_DL ("d.is_partially_done", CMD2_ON_DATA(is_partially_done)); - CMD2_DL ("d.is_not_partially_done", CMD2_ON_DATA(is_not_partially_done)); - -- CMD2_DL_V ("d.resume", tr1::bind(&core::DownloadList::resume_default, control->core()->download_list(), tr1::placeholders::_1)); -- CMD2_DL_V ("d.pause", tr1::bind(&core::DownloadList::pause_default, control->core()->download_list(), tr1::placeholders::_1)); -- CMD2_DL_V ("d.open", tr1::bind(&core::DownloadList::open_throw, control->core()->download_list(), tr1::placeholders::_1)); -- CMD2_DL_V ("d.close", tr1::bind(&core::DownloadList::close_throw, control->core()->download_list(), tr1::placeholders::_1)); -- CMD2_DL_V ("d.close.directly", tr1::bind(&core::DownloadList::close_directly, control->core()->download_list(), tr1::placeholders::_1)); -- CMD2_DL_V ("d.erase", tr1::bind(&core::DownloadList::erase_ptr, control->core()->download_list(), tr1::placeholders::_1)); -- CMD2_DL_V ("d.check_hash", tr1::bind(&core::DownloadList::check_hash, control->core()->download_list(), tr1::placeholders::_1)); -+ CMD2_DL_V ("d.resume", bind(&core::DownloadList::resume_default, control->core()->download_list(), STD_PLACEHOLDERS::_1)); -+ CMD2_DL_V ("d.pause", bind(&core::DownloadList::pause_default, control->core()->download_list(), STD_PLACEHOLDERS::_1)); -+ CMD2_DL_V ("d.open", bind(&core::DownloadList::open_throw, control->core()->download_list(), STD_PLACEHOLDERS::_1)); -+ CMD2_DL_V ("d.close", bind(&core::DownloadList::close_throw, control->core()->download_list(), STD_PLACEHOLDERS::_1)); -+ CMD2_DL_V ("d.close.directly", bind(&core::DownloadList::close_directly, control->core()->download_list(), STD_PLACEHOLDERS::_1)); -+ CMD2_DL_V ("d.erase", bind(&core::DownloadList::erase_ptr, control->core()->download_list(), STD_PLACEHOLDERS::_1)); -+ CMD2_DL_V ("d.check_hash", bind(&core::DownloadList::check_hash, control->core()->download_list(), STD_PLACEHOLDERS::_1)); - -- CMD2_DL ("d.save_resume", tr1::bind(&core::DownloadStore::save_resume, control->core()->download_store(), tr1::placeholders::_1)); -- CMD2_DL ("d.save_full_session", tr1::bind(&core::DownloadStore::save_full, control->core()->download_store(), tr1::placeholders::_1)); -+ CMD2_DL ("d.save_resume", bind(&core::DownloadStore::save_resume, control->core()->download_store(), STD_PLACEHOLDERS::_1)); -+ CMD2_DL ("d.save_full_session", bind(&core::DownloadStore::save_full, control->core()->download_store(), STD_PLACEHOLDERS::_1)); - - CMD2_DL_V ("d.update_priorities", CMD2_ON_DL(update_priorities)); - -- CMD2_DL_STRING_V("add_peer", tr1::bind(&apply_d_add_peer, tr1::placeholders::_1, tr1::placeholders::_2)); -+ CMD2_DL_STRING_V("add_peer", bind(&apply_d_add_peer, STD_PLACEHOLDERS::_1, STD_PLACEHOLDERS::_2)); - - // - // Custom settings: - // - -- CMD2_DL_STRING("d.custom", tr1::bind(&retrieve_d_custom, tr1::placeholders::_1, tr1::placeholders::_2)); -- CMD2_DL_STRING("d.custom_throw", tr1::bind(&retrieve_d_custom_throw, tr1::placeholders::_1, tr1::placeholders::_2)); -- CMD2_DL_LIST ("d.custom.set", tr1::bind(&apply_d_custom, tr1::placeholders::_1, tr1::placeholders::_2)); -+ CMD2_DL_STRING("d.custom", bind(&retrieve_d_custom, STD_PLACEHOLDERS::_1, STD_PLACEHOLDERS::_2)); -+ CMD2_DL_STRING("d.custom_throw", bind(&retrieve_d_custom_throw, STD_PLACEHOLDERS::_1, STD_PLACEHOLDERS::_2)); -+ CMD2_DL_LIST ("d.custom.set", bind(&apply_d_custom, STD_PLACEHOLDERS::_1, STD_PLACEHOLDERS::_2)); - - CMD2_DL_VAR_STRING_PUBLIC("d.custom1", "rtorrent", "custom1"); - CMD2_DL_VAR_STRING_PUBLIC("d.custom2", "rtorrent", "custom2"); -@@ -757,68 +767,68 @@ initialize_command_download() { - CMD2_DL_TIMESTAMP("d.timestamp.started", "rtorrent", "timestamp.started"); - CMD2_DL_TIMESTAMP("d.timestamp.finished", "rtorrent", "timestamp.finished"); - -- CMD2_DL ("d.connection_current", tr1::bind(&torrent::option_as_string, torrent::OPTION_CONNECTION_TYPE, CMD2_ON_DL(connection_type))); -- CMD2_DL_STRING("d.connection_current.set", tr1::bind(&apply_d_connection_type, tr1::placeholders::_1, tr1::placeholders::_2)); -+ CMD2_DL ("d.connection_current", bind(&torrent::option_as_string, torrent::OPTION_CONNECTION_TYPE, CMD2_ON_DL(connection_type))); -+ CMD2_DL_STRING("d.connection_current.set", bind(&apply_d_connection_type, STD_PLACEHOLDERS::_1, STD_PLACEHOLDERS::_2)); - - CMD2_DL_VAR_STRING("d.connection_leech", "rtorrent", "connection_leech"); - CMD2_DL_VAR_STRING("d.connection_seed", "rtorrent", "connection_seed"); - -- CMD2_DL ("d.up.choke_heuristics", tr1::bind(&torrent::option_as_string, torrent::OPTION_CHOKE_HEURISTICS, CMD2_ON_DL(upload_choke_heuristic))); -- CMD2_DL_STRING("d.up.choke_heuristics.set", tr1::bind(&apply_d_choke_heuristics, tr1::placeholders::_1, tr1::placeholders::_2, false)); -- CMD2_DL ("d.down.choke_heuristics", tr1::bind(&torrent::option_as_string, torrent::OPTION_CHOKE_HEURISTICS, CMD2_ON_DL(download_choke_heuristic))); -- CMD2_DL_STRING("d.down.choke_heuristics.set", tr1::bind(&apply_d_choke_heuristics, tr1::placeholders::_1, tr1::placeholders::_2, true)); -+ CMD2_DL ("d.up.choke_heuristics", bind(&torrent::option_as_string, torrent::OPTION_CHOKE_HEURISTICS, CMD2_ON_DL(upload_choke_heuristic))); -+ CMD2_DL_STRING("d.up.choke_heuristics.set", bind(&apply_d_choke_heuristics, STD_PLACEHOLDERS::_1, STD_PLACEHOLDERS::_2, false)); -+ CMD2_DL ("d.down.choke_heuristics", bind(&torrent::option_as_string, torrent::OPTION_CHOKE_HEURISTICS, CMD2_ON_DL(download_choke_heuristic))); -+ CMD2_DL_STRING("d.down.choke_heuristics.set", bind(&apply_d_choke_heuristics, STD_PLACEHOLDERS::_1, STD_PLACEHOLDERS::_2, true)); - - CMD2_DL_VAR_STRING("d.up.choke_heuristics.leech", "rtorrent", "choke_heuristics.up.leech"); - CMD2_DL_VAR_STRING("d.up.choke_heuristics.seed", "rtorrent", "choke_heuristics.up.seed"); - CMD2_DL_VAR_STRING("d.down.choke_heuristics.leech", "rtorrent", "choke_heuristics.down.leech"); - CMD2_DL_VAR_STRING("d.down.choke_heuristics.seed", "rtorrent", "choke_heuristics.down.seed"); - -- CMD2_DL ("d.hashing_failed", tr1::bind(&core::Download::is_hash_failed, tr1::placeholders::_1)); -- CMD2_DL_VALUE_V ("d.hashing_failed.set", tr1::bind(&core::Download::set_hash_failed, tr1::placeholders::_1, tr1::placeholders::_2)); -+ CMD2_DL ("d.hashing_failed", bind(&core::Download::is_hash_failed, STD_PLACEHOLDERS::_1)); -+ CMD2_DL_VALUE_V ("d.hashing_failed.set", bind(&core::Download::set_hash_failed, STD_PLACEHOLDERS::_1, STD_PLACEHOLDERS::_2)); - -- CMD2_DL ("d.views", tr1::bind(&download_get_variable, tr1::placeholders::_1, "rtorrent", "views")); -- CMD2_DL ("d.views.has", tr1::bind(&d_list_has, tr1::placeholders::_1, tr1::placeholders::_2, "rtorrent", "views")); -- CMD2_DL ("d.views.remove", tr1::bind(&d_list_remove, tr1::placeholders::_1, tr1::placeholders::_2, "rtorrent", "views")); -- CMD2_DL ("d.views.push_back", tr1::bind(&d_list_push_back, tr1::placeholders::_1, tr1::placeholders::_2, "rtorrent", "views")); -- CMD2_DL ("d.views.push_back_unique", tr1::bind(&d_list_push_back_unique, tr1::placeholders::_1, tr1::placeholders::_2, "rtorrent", "views")); -+ CMD2_DL ("d.views", bind(&download_get_variable, STD_PLACEHOLDERS::_1, "rtorrent", "views")); -+ CMD2_DL ("d.views.has", bind(&d_list_has, STD_PLACEHOLDERS::_1, STD_PLACEHOLDERS::_2, "rtorrent", "views")); -+ CMD2_DL ("d.views.remove", bind(&d_list_remove, STD_PLACEHOLDERS::_1, STD_PLACEHOLDERS::_2, "rtorrent", "views")); -+ CMD2_DL ("d.views.push_back", bind(&d_list_push_back, STD_PLACEHOLDERS::_1, STD_PLACEHOLDERS::_2, "rtorrent", "views")); -+ CMD2_DL ("d.views.push_back_unique", bind(&d_list_push_back_unique, STD_PLACEHOLDERS::_1, STD_PLACEHOLDERS::_2, "rtorrent", "views")); - - // This command really needs to be improved, so we have proper - // logging support. -- CMD2_DL ("d.message", tr1::bind(&core::Download::message, tr1::placeholders::_1)); -- CMD2_DL_STRING_V("d.message.set", tr1::bind(&core::Download::set_message, tr1::placeholders::_1, tr1::placeholders::_2)); -+ CMD2_DL ("d.message", bind(&core::Download::message, STD_PLACEHOLDERS::_1)); -+ CMD2_DL_STRING_V("d.message.set", bind(&core::Download::set_message, STD_PLACEHOLDERS::_1, STD_PLACEHOLDERS::_2)); - - CMD2_DL ("d.max_file_size", CMD2_ON_FL(max_file_size)); -- CMD2_DL_VALUE_V ("d.max_file_size.set", tr1::bind(&torrent::FileList::set_max_file_size, CMD2_BIND_FL, tr1::placeholders::_2)); -+ CMD2_DL_VALUE_V ("d.max_file_size.set", bind(&torrent::FileList::set_max_file_size, CMD2_BIND_FL, STD_PLACEHOLDERS::_2)); - -- CMD2_DL ("d.peers_min", tr1::bind(&torrent::ConnectionList::min_size, CMD2_BIND_CL)); -- CMD2_DL_VALUE_V ("d.peers_min.set", tr1::bind(&torrent::ConnectionList::set_min_size, CMD2_BIND_CL, tr1::placeholders::_2)); -- CMD2_DL ("d.peers_max", tr1::bind(&torrent::ConnectionList::max_size, CMD2_BIND_CL)); -- CMD2_DL_VALUE_V ("d.peers_max.set", tr1::bind(&torrent::ConnectionList::set_max_size, CMD2_BIND_CL, tr1::placeholders::_2)); -- CMD2_DL ("d.uploads_max", tr1::bind(&torrent::Download::uploads_max, CMD2_BIND_DL)); -- CMD2_DL_VALUE_V ("d.uploads_max.set", tr1::bind(&torrent::Download::set_uploads_max, CMD2_BIND_DL, tr1::placeholders::_2)); -- CMD2_DL ("d.uploads_min", tr1::bind(&torrent::Download::uploads_min, CMD2_BIND_DL)); -- CMD2_DL_VALUE_V ("d.uploads_min.set", tr1::bind(&torrent::Download::set_uploads_min, CMD2_BIND_DL, tr1::placeholders::_2)); -- CMD2_DL ("d.downloads_max", tr1::bind(&torrent::Download::downloads_max, CMD2_BIND_DL)); -- CMD2_DL_VALUE_V ("d.downloads_max.set", tr1::bind(&torrent::Download::set_downloads_max, CMD2_BIND_DL, tr1::placeholders::_2)); -- CMD2_DL ("d.downloads_min", tr1::bind(&torrent::Download::downloads_min, CMD2_BIND_DL)); -- CMD2_DL_VALUE_V ("d.downloads_min.set", tr1::bind(&torrent::Download::set_downloads_min, CMD2_BIND_DL, tr1::placeholders::_2)); -- CMD2_DL ("d.peers_connected", tr1::bind(&torrent::ConnectionList::size, CMD2_BIND_CL)); -- CMD2_DL ("d.peers_not_connected", tr1::bind(&torrent::PeerList::available_list_size, CMD2_BIND_PL)); -+ CMD2_DL ("d.peers_min", bind(&torrent::ConnectionList::min_size, CMD2_BIND_CL)); -+ CMD2_DL_VALUE_V ("d.peers_min.set", bind(&torrent::ConnectionList::set_min_size, CMD2_BIND_CL, STD_PLACEHOLDERS::_2)); -+ CMD2_DL ("d.peers_max", bind(&torrent::ConnectionList::max_size, CMD2_BIND_CL)); -+ CMD2_DL_VALUE_V ("d.peers_max.set", bind(&torrent::ConnectionList::set_max_size, CMD2_BIND_CL, STD_PLACEHOLDERS::_2)); -+ CMD2_DL ("d.uploads_max", bind(&torrent::Download::uploads_max, CMD2_BIND_DL)); -+ CMD2_DL_VALUE_V ("d.uploads_max.set", bind(&torrent::Download::set_uploads_max, CMD2_BIND_DL, STD_PLACEHOLDERS::_2)); -+ CMD2_DL ("d.uploads_min", bind(&torrent::Download::uploads_min, CMD2_BIND_DL)); -+ CMD2_DL_VALUE_V ("d.uploads_min.set", bind(&torrent::Download::set_uploads_min, CMD2_BIND_DL, STD_PLACEHOLDERS::_2)); -+ CMD2_DL ("d.downloads_max", bind(&torrent::Download::downloads_max, CMD2_BIND_DL)); -+ CMD2_DL_VALUE_V ("d.downloads_max.set", bind(&torrent::Download::set_downloads_max, CMD2_BIND_DL, STD_PLACEHOLDERS::_2)); -+ CMD2_DL ("d.downloads_min", bind(&torrent::Download::downloads_min, CMD2_BIND_DL)); -+ CMD2_DL_VALUE_V ("d.downloads_min.set", bind(&torrent::Download::set_downloads_min, CMD2_BIND_DL, STD_PLACEHOLDERS::_2)); -+ CMD2_DL ("d.peers_connected", bind(&torrent::ConnectionList::size, CMD2_BIND_CL)); -+ CMD2_DL ("d.peers_not_connected", bind(&torrent::PeerList::available_list_size, CMD2_BIND_PL)); - - CMD2_DL ("d.peers_complete", CMD2_ON_DL(peers_complete)); - CMD2_DL ("d.peers_accounted", CMD2_ON_DL(peers_accounted)); - -- CMD2_DL_V ("d.disconnect.seeders", tr1::bind(&torrent::ConnectionList::erase_seeders, CMD2_BIND_CL)); -+ CMD2_DL_V ("d.disconnect.seeders", bind(&torrent::ConnectionList::erase_seeders, CMD2_BIND_CL)); - - CMD2_DL ("d.accepting_seeders", CMD2_ON_INFO(is_accepting_seeders)); -- CMD2_DL_V ("d.accepting_seeders.enable", tr1::bind(&torrent::DownloadInfo::public_set_flags, CMD2_BIND_INFO, torrent::DownloadInfo::flag_accepting_seeders)); -- CMD2_DL_V ("d.accepting_seeders.disable", tr1::bind(&torrent::DownloadInfo::public_unset_flags, CMD2_BIND_INFO, torrent::DownloadInfo::flag_accepting_seeders)); -+ CMD2_DL_V ("d.accepting_seeders.enable", bind(&torrent::DownloadInfo::public_set_flags, CMD2_BIND_INFO, torrent::DownloadInfo::flag_accepting_seeders)); -+ CMD2_DL_V ("d.accepting_seeders.disable", bind(&torrent::DownloadInfo::public_unset_flags, CMD2_BIND_INFO, torrent::DownloadInfo::flag_accepting_seeders)); - -- CMD2_DL ("d.throttle_name", tr1::bind(&download_get_variable, tr1::placeholders::_1, "rtorrent", "throttle_name")); -- CMD2_DL_STRING_V("d.throttle_name.set", tr1::bind(&core::Download::set_throttle_name, tr1::placeholders::_1, tr1::placeholders::_2)); -+ CMD2_DL ("d.throttle_name", bind(&download_get_variable, STD_PLACEHOLDERS::_1, "rtorrent", "throttle_name")); -+ CMD2_DL_STRING_V("d.throttle_name.set", bind(&core::Download::set_throttle_name, STD_PLACEHOLDERS::_1, STD_PLACEHOLDERS::_2)); - - CMD2_DL ("d.bytes_done", CMD2_ON_DL(bytes_done)); -- CMD2_DL ("d.ratio", tr1::bind(&retrieve_d_ratio, tr1::placeholders::_1)); -+ CMD2_DL ("d.ratio", bind(&retrieve_d_ratio, STD_PLACEHOLDERS::_1)); - CMD2_DL ("d.chunks_hashed", CMD2_ON_DL(chunks_hashed)); - CMD2_DL ("d.free_diskspace", CMD2_ON_FL(free_diskspace)); - -@@ -829,7 +839,7 @@ initialize_command_download() { - CMD2_DL ("d.size_pex", CMD2_ON_DL(size_pex)); - CMD2_DL ("d.max_size_pex", CMD2_ON_DL(max_size_pex)); - -- CMD2_DL ("d.chunks_seen", tr1::bind(&d_chunks_seen, tr1::placeholders::_1)); -+ CMD2_DL ("d.chunks_seen", bind(&d_chunks_seen, STD_PLACEHOLDERS::_1)); - - CMD2_DL ("d.completed_bytes", CMD2_ON_FL(completed_bytes)); - CMD2_DL ("d.completed_chunks", CMD2_ON_FL(completed_chunks)); -@@ -837,44 +847,44 @@ initialize_command_download() { - - CMD2_DL ("d.wanted_chunks", CMD2_ON_DATA(wanted_chunks)); - -- CMD2_DL_V ("d.tracker_announce", tr1::bind(&torrent::Download::manual_request, CMD2_BIND_DL, false)); -- CMD2_DL ("d.tracker_numwant", tr1::bind(&torrent::TrackerList::numwant, CMD2_BIND_TL)); -- CMD2_DL_VALUE_V ("d.tracker_numwant.set", tr1::bind(&torrent::TrackerList::set_numwant, CMD2_BIND_TL, tr1::placeholders::_2)); -+ CMD2_DL_V ("d.tracker_announce", bind(&torrent::Download::manual_request, CMD2_BIND_DL, false)); -+ CMD2_DL ("d.tracker_numwant", bind(&torrent::TrackerList::numwant, CMD2_BIND_TL)); -+ CMD2_DL_VALUE_V ("d.tracker_numwant.set", bind(&torrent::TrackerList::set_numwant, CMD2_BIND_TL, STD_PLACEHOLDERS::_2)); - // TODO: Deprecate 'd.tracker_focus'. -- CMD2_DL ("d.tracker_focus", tr1::bind(&core::Download::tracker_list_size, tr1::placeholders::_1)); -- CMD2_DL ("d.tracker_size", tr1::bind(&core::Download::tracker_list_size, tr1::placeholders::_1)); -+ CMD2_DL ("d.tracker_focus", bind(&core::Download::tracker_list_size, STD_PLACEHOLDERS::_1)); -+ CMD2_DL ("d.tracker_size", bind(&core::Download::tracker_list_size, STD_PLACEHOLDERS::_1)); - -- CMD2_DL_LIST ("d.tracker.insert", tr1::bind(&download_tracker_insert, tr1::placeholders::_1, tr1::placeholders::_2)); -- CMD2_DL_VALUE_V ("d.tracker.send_scrape", tr1::bind(&torrent::TrackerController::scrape_request, CMD2_BIND_TC, tr1::placeholders::_2)); -+ CMD2_DL_LIST ("d.tracker.insert", bind(&download_tracker_insert, STD_PLACEHOLDERS::_1, STD_PLACEHOLDERS::_2)); -+ CMD2_DL_VALUE_V ("d.tracker.send_scrape", bind(&torrent::TrackerController::scrape_request, CMD2_BIND_TC, STD_PLACEHOLDERS::_2)); - - CMD2_DL ("d.directory", CMD2_ON_FL(root_dir)); -- CMD2_DL_STRING_V("d.directory.set", tr1::bind(&apply_d_directory, tr1::placeholders::_1, tr1::placeholders::_2)); -+ CMD2_DL_STRING_V("d.directory.set", bind(&apply_d_directory, STD_PLACEHOLDERS::_1, STD_PLACEHOLDERS::_2)); - CMD2_DL ("d.directory_base", CMD2_ON_FL(root_dir)); -- CMD2_DL_STRING_V("d.directory_base.set", tr1::bind(&core::Download::set_root_directory, tr1::placeholders::_1, tr1::placeholders::_2)); -+ CMD2_DL_STRING_V("d.directory_base.set", bind(&core::Download::set_root_directory, STD_PLACEHOLDERS::_1, STD_PLACEHOLDERS::_2)); - -- CMD2_DL ("d.priority", tr1::bind(&core::Download::priority, tr1::placeholders::_1)); -- CMD2_DL ("d.priority_str", tr1::bind(&retrieve_d_priority_str, tr1::placeholders::_1)); -- CMD2_DL_VALUE_V ("d.priority.set", tr1::bind(&core::Download::set_priority, tr1::placeholders::_1, tr1::placeholders::_2)); -+ CMD2_DL ("d.priority", bind(&core::Download::priority, STD_PLACEHOLDERS::_1)); -+ CMD2_DL ("d.priority_str", bind(&retrieve_d_priority_str, STD_PLACEHOLDERS::_1)); -+ CMD2_DL_VALUE_V ("d.priority.set", bind(&core::Download::set_priority, STD_PLACEHOLDERS::_1, STD_PLACEHOLDERS::_2)); - -- // CMD2_DL ("d.group", tr1::bind(&torrent::resource_manager_entry::group, -- // tr1::bind(&torrent::ResourceManager::entry_at, torrent::resource_manager(), -- // tr1::bind(&core::Download::main, tr1::placeholders::_1)))); -+ // CMD2_DL ("d.group", bind(&torrent::resource_manager_entry::group, -+ // bind(&torrent::ResourceManager::entry_at, torrent::resource_manager(), -+ // bind(&core::Download::main, STD_PLACEHOLDERS::_1)))); - -- // CMD2_DL_V ("d.group.set", tr1::bind(&torrent::ResourceManager::set_group, -+ // CMD2_DL_V ("d.group.set", bind(&torrent::ResourceManager::set_group, - // torrent::resource_manager(), -- // tr1::bind(&torrent::ResourceManager::find_throw, torrent::resource_manager(), -- // tr1::bind(&core::Download::main, tr1::placeholders::_1)), -+ // bind(&torrent::ResourceManager::find_throw, torrent::resource_manager(), -+ // bind(&core::Download::main, STD_PLACEHOLDERS::_1)), - // CG_GROUP_INDEX())); - -- CMD2_DL ("d.group", tr1::bind(&cg_d_group, tr1::placeholders::_1)); -- CMD2_DL ("d.group.name", tr1::bind(&cg_d_group, tr1::placeholders::_1)); -- CMD2_DL_V ("d.group.set", tr1::bind(&cg_d_group_set, tr1::placeholders::_1, tr1::placeholders::_2)); -+ CMD2_DL ("d.group", bind(&cg_d_group, STD_PLACEHOLDERS::_1)); -+ CMD2_DL ("d.group.name", bind(&cg_d_group, STD_PLACEHOLDERS::_1)); -+ CMD2_DL_V ("d.group.set", bind(&cg_d_group_set, STD_PLACEHOLDERS::_1, STD_PLACEHOLDERS::_2)); - -- CMD2_DL ("d.initialize_logs", tr1::bind(&cmd_d_initialize_logs, tr1::placeholders::_1)); -+ CMD2_DL ("d.initialize_logs", bind(&cmd_d_initialize_logs, STD_PLACEHOLDERS::_1)); - -- CMD2_DL_LIST ("f.multicall", tr1::bind(&f_multicall, tr1::placeholders::_1, tr1::placeholders::_2)); -- CMD2_DL_LIST ("p.multicall", tr1::bind(&p_multicall, tr1::placeholders::_1, tr1::placeholders::_2)); -- CMD2_DL_LIST ("t.multicall", tr1::bind(&t_multicall, tr1::placeholders::_1, tr1::placeholders::_2)); -+ CMD2_DL_LIST ("f.multicall", bind(&f_multicall, STD_PLACEHOLDERS::_1, STD_PLACEHOLDERS::_2)); -+ CMD2_DL_LIST ("p.multicall", bind(&p_multicall, STD_PLACEHOLDERS::_1, STD_PLACEHOLDERS::_2)); -+ CMD2_DL_LIST ("t.multicall", bind(&t_multicall, STD_PLACEHOLDERS::_1, STD_PLACEHOLDERS::_2)); - -- CMD2_ANY_LIST ("p.call_target", tr1::bind(&p_call_target, tr1::placeholders::_2)); -+ CMD2_ANY_LIST ("p.call_target", bind(&p_call_target, STD_PLACEHOLDERS::_2)); - } diff --git a/net/rtorrent/patches/patch-src_command__dynamic.cc b/net/rtorrent/patches/patch-src_command__dynamic.cc deleted file mode 100644 index 45bdeea5142..00000000000 --- a/net/rtorrent/patches/patch-src_command__dynamic.cc +++ /dev/null @@ -1,130 +0,0 @@ -$NetBSD: patch-src_command__dynamic.cc,v 1.1 2013/05/09 14:28:25 joerg Exp $ - ---- src/command_dynamic.cc.orig 2013-05-03 23:01:52.000000000 +0000 -+++ src/command_dynamic.cc -@@ -43,6 +43,16 @@ - #include "command_helpers.h" - #include "rpc/parse.h" - -+#if __cplusplus >= 201103L -+#include <functional> -+using std::bind; -+#define STD_PLACEHOLDERS std::placeholders -+#else -+#include <tr1/functional> -+using std::tr1::bind; -+#define STD_PLACEHOLDERS std::tr1::placeholders -+#endif -+ - std::string - system_method_generate_command(torrent::Object::list_const_iterator first, torrent::Object::list_const_iterator last) { - std::string command; -@@ -157,15 +167,15 @@ system_method_insert_object(const torren - - rpc::commands.insert_slot<rpc::command_base_is_type<rpc::command_base_call<rpc::target_type> >::type> - (create_new_key(rawKey), -- tr1::bind(&rpc::object_storage::call_function_str, control->object_storage(), -- rawKey, tr1::placeholders::_1, tr1::placeholders::_2), -+ bind(&rpc::object_storage::call_function_str, control->object_storage(), -+ rawKey, STD_PLACEHOLDERS::_1, STD_PLACEHOLDERS::_2), - &rpc::command_base_call<rpc::target_type>, - cmd_flags, NULL, NULL); - - } else { - rpc::commands.insert_slot<rpc::command_base_is_type<rpc::command_base_call<rpc::target_type> >::type> - (create_new_key(rawKey), -- tr1::bind(&rpc::object_storage::get_str, control->object_storage(), rawKey), -+ bind(&rpc::object_storage::get_str, control->object_storage(), rawKey), - &rpc::command_base_call<rpc::target_type>, - cmd_flags, NULL, NULL); - } -@@ -174,7 +184,7 @@ system_method_insert_object(const torren - // if (flags & rpc::object_storage::flag_rlookup) { - // rpc::commands.insert_slot<rpc::command_base_is_type<rpc::command_base_call_string<rpc::target_type> >::type> - // (create_new_key<9>(rawKey, ".rlookup"), -- // tr1::bind(&rpc::object_storage::rlookup_obj_list, control->object_storage(), rawKey), -+ // bind(&rpc::object_storage::rlookup_obj_list, control->object_storage(), rawKey), - // &rpc::command_base_call_string<rpc::target_type>, - // cmd_flags, NULL, NULL); - // } -@@ -188,21 +198,21 @@ system_method_insert_object(const torren - case rpc::object_storage::flag_bool_type: - rpc::commands.insert_slot<rpc::command_base_is_type<rpc::command_base_call_value<rpc::target_type> >::type> - (create_new_key<5>(rawKey, ".set"), -- tr1::bind(&rpc::object_storage::set_str_bool, control->object_storage(), rawKey, tr1::placeholders::_2), -+ bind(&rpc::object_storage::set_str_bool, control->object_storage(), rawKey, STD_PLACEHOLDERS::_2), - &rpc::command_base_call_value<rpc::target_type>, - cmd_flags, NULL, NULL); - break; - case rpc::object_storage::flag_value_type: - rpc::commands.insert_slot<rpc::command_base_is_type<rpc::command_base_call_value<rpc::target_type> >::type> - (create_new_key<5>(rawKey, ".set"), -- tr1::bind(&rpc::object_storage::set_str_value, control->object_storage(), rawKey, tr1::placeholders::_2), -+ bind(&rpc::object_storage::set_str_value, control->object_storage(), rawKey, STD_PLACEHOLDERS::_2), - &rpc::command_base_call_value<rpc::target_type>, - cmd_flags, NULL, NULL); - break; - case rpc::object_storage::flag_string_type: - rpc::commands.insert_slot<rpc::command_base_is_type<rpc::command_base_call_string<rpc::target_type> >::type> - (create_new_key<5>(rawKey, ".set"), -- tr1::bind(&rpc::object_storage::set_str_string, control->object_storage(), rawKey, tr1::placeholders::_2), -+ bind(&rpc::object_storage::set_str_string, control->object_storage(), rawKey, STD_PLACEHOLDERS::_2), - &rpc::command_base_call_string<rpc::target_type>, - cmd_flags, NULL, NULL); - break; -@@ -423,36 +433,36 @@ system_method_list_keys(const torrent::O - } - - #define CMD2_METHOD_INSERT(key, flags) \ -- CMD2_ANY_LIST(key, tr1::bind(&system_method_insert_object, tr1::placeholders::_2, flags)); -+ CMD2_ANY_LIST(key, bind(&system_method_insert_object, STD_PLACEHOLDERS::_2, flags)); - - void - initialize_command_dynamic() { - CMD2_VAR_BOOL ("method.use_deprecated", true); - CMD2_VAR_VALUE ("method.use_intermediate", 1); - -- CMD2_ANY_LIST ("method.insert", tr1::bind(&system_method_insert, tr1::placeholders::_2)); -- CMD2_ANY_LIST ("method.insert.value", tr1::bind(&system_method_insert_object, tr1::placeholders::_2, rpc::object_storage::flag_value_type)); -+ CMD2_ANY_LIST ("method.insert", bind(&system_method_insert, STD_PLACEHOLDERS::_2)); -+ CMD2_ANY_LIST ("method.insert.value", bind(&system_method_insert_object, STD_PLACEHOLDERS::_2, rpc::object_storage::flag_value_type)); - - CMD2_METHOD_INSERT("method.insert.simple", rpc::object_storage::flag_function_type); - CMD2_METHOD_INSERT("method.insert.c_simple", rpc::object_storage::flag_constant | rpc::object_storage::flag_function_type); - CMD2_METHOD_INSERT("method.insert.s_c_simple", rpc::object_storage::flag_static | - rpc::object_storage::flag_constant |rpc::object_storage::flag_function_type); - -- CMD2_ANY_STRING ("method.erase", tr1::bind(&system_method_erase, tr1::placeholders::_2)); -- CMD2_ANY_LIST ("method.redirect", tr1::bind(&system_method_redirect, tr1::placeholders::_2)); -- CMD2_ANY_STRING ("method.get", tr1::bind(&rpc::object_storage::get_str, control->object_storage(), -- tr1::placeholders::_2)); -- CMD2_ANY_LIST ("method.set", tr1::bind(&system_method_set_function, tr1::placeholders::_2)); -- -- CMD2_ANY_STRING ("method.const", tr1::bind(&rpc::object_storage::has_flag_str, control->object_storage(), -- tr1::placeholders::_2, rpc::object_storage::flag_constant)); -- CMD2_ANY_STRING_V("method.const.enable", tr1::bind(&rpc::object_storage::enable_flag_str, control->object_storage(), -- tr1::placeholders::_2, rpc::object_storage::flag_constant)); -- -- CMD2_ANY_LIST ("method.has_key", tr1::bind(&system_method_has_key, tr1::placeholders::_2)); -- CMD2_ANY_LIST ("method.set_key", tr1::bind(&system_method_set_key, tr1::placeholders::_2)); -- CMD2_ANY_STRING ("method.list_keys", tr1::bind(&system_method_list_keys, tr1::placeholders::_2)); -+ CMD2_ANY_STRING ("method.erase", bind(&system_method_erase, STD_PLACEHOLDERS::_2)); -+ CMD2_ANY_LIST ("method.redirect", bind(&system_method_redirect, STD_PLACEHOLDERS::_2)); -+ CMD2_ANY_STRING ("method.get", bind(&rpc::object_storage::get_str, control->object_storage(), -+ STD_PLACEHOLDERS::_2)); -+ CMD2_ANY_LIST ("method.set", bind(&system_method_set_function, STD_PLACEHOLDERS::_2)); -+ -+ CMD2_ANY_STRING ("method.const", bind(&rpc::object_storage::has_flag_str, control->object_storage(), -+ STD_PLACEHOLDERS::_2, rpc::object_storage::flag_constant)); -+ CMD2_ANY_STRING_V("method.const.enable", bind(&rpc::object_storage::enable_flag_str, control->object_storage(), -+ STD_PLACEHOLDERS::_2, rpc::object_storage::flag_constant)); -+ -+ CMD2_ANY_LIST ("method.has_key", bind(&system_method_has_key, STD_PLACEHOLDERS::_2)); -+ CMD2_ANY_LIST ("method.set_key", bind(&system_method_set_key, STD_PLACEHOLDERS::_2)); -+ CMD2_ANY_STRING ("method.list_keys", bind(&system_method_list_keys, STD_PLACEHOLDERS::_2)); - -- CMD2_ANY_STRING ("method.rlookup", tr1::bind(&rpc::object_storage::rlookup_obj_list, control->object_storage(), tr1::placeholders::_2)); -- CMD2_ANY_STRING_V("method.rlookup.clear", tr1::bind(&rpc::object_storage::rlookup_clear, control->object_storage(), tr1::placeholders::_2)); -+ CMD2_ANY_STRING ("method.rlookup", bind(&rpc::object_storage::rlookup_obj_list, control->object_storage(), STD_PLACEHOLDERS::_2)); -+ CMD2_ANY_STRING_V("method.rlookup.clear", bind(&rpc::object_storage::rlookup_clear, control->object_storage(), STD_PLACEHOLDERS::_2)); - } diff --git a/net/rtorrent/patches/patch-src_command__events.cc b/net/rtorrent/patches/patch-src_command__events.cc deleted file mode 100644 index f0fb3bd6e76..00000000000 --- a/net/rtorrent/patches/patch-src_command__events.cc +++ /dev/null @@ -1,75 +0,0 @@ -$NetBSD: patch-src_command__events.cc,v 1.1 2013/05/09 14:28:25 joerg Exp $ - ---- src/command_events.cc.orig 2013-05-03 23:02:24.000000000 +0000 -+++ src/command_events.cc -@@ -60,6 +60,16 @@ - - #include "thread_worker.h" - -+#if __cplusplus >= 201103L -+#include <functional> -+using std::bind; -+#define STD_PLACEHOLDERS std::placeholders -+#else -+#include <tr1/functional> -+using std::tr1::bind; -+#define STD_PLACEHOLDERS std::tr1::placeholders -+#endif -+ - torrent::Object - apply_on_ratio(const torrent::Object& rawArgs) { - const std::string& groupName = rawArgs.as_string(); -@@ -308,31 +318,31 @@ d_multicall(const torrent::Object::list_ - - void - initialize_command_events() { -- CMD2_ANY_STRING ("on_ratio", tr1::bind(&apply_on_ratio, tr1::placeholders::_2)); -+ CMD2_ANY_STRING ("on_ratio", bind(&apply_on_ratio, STD_PLACEHOLDERS::_2)); - -- CMD2_ANY ("start_tied", tr1::bind(&apply_start_tied)); -- CMD2_ANY ("stop_untied", tr1::bind(&apply_stop_untied)); -- CMD2_ANY ("close_untied", tr1::bind(&apply_close_untied)); -- CMD2_ANY ("remove_untied", tr1::bind(&apply_remove_untied)); -- -- CMD2_ANY_LIST ("schedule2", tr1::bind(&apply_schedule, tr1::placeholders::_2)); -- CMD2_ANY_STRING_V("schedule_remove2", tr1::bind(&rpc::CommandScheduler::erase_str, control->command_scheduler(), tr1::placeholders::_2)); -- -- CMD2_ANY_STRING_V("import", tr1::bind(&apply_import, tr1::placeholders::_2)); -- CMD2_ANY_STRING_V("try_import", tr1::bind(&apply_try_import, tr1::placeholders::_2)); -- -- CMD2_ANY_LIST ("load.normal", tr1::bind(&apply_load, tr1::placeholders::_2, core::Manager::create_quiet | core::Manager::create_tied)); -- CMD2_ANY_LIST ("load.verbose", tr1::bind(&apply_load, tr1::placeholders::_2, core::Manager::create_tied)); -- CMD2_ANY_LIST ("load.start", tr1::bind(&apply_load, tr1::placeholders::_2, -+ CMD2_ANY ("start_tied", bind(&apply_start_tied)); -+ CMD2_ANY ("stop_untied", bind(&apply_stop_untied)); -+ CMD2_ANY ("close_untied", bind(&apply_close_untied)); -+ CMD2_ANY ("remove_untied", bind(&apply_remove_untied)); -+ -+ CMD2_ANY_LIST ("schedule2", bind(&apply_schedule, STD_PLACEHOLDERS::_2)); -+ CMD2_ANY_STRING_V("schedule_remove2", bind(&rpc::CommandScheduler::erase_str, control->command_scheduler(), STD_PLACEHOLDERS::_2)); -+ -+ CMD2_ANY_STRING_V("import", bind(&apply_import, STD_PLACEHOLDERS::_2)); -+ CMD2_ANY_STRING_V("try_import", bind(&apply_try_import, STD_PLACEHOLDERS::_2)); -+ -+ CMD2_ANY_LIST ("load.normal", bind(&apply_load, STD_PLACEHOLDERS::_2, core::Manager::create_quiet | core::Manager::create_tied)); -+ CMD2_ANY_LIST ("load.verbose", bind(&apply_load, STD_PLACEHOLDERS::_2, core::Manager::create_tied)); -+ CMD2_ANY_LIST ("load.start", bind(&apply_load, STD_PLACEHOLDERS::_2, - core::Manager::create_quiet | core::Manager::create_tied | core::Manager::create_start)); -- CMD2_ANY_LIST ("load.start_verbose", tr1::bind(&apply_load, tr1::placeholders::_2, core::Manager::create_tied | core::Manager::create_start)); -- CMD2_ANY_LIST ("load.raw", tr1::bind(&apply_load, tr1::placeholders::_2, core::Manager::create_quiet | core::Manager::create_raw_data)); -- CMD2_ANY_LIST ("load.raw_verbose", tr1::bind(&apply_load, tr1::placeholders::_2, core::Manager::create_raw_data)); -- CMD2_ANY_LIST ("load.raw_start", tr1::bind(&apply_load, tr1::placeholders::_2, -+ CMD2_ANY_LIST ("load.start_verbose", bind(&apply_load, STD_PLACEHOLDERS::_2, core::Manager::create_tied | core::Manager::create_start)); -+ CMD2_ANY_LIST ("load.raw", bind(&apply_load, STD_PLACEHOLDERS::_2, core::Manager::create_quiet | core::Manager::create_raw_data)); -+ CMD2_ANY_LIST ("load.raw_verbose", bind(&apply_load, STD_PLACEHOLDERS::_2, core::Manager::create_raw_data)); -+ CMD2_ANY_LIST ("load.raw_start", bind(&apply_load, STD_PLACEHOLDERS::_2, - core::Manager::create_quiet | core::Manager::create_start | core::Manager::create_raw_data)); - -- CMD2_ANY_VALUE ("close_low_diskspace", tr1::bind(&apply_close_low_diskspace, tr1::placeholders::_2)); -+ CMD2_ANY_VALUE ("close_low_diskspace", bind(&apply_close_low_diskspace, STD_PLACEHOLDERS::_2)); - -- CMD2_ANY_LIST ("download_list", tr1::bind(&apply_download_list, tr1::placeholders::_2)); -- CMD2_ANY_LIST ("d.multicall2", tr1::bind(&d_multicall, tr1::placeholders::_2)); -+ CMD2_ANY_LIST ("download_list", bind(&apply_download_list, STD_PLACEHOLDERS::_2)); -+ CMD2_ANY_LIST ("d.multicall2", bind(&d_multicall, STD_PLACEHOLDERS::_2)); - } diff --git a/net/rtorrent/patches/patch-src_command__file.cc b/net/rtorrent/patches/patch-src_command__file.cc deleted file mode 100644 index f8a44fb9f08..00000000000 --- a/net/rtorrent/patches/patch-src_command__file.cc +++ /dev/null @@ -1,103 +0,0 @@ -$NetBSD: patch-src_command__file.cc,v 1.1 2013/05/09 14:28:25 joerg Exp $ - ---- src/command_file.cc.orig 2013-05-03 23:02:54.000000000 +0000 -+++ src/command_file.cc -@@ -48,6 +48,16 @@ - #include "control.h" - #include "command_helpers.h" - -+#if __cplusplus >= 201103L -+#include <functional> -+using std::bind; -+#define STD_PLACEHOLDERS std::placeholders -+#else -+#include <tr1/functional> -+using std::tr1::bind; -+#define STD_PLACEHOLDERS std::tr1::placeholders -+#endif -+ - void - apply_f_set_priority(torrent::File* file, uint32_t value) { - if (value > torrent::PRIORITY_HIGH) -@@ -100,45 +110,45 @@ apply_fi_filename_last(torrent::FileList - - void - initialize_command_file() { -- CMD2_FILE("f.is_created", tr1::bind(&torrent::File::is_created, tr1::placeholders::_1)); -- CMD2_FILE("f.is_open", tr1::bind(&torrent::File::is_open, tr1::placeholders::_1)); -+ CMD2_FILE("f.is_created", bind(&torrent::File::is_created, STD_PLACEHOLDERS::_1)); -+ CMD2_FILE("f.is_open", bind(&torrent::File::is_open, STD_PLACEHOLDERS::_1)); - -- CMD2_FILE("f.is_create_queued", tr1::bind(&torrent::File::is_create_queued, tr1::placeholders::_1)); -- CMD2_FILE("f.is_resize_queued", tr1::bind(&torrent::File::is_resize_queued, tr1::placeholders::_1)); -+ CMD2_FILE("f.is_create_queued", bind(&torrent::File::is_create_queued, STD_PLACEHOLDERS::_1)); -+ CMD2_FILE("f.is_resize_queued", bind(&torrent::File::is_resize_queued, STD_PLACEHOLDERS::_1)); - -- CMD2_FILE_VALUE_V("f.set_create_queued", tr1::bind(&torrent::File::set_flags, tr1::placeholders::_1, torrent::File::flag_create_queued)); -- CMD2_FILE_VALUE_V("f.set_resize_queued", tr1::bind(&torrent::File::set_flags, tr1::placeholders::_1, torrent::File::flag_resize_queued)); -- CMD2_FILE_VALUE_V("f.unset_create_queued", tr1::bind(&torrent::File::unset_flags, tr1::placeholders::_1, torrent::File::flag_create_queued)); -- CMD2_FILE_VALUE_V("f.unset_resize_queued", tr1::bind(&torrent::File::unset_flags, tr1::placeholders::_1, torrent::File::flag_resize_queued)); -- -- CMD2_FILE ("f.prioritize_first", tr1::bind(&torrent::File::has_flags, tr1::placeholders::_1, torrent::File::flag_prioritize_first)); -- CMD2_FILE_V("f.prioritize_first.enable", tr1::bind(&torrent::File::set_flags, tr1::placeholders::_1, torrent::File::flag_prioritize_first)); -- CMD2_FILE_V("f.prioritize_first.disable", tr1::bind(&torrent::File::unset_flags, tr1::placeholders::_1, torrent::File::flag_prioritize_first)); -- CMD2_FILE ("f.prioritize_last", tr1::bind(&torrent::File::has_flags, tr1::placeholders::_1, torrent::File::flag_prioritize_last)); -- CMD2_FILE_V("f.prioritize_last.enable", tr1::bind(&torrent::File::set_flags, tr1::placeholders::_1, torrent::File::flag_prioritize_last)); -- CMD2_FILE_V("f.prioritize_last.disable", tr1::bind(&torrent::File::unset_flags, tr1::placeholders::_1, torrent::File::flag_prioritize_last)); -- -- CMD2_FILE("f.size_bytes", tr1::bind(&torrent::File::size_bytes, tr1::placeholders::_1)); -- CMD2_FILE("f.size_chunks", tr1::bind(&torrent::File::size_chunks, tr1::placeholders::_1)); -- CMD2_FILE("f.completed_chunks", tr1::bind(&torrent::File::completed_chunks, tr1::placeholders::_1)); -- -- CMD2_FILE("f.offset", tr1::bind(&torrent::File::offset, tr1::placeholders::_1)); -- CMD2_FILE("f.range_first", tr1::bind(&torrent::File::range_first, tr1::placeholders::_1)); -- CMD2_FILE("f.range_second", tr1::bind(&torrent::File::range_second, tr1::placeholders::_1)); -- -- CMD2_FILE("f.priority", tr1::bind(&torrent::File::priority, tr1::placeholders::_1)); -- CMD2_FILE_VALUE_V("f.priority.set", tr1::bind(&apply_f_set_priority, tr1::placeholders::_1, tr1::placeholders::_2)); -- -- CMD2_FILE("f.path", tr1::bind(&apply_f_path, tr1::placeholders::_1)); -- CMD2_FILE("f.path_components", tr1::bind(&apply_f_path_components, tr1::placeholders::_1)); -- CMD2_FILE("f.path_depth", tr1::bind(&apply_f_path_depth, tr1::placeholders::_1)); -- CMD2_FILE("f.frozen_path", tr1::bind(&torrent::File::frozen_path, tr1::placeholders::_1)); -+ CMD2_FILE_VALUE_V("f.set_create_queued", bind(&torrent::File::set_flags, STD_PLACEHOLDERS::_1, torrent::File::flag_create_queued)); -+ CMD2_FILE_VALUE_V("f.set_resize_queued", bind(&torrent::File::set_flags, STD_PLACEHOLDERS::_1, torrent::File::flag_resize_queued)); -+ CMD2_FILE_VALUE_V("f.unset_create_queued", bind(&torrent::File::unset_flags, STD_PLACEHOLDERS::_1, torrent::File::flag_create_queued)); -+ CMD2_FILE_VALUE_V("f.unset_resize_queued", bind(&torrent::File::unset_flags, STD_PLACEHOLDERS::_1, torrent::File::flag_resize_queued)); -+ -+ CMD2_FILE ("f.prioritize_first", bind(&torrent::File::has_flags, STD_PLACEHOLDERS::_1, torrent::File::flag_prioritize_first)); -+ CMD2_FILE_V("f.prioritize_first.enable", bind(&torrent::File::set_flags, STD_PLACEHOLDERS::_1, torrent::File::flag_prioritize_first)); -+ CMD2_FILE_V("f.prioritize_first.disable", bind(&torrent::File::unset_flags, STD_PLACEHOLDERS::_1, torrent::File::flag_prioritize_first)); -+ CMD2_FILE ("f.prioritize_last", bind(&torrent::File::has_flags, STD_PLACEHOLDERS::_1, torrent::File::flag_prioritize_last)); -+ CMD2_FILE_V("f.prioritize_last.enable", bind(&torrent::File::set_flags, STD_PLACEHOLDERS::_1, torrent::File::flag_prioritize_last)); -+ CMD2_FILE_V("f.prioritize_last.disable", bind(&torrent::File::unset_flags, STD_PLACEHOLDERS::_1, torrent::File::flag_prioritize_last)); -+ -+ CMD2_FILE("f.size_bytes", bind(&torrent::File::size_bytes, STD_PLACEHOLDERS::_1)); -+ CMD2_FILE("f.size_chunks", bind(&torrent::File::size_chunks, STD_PLACEHOLDERS::_1)); -+ CMD2_FILE("f.completed_chunks", bind(&torrent::File::completed_chunks, STD_PLACEHOLDERS::_1)); -+ -+ CMD2_FILE("f.offset", bind(&torrent::File::offset, STD_PLACEHOLDERS::_1)); -+ CMD2_FILE("f.range_first", bind(&torrent::File::range_first, STD_PLACEHOLDERS::_1)); -+ CMD2_FILE("f.range_second", bind(&torrent::File::range_second, STD_PLACEHOLDERS::_1)); -+ -+ CMD2_FILE("f.priority", bind(&torrent::File::priority, STD_PLACEHOLDERS::_1)); -+ CMD2_FILE_VALUE_V("f.priority.set", bind(&apply_f_set_priority, STD_PLACEHOLDERS::_1, STD_PLACEHOLDERS::_2)); -+ -+ CMD2_FILE("f.path", bind(&apply_f_path, STD_PLACEHOLDERS::_1)); -+ CMD2_FILE("f.path_components", bind(&apply_f_path_components, STD_PLACEHOLDERS::_1)); -+ CMD2_FILE("f.path_depth", bind(&apply_f_path_depth, STD_PLACEHOLDERS::_1)); -+ CMD2_FILE("f.frozen_path", bind(&torrent::File::frozen_path, STD_PLACEHOLDERS::_1)); - -- CMD2_FILE("f.match_depth_prev", tr1::bind(&torrent::File::match_depth_prev, tr1::placeholders::_1)); -- CMD2_FILE("f.match_depth_next", tr1::bind(&torrent::File::match_depth_next, tr1::placeholders::_1)); -+ CMD2_FILE("f.match_depth_prev", bind(&torrent::File::match_depth_prev, STD_PLACEHOLDERS::_1)); -+ CMD2_FILE("f.match_depth_next", bind(&torrent::File::match_depth_next, STD_PLACEHOLDERS::_1)); - -- CMD2_FILE("f.last_touched", tr1::bind(&torrent::File::last_touched, tr1::placeholders::_1)); -+ CMD2_FILE("f.last_touched", bind(&torrent::File::last_touched, STD_PLACEHOLDERS::_1)); - -- CMD2_FILEITR("fi.filename_last", tr1::bind(&apply_fi_filename_last, tr1::placeholders::_1)); -- CMD2_FILEITR("fi.is_file", tr1::bind(&torrent::FileListIterator::is_file, tr1::placeholders::_1)); -+ CMD2_FILEITR("fi.filename_last", bind(&apply_fi_filename_last, STD_PLACEHOLDERS::_1)); -+ CMD2_FILEITR("fi.is_file", bind(&torrent::FileListIterator::is_file, STD_PLACEHOLDERS::_1)); - } diff --git a/net/rtorrent/patches/patch-src_command__groups.cc b/net/rtorrent/patches/patch-src_command__groups.cc deleted file mode 100644 index c92d835bbb9..00000000000 --- a/net/rtorrent/patches/patch-src_command__groups.cc +++ /dev/null @@ -1,126 +0,0 @@ -$NetBSD: patch-src_command__groups.cc,v 1.1 2013/05/09 14:28:25 joerg Exp $ - ---- src/command_groups.cc.orig 2013-05-03 23:08:09.000000000 +0000 -+++ src/command_groups.cc -@@ -52,6 +52,16 @@ - // For cg_d_group. - #include "core/download.h" - -+#if __cplusplus >= 201103L -+#include <functional> -+using std::bind; -+#define STD_PLACEHOLDERS std::placeholders -+#else -+#include <tr1/functional> -+using std::tr1::bind; -+#define STD_PLACEHOLDERS std::tr1::placeholders -+#endif -+ - // A hack to allow testing of the new choke_group API without the - // working parts present. - #define USE_CHOKE_GROUP 0 -@@ -264,8 +274,8 @@ apply_cg_tracker_mode_set(const torrent: - return torrent::Object(); - } - --#define CG_GROUP_AT() tr1::bind(&cg_get_group, tr1::placeholders::_2) --#define CHOKE_GROUP(direction) tr1::bind(direction, CG_GROUP_AT()) -+#define CG_GROUP_AT() bind(&cg_get_group, STD_PLACEHOLDERS::_2) -+#define CHOKE_GROUP(direction) bind(direction, CG_GROUP_AT()) - - /* - -@@ -336,54 +346,54 @@ options. - void - initialize_command_groups() { - // Move somewhere else? -- CMD2_ANY ("strings.choke_heuristics", tr1::bind(&torrent::option_list_strings, torrent::OPTION_CHOKE_HEURISTICS)); -- CMD2_ANY ("strings.choke_heuristics.upload", tr1::bind(&torrent::option_list_strings, torrent::OPTION_CHOKE_HEURISTICS_UPLOAD)); -- CMD2_ANY ("strings.choke_heuristics.download", tr1::bind(&torrent::option_list_strings, torrent::OPTION_CHOKE_HEURISTICS_DOWNLOAD)); -- CMD2_ANY ("strings.tracker_mode", tr1::bind(&torrent::option_list_strings, torrent::OPTION_TRACKER_MODE)); -+ CMD2_ANY ("strings.choke_heuristics", bind(&torrent::option_list_strings, torrent::OPTION_CHOKE_HEURISTICS)); -+ CMD2_ANY ("strings.choke_heuristics.upload", bind(&torrent::option_list_strings, torrent::OPTION_CHOKE_HEURISTICS_UPLOAD)); -+ CMD2_ANY ("strings.choke_heuristics.download", bind(&torrent::option_list_strings, torrent::OPTION_CHOKE_HEURISTICS_DOWNLOAD)); -+ CMD2_ANY ("strings.tracker_mode", bind(&torrent::option_list_strings, torrent::OPTION_TRACKER_MODE)); - -- CMD2_ANY ("choke_group.list", tr1::bind(&apply_cg_list)); -- CMD2_ANY_STRING ("choke_group.insert", tr1::bind(&apply_cg_insert, tr1::placeholders::_2)); -+ CMD2_ANY ("choke_group.list", bind(&apply_cg_list)); -+ CMD2_ANY_STRING ("choke_group.insert", bind(&apply_cg_insert, STD_PLACEHOLDERS::_2)); - - #if USE_CHOKE_GROUP -- CMD2_ANY ("choke_group.size", tr1::bind(&torrent::ResourceManager::group_size, torrent::resource_manager())); -- CMD2_ANY_STRING ("choke_group.index_of", tr1::bind(&torrent::ResourceManager::group_index_of, torrent::resource_manager(), tr1::placeholders::_2)); -+ CMD2_ANY ("choke_group.size", bind(&torrent::ResourceManager::group_size, torrent::resource_manager())); -+ CMD2_ANY_STRING ("choke_group.index_of", bind(&torrent::ResourceManager::group_index_of, torrent::resource_manager(), STD_PLACEHOLDERS::_2)); - #else - apply_cg_insert("default"); - -- CMD2_ANY ("choke_group.size", tr1::bind(&std::vector<torrent::choke_group*>::size, cg_list_hack)); -- CMD2_ANY_STRING ("choke_group.index_of", tr1::bind(&apply_cg_index_of, tr1::placeholders::_2)); -+ CMD2_ANY ("choke_group.size", bind(&std::vector<torrent::choke_group*>::size, cg_list_hack)); -+ CMD2_ANY_STRING ("choke_group.index_of", bind(&apply_cg_index_of, STD_PLACEHOLDERS::_2)); - #endif - - // Commands specific for a group. Supports as the first argument the - // name, the index or a negative index. -- CMD2_ANY ("choke_group.general.size", tr1::bind(&torrent::choke_group::size, CG_GROUP_AT())); -+ CMD2_ANY ("choke_group.general.size", bind(&torrent::choke_group::size, CG_GROUP_AT())); - -- CMD2_ANY ("choke_group.tracker.mode", tr1::bind(&torrent::option_as_string, torrent::OPTION_TRACKER_MODE, -- tr1::bind(&torrent::choke_group::tracker_mode, CG_GROUP_AT()))); -- CMD2_ANY_LIST ("choke_group.tracker.mode.set", tr1::bind(&apply_cg_tracker_mode_set, tr1::placeholders::_2)); -- -- CMD2_ANY ("choke_group.up.rate", tr1::bind(&torrent::choke_group::up_rate, CG_GROUP_AT())); -- CMD2_ANY ("choke_group.down.rate", tr1::bind(&torrent::choke_group::down_rate, CG_GROUP_AT())); -- -- CMD2_ANY ("choke_group.up.max.unlimited", tr1::bind(&torrent::choke_queue::is_unlimited, CHOKE_GROUP(&torrent::choke_group::up_queue))); -- CMD2_ANY ("choke_group.up.max", tr1::bind(&torrent::choke_queue::max_unchoked_signed, CHOKE_GROUP(&torrent::choke_group::up_queue))); -- CMD2_ANY_LIST ("choke_group.up.max.set", tr1::bind(&apply_cg_max_set, tr1::placeholders::_2, true)); -- -- CMD2_ANY ("choke_group.up.total", tr1::bind(&torrent::choke_queue::size_total, CHOKE_GROUP(&torrent::choke_group::up_queue))); -- CMD2_ANY ("choke_group.up.queued", tr1::bind(&torrent::choke_queue::size_queued, CHOKE_GROUP(&torrent::choke_group::up_queue))); -- CMD2_ANY ("choke_group.up.unchoked", tr1::bind(&torrent::choke_queue::size_unchoked, CHOKE_GROUP(&torrent::choke_group::up_queue))); -- CMD2_ANY ("choke_group.up.heuristics", tr1::bind(&torrent::option_as_string, torrent::OPTION_CHOKE_HEURISTICS, -- tr1::bind(&torrent::choke_queue::heuristics, CHOKE_GROUP(&torrent::choke_group::up_queue)))); -- CMD2_ANY_LIST ("choke_group.up.heuristics.set", tr1::bind(&apply_cg_heuristics_set, tr1::placeholders::_2, true)); -- -- CMD2_ANY ("choke_group.down.max.unlimited", tr1::bind(&torrent::choke_queue::is_unlimited, CHOKE_GROUP(&torrent::choke_group::down_queue))); -- CMD2_ANY ("choke_group.down.max", tr1::bind(&torrent::choke_queue::max_unchoked_signed, CHOKE_GROUP(&torrent::choke_group::down_queue))); -- CMD2_ANY_LIST ("choke_group.down.max.set", tr1::bind(&apply_cg_max_set, tr1::placeholders::_2, false)); -- -- CMD2_ANY ("choke_group.down.total", tr1::bind(&torrent::choke_queue::size_total, CHOKE_GROUP(&torrent::choke_group::down_queue))); -- CMD2_ANY ("choke_group.down.queued", tr1::bind(&torrent::choke_queue::size_queued, CHOKE_GROUP(&torrent::choke_group::down_queue))); -- CMD2_ANY ("choke_group.down.unchoked", tr1::bind(&torrent::choke_queue::size_unchoked, CHOKE_GROUP(&torrent::choke_group::down_queue))); -- CMD2_ANY ("choke_group.down.heuristics", tr1::bind(&torrent::option_as_string, torrent::OPTION_CHOKE_HEURISTICS, -- tr1::bind(&torrent::choke_queue::heuristics, CHOKE_GROUP(&torrent::choke_group::down_queue)))); -- CMD2_ANY_LIST ("choke_group.down.heuristics.set", tr1::bind(&apply_cg_heuristics_set, tr1::placeholders::_2, false)); -+ CMD2_ANY ("choke_group.tracker.mode", bind(&torrent::option_as_string, torrent::OPTION_TRACKER_MODE, -+ bind(&torrent::choke_group::tracker_mode, CG_GROUP_AT()))); -+ CMD2_ANY_LIST ("choke_group.tracker.mode.set", bind(&apply_cg_tracker_mode_set, STD_PLACEHOLDERS::_2)); -+ -+ CMD2_ANY ("choke_group.up.rate", bind(&torrent::choke_group::up_rate, CG_GROUP_AT())); -+ CMD2_ANY ("choke_group.down.rate", bind(&torrent::choke_group::down_rate, CG_GROUP_AT())); -+ -+ CMD2_ANY ("choke_group.up.max.unlimited", bind(&torrent::choke_queue::is_unlimited, CHOKE_GROUP(&torrent::choke_group::up_queue))); -+ CMD2_ANY ("choke_group.up.max", bind(&torrent::choke_queue::max_unchoked_signed, CHOKE_GROUP(&torrent::choke_group::up_queue))); -+ CMD2_ANY_LIST ("choke_group.up.max.set", bind(&apply_cg_max_set, STD_PLACEHOLDERS::_2, true)); -+ -+ CMD2_ANY ("choke_group.up.total", bind(&torrent::choke_queue::size_total, CHOKE_GROUP(&torrent::choke_group::up_queue))); -+ CMD2_ANY ("choke_group.up.queued", bind(&torrent::choke_queue::size_queued, CHOKE_GROUP(&torrent::choke_group::up_queue))); -+ CMD2_ANY ("choke_group.up.unchoked", bind(&torrent::choke_queue::size_unchoked, CHOKE_GROUP(&torrent::choke_group::up_queue))); -+ CMD2_ANY ("choke_group.up.heuristics", bind(&torrent::option_as_string, torrent::OPTION_CHOKE_HEURISTICS, -+ bind(&torrent::choke_queue::heuristics, CHOKE_GROUP(&torrent::choke_group::up_queue)))); -+ CMD2_ANY_LIST ("choke_group.up.heuristics.set", bind(&apply_cg_heuristics_set, STD_PLACEHOLDERS::_2, true)); -+ -+ CMD2_ANY ("choke_group.down.max.unlimited", bind(&torrent::choke_queue::is_unlimited, CHOKE_GROUP(&torrent::choke_group::down_queue))); -+ CMD2_ANY ("choke_group.down.max", bind(&torrent::choke_queue::max_unchoked_signed, CHOKE_GROUP(&torrent::choke_group::down_queue))); -+ CMD2_ANY_LIST ("choke_group.down.max.set", bind(&apply_cg_max_set, STD_PLACEHOLDERS::_2, false)); -+ -+ CMD2_ANY ("choke_group.down.total", bind(&torrent::choke_queue::size_total, CHOKE_GROUP(&torrent::choke_group::down_queue))); -+ CMD2_ANY ("choke_group.down.queued", bind(&torrent::choke_queue::size_queued, CHOKE_GROUP(&torrent::choke_group::down_queue))); -+ CMD2_ANY ("choke_group.down.unchoked", bind(&torrent::choke_queue::size_unchoked, CHOKE_GROUP(&torrent::choke_group::down_queue))); -+ CMD2_ANY ("choke_group.down.heuristics", bind(&torrent::option_as_string, torrent::OPTION_CHOKE_HEURISTICS, -+ bind(&torrent::choke_queue::heuristics, CHOKE_GROUP(&torrent::choke_group::down_queue)))); -+ CMD2_ANY_LIST ("choke_group.down.heuristics.set", bind(&apply_cg_heuristics_set, STD_PLACEHOLDERS::_2, false)); - } diff --git a/net/rtorrent/patches/patch-src_command__helpers.h b/net/rtorrent/patches/patch-src_command__helpers.h deleted file mode 100644 index 33159a9757b..00000000000 --- a/net/rtorrent/patches/patch-src_command__helpers.h +++ /dev/null @@ -1,74 +0,0 @@ -$NetBSD: patch-src_command__helpers.h,v 1.1 2013/05/09 14:28:25 joerg Exp $ - ---- src/command_helpers.h.orig 2013-05-03 22:59:40.000000000 +0000 -+++ src/command_helpers.h -@@ -41,8 +41,6 @@ - #include "rpc/parse_commands.h" - #include "rpc/object_storage.h" - --namespace tr1 { using namespace std::tr1; } -- - void initialize_commands(); - - // -@@ -100,43 +98,43 @@ void initialize_commands(); - - #define CMD2_VAR_BOOL(key, value) \ - control->object_storage()->insert_c_str(key, int64_t(value), rpc::object_storage::flag_bool_type); \ -- CMD2_ANY(key, tr1::bind(&rpc::object_storage::get, control->object_storage(), \ -+ CMD2_ANY(key, bind(&rpc::object_storage::get, control->object_storage(), \ - torrent::raw_string::from_c_str(key))); \ -- CMD2_ANY_VALUE(key ".set", tr1::bind(&rpc::object_storage::set_bool, control->object_storage(), \ -- torrent::raw_string::from_c_str(key), tr1::placeholders::_2)); -+ CMD2_ANY_VALUE(key ".set", bind(&rpc::object_storage::set_bool, control->object_storage(), \ -+ torrent::raw_string::from_c_str(key), STD_PLACEHOLDERS::_2)); - - #define CMD2_VAR_VALUE(key, value) \ - control->object_storage()->insert_c_str(key, int64_t(value), rpc::object_storage::flag_value_type); \ -- CMD2_ANY(key, tr1::bind(&rpc::object_storage::get, control->object_storage(), \ -+ CMD2_ANY(key, bind(&rpc::object_storage::get, control->object_storage(), \ - torrent::raw_string::from_c_str(key))); \ -- CMD2_ANY_VALUE(key ".set", tr1::bind(&rpc::object_storage::set_value, control->object_storage(), \ -- torrent::raw_string::from_c_str(key), tr1::placeholders::_2)); -+ CMD2_ANY_VALUE(key ".set", bind(&rpc::object_storage::set_value, control->object_storage(), \ -+ torrent::raw_string::from_c_str(key), STD_PLACEHOLDERS::_2)); - - #define CMD2_VAR_STRING(key, value) \ - control->object_storage()->insert_c_str(key, value, rpc::object_storage::flag_string_type); \ -- CMD2_ANY(key, tr1::bind(&rpc::object_storage::get, control->object_storage(), \ -+ CMD2_ANY(key, bind(&rpc::object_storage::get, control->object_storage(), \ - torrent::raw_string::from_c_str(key))); \ -- CMD2_ANY_STRING(key ".set", tr1::bind(&rpc::object_storage::set_string, control->object_storage(), \ -- torrent::raw_string::from_c_str(key), tr1::placeholders::_2)); -+ CMD2_ANY_STRING(key ".set", bind(&rpc::object_storage::set_string, control->object_storage(), \ -+ torrent::raw_string::from_c_str(key), STD_PLACEHOLDERS::_2)); - - - #define CMD2_VAR_C_STRING(key, value) \ - control->object_storage()->insert_c_str(key, value, rpc::object_storage::flag_string_type); \ -- CMD2_ANY(key, tr1::bind(&rpc::object_storage::get, control->object_storage(), \ -+ CMD2_ANY(key, bind(&rpc::object_storage::get, control->object_storage(), \ - torrent::raw_string::from_c_str(key))); - - #define CMD2_VAR_LIST(key) \ - control->object_storage()->insert_c_str(key, torrent::Object::create_list(), rpc::object_storage::flag_list_type); \ -- CMD2_ANY(key, tr1::bind(&rpc::object_storage::get, control->object_storage(), \ -+ CMD2_ANY(key, bind(&rpc::object_storage::get, control->object_storage(), \ - torrent::raw_string::from_c_str(key))); \ -- CMD2_ANY_LIST(key ".set", tr1::bind(&rpc::object_storage::set_list, control->object_storage(), \ -- torrent::raw_string::from_c_str(key), tr1::placeholders::_2)); \ -- CMD2_ANY_VOID(key ".push_back", tr1::bind(&rpc::object_storage::list_push_back, control->object_storage(), \ -- torrent::raw_string::from_c_str(key), tr1::placeholders::_2)); -+ CMD2_ANY_LIST(key ".set", bind(&rpc::object_storage::set_list, control->object_storage(), \ -+ torrent::raw_string::from_c_str(key), STD_PLACEHOLDERS::_2)); \ -+ CMD2_ANY_VOID(key ".push_back", bind(&rpc::object_storage::list_push_back, control->object_storage(), \ -+ torrent::raw_string::from_c_str(key), STD_PLACEHOLDERS::_2)); - - #define CMD2_FUNC_SINGLE(key, cmds) \ -- CMD2_ANY(key, tr1::bind(&rpc::command_function_call, torrent::raw_string::from_c_str(cmds), \ -- tr1::placeholders::_1, tr1::placeholders::_2)); -+ CMD2_ANY(key, bind(&rpc::command_function_call, torrent::raw_string::from_c_str(cmds), \ -+ STD_PLACEHOLDERS::_1, STD_PLACEHOLDERS::_2)); - - #define CMD2_REDIRECT(from_key, to_key) \ - rpc::commands.create_redirect(from_key, to_key, rpc::CommandMap::flag_public_xmlrpc | rpc::CommandMap::flag_dont_delete); diff --git a/net/rtorrent/patches/patch-src_command__ip.cc b/net/rtorrent/patches/patch-src_command__ip.cc deleted file mode 100644 index ad8d7f3693a..00000000000 --- a/net/rtorrent/patches/patch-src_command__ip.cc +++ /dev/null @@ -1,51 +0,0 @@ -$NetBSD: patch-src_command__ip.cc,v 1.1 2013/05/09 14:28:25 joerg Exp $ - ---- src/command_ip.cc.orig 2013-05-03 23:03:23.000000000 +0000 -+++ src/command_ip.cc -@@ -45,6 +45,16 @@ - #include "globals.h" - #include "command_helpers.h" - -+#if __cplusplus >= 201103L -+#include <functional> -+using std::bind; -+#define STD_PLACEHOLDERS std::placeholders -+#else -+#include <tr1/functional> -+using std::tr1::bind; -+#define STD_PLACEHOLDERS std::tr1::placeholders -+#endif -+ - void - ipv4_filter_parse(const char* address, int value) { - uint32_t ip_values[4] = { 0, 0, 0, 0 }; -@@ -287,17 +297,17 @@ apply_ipv4_filter_dump() { - - void - initialize_command_ip() { -- CMD2_ANY ("strings.ip_filter", tr1::bind(&torrent::option_list_strings, torrent::OPTION_IP_FILTER)); -- CMD2_ANY ("strings.ip_tos", tr1::bind(&torrent::option_list_strings, torrent::OPTION_IP_TOS)); -+ CMD2_ANY ("strings.ip_filter", bind(&torrent::option_list_strings, torrent::OPTION_IP_FILTER)); -+ CMD2_ANY ("strings.ip_tos", bind(&torrent::option_list_strings, torrent::OPTION_IP_TOS)); - -- CMD2_ANY_STRING ("ip_tables.insert_table", tr1::bind(&apply_ip_tables_insert_table, tr1::placeholders::_2)); -- CMD2_ANY_STRING ("ip_tables.size_data", tr1::bind(&apply_ip_tables_size_data, tr1::placeholders::_2)); -- CMD2_ANY_LIST ("ip_tables.get", tr1::bind(&apply_ip_tables_get, tr1::placeholders::_2)); -- CMD2_ANY_LIST ("ip_tables.add_address", tr1::bind(&apply_ip_tables_add_address, tr1::placeholders::_2)); -- -- CMD2_ANY ("ipv4_filter.size_data", tr1::bind(&apply_ipv4_filter_size_data)); -- CMD2_ANY_STRING ("ipv4_filter.get", tr1::bind(&apply_ipv4_filter_get, tr1::placeholders::_2)); -- CMD2_ANY_LIST ("ipv4_filter.add_address", tr1::bind(&apply_ipv4_filter_add_address, tr1::placeholders::_2)); -- CMD2_ANY_LIST ("ipv4_filter.load", tr1::bind(&apply_ipv4_filter_load, tr1::placeholders::_2)); -- CMD2_ANY_LIST ("ipv4_filter.dump", tr1::bind(&apply_ipv4_filter_dump)); -+ CMD2_ANY_STRING ("ip_tables.insert_table", bind(&apply_ip_tables_insert_table, STD_PLACEHOLDERS::_2)); -+ CMD2_ANY_STRING ("ip_tables.size_data", bind(&apply_ip_tables_size_data, STD_PLACEHOLDERS::_2)); -+ CMD2_ANY_LIST ("ip_tables.get", bind(&apply_ip_tables_get, STD_PLACEHOLDERS::_2)); -+ CMD2_ANY_LIST ("ip_tables.add_address", bind(&apply_ip_tables_add_address, STD_PLACEHOLDERS::_2)); -+ -+ CMD2_ANY ("ipv4_filter.size_data", bind(&apply_ipv4_filter_size_data)); -+ CMD2_ANY_STRING ("ipv4_filter.get", bind(&apply_ipv4_filter_get, STD_PLACEHOLDERS::_2)); -+ CMD2_ANY_LIST ("ipv4_filter.add_address", bind(&apply_ipv4_filter_add_address, STD_PLACEHOLDERS::_2)); -+ CMD2_ANY_LIST ("ipv4_filter.load", bind(&apply_ipv4_filter_load, STD_PLACEHOLDERS::_2)); -+ CMD2_ANY_LIST ("ipv4_filter.dump", bind(&apply_ipv4_filter_dump)); - } diff --git a/net/rtorrent/patches/patch-src_command__local.cc b/net/rtorrent/patches/patch-src_command__local.cc deleted file mode 100644 index b4b2702de8a..00000000000 --- a/net/rtorrent/patches/patch-src_command__local.cc +++ /dev/null @@ -1,183 +0,0 @@ -$NetBSD: patch-src_command__local.cc,v 1.1 2013/05/09 14:28:25 joerg Exp $ - ---- src/command_local.cc.orig 2013-05-03 23:06:13.000000000 +0000 -+++ src/command_local.cc -@@ -65,6 +65,16 @@ - #include "control.h" - #include "command_helpers.h" - -+#if __cplusplus >= 201103L -+#include <functional> -+using std::bind; -+#define STD_PLACEHOLDERS std::placeholders -+#else -+#include <tr1/functional> -+using std::tr1::bind; -+#define STD_PLACEHOLDERS std::tr1::placeholders -+#endif -+ - typedef torrent::ChunkManager CM_t; - typedef torrent::FileManager FM_t; - -@@ -326,8 +336,8 @@ initialize_command_local() { - core::DownloadList* dList = control->core()->download_list(); - core::DownloadStore* dStore = control->core()->download_store(); - -- CMD2_ANY ("system.hostname", tr1::bind(&system_hostname)); -- CMD2_ANY ("system.pid", tr1::bind(&getpid)); -+ CMD2_ANY ("system.hostname", bind(&system_hostname)); -+ CMD2_ANY ("system.pid", bind(&getpid)); - - CMD2_VAR_C_STRING("system.api_version", (int64_t)API_VERSION); - CMD2_VAR_C_STRING("system.client_version", PACKAGE_VERSION); -@@ -337,54 +347,54 @@ initialize_command_local() { - CMD2_VAR_VALUE ("system.file.split_size", -1); - CMD2_VAR_STRING ("system.file.split_suffix", ".part"); - -- CMD2_ANY ("system.file_status_cache.size", tr1::bind(&utils::FileStatusCache::size, -+ CMD2_ANY ("system.file_status_cache.size", bind(&utils::FileStatusCache::size, - (utils::FileStatusCache::base_type*)control->core()->file_status_cache())); -- CMD2_ANY_V ("system.file_status_cache.prune", tr1::bind(&utils::FileStatusCache::prune, control->core()->file_status_cache())); -+ CMD2_ANY_V ("system.file_status_cache.prune", bind(&utils::FileStatusCache::prune, control->core()->file_status_cache())); - - CMD2_VAR_BOOL ("file.prioritize_toc", 0); - CMD2_VAR_LIST ("file.prioritize_toc.first"); - CMD2_VAR_LIST ("file.prioritize_toc.last"); - -- CMD2_ANY ("system.files.opened_counter", tr1::bind(&FM_t::files_opened_counter, fileManager)); -- CMD2_ANY ("system.files.closed_counter", tr1::bind(&FM_t::files_closed_counter, fileManager)); -- CMD2_ANY ("system.files.failed_counter", tr1::bind(&FM_t::files_failed_counter, fileManager)); -- -- CMD2_ANY ("system.time", tr1::bind(&rak::timer::seconds, &cachedTime)); -- CMD2_ANY ("system.time_seconds", tr1::bind(&rak::timer::current_seconds)); -- CMD2_ANY ("system.time_usec", tr1::bind(&rak::timer::current_usec)); -- -- CMD2_ANY_VALUE_V ("system.umask.set", tr1::bind(&umask, tr1::placeholders::_2)); -- -- CMD2_ANY ("system.cwd", tr1::bind(&system_get_cwd)); -- CMD2_ANY_STRING ("system.cwd.set", tr1::bind(&system_set_cwd, tr1::placeholders::_2)); -- -- CMD2_ANY ("pieces.sync.always_safe", tr1::bind(&CM_t::safe_sync, chunkManager)); -- CMD2_ANY_VALUE_V ("pieces.sync.always_safe.set", tr1::bind(&CM_t::set_safe_sync, chunkManager, tr1::placeholders::_2)); -- CMD2_ANY ("pieces.sync.safe_free_diskspace", tr1::bind(&CM_t::safe_free_diskspace, chunkManager)); -- CMD2_ANY ("pieces.sync.timeout", tr1::bind(&CM_t::timeout_sync, chunkManager)); -- CMD2_ANY_VALUE_V ("pieces.sync.timeout.set", tr1::bind(&CM_t::set_timeout_sync, chunkManager, tr1::placeholders::_2)); -- CMD2_ANY ("pieces.sync.timeout_safe", tr1::bind(&CM_t::timeout_safe_sync, chunkManager)); -- CMD2_ANY_VALUE_V ("pieces.sync.timeout_safe.set", tr1::bind(&CM_t::set_timeout_safe_sync, chunkManager, tr1::placeholders::_2)); -- CMD2_ANY ("pieces.sync.queue_size", tr1::bind(&CM_t::sync_queue_size, chunkManager)); -- -- CMD2_ANY ("pieces.preload.type", tr1::bind(&CM_t::preload_type, chunkManager)); -- CMD2_ANY_VALUE_V ("pieces.preload.type.set", tr1::bind(&CM_t::set_preload_type, chunkManager, tr1::placeholders::_2)); -- CMD2_ANY ("pieces.preload.min_size", tr1::bind(&CM_t::preload_min_size, chunkManager)); -- CMD2_ANY_VALUE_V ("pieces.preload.min_size.set", tr1::bind(&CM_t::set_preload_min_size, chunkManager, tr1::placeholders::_2)); -- CMD2_ANY ("pieces.preload.min_rate", tr1::bind(&CM_t::preload_required_rate, chunkManager)); -- CMD2_ANY_VALUE_V ("pieces.preload.min_rate.set", tr1::bind(&CM_t::set_preload_required_rate, chunkManager, tr1::placeholders::_2)); -- -- CMD2_ANY ("pieces.memory.current", tr1::bind(&CM_t::memory_usage, chunkManager)); -- CMD2_ANY ("pieces.memory.sync_queue", tr1::bind(&CM_t::sync_queue_memory_usage, chunkManager)); -- CMD2_ANY ("pieces.memory.block_count", tr1::bind(&CM_t::memory_block_count, chunkManager)); -- CMD2_ANY ("pieces.memory.max", tr1::bind(&CM_t::max_memory_usage, chunkManager)); -- CMD2_ANY_VALUE_V ("pieces.memory.max.set", tr1::bind(&CM_t::set_max_memory_usage, chunkManager, tr1::placeholders::_2)); -- CMD2_ANY ("pieces.stats_preloaded", tr1::bind(&CM_t::stats_preloaded, chunkManager)); -- CMD2_ANY ("pieces.stats_not_preloaded", tr1::bind(&CM_t::stats_not_preloaded, chunkManager)); -+ CMD2_ANY ("system.files.opened_counter", bind(&FM_t::files_opened_counter, fileManager)); -+ CMD2_ANY ("system.files.closed_counter", bind(&FM_t::files_closed_counter, fileManager)); -+ CMD2_ANY ("system.files.failed_counter", bind(&FM_t::files_failed_counter, fileManager)); -+ -+ CMD2_ANY ("system.time", bind(&rak::timer::seconds, &cachedTime)); -+ CMD2_ANY ("system.time_seconds", bind(&rak::timer::current_seconds)); -+ CMD2_ANY ("system.time_usec", bind(&rak::timer::current_usec)); -+ -+ CMD2_ANY_VALUE_V ("system.umask.set", bind(&umask, STD_PLACEHOLDERS::_2)); -+ -+ CMD2_ANY ("system.cwd", bind(&system_get_cwd)); -+ CMD2_ANY_STRING ("system.cwd.set", bind(&system_set_cwd, STD_PLACEHOLDERS::_2)); -+ -+ CMD2_ANY ("pieces.sync.always_safe", bind(&CM_t::safe_sync, chunkManager)); -+ CMD2_ANY_VALUE_V ("pieces.sync.always_safe.set", bind(&CM_t::set_safe_sync, chunkManager, STD_PLACEHOLDERS::_2)); -+ CMD2_ANY ("pieces.sync.safe_free_diskspace", bind(&CM_t::safe_free_diskspace, chunkManager)); -+ CMD2_ANY ("pieces.sync.timeout", bind(&CM_t::timeout_sync, chunkManager)); -+ CMD2_ANY_VALUE_V ("pieces.sync.timeout.set", bind(&CM_t::set_timeout_sync, chunkManager, STD_PLACEHOLDERS::_2)); -+ CMD2_ANY ("pieces.sync.timeout_safe", bind(&CM_t::timeout_safe_sync, chunkManager)); -+ CMD2_ANY_VALUE_V ("pieces.sync.timeout_safe.set", bind(&CM_t::set_timeout_safe_sync, chunkManager, STD_PLACEHOLDERS::_2)); -+ CMD2_ANY ("pieces.sync.queue_size", bind(&CM_t::sync_queue_size, chunkManager)); -+ -+ CMD2_ANY ("pieces.preload.type", bind(&CM_t::preload_type, chunkManager)); -+ CMD2_ANY_VALUE_V ("pieces.preload.type.set", bind(&CM_t::set_preload_type, chunkManager, STD_PLACEHOLDERS::_2)); -+ CMD2_ANY ("pieces.preload.min_size", bind(&CM_t::preload_min_size, chunkManager)); -+ CMD2_ANY_VALUE_V ("pieces.preload.min_size.set", bind(&CM_t::set_preload_min_size, chunkManager, STD_PLACEHOLDERS::_2)); -+ CMD2_ANY ("pieces.preload.min_rate", bind(&CM_t::preload_required_rate, chunkManager)); -+ CMD2_ANY_VALUE_V ("pieces.preload.min_rate.set", bind(&CM_t::set_preload_required_rate, chunkManager, STD_PLACEHOLDERS::_2)); -+ -+ CMD2_ANY ("pieces.memory.current", bind(&CM_t::memory_usage, chunkManager)); -+ CMD2_ANY ("pieces.memory.sync_queue", bind(&CM_t::sync_queue_memory_usage, chunkManager)); -+ CMD2_ANY ("pieces.memory.block_count", bind(&CM_t::memory_block_count, chunkManager)); -+ CMD2_ANY ("pieces.memory.max", bind(&CM_t::max_memory_usage, chunkManager)); -+ CMD2_ANY_VALUE_V ("pieces.memory.max.set", bind(&CM_t::set_max_memory_usage, chunkManager, STD_PLACEHOLDERS::_2)); -+ CMD2_ANY ("pieces.stats_preloaded", bind(&CM_t::stats_preloaded, chunkManager)); -+ CMD2_ANY ("pieces.stats_not_preloaded", bind(&CM_t::stats_not_preloaded, chunkManager)); - -- CMD2_ANY ("pieces.stats.total_size", tr1::bind(&apply_pieces_stats_total_size)); -+ CMD2_ANY ("pieces.stats.total_size", bind(&apply_pieces_stats_total_size)); - -- CMD2_ANY ("pieces.hash.queue_size", tr1::bind(&torrent::hash_queue_size)); -+ CMD2_ANY ("pieces.hash.queue_size", bind(&torrent::hash_queue_size)); - CMD2_VAR_BOOL ("pieces.hash.on_completion", true); - - CMD2_VAR_STRING ("directory.default", "./"); -@@ -393,13 +403,13 @@ initialize_command_local() { - CMD2_VAR_BOOL ("session.use_lock", true); - CMD2_VAR_BOOL ("session.on_completion", true); - -- CMD2_ANY ("session.path", tr1::bind(&core::DownloadStore::path, dStore)); -- CMD2_ANY_STRING_V("session.path.set", tr1::bind(&core::DownloadStore::set_path, dStore, tr1::placeholders::_2)); -+ CMD2_ANY ("session.path", bind(&core::DownloadStore::path, dStore)); -+ CMD2_ANY_STRING_V("session.path.set", bind(&core::DownloadStore::set_path, dStore, STD_PLACEHOLDERS::_2)); - -- CMD2_ANY_V ("session.save", tr1::bind(&core::DownloadList::session_save, dList)); -+ CMD2_ANY_V ("session.save", bind(&core::DownloadList::session_save, dList)); - - #define CMD2_EXECUTE(key, flags) \ -- CMD2_ANY(key, tr1::bind(&rpc::ExecFile::execute_object, &rpc::execFile, tr1::placeholders::_2, flags)); -+ CMD2_ANY(key, bind(&rpc::ExecFile::execute_object, &rpc::execFile, STD_PLACEHOLDERS::_2, flags)); - - CMD2_EXECUTE ("execute2", rpc::ExecFile::flag_expand_tilde | rpc::ExecFile::flag_throw); - CMD2_EXECUTE ("execute.throw", rpc::ExecFile::flag_expand_tilde | rpc::ExecFile::flag_throw); -@@ -413,25 +423,25 @@ initialize_command_local() { - CMD2_EXECUTE ("execute.capture", rpc::ExecFile::flag_throw | rpc::ExecFile::flag_expand_tilde | rpc::ExecFile::flag_capture); - CMD2_EXECUTE ("execute.capture_nothrow", rpc::ExecFile::flag_expand_tilde | rpc::ExecFile::flag_capture); - -- CMD2_ANY_LIST ("log.open_file", tr1::bind(&apply_log_open_file, tr1::placeholders::_2)); -- CMD2_ANY_LIST ("log.add_output", tr1::bind(&apply_log_add_output, tr1::placeholders::_2)); -+ CMD2_ANY_LIST ("log.open_file", bind(&apply_log_open_file, STD_PLACEHOLDERS::_2)); -+ CMD2_ANY_LIST ("log.add_output", bind(&apply_log_add_output, STD_PLACEHOLDERS::_2)); - -- CMD2_ANY_STRING ("log.execute", tr1::bind(&apply_log, tr1::placeholders::_2, 0)); -- CMD2_ANY_STRING ("log.vmmap.dump", tr1::bind(&log_vmmap_dump, tr1::placeholders::_2)); -- CMD2_ANY_STRING_V("log.xmlrpc", tr1::bind(&ThreadWorker::set_xmlrpc_log, worker_thread, tr1::placeholders::_2)); -- CMD2_ANY_LIST ("log.libtorrent", tr1::bind(&apply_log_libtorrent, tr1::placeholders::_2)); -+ CMD2_ANY_STRING ("log.execute", bind(&apply_log, STD_PLACEHOLDERS::_2, 0)); -+ CMD2_ANY_STRING ("log.vmmap.dump", bind(&log_vmmap_dump, STD_PLACEHOLDERS::_2)); -+ CMD2_ANY_STRING_V("log.xmlrpc", bind(&ThreadWorker::set_xmlrpc_log, worker_thread, STD_PLACEHOLDERS::_2)); -+ CMD2_ANY_LIST ("log.libtorrent", bind(&apply_log_libtorrent, STD_PLACEHOLDERS::_2)); - -- CMD2_ANY_LIST ("file.append", tr1::bind(&cmd_file_append, tr1::placeholders::_2)); -+ CMD2_ANY_LIST ("file.append", bind(&cmd_file_append, STD_PLACEHOLDERS::_2)); - - // TODO: Convert to new command types: - *rpc::command_base::argument(0) = "placeholder.0"; - *rpc::command_base::argument(1) = "placeholder.1"; - *rpc::command_base::argument(2) = "placeholder.2"; - *rpc::command_base::argument(3) = "placeholder.3"; -- CMD2_ANY_P("argument.0", tr1::bind(&rpc::command_base::argument_ref, 0)); -- CMD2_ANY_P("argument.1", tr1::bind(&rpc::command_base::argument_ref, 1)); -- CMD2_ANY_P("argument.2", tr1::bind(&rpc::command_base::argument_ref, 2)); -- CMD2_ANY_P("argument.3", tr1::bind(&rpc::command_base::argument_ref, 3)); -+ CMD2_ANY_P("argument.0", bind(&rpc::command_base::argument_ref, 0)); -+ CMD2_ANY_P("argument.1", bind(&rpc::command_base::argument_ref, 1)); -+ CMD2_ANY_P("argument.2", bind(&rpc::command_base::argument_ref, 2)); -+ CMD2_ANY_P("argument.3", bind(&rpc::command_base::argument_ref, 3)); - -- CMD2_ANY_LIST ("group.insert", tr1::bind(&group_insert, tr1::placeholders::_2)); -+ CMD2_ANY_LIST ("group.insert", bind(&group_insert, STD_PLACEHOLDERS::_2)); - } diff --git a/net/rtorrent/patches/patch-src_command__network.cc b/net/rtorrent/patches/patch-src_command__network.cc deleted file mode 100644 index 7a5c02472b2..00000000000 --- a/net/rtorrent/patches/patch-src_command__network.cc +++ /dev/null @@ -1,146 +0,0 @@ -$NetBSD: patch-src_command__network.cc,v 1.1 2013/05/09 14:28:25 joerg Exp $ - ---- src/command_network.cc.orig 2013-05-03 23:07:09.000000000 +0000 -+++ src/command_network.cc -@@ -62,7 +62,15 @@ - #include "control.h" - #include "command_helpers.h" - --namespace tr1 { using namespace std::tr1; } -+#if __cplusplus >= 201103L -+#include <functional> -+using std::bind; -+#define STD_PLACEHOLDERS std::placeholders -+#else -+#include <tr1/functional> -+using std::tr1::bind; -+#define STD_PLACEHOLDERS std::tr1::placeholders -+#endif - - torrent::Object - apply_encryption(const torrent::Object::list_type& args) { -@@ -126,10 +134,10 @@ xmlrpc_find_peer(core::Download* downloa - void - initialize_xmlrpc() { - rpc::xmlrpc.initialize(); -- rpc::xmlrpc.slot_find_download() = tr1::bind(&core::DownloadList::find_hex_ptr, control->core()->download_list(), tr1::placeholders::_1); -- rpc::xmlrpc.slot_find_file() = tr1::bind(&xmlrpc_find_file, tr1::placeholders::_1, tr1::placeholders::_2); -- rpc::xmlrpc.slot_find_tracker() = tr1::bind(&xmlrpc_find_tracker, tr1::placeholders::_1, tr1::placeholders::_2); -- rpc::xmlrpc.slot_find_peer() = tr1::bind(&xmlrpc_find_peer, tr1::placeholders::_1, tr1::placeholders::_2); -+ rpc::xmlrpc.slot_find_download() = bind(&core::DownloadList::find_hex_ptr, control->core()->download_list(), STD_PLACEHOLDERS::_1); -+ rpc::xmlrpc.slot_find_file() = bind(&xmlrpc_find_file, STD_PLACEHOLDERS::_1, STD_PLACEHOLDERS::_2); -+ rpc::xmlrpc.slot_find_tracker() = bind(&xmlrpc_find_tracker, STD_PLACEHOLDERS::_1, STD_PLACEHOLDERS::_2); -+ rpc::xmlrpc.slot_find_peer() = bind(&xmlrpc_find_peer, STD_PLACEHOLDERS::_1, STD_PLACEHOLDERS::_2); - - unsigned int count = 0; - -@@ -236,23 +244,23 @@ initialize_command_network() { - torrent::FileManager* fileManager = torrent::file_manager(); - core::CurlStack* httpStack = control->core()->http_stack(); - -- CMD2_ANY ("strings.connection_type", tr1::bind(&torrent::option_list_strings, torrent::OPTION_CONNECTION_TYPE)); -- CMD2_ANY ("strings.encryption", tr1::bind(&torrent::option_list_strings, torrent::OPTION_ENCRYPTION)); -+ CMD2_ANY ("strings.connection_type", bind(&torrent::option_list_strings, torrent::OPTION_CONNECTION_TYPE)); -+ CMD2_ANY ("strings.encryption", bind(&torrent::option_list_strings, torrent::OPTION_ENCRYPTION)); - - CMD2_VAR_BOOL ("log.handshake", false); - -- // CMD2_ANY_STRING ("encoding_list", tr1::bind(&apply_encoding_list, tr1::placeholders::_2)); -- CMD2_ANY_STRING ("encoding.add", tr1::bind(&apply_encoding_list, tr1::placeholders::_2)); -+ // CMD2_ANY_STRING ("encoding_list", bind(&apply_encoding_list, STD_PLACEHOLDERS::_2)); -+ CMD2_ANY_STRING ("encoding.add", bind(&apply_encoding_list, STD_PLACEHOLDERS::_2)); - - // Isn't port_open used? - CMD2_VAR_BOOL ("network.port_open", true); - CMD2_VAR_BOOL ("network.port_random", true); - CMD2_VAR_STRING ("network.port_range", "6881-6999"); - -- CMD2_ANY ("network.listen.port", tr1::bind(&torrent::ConnectionManager::listen_port, cm)); -+ CMD2_ANY ("network.listen.port", bind(&torrent::ConnectionManager::listen_port, cm)); - - CMD2_VAR_BOOL ("protocol.pex", true); -- CMD2_ANY_LIST ("protocol.encryption.set", tr1::bind(&apply_encryption, tr1::placeholders::_2)); -+ CMD2_ANY_LIST ("protocol.encryption.set", bind(&apply_encryption, STD_PLACEHOLDERS::_2)); - - CMD2_VAR_STRING ("protocol.connection.leech", "leech"); - CMD2_VAR_STRING ("protocol.connection.seed", "seed"); -@@ -262,43 +270,43 @@ initialize_command_network() { - CMD2_VAR_STRING ("protocol.choke_heuristics.down.leech", "download_leech"); - CMD2_VAR_STRING ("protocol.choke_heuristics.down.seed", "download_leech"); - -- CMD2_ANY ("network.http.capath", tr1::bind(&core::CurlStack::http_capath, httpStack)); -- CMD2_ANY_STRING_V("network.http.capath.set", tr1::bind(&core::CurlStack::set_http_capath, httpStack, tr1::placeholders::_2)); -- CMD2_ANY ("network.http.cacert", tr1::bind(&core::CurlStack::http_cacert, httpStack)); -- CMD2_ANY_STRING_V("network.http.cacert.set", tr1::bind(&core::CurlStack::set_http_cacert, httpStack, tr1::placeholders::_2)); -- CMD2_ANY ("network.http.proxy_address", tr1::bind(&core::CurlStack::http_proxy, httpStack)); -- CMD2_ANY_STRING_V("network.http.proxy_address.set", tr1::bind(&core::CurlStack::set_http_proxy, httpStack, tr1::placeholders::_2)); -- CMD2_ANY ("network.http.max_open", tr1::bind(&core::CurlStack::max_active, httpStack)); -- CMD2_ANY_VALUE_V ("network.http.max_open.set", tr1::bind(&core::CurlStack::set_max_active, httpStack, tr1::placeholders::_2)); -- CMD2_ANY ("network.http.ssl_verify_peer", tr1::bind(&core::CurlStack::ssl_verify_peer, httpStack)); -- CMD2_ANY_VALUE_V ("network.http.ssl_verify_peer.set", tr1::bind(&core::CurlStack::set_ssl_verify_peer, httpStack, tr1::placeholders::_2)); -- CMD2_ANY ("network.http.dns_cache_timeout", tr1::bind(&core::CurlStack::dns_timeout, httpStack)); -- CMD2_ANY_VALUE_V ("network.http.dns_cache_timeout.set", tr1::bind(&core::CurlStack::set_dns_timeout, httpStack, tr1::placeholders::_2)); -- -- CMD2_ANY ("network.send_buffer.size", tr1::bind(&torrent::ConnectionManager::send_buffer_size, cm)); -- CMD2_ANY_VALUE_V ("network.send_buffer.size.set", tr1::bind(&torrent::ConnectionManager::set_send_buffer_size, cm, tr1::placeholders::_2)); -- CMD2_ANY ("network.receive_buffer.size", tr1::bind(&torrent::ConnectionManager::receive_buffer_size, cm)); -- CMD2_ANY_VALUE_V ("network.receive_buffer.size.set", tr1::bind(&torrent::ConnectionManager::set_receive_buffer_size, cm, tr1::placeholders::_2)); -- CMD2_ANY_STRING ("network.tos.set", tr1::bind(&apply_tos, tr1::placeholders::_2)); -- -- CMD2_ANY ("network.bind_address", tr1::bind(&core::Manager::bind_address, control->core())); -- CMD2_ANY_STRING_V("network.bind_address.set", tr1::bind(&core::Manager::set_bind_address, control->core(), tr1::placeholders::_2)); -- CMD2_ANY ("network.local_address", tr1::bind(&core::Manager::local_address, control->core())); -- CMD2_ANY_STRING_V("network.local_address.set", tr1::bind(&core::Manager::set_local_address, control->core(), tr1::placeholders::_2)); -- CMD2_ANY ("network.proxy_address", tr1::bind(&core::Manager::proxy_address, control->core())); -- CMD2_ANY_STRING_V("network.proxy_address.set", tr1::bind(&core::Manager::set_proxy_address, control->core(), tr1::placeholders::_2)); -- -- CMD2_ANY ("network.max_open_files", tr1::bind(&torrent::FileManager::max_open_files, fileManager)); -- CMD2_ANY_VALUE_V ("network.max_open_files.set", tr1::bind(&torrent::FileManager::set_max_open_files, fileManager, tr1::placeholders::_2)); -- CMD2_ANY ("network.open_sockets", tr1::bind(&torrent::ConnectionManager::size, cm)); -- CMD2_ANY ("network.max_open_sockets", tr1::bind(&torrent::ConnectionManager::max_size, cm)); -- CMD2_ANY_VALUE_V ("network.max_open_sockets.set", tr1::bind(&torrent::ConnectionManager::set_max_size, cm, tr1::placeholders::_2)); -+ CMD2_ANY ("network.http.capath", bind(&core::CurlStack::http_capath, httpStack)); -+ CMD2_ANY_STRING_V("network.http.capath.set", bind(&core::CurlStack::set_http_capath, httpStack, STD_PLACEHOLDERS::_2)); -+ CMD2_ANY ("network.http.cacert", bind(&core::CurlStack::http_cacert, httpStack)); -+ CMD2_ANY_STRING_V("network.http.cacert.set", bind(&core::CurlStack::set_http_cacert, httpStack, STD_PLACEHOLDERS::_2)); -+ CMD2_ANY ("network.http.proxy_address", bind(&core::CurlStack::http_proxy, httpStack)); -+ CMD2_ANY_STRING_V("network.http.proxy_address.set", bind(&core::CurlStack::set_http_proxy, httpStack, STD_PLACEHOLDERS::_2)); -+ CMD2_ANY ("network.http.max_open", bind(&core::CurlStack::max_active, httpStack)); -+ CMD2_ANY_VALUE_V ("network.http.max_open.set", bind(&core::CurlStack::set_max_active, httpStack, STD_PLACEHOLDERS::_2)); -+ CMD2_ANY ("network.http.ssl_verify_peer", bind(&core::CurlStack::ssl_verify_peer, httpStack)); -+ CMD2_ANY_VALUE_V ("network.http.ssl_verify_peer.set", bind(&core::CurlStack::set_ssl_verify_peer, httpStack, STD_PLACEHOLDERS::_2)); -+ CMD2_ANY ("network.http.dns_cache_timeout", bind(&core::CurlStack::dns_timeout, httpStack)); -+ CMD2_ANY_VALUE_V ("network.http.dns_cache_timeout.set", bind(&core::CurlStack::set_dns_timeout, httpStack, STD_PLACEHOLDERS::_2)); -+ -+ CMD2_ANY ("network.send_buffer.size", bind(&torrent::ConnectionManager::send_buffer_size, cm)); -+ CMD2_ANY_VALUE_V ("network.send_buffer.size.set", bind(&torrent::ConnectionManager::set_send_buffer_size, cm, STD_PLACEHOLDERS::_2)); -+ CMD2_ANY ("network.receive_buffer.size", bind(&torrent::ConnectionManager::receive_buffer_size, cm)); -+ CMD2_ANY_VALUE_V ("network.receive_buffer.size.set", bind(&torrent::ConnectionManager::set_receive_buffer_size, cm, STD_PLACEHOLDERS::_2)); -+ CMD2_ANY_STRING ("network.tos.set", bind(&apply_tos, STD_PLACEHOLDERS::_2)); -+ -+ CMD2_ANY ("network.bind_address", bind(&core::Manager::bind_address, control->core())); -+ CMD2_ANY_STRING_V("network.bind_address.set", bind(&core::Manager::set_bind_address, control->core(), STD_PLACEHOLDERS::_2)); -+ CMD2_ANY ("network.local_address", bind(&core::Manager::local_address, control->core())); -+ CMD2_ANY_STRING_V("network.local_address.set", bind(&core::Manager::set_local_address, control->core(), STD_PLACEHOLDERS::_2)); -+ CMD2_ANY ("network.proxy_address", bind(&core::Manager::proxy_address, control->core())); -+ CMD2_ANY_STRING_V("network.proxy_address.set", bind(&core::Manager::set_proxy_address, control->core(), STD_PLACEHOLDERS::_2)); -+ -+ CMD2_ANY ("network.max_open_files", bind(&torrent::FileManager::max_open_files, fileManager)); -+ CMD2_ANY_VALUE_V ("network.max_open_files.set", bind(&torrent::FileManager::set_max_open_files, fileManager, STD_PLACEHOLDERS::_2)); -+ CMD2_ANY ("network.open_sockets", bind(&torrent::ConnectionManager::size, cm)); -+ CMD2_ANY ("network.max_open_sockets", bind(&torrent::ConnectionManager::max_size, cm)); -+ CMD2_ANY_VALUE_V ("network.max_open_sockets.set", bind(&torrent::ConnectionManager::set_max_size, cm, STD_PLACEHOLDERS::_2)); - -- CMD2_ANY_STRING ("network.scgi.open_port", tr1::bind(&apply_scgi, tr1::placeholders::_2, 1)); -- CMD2_ANY_STRING ("network.scgi.open_local", tr1::bind(&apply_scgi, tr1::placeholders::_2, 2)); -+ CMD2_ANY_STRING ("network.scgi.open_port", bind(&apply_scgi, STD_PLACEHOLDERS::_2, 1)); -+ CMD2_ANY_STRING ("network.scgi.open_local", bind(&apply_scgi, STD_PLACEHOLDERS::_2, 2)); - CMD2_VAR_BOOL ("network.scgi.dont_route", false); - -- CMD2_ANY_STRING ("network.xmlrpc.dialect.set", tr1::bind(&apply_xmlrpc_dialect, tr1::placeholders::_2)); -- CMD2_ANY ("network.xmlrpc.size_limit", tr1::bind(&rpc::XmlRpc::size_limit)); -- CMD2_ANY_VALUE_V ("network.xmlrpc.size_limit.set", tr1::bind(&rpc::XmlRpc::set_size_limit, tr1::placeholders::_2)); -+ CMD2_ANY_STRING ("network.xmlrpc.dialect.set", bind(&apply_xmlrpc_dialect, STD_PLACEHOLDERS::_2)); -+ CMD2_ANY ("network.xmlrpc.size_limit", bind(&rpc::XmlRpc::size_limit)); -+ CMD2_ANY_VALUE_V ("network.xmlrpc.size_limit.set", bind(&rpc::XmlRpc::set_size_limit, STD_PLACEHOLDERS::_2)); - } diff --git a/net/rtorrent/patches/patch-src_command__peer.cc b/net/rtorrent/patches/patch-src_command__peer.cc deleted file mode 100644 index 1a0f3f8664a..00000000000 --- a/net/rtorrent/patches/patch-src_command__peer.cc +++ /dev/null @@ -1,91 +0,0 @@ -$NetBSD: patch-src_command__peer.cc,v 1.1 2013/05/09 14:28:25 joerg Exp $ - ---- src/command_peer.cc.orig 2013-05-03 23:06:44.000000000 +0000 -+++ src/command_peer.cc -@@ -53,6 +53,16 @@ - #include "control.h" - #include "command_helpers.h" - -+#if __cplusplus >= 201103L -+#include <functional> -+using std::bind; -+#define STD_PLACEHOLDERS std::placeholders -+#else -+#include <tr1/functional> -+using std::tr1::bind; -+#define STD_PLACEHOLDERS std::tr1::placeholders -+#endif -+ - torrent::Object - retrieve_p_id(torrent::Peer* peer) { - const torrent::HashString* hashString = &peer->id(); -@@ -97,37 +107,37 @@ retrieve_p_completed_percent(torrent::Pe - - void - initialize_command_peer() { -- CMD2_PEER("p.id", tr1::bind(&retrieve_p_id, tr1::placeholders::_1)); -- CMD2_PEER("p.id_html", tr1::bind(&retrieve_p_id_html, tr1::placeholders::_1)); -- CMD2_PEER("p.client_version", tr1::bind(&retrieve_p_client_version, tr1::placeholders::_1)); -- -- CMD2_PEER("p.options_str", tr1::bind(&retrieve_p_options_str, tr1::placeholders::_1)); -- -- CMD2_PEER("p.is_encrypted", tr1::bind(&torrent::Peer::is_encrypted, tr1::placeholders::_1)); -- CMD2_PEER("p.is_incoming", tr1::bind(&torrent::Peer::is_incoming, tr1::placeholders::_1)); -- CMD2_PEER("p.is_obfuscated", tr1::bind(&torrent::Peer::is_obfuscated, tr1::placeholders::_1)); -- CMD2_PEER("p.is_snubbed", tr1::bind(&torrent::Peer::is_snubbed, tr1::placeholders::_1)); -- -- CMD2_PEER("p.is_unwanted", tr1::bind(&torrent::PeerInfo::is_unwanted, tr1::bind(&torrent::Peer::peer_info, tr1::placeholders::_1))); -- CMD2_PEER("p.is_preferred", tr1::bind(&torrent::PeerInfo::is_preferred, tr1::bind(&torrent::Peer::peer_info, tr1::placeholders::_1))); -- -- CMD2_PEER("p.address", tr1::bind(&retrieve_p_address, tr1::placeholders::_1)); -- CMD2_PEER("p.port", tr1::bind(&retrieve_p_port, tr1::placeholders::_1)); -- -- CMD2_PEER("p.completed_percent", tr1::bind(&retrieve_p_completed_percent, tr1::placeholders::_1)); -- -- CMD2_PEER("p.up_rate", tr1::bind(&torrent::Rate::rate, tr1::bind(&torrent::Peer::up_rate, tr1::placeholders::_1))); -- CMD2_PEER("p.up_total", tr1::bind(&torrent::Rate::total, tr1::bind(&torrent::Peer::up_rate, tr1::placeholders::_1))); -- CMD2_PEER("p.down_rate", tr1::bind(&torrent::Rate::rate, tr1::bind(&torrent::Peer::down_rate, tr1::placeholders::_1))); -- CMD2_PEER("p.down_total", tr1::bind(&torrent::Rate::total, tr1::bind(&torrent::Peer::down_rate, tr1::placeholders::_1))); -- CMD2_PEER("p.peer_rate", tr1::bind(&torrent::Rate::rate, tr1::bind(&torrent::Peer::peer_rate, tr1::placeholders::_1))); -- CMD2_PEER("p.peer_total", tr1::bind(&torrent::Rate::total, tr1::bind(&torrent::Peer::peer_rate, tr1::placeholders::_1))); -- -- CMD2_PEER ("p.snubbed", tr1::bind(&torrent::Peer::is_snubbed, tr1::placeholders::_1)); -- CMD2_PEER_VALUE_V("p.snubbed.set", tr1::bind(&torrent::Peer::set_snubbed, tr1::placeholders::_1, tr1::placeholders::_2)); -- CMD2_PEER ("p.banned", tr1::bind(&torrent::Peer::is_banned, tr1::placeholders::_1)); -- CMD2_PEER_VALUE_V("p.banned.set", tr1::bind(&torrent::Peer::set_banned, tr1::placeholders::_1, tr1::placeholders::_2)); -+ CMD2_PEER("p.id", bind(&retrieve_p_id, STD_PLACEHOLDERS::_1)); -+ CMD2_PEER("p.id_html", bind(&retrieve_p_id_html, STD_PLACEHOLDERS::_1)); -+ CMD2_PEER("p.client_version", bind(&retrieve_p_client_version, STD_PLACEHOLDERS::_1)); -+ -+ CMD2_PEER("p.options_str", bind(&retrieve_p_options_str, STD_PLACEHOLDERS::_1)); -+ -+ CMD2_PEER("p.is_encrypted", bind(&torrent::Peer::is_encrypted, STD_PLACEHOLDERS::_1)); -+ CMD2_PEER("p.is_incoming", bind(&torrent::Peer::is_incoming, STD_PLACEHOLDERS::_1)); -+ CMD2_PEER("p.is_obfuscated", bind(&torrent::Peer::is_obfuscated, STD_PLACEHOLDERS::_1)); -+ CMD2_PEER("p.is_snubbed", bind(&torrent::Peer::is_snubbed, STD_PLACEHOLDERS::_1)); -+ -+ CMD2_PEER("p.is_unwanted", bind(&torrent::PeerInfo::is_unwanted, bind(&torrent::Peer::peer_info, STD_PLACEHOLDERS::_1))); -+ CMD2_PEER("p.is_preferred", bind(&torrent::PeerInfo::is_preferred, bind(&torrent::Peer::peer_info, STD_PLACEHOLDERS::_1))); -+ -+ CMD2_PEER("p.address", bind(&retrieve_p_address, STD_PLACEHOLDERS::_1)); -+ CMD2_PEER("p.port", bind(&retrieve_p_port, STD_PLACEHOLDERS::_1)); -+ -+ CMD2_PEER("p.completed_percent", bind(&retrieve_p_completed_percent, STD_PLACEHOLDERS::_1)); -+ -+ CMD2_PEER("p.up_rate", bind(&torrent::Rate::rate, bind(&torrent::Peer::up_rate, STD_PLACEHOLDERS::_1))); -+ CMD2_PEER("p.up_total", bind(&torrent::Rate::total, bind(&torrent::Peer::up_rate, STD_PLACEHOLDERS::_1))); -+ CMD2_PEER("p.down_rate", bind(&torrent::Rate::rate, bind(&torrent::Peer::down_rate, STD_PLACEHOLDERS::_1))); -+ CMD2_PEER("p.down_total", bind(&torrent::Rate::total, bind(&torrent::Peer::down_rate, STD_PLACEHOLDERS::_1))); -+ CMD2_PEER("p.peer_rate", bind(&torrent::Rate::rate, bind(&torrent::Peer::peer_rate, STD_PLACEHOLDERS::_1))); -+ CMD2_PEER("p.peer_total", bind(&torrent::Rate::total, bind(&torrent::Peer::peer_rate, STD_PLACEHOLDERS::_1))); -+ -+ CMD2_PEER ("p.snubbed", bind(&torrent::Peer::is_snubbed, STD_PLACEHOLDERS::_1)); -+ CMD2_PEER_VALUE_V("p.snubbed.set", bind(&torrent::Peer::set_snubbed, STD_PLACEHOLDERS::_1, STD_PLACEHOLDERS::_2)); -+ CMD2_PEER ("p.banned", bind(&torrent::Peer::is_banned, STD_PLACEHOLDERS::_1)); -+ CMD2_PEER_VALUE_V("p.banned.set", bind(&torrent::Peer::set_banned, STD_PLACEHOLDERS::_1, STD_PLACEHOLDERS::_2)); - -- CMD2_PEER_V("p.disconnect", tr1::bind(&torrent::Peer::disconnect, tr1::placeholders::_1, 0)); -- CMD2_PEER_V("p.disconnect_delayed", tr1::bind(&torrent::Peer::disconnect, tr1::placeholders::_1, torrent::ConnectionList::disconnect_delayed)); -+ CMD2_PEER_V("p.disconnect", bind(&torrent::Peer::disconnect, STD_PLACEHOLDERS::_1, 0)); -+ CMD2_PEER_V("p.disconnect_delayed", bind(&torrent::Peer::disconnect, STD_PLACEHOLDERS::_1, torrent::ConnectionList::disconnect_delayed)); - } diff --git a/net/rtorrent/patches/patch-src_command__scheduler.cc b/net/rtorrent/patches/patch-src_command__scheduler.cc deleted file mode 100644 index 1b80b17cbd8..00000000000 --- a/net/rtorrent/patches/patch-src_command__scheduler.cc +++ /dev/null @@ -1,32 +0,0 @@ -$NetBSD: patch-src_command__scheduler.cc,v 1.1 2013/05/09 14:28:25 joerg Exp $ - ---- src/command_scheduler.cc.orig 2012-03-20 16:25:05.000000000 +0000 -+++ src/command_scheduler.cc -@@ -48,6 +48,16 @@ - #include "control.h" - #include "command_helpers.h" - -+#if __cplusplus >= 201103L -+#include <functional> -+using std::bind; -+#define STD_PLACEHOLDERS std::placeholders -+#else -+#include <tr1/functional> -+using std::tr1::bind; -+#define STD_PLACEHOLDERS std::tr1::placeholders -+#endif -+ - torrent::Object - cmd_scheduler_simple_added(core::Download* download) { - unsigned int numActive = (*control->view_manager()->find("active"))->size_visible(); -@@ -115,7 +125,7 @@ void - initialize_command_scheduler() { - CMD2_VAR_VALUE("scheduler.max_active", int64_t(-1)); - -- CMD2_DL("scheduler.simple.added", tr1::bind(&cmd_scheduler_simple_added, tr1::placeholders::_1)); -- CMD2_DL("scheduler.simple.removed", tr1::bind(&cmd_scheduler_simple_removed, tr1::placeholders::_1)); -- CMD2_DL("scheduler.simple.update", tr1::bind(&cmd_scheduler_simple_update, tr1::placeholders::_1)); -+ CMD2_DL("scheduler.simple.added", bind(&cmd_scheduler_simple_added, STD_PLACEHOLDERS::_1)); -+ CMD2_DL("scheduler.simple.removed", bind(&cmd_scheduler_simple_removed, STD_PLACEHOLDERS::_1)); -+ CMD2_DL("scheduler.simple.update", bind(&cmd_scheduler_simple_update, STD_PLACEHOLDERS::_1)); - } diff --git a/net/rtorrent/patches/patch-src_command__throttle.cc b/net/rtorrent/patches/patch-src_command__throttle.cc deleted file mode 100644 index 4aedbd67999..00000000000 --- a/net/rtorrent/patches/patch-src_command__throttle.cc +++ /dev/null @@ -1,86 +0,0 @@ -$NetBSD: patch-src_command__throttle.cc,v 1.1 2013/05/09 14:28:25 joerg Exp $ - ---- src/command_throttle.cc.orig 2013-05-03 23:08:41.000000000 +0000 -+++ src/command_throttle.cc -@@ -51,6 +51,16 @@ - #include "control.h" - #include "command_helpers.h" - -+#if __cplusplus >= 201103L -+#include <functional> -+using std::bind; -+#define STD_PLACEHOLDERS std::placeholders -+#else -+#include <tr1/functional> -+using std::tr1::bind; -+#define STD_PLACEHOLDERS std::tr1::placeholders -+#endif -+ - std::pair<uint32_t, uint32_t> - parse_address_range(const torrent::Object::list_type& args, torrent::Object::list_type::const_iterator itr) { - unsigned int prefixWidth, ret; -@@ -173,8 +183,8 @@ throttle_update(const char* variable, in - - void - initialize_command_throttle() { -- CMD2_ANY ("throttle.unchoked_uploads", tr1::bind(&torrent::ResourceManager::currently_upload_unchoked, torrent::resource_manager())); -- CMD2_ANY ("throttle.unchoked_downloads", tr1::bind(&torrent::ResourceManager::currently_download_unchoked, torrent::resource_manager())); -+ CMD2_ANY ("throttle.unchoked_uploads", bind(&torrent::ResourceManager::currently_upload_unchoked, torrent::resource_manager())); -+ CMD2_ANY ("throttle.unchoked_downloads", bind(&torrent::ResourceManager::currently_download_unchoked, torrent::resource_manager())); - - CMD2_VAR_VALUE ("throttle.min_peers.normal", 100); - CMD2_VAR_VALUE ("throttle.max_peers.normal", 200); -@@ -196,31 +206,31 @@ initialize_command_throttle() { - CMD2_REDIRECT_GENERIC("throttle.max_downloads.div", "throttle.max_downloads.div._val"); - CMD2_REDIRECT_GENERIC("throttle.max_downloads.global", "throttle.max_downloads.global._val"); - -- CMD2_ANY_VALUE ("throttle.max_uploads.div.set", tr1::bind(&throttle_update, "throttle.max_uploads.div._val.set", tr1::placeholders::_2)); -- CMD2_ANY_VALUE ("throttle.max_uploads.global.set", tr1::bind(&throttle_update, "throttle.max_uploads.global._val.set", tr1::placeholders::_2)); -- CMD2_ANY_VALUE ("throttle.max_downloads.div.set", tr1::bind(&throttle_update, "throttle.max_downloads.div._val.set", tr1::placeholders::_2)); -- CMD2_ANY_VALUE ("throttle.max_downloads.global.set", tr1::bind(&throttle_update, "throttle.max_downloads.global._val.set", tr1::placeholders::_2)); -+ CMD2_ANY_VALUE ("throttle.max_uploads.div.set", bind(&throttle_update, "throttle.max_uploads.div._val.set", STD_PLACEHOLDERS::_2)); -+ CMD2_ANY_VALUE ("throttle.max_uploads.global.set", bind(&throttle_update, "throttle.max_uploads.global._val.set", STD_PLACEHOLDERS::_2)); -+ CMD2_ANY_VALUE ("throttle.max_downloads.div.set", bind(&throttle_update, "throttle.max_downloads.div._val.set", STD_PLACEHOLDERS::_2)); -+ CMD2_ANY_VALUE ("throttle.max_downloads.global.set", bind(&throttle_update, "throttle.max_downloads.global._val.set", STD_PLACEHOLDERS::_2)); - - // TODO: Move the logic into some libtorrent function. -- CMD2_ANY ("throttle.global_up.rate", tr1::bind(&torrent::Rate::rate, torrent::up_rate())); -- CMD2_ANY ("throttle.global_up.total", tr1::bind(&torrent::Rate::total, torrent::up_rate())); -- CMD2_ANY ("throttle.global_up.max_rate", tr1::bind(&torrent::Throttle::max_rate, torrent::up_throttle_global())); -- CMD2_ANY_VALUE_V ("throttle.global_up.max_rate.set", tr1::bind(&ui::Root::set_up_throttle_i64, control->ui(), tr1::placeholders::_2)); -- CMD2_ANY_VALUE_KB("throttle.global_up.max_rate.set_kb", tr1::bind(&ui::Root::set_up_throttle_i64, control->ui(), tr1::placeholders::_2)); -- CMD2_ANY ("throttle.global_down.rate", tr1::bind(&torrent::Rate::rate, torrent::down_rate())); -- CMD2_ANY ("throttle.global_down.total", tr1::bind(&torrent::Rate::total, torrent::down_rate())); -- CMD2_ANY ("throttle.global_down.max_rate", tr1::bind(&torrent::Throttle::max_rate, torrent::down_throttle_global())); -- CMD2_ANY_VALUE_V ("throttle.global_down.max_rate.set", tr1::bind(&ui::Root::set_down_throttle_i64, control->ui(), tr1::placeholders::_2)); -- CMD2_ANY_VALUE_KB("throttle.global_down.max_rate.set_kb", tr1::bind(&ui::Root::set_down_throttle_i64, control->ui(), tr1::placeholders::_2)); -+ CMD2_ANY ("throttle.global_up.rate", bind(&torrent::Rate::rate, torrent::up_rate())); -+ CMD2_ANY ("throttle.global_up.total", bind(&torrent::Rate::total, torrent::up_rate())); -+ CMD2_ANY ("throttle.global_up.max_rate", bind(&torrent::Throttle::max_rate, torrent::up_throttle_global())); -+ CMD2_ANY_VALUE_V ("throttle.global_up.max_rate.set", bind(&ui::Root::set_up_throttle_i64, control->ui(), STD_PLACEHOLDERS::_2)); -+ CMD2_ANY_VALUE_KB("throttle.global_up.max_rate.set_kb", bind(&ui::Root::set_up_throttle_i64, control->ui(), STD_PLACEHOLDERS::_2)); -+ CMD2_ANY ("throttle.global_down.rate", bind(&torrent::Rate::rate, torrent::down_rate())); -+ CMD2_ANY ("throttle.global_down.total", bind(&torrent::Rate::total, torrent::down_rate())); -+ CMD2_ANY ("throttle.global_down.max_rate", bind(&torrent::Throttle::max_rate, torrent::down_throttle_global())); -+ CMD2_ANY_VALUE_V ("throttle.global_down.max_rate.set", bind(&ui::Root::set_down_throttle_i64, control->ui(), STD_PLACEHOLDERS::_2)); -+ CMD2_ANY_VALUE_KB("throttle.global_down.max_rate.set_kb", bind(&ui::Root::set_down_throttle_i64, control->ui(), STD_PLACEHOLDERS::_2)); - - // Temporary names, need to change this to accept real rates rather - // than kB. -- CMD2_ANY_LIST ("throttle.up", tr1::bind(&apply_throttle, tr1::placeholders::_2, true)); -- CMD2_ANY_LIST ("throttle.down", tr1::bind(&apply_throttle, tr1::placeholders::_2, false)); -- CMD2_ANY_LIST ("throttle.ip", tr1::bind(&apply_address_throttle, tr1::placeholders::_2)); -- -- CMD2_ANY_STRING ("throttle.up.max", tr1::bind(&retrieve_throttle_info, tr1::placeholders::_2, throttle_info_up | throttle_info_max)); -- CMD2_ANY_STRING ("throttle.up.rate", tr1::bind(&retrieve_throttle_info, tr1::placeholders::_2, throttle_info_up | throttle_info_rate)); -- CMD2_ANY_STRING ("throttle.down.max", tr1::bind(&retrieve_throttle_info, tr1::placeholders::_2, throttle_info_down | throttle_info_max)); -- CMD2_ANY_STRING ("throttle.down.rate", tr1::bind(&retrieve_throttle_info, tr1::placeholders::_2, throttle_info_down | throttle_info_rate)); -+ CMD2_ANY_LIST ("throttle.up", bind(&apply_throttle, STD_PLACEHOLDERS::_2, true)); -+ CMD2_ANY_LIST ("throttle.down", bind(&apply_throttle, STD_PLACEHOLDERS::_2, false)); -+ CMD2_ANY_LIST ("throttle.ip", bind(&apply_address_throttle, STD_PLACEHOLDERS::_2)); -+ -+ CMD2_ANY_STRING ("throttle.up.max", bind(&retrieve_throttle_info, STD_PLACEHOLDERS::_2, throttle_info_up | throttle_info_max)); -+ CMD2_ANY_STRING ("throttle.up.rate", bind(&retrieve_throttle_info, STD_PLACEHOLDERS::_2, throttle_info_up | throttle_info_rate)); -+ CMD2_ANY_STRING ("throttle.down.max", bind(&retrieve_throttle_info, STD_PLACEHOLDERS::_2, throttle_info_down | throttle_info_max)); -+ CMD2_ANY_STRING ("throttle.down.rate", bind(&retrieve_throttle_info, STD_PLACEHOLDERS::_2, throttle_info_down | throttle_info_rate)); - } diff --git a/net/rtorrent/patches/patch-src_command__tracker.cc b/net/rtorrent/patches/patch-src_command__tracker.cc deleted file mode 100644 index bc8a42ec702..00000000000 --- a/net/rtorrent/patches/patch-src_command__tracker.cc +++ /dev/null @@ -1,123 +0,0 @@ -$NetBSD: patch-src_command__tracker.cc,v 1.1 2013/05/09 14:28:25 joerg Exp $ - ---- src/command_tracker.cc.orig 2013-05-03 23:08:53.000000000 +0000 -+++ src/command_tracker.cc -@@ -51,6 +51,16 @@ - #include "command_helpers.h" - #include "core/dht_manager.h" - -+#if __cplusplus >= 201103L -+#include <functional> -+using std::bind; -+#define STD_PLACEHOLDERS std::placeholders -+#else -+#include <tr1/functional> -+using std::tr1::bind; -+#define STD_PLACEHOLDERS std::tr1::placeholders -+#endif -+ - void - tracker_set_enabled(torrent::Tracker* tracker, bool state) { - if (state) -@@ -111,59 +121,59 @@ apply_enable_trackers(int64_t arg) { - - void - initialize_command_tracker() { -- CMD2_TRACKER ("t.is_open", tr1::bind(&torrent::Tracker::is_busy, tr1::placeholders::_1)); -- CMD2_TRACKER ("t.is_enabled", tr1::bind(&torrent::Tracker::is_enabled, tr1::placeholders::_1)); -- CMD2_TRACKER ("t.is_usable", tr1::bind(&torrent::Tracker::is_usable, tr1::placeholders::_1)); -- CMD2_TRACKER ("t.is_busy", tr1::bind(&torrent::Tracker::is_busy, tr1::placeholders::_1)); -- CMD2_TRACKER ("t.is_extra_tracker", tr1::bind(&torrent::Tracker::is_extra_tracker, tr1::placeholders::_1)); -- CMD2_TRACKER ("t.can_scrape", tr1::bind(&torrent::Tracker::can_scrape, tr1::placeholders::_1)); -- -- CMD2_TRACKER_V ("t.enable", tr1::bind(&torrent::Tracker::enable, tr1::placeholders::_1)); -- CMD2_TRACKER_V ("t.disable", tr1::bind(&torrent::Tracker::disable, tr1::placeholders::_1)); -- -- CMD2_TRACKER_VALUE_V("t.is_enabled.set", tr1::bind(&tracker_set_enabled, tr1::placeholders::_1, tr1::placeholders::_2)); -- -- CMD2_TRACKER ("t.url", tr1::bind(&torrent::Tracker::url, tr1::placeholders::_1)); -- CMD2_TRACKER ("t.group", tr1::bind(&torrent::Tracker::group, tr1::placeholders::_1)); -- CMD2_TRACKER ("t.type", tr1::bind(&torrent::Tracker::type, tr1::placeholders::_1)); -- CMD2_TRACKER ("t.id", tr1::bind(&torrent::Tracker::tracker_id, tr1::placeholders::_1)); -- -- CMD2_TRACKER ("t.latest_event", tr1::bind(&torrent::Tracker::latest_event, tr1::placeholders::_1)); -- CMD2_TRACKER ("t.latest_new_peers", tr1::bind(&torrent::Tracker::latest_new_peers, tr1::placeholders::_1)); -- CMD2_TRACKER ("t.latest_sum_peers", tr1::bind(&torrent::Tracker::latest_sum_peers, tr1::placeholders::_1)); -+ CMD2_TRACKER ("t.is_open", bind(&torrent::Tracker::is_busy, STD_PLACEHOLDERS::_1)); -+ CMD2_TRACKER ("t.is_enabled", bind(&torrent::Tracker::is_enabled, STD_PLACEHOLDERS::_1)); -+ CMD2_TRACKER ("t.is_usable", bind(&torrent::Tracker::is_usable, STD_PLACEHOLDERS::_1)); -+ CMD2_TRACKER ("t.is_busy", bind(&torrent::Tracker::is_busy, STD_PLACEHOLDERS::_1)); -+ CMD2_TRACKER ("t.is_extra_tracker", bind(&torrent::Tracker::is_extra_tracker, STD_PLACEHOLDERS::_1)); -+ CMD2_TRACKER ("t.can_scrape", bind(&torrent::Tracker::can_scrape, STD_PLACEHOLDERS::_1)); -+ -+ CMD2_TRACKER_V ("t.enable", bind(&torrent::Tracker::enable, STD_PLACEHOLDERS::_1)); -+ CMD2_TRACKER_V ("t.disable", bind(&torrent::Tracker::disable, STD_PLACEHOLDERS::_1)); -+ -+ CMD2_TRACKER_VALUE_V("t.is_enabled.set", bind(&tracker_set_enabled, STD_PLACEHOLDERS::_1, STD_PLACEHOLDERS::_2)); -+ -+ CMD2_TRACKER ("t.url", bind(&torrent::Tracker::url, STD_PLACEHOLDERS::_1)); -+ CMD2_TRACKER ("t.group", bind(&torrent::Tracker::group, STD_PLACEHOLDERS::_1)); -+ CMD2_TRACKER ("t.type", bind(&torrent::Tracker::type, STD_PLACEHOLDERS::_1)); -+ CMD2_TRACKER ("t.id", bind(&torrent::Tracker::tracker_id, STD_PLACEHOLDERS::_1)); -+ -+ CMD2_TRACKER ("t.latest_event", bind(&torrent::Tracker::latest_event, STD_PLACEHOLDERS::_1)); -+ CMD2_TRACKER ("t.latest_new_peers", bind(&torrent::Tracker::latest_new_peers, STD_PLACEHOLDERS::_1)); -+ CMD2_TRACKER ("t.latest_sum_peers", bind(&torrent::Tracker::latest_sum_peers, STD_PLACEHOLDERS::_1)); - - // Time since last connection, connection attempt. - -- CMD2_TRACKER ("t.normal_interval", tr1::bind(&torrent::Tracker::normal_interval, tr1::placeholders::_1)); -- CMD2_TRACKER ("t.min_interval", tr1::bind(&torrent::Tracker::min_interval, tr1::placeholders::_1)); -+ CMD2_TRACKER ("t.normal_interval", bind(&torrent::Tracker::normal_interval, STD_PLACEHOLDERS::_1)); -+ CMD2_TRACKER ("t.min_interval", bind(&torrent::Tracker::min_interval, STD_PLACEHOLDERS::_1)); - -- CMD2_TRACKER ("t.activity_time_next", tr1::bind(&torrent::Tracker::activity_time_next, tr1::placeholders::_1)); -- CMD2_TRACKER ("t.activity_time_last", tr1::bind(&torrent::Tracker::activity_time_last, tr1::placeholders::_1)); -+ CMD2_TRACKER ("t.activity_time_next", bind(&torrent::Tracker::activity_time_next, STD_PLACEHOLDERS::_1)); -+ CMD2_TRACKER ("t.activity_time_last", bind(&torrent::Tracker::activity_time_last, STD_PLACEHOLDERS::_1)); - -- CMD2_TRACKER ("t.success_time_next", tr1::bind(&torrent::Tracker::success_time_next, tr1::placeholders::_1)); -- CMD2_TRACKER ("t.success_time_last", tr1::bind(&torrent::Tracker::success_time_last, tr1::placeholders::_1)); -- CMD2_TRACKER ("t.success_counter", tr1::bind(&torrent::Tracker::success_counter, tr1::placeholders::_1)); -+ CMD2_TRACKER ("t.success_time_next", bind(&torrent::Tracker::success_time_next, STD_PLACEHOLDERS::_1)); -+ CMD2_TRACKER ("t.success_time_last", bind(&torrent::Tracker::success_time_last, STD_PLACEHOLDERS::_1)); -+ CMD2_TRACKER ("t.success_counter", bind(&torrent::Tracker::success_counter, STD_PLACEHOLDERS::_1)); - -- CMD2_TRACKER ("t.failed_time_next", tr1::bind(&torrent::Tracker::failed_time_next, tr1::placeholders::_1)); -- CMD2_TRACKER ("t.failed_time_last", tr1::bind(&torrent::Tracker::failed_time_last, tr1::placeholders::_1)); -- CMD2_TRACKER ("t.failed_counter", tr1::bind(&torrent::Tracker::failed_counter, tr1::placeholders::_1)); -+ CMD2_TRACKER ("t.failed_time_next", bind(&torrent::Tracker::failed_time_next, STD_PLACEHOLDERS::_1)); -+ CMD2_TRACKER ("t.failed_time_last", bind(&torrent::Tracker::failed_time_last, STD_PLACEHOLDERS::_1)); -+ CMD2_TRACKER ("t.failed_counter", bind(&torrent::Tracker::failed_counter, STD_PLACEHOLDERS::_1)); - -- CMD2_TRACKER ("t.scrape_time_last", tr1::bind(&torrent::Tracker::scrape_time_last, tr1::placeholders::_1)); -- CMD2_TRACKER ("t.scrape_counter", tr1::bind(&torrent::Tracker::scrape_counter, tr1::placeholders::_1)); -+ CMD2_TRACKER ("t.scrape_time_last", bind(&torrent::Tracker::scrape_time_last, STD_PLACEHOLDERS::_1)); -+ CMD2_TRACKER ("t.scrape_counter", bind(&torrent::Tracker::scrape_counter, STD_PLACEHOLDERS::_1)); - -- CMD2_TRACKER ("t.scrape_complete", tr1::bind(&torrent::Tracker::scrape_complete, tr1::placeholders::_1)); -- CMD2_TRACKER ("t.scrape_incomplete", tr1::bind(&torrent::Tracker::scrape_incomplete, tr1::placeholders::_1)); -- CMD2_TRACKER ("t.scrape_downloaded", tr1::bind(&torrent::Tracker::scrape_downloaded, tr1::placeholders::_1)); -+ CMD2_TRACKER ("t.scrape_complete", bind(&torrent::Tracker::scrape_complete, STD_PLACEHOLDERS::_1)); -+ CMD2_TRACKER ("t.scrape_incomplete", bind(&torrent::Tracker::scrape_incomplete, STD_PLACEHOLDERS::_1)); -+ CMD2_TRACKER ("t.scrape_downloaded", bind(&torrent::Tracker::scrape_downloaded, STD_PLACEHOLDERS::_1)); - -- CMD2_ANY_VALUE ("trackers.enable", tr1::bind(&apply_enable_trackers, int64_t(1))); -- CMD2_ANY_VALUE ("trackers.disable", tr1::bind(&apply_enable_trackers, int64_t(0))); -+ CMD2_ANY_VALUE ("trackers.enable", bind(&apply_enable_trackers, int64_t(1))); -+ CMD2_ANY_VALUE ("trackers.disable", bind(&apply_enable_trackers, int64_t(0))); - CMD2_VAR_VALUE ("trackers.numwant", -1); - CMD2_VAR_BOOL ("trackers.use_udp", true); - -- CMD2_ANY_STRING_V ("dht.mode.set", tr1::bind(&core::DhtManager::set_mode, control->dht_manager(), tr1::placeholders::_2)); -+ CMD2_ANY_STRING_V ("dht.mode.set", bind(&core::DhtManager::set_mode, control->dht_manager(), STD_PLACEHOLDERS::_2)); - CMD2_VAR_VALUE ("dht.port", int64_t(6881)); -- CMD2_ANY_STRING ("dht.add_node", tr1::bind(&apply_dht_add_node, tr1::placeholders::_2)); -- CMD2_ANY ("dht.statistics", tr1::bind(&core::DhtManager::dht_statistics, control->dht_manager())); -- CMD2_ANY ("dht.throttle.name", tr1::bind(&core::DhtManager::throttle_name, control->dht_manager())); -- CMD2_ANY_STRING_V ("dht.throttle.name.set", tr1::bind(&core::DhtManager::set_throttle_name, control->dht_manager(), tr1::placeholders::_2)); -+ CMD2_ANY_STRING ("dht.add_node", bind(&apply_dht_add_node, STD_PLACEHOLDERS::_2)); -+ CMD2_ANY ("dht.statistics", bind(&core::DhtManager::dht_statistics, control->dht_manager())); -+ CMD2_ANY ("dht.throttle.name", bind(&core::DhtManager::throttle_name, control->dht_manager())); -+ CMD2_ANY_STRING_V ("dht.throttle.name.set", bind(&core::DhtManager::set_throttle_name, control->dht_manager(), STD_PLACEHOLDERS::_2)); - } diff --git a/net/rtorrent/patches/patch-src_command__ui.cc b/net/rtorrent/patches/patch-src_command__ui.cc deleted file mode 100644 index c027e593a97..00000000000 --- a/net/rtorrent/patches/patch-src_command__ui.cc +++ /dev/null @@ -1,120 +0,0 @@ -$NetBSD: patch-src_command__ui.cc,v 1.1 2013/05/09 14:28:25 joerg Exp $ - ---- src/command_ui.cc.orig 2013-05-03 23:09:03.000000000 +0000 -+++ src/command_ui.cc -@@ -53,6 +53,16 @@ - #include "control.h" - #include "command_helpers.h" - -+#if __cplusplus >= 201103L -+#include <functional> -+using std::bind; -+#define STD_PLACEHOLDERS std::placeholders -+#else -+#include <tr1/functional> -+using std::tr1::bind; -+#define STD_PLACEHOLDERS std::tr1::placeholders -+#endif -+ - typedef void (core::ViewManager::*view_cfilter_slot)(const std::string&, const torrent::Object&); - typedef void (core::ViewManager::*view_event_slot)(const std::string&, const std::string&); - -@@ -541,41 +551,41 @@ void - initialize_command_ui() { - CMD2_VAR_STRING("keys.layout", "qwerty"); - -- CMD2_ANY_STRING("view.add", object_convert_void(tr1::bind(&core::ViewManager::insert_throw, control->view_manager(), tr1::placeholders::_2))); -+ CMD2_ANY_STRING("view.add", object_convert_void(bind(&core::ViewManager::insert_throw, control->view_manager(), STD_PLACEHOLDERS::_2))); - -- CMD2_ANY_L ("view.list", tr1::bind(&apply_view_list)); -- CMD2_ANY_LIST("view.set", tr1::bind(&apply_view_set, tr1::placeholders::_2)); -+ CMD2_ANY_L ("view.list", bind(&apply_view_list)); -+ CMD2_ANY_LIST("view.set", bind(&apply_view_set, STD_PLACEHOLDERS::_2)); - -- CMD2_ANY_LIST("view.filter", tr1::bind(&apply_view_cfilter, &core::ViewManager::set_filter, tr1::placeholders::_2)); -- CMD2_ANY_LIST("view.filter_on", tr1::bind(&apply_view_filter_on, tr1::placeholders::_2)); -+ CMD2_ANY_LIST("view.filter", bind(&apply_view_cfilter, &core::ViewManager::set_filter, STD_PLACEHOLDERS::_2)); -+ CMD2_ANY_LIST("view.filter_on", bind(&apply_view_filter_on, STD_PLACEHOLDERS::_2)); - -- CMD2_ANY_LIST("view.sort", tr1::bind(&apply_view_sort, tr1::placeholders::_2)); -- CMD2_ANY_LIST("view.sort_new", tr1::bind(&apply_view_cfilter, &core::ViewManager::set_sort_new, tr1::placeholders::_2)); -- CMD2_ANY_LIST("view.sort_current", tr1::bind(&apply_view_cfilter, &core::ViewManager::set_sort_current, tr1::placeholders::_2)); -+ CMD2_ANY_LIST("view.sort", bind(&apply_view_sort, STD_PLACEHOLDERS::_2)); -+ CMD2_ANY_LIST("view.sort_new", bind(&apply_view_cfilter, &core::ViewManager::set_sort_new, STD_PLACEHOLDERS::_2)); -+ CMD2_ANY_LIST("view.sort_current", bind(&apply_view_cfilter, &core::ViewManager::set_sort_current, STD_PLACEHOLDERS::_2)); - -- CMD2_ANY_LIST("view.event_added", tr1::bind(&apply_view_event, &core::ViewManager::set_event_added, tr1::placeholders::_2)); -- CMD2_ANY_LIST("view.event_removed", tr1::bind(&apply_view_event, &core::ViewManager::set_event_removed, tr1::placeholders::_2)); -+ CMD2_ANY_LIST("view.event_added", bind(&apply_view_event, &core::ViewManager::set_event_added, STD_PLACEHOLDERS::_2)); -+ CMD2_ANY_LIST("view.event_removed", bind(&apply_view_event, &core::ViewManager::set_event_removed, STD_PLACEHOLDERS::_2)); - - // Cleanup and add . to view. - -- CMD2_ANY_STRING("view.size", tr1::bind(&cmd_view_size, tr1::placeholders::_2)); -- CMD2_ANY_STRING("view.size_not_visible", tr1::bind(&cmd_view_size_not_visible, tr1::placeholders::_2)); -- CMD2_ANY_STRING("view.persistent", tr1::bind(&cmd_view_persistent, tr1::placeholders::_2)); -- -- CMD2_ANY_STRING_V("view.filter_all", tr1::bind(&core::View::filter, tr1::bind(&core::ViewManager::find_ptr_throw, control->view_manager(), tr1::placeholders::_2))); -- -- CMD2_DL_STRING ("view.filter_download", tr1::bind(&cmd_view_filter_download, tr1::placeholders::_1, tr1::placeholders::_2)); -- CMD2_DL_STRING ("view.set_visible", tr1::bind(&cmd_view_set_visible, tr1::placeholders::_1, tr1::placeholders::_2)); -- CMD2_DL_STRING ("view.set_not_visible", tr1::bind(&cmd_view_set_not_visible, tr1::placeholders::_1, tr1::placeholders::_2)); -+ CMD2_ANY_STRING("view.size", bind(&cmd_view_size, STD_PLACEHOLDERS::_2)); -+ CMD2_ANY_STRING("view.size_not_visible", bind(&cmd_view_size_not_visible, STD_PLACEHOLDERS::_2)); -+ CMD2_ANY_STRING("view.persistent", bind(&cmd_view_persistent, STD_PLACEHOLDERS::_2)); -+ -+ CMD2_ANY_STRING_V("view.filter_all", bind(&core::View::filter, bind(&core::ViewManager::find_ptr_throw, control->view_manager(), STD_PLACEHOLDERS::_2))); -+ -+ CMD2_DL_STRING ("view.filter_download", bind(&cmd_view_filter_download, STD_PLACEHOLDERS::_1, STD_PLACEHOLDERS::_2)); -+ CMD2_DL_STRING ("view.set_visible", bind(&cmd_view_set_visible, STD_PLACEHOLDERS::_1, STD_PLACEHOLDERS::_2)); -+ CMD2_DL_STRING ("view.set_not_visible", bind(&cmd_view_set_not_visible, STD_PLACEHOLDERS::_1, STD_PLACEHOLDERS::_2)); - - // Commands that affect the default rtorrent UI. -- CMD2_DL ("ui.unfocus_download", tr1::bind(&cmd_ui_unfocus_download, tr1::placeholders::_1)); -- CMD2_ANY_STRING("ui.current_view.set", tr1::bind(&cmd_ui_set_view, tr1::placeholders::_2)); -+ CMD2_DL ("ui.unfocus_download", bind(&cmd_ui_unfocus_download, STD_PLACEHOLDERS::_1)); -+ CMD2_ANY_STRING("ui.current_view.set", bind(&cmd_ui_set_view, STD_PLACEHOLDERS::_2)); - - // Move. - CMD2_ANY("print", &apply_print); - CMD2_ANY("cat", &apply_cat); -- CMD2_ANY("if", tr1::bind(&apply_if, tr1::placeholders::_1, tr1::placeholders::_2, 0)); -+ CMD2_ANY("if", bind(&apply_if, STD_PLACEHOLDERS::_1, STD_PLACEHOLDERS::_2, 0)); - CMD2_ANY("not", &apply_not); - CMD2_ANY("false", &apply_false); - CMD2_ANY("and", &apply_and); -@@ -583,22 +593,22 @@ initialize_command_ui() { - - // A temporary command for handling stuff until we get proper - // support for seperation of commands and literals. -- CMD2_ANY("branch", tr1::bind(&apply_if, tr1::placeholders::_1, tr1::placeholders::_2, 1)); -+ CMD2_ANY("branch", bind(&apply_if, STD_PLACEHOLDERS::_1, STD_PLACEHOLDERS::_2, 1)); - - CMD2_ANY_LIST("less", &apply_less); - CMD2_ANY_LIST("greater", &apply_greater); - CMD2_ANY_LIST("equal", &apply_equal); - -- CMD2_ANY_VALUE("convert.gm_time", tr1::bind(&apply_to_time, tr1::placeholders::_2, 0)); -- CMD2_ANY_VALUE("convert.gm_date", tr1::bind(&apply_to_time, tr1::placeholders::_2, 0x2)); -- CMD2_ANY_VALUE("convert.time", tr1::bind(&apply_to_time, tr1::placeholders::_2, 0x1)); -- CMD2_ANY_VALUE("convert.date", tr1::bind(&apply_to_time, tr1::placeholders::_2, 0x1 | 0x2)); -- CMD2_ANY_VALUE("convert.elapsed_time", tr1::bind(&apply_to_elapsed_time, tr1::placeholders::_2)); -- CMD2_ANY_VALUE("convert.kb", tr1::bind(&apply_to_kb, tr1::placeholders::_2)); -- CMD2_ANY_VALUE("convert.mb", tr1::bind(&apply_to_mb, tr1::placeholders::_2)); -- CMD2_ANY_VALUE("convert.xb", tr1::bind(&apply_to_xb, tr1::placeholders::_2)); -- CMD2_ANY_VALUE("convert.throttle", tr1::bind(&apply_to_throttle, tr1::placeholders::_2)); -+ CMD2_ANY_VALUE("convert.gm_time", bind(&apply_to_time, STD_PLACEHOLDERS::_2, 0)); -+ CMD2_ANY_VALUE("convert.gm_date", bind(&apply_to_time, STD_PLACEHOLDERS::_2, 0x2)); -+ CMD2_ANY_VALUE("convert.time", bind(&apply_to_time, STD_PLACEHOLDERS::_2, 0x1)); -+ CMD2_ANY_VALUE("convert.date", bind(&apply_to_time, STD_PLACEHOLDERS::_2, 0x1 | 0x2)); -+ CMD2_ANY_VALUE("convert.elapsed_time", bind(&apply_to_elapsed_time, STD_PLACEHOLDERS::_2)); -+ CMD2_ANY_VALUE("convert.kb", bind(&apply_to_kb, STD_PLACEHOLDERS::_2)); -+ CMD2_ANY_VALUE("convert.mb", bind(&apply_to_mb, STD_PLACEHOLDERS::_2)); -+ CMD2_ANY_VALUE("convert.xb", bind(&apply_to_xb, STD_PLACEHOLDERS::_2)); -+ CMD2_ANY_VALUE("convert.throttle", bind(&apply_to_throttle, STD_PLACEHOLDERS::_2)); - -- CMD2_ANY_LIST ("elapsed.less", tr1::bind(&apply_elapsed_less, tr1::placeholders::_2)); -- CMD2_ANY_LIST ("elapsed.greater", tr1::bind(&apply_elapsed_greater, tr1::placeholders::_2)); -+ CMD2_ANY_LIST ("elapsed.less", bind(&apply_elapsed_less, STD_PLACEHOLDERS::_2)); -+ CMD2_ANY_LIST ("elapsed.greater", bind(&apply_elapsed_greater, STD_PLACEHOLDERS::_2)); - } diff --git a/net/rtorrent/patches/patch-src_control.cc b/net/rtorrent/patches/patch-src_control.cc deleted file mode 100644 index 5fb157ad2a1..00000000000 --- a/net/rtorrent/patches/patch-src_control.cc +++ /dev/null @@ -1,28 +0,0 @@ -$NetBSD: patch-src_control.cc,v 1.1 2013/05/09 14:28:25 joerg Exp $ - ---- src/control.cc.orig 2013-05-03 23:09:27.000000000 +0000 -+++ src/control.cc -@@ -58,6 +58,14 @@ - - #include "control.h" - -+#if __cplusplus >= 201103L -+#include <functional> -+using std::bind; -+#else -+#include <tr1/functional> -+using std::tr1::bind; -+#endif -+ - Control::Control() : - m_ui(new ui::Root()), - m_display(new display::Manager()), -@@ -77,7 +85,7 @@ Control::Control() : - - m_inputStdin->slot_pressed(sigc::mem_fun(m_input, &input::Manager::pressed)); - -- m_taskShutdown.slot() = std::tr1::bind(&Control::handle_shutdown, this); -+ m_taskShutdown.slot() = std::bind(&Control::handle_shutdown, this); - - m_commandScheduler->set_slot_error_message(rak::mem_fn(m_core, &core::Manager::push_log_std)); - } diff --git a/net/rtorrent/patches/patch-src_core_curl__get.cc b/net/rtorrent/patches/patch-src_core_curl__get.cc deleted file mode 100644 index 5f81c1ec448..00000000000 --- a/net/rtorrent/patches/patch-src_core_curl__get.cc +++ /dev/null @@ -1,28 +0,0 @@ -$NetBSD: patch-src_core_curl__get.cc,v 1.1 2013/05/09 14:28:25 joerg Exp $ - ---- src/core/curl_get.cc.orig 2013-05-03 22:43:40.000000000 +0000 -+++ src/core/curl_get.cc -@@ -45,6 +45,14 @@ - #include "curl_get.h" - #include "curl_stack.h" - -+#if __cplusplus >= 201103L -+#include <functional> -+using std::bind; -+#else -+#include <tr1/functional> -+using std::tr1::bind; -+#endif -+ - namespace core { - - size_t -@@ -82,7 +90,7 @@ CurlGet::start() { - - // Normally libcurl should handle the timeout. But sometimes that doesn't - // work right so we do a fallback timeout that just aborts the transfer. -- m_taskTimeout.slot() = std::tr1::bind(&CurlGet::receive_timeout, this); -+ m_taskTimeout.slot() = bind(&CurlGet::receive_timeout, this); - priority_queue_erase(&taskScheduler, &m_taskTimeout); - priority_queue_insert(&taskScheduler, &m_taskTimeout, cachedTime + rak::timer::from_seconds(m_timeout + 5)); - } diff --git a/net/rtorrent/patches/patch-src_core_curl__stack.cc b/net/rtorrent/patches/patch-src_core_curl__stack.cc deleted file mode 100644 index f4d87e5dd6e..00000000000 --- a/net/rtorrent/patches/patch-src_core_curl__stack.cc +++ /dev/null @@ -1,13 +0,0 @@ -$NetBSD: patch-src_core_curl__stack.cc,v 1.1 2013/05/09 14:28:25 joerg Exp $ - ---- src/core/curl_stack.cc.orig 2013-05-03 22:43:15.000000000 +0000 -+++ src/core/curl_stack.cc -@@ -55,7 +55,7 @@ CurlStack::CurlStack() : - m_ssl_verify_peer(true), - m_dns_timeout(60) { - -- m_taskTimeout.slot() = std::tr1::bind(&CurlStack::receive_timeout, this); -+ m_taskTimeout.slot() = bind(&CurlStack::receive_timeout, this); - - #if (LIBCURL_VERSION_NUM >= 0x071000) - curl_multi_setopt((CURLM*)m_handle, CURLMOPT_TIMERDATA, this); diff --git a/net/rtorrent/patches/patch-src_core_dht__manager.cc b/net/rtorrent/patches/patch-src_core_dht__manager.cc deleted file mode 100644 index 5644b8eff78..00000000000 --- a/net/rtorrent/patches/patch-src_core_dht__manager.cc +++ /dev/null @@ -1,37 +0,0 @@ -$NetBSD: patch-src_core_dht__manager.cc,v 1.1 2013/05/09 14:28:25 joerg Exp $ - ---- src/core/dht_manager.cc.orig 2013-05-03 22:44:37.000000000 +0000 -+++ src/core/dht_manager.cc -@@ -54,6 +54,14 @@ - #include "download_store.h" - #include "manager.h" - -+#if __cplusplus >= 201103L -+#include <functional> -+using std::bind; -+#else -+#include <tr1/functional> -+using std::tr1::bind; -+#endif -+ - namespace core { - - const char* DhtManager::dht_settings[dht_settings_num] = { "disable", "off", "auto", "on" }; -@@ -114,7 +122,7 @@ DhtManager::start_dht() { - torrent::dht_manager()->start(port); - torrent::dht_manager()->reset_statistics(); - -- m_updateTimeout.slot() = std::tr1::bind(&DhtManager::update, this); -+ m_updateTimeout.slot() = bind(&DhtManager::update, this); - priority_queue_insert(&taskScheduler, &m_updateTimeout, (cachedTime + rak::timer::from_seconds(60)).round_seconds()); - - m_dhtPrevCycle = 0; -@@ -197,7 +205,7 @@ DhtManager::update() { - break; - - if (itr == end) { -- m_stopTimeout.slot() = std::tr1::bind(&DhtManager::stop_dht, this); -+ m_stopTimeout.slot() = bind(&DhtManager::stop_dht, this); - priority_queue_insert(&taskScheduler, &m_stopTimeout, (cachedTime + rak::timer::from_seconds(15 * 60)).round_seconds()); - } - } diff --git a/net/rtorrent/patches/patch-src_core_download.cc b/net/rtorrent/patches/patch-src_core_download.cc deleted file mode 100644 index 8280030c482..00000000000 --- a/net/rtorrent/patches/patch-src_core_download.cc +++ /dev/null @@ -1,36 +0,0 @@ -$NetBSD: patch-src_core_download.cc,v 1.1 2013/05/09 14:28:25 joerg Exp $ - ---- src/core/download.cc.orig 2013-05-03 22:45:22.000000000 +0000 -+++ src/core/download.cc -@@ -53,6 +53,16 @@ - #include "download.h" - #include "manager.h" - -+#if __cplusplus >= 201103L -+#include <functional> -+using std::bind; -+#define STD_PLACEHOLDERS std::placeholders -+#else -+#include <tr1/functional> -+using std::tr1::bind; -+#define STD_PLACEHOLDERS std::tr1::placeholders -+#endif -+ - namespace core { - - Download::Download(download_type d) : -@@ -63,10 +73,10 @@ Download::Download(download_type d) : - m_resumeFlags(~uint32_t()), - m_group(0) { - -- m_download.info()->signal_tracker_success().push_back(tr1::bind(&Download::receive_tracker_msg, this, "")); -- m_download.info()->signal_tracker_failed().push_back(tr1::bind(&Download::receive_tracker_msg, this, tr1::placeholders::_1)); -- m_download.info()->signal_storage_error().push_back(tr1::bind(&Download::receive_storage_error, this, tr1::placeholders::_1)); -- m_download.info()->signal_chunk_failed().push_back(tr1::bind(&Download::receive_chunk_failed, this, tr1::placeholders::_1)); -+ m_download.info()->signal_tracker_success().push_back(bind(&Download::receive_tracker_msg, this, "")); -+ m_download.info()->signal_tracker_failed().push_back(bind(&Download::receive_tracker_msg, this, STD_PLACEHOLDERS::_1)); -+ m_download.info()->signal_storage_error().push_back(bind(&Download::receive_storage_error, this, STD_PLACEHOLDERS::_1)); -+ m_download.info()->signal_chunk_failed().push_back(bind(&Download::receive_chunk_failed, this, STD_PLACEHOLDERS::_1)); - } - - Download::~Download() { diff --git a/net/rtorrent/patches/patch-src_core_download__factory.cc b/net/rtorrent/patches/patch-src_core_download__factory.cc deleted file mode 100644 index eb0abbc130f..00000000000 --- a/net/rtorrent/patches/patch-src_core_download__factory.cc +++ /dev/null @@ -1,42 +0,0 @@ -$NetBSD: patch-src_core_download__factory.cc,v 1.1 2013/05/09 14:28:25 joerg Exp $ - ---- src/core/download_factory.cc.orig 2013-05-03 22:37:54.000000000 +0000 -+++ src/core/download_factory.cc -@@ -41,7 +41,15 @@ - #include <sstream> - #include <stdexcept> - #include <rak/path.h> -+#if __cplusplus >= 201103L -+#include <functional> -+using std::bind; -+#define STD_PLACEHOLDERS std::placeholders -+#else - #include <tr1/functional> -+using std::tr1::bind; -+#define STD_PLACEHOLDERS std::tr1::placeholders -+#endif - #include <torrent/utils/log.h> - #include <torrent/utils/resume.h> - #include <torrent/object.h> -@@ -107,8 +115,8 @@ DownloadFactory::DownloadFactory(Manager - m_printLog(true), - m_isFile(false) { - -- m_taskLoad.slot() = std::tr1::bind(&DownloadFactory::receive_load, this); -- m_taskCommit.slot() = std::tr1::bind(&DownloadFactory::receive_commit, this); -+ m_taskLoad.slot() = bind(&DownloadFactory::receive_load, this); -+ m_taskCommit.slot() = bind(&DownloadFactory::receive_commit, this); - - // m_variables["connection_leech"] = rpc::call_command_void("protocol.connection.leech"); - // m_variables["connection_seed"] = rpc::call_command_void("protocol.connection.seed"); -@@ -158,8 +166,8 @@ DownloadFactory::receive_load() { - m_stream = new std::stringstream; - HttpQueue::iterator itr = m_manager->http_queue()->insert(m_uri, m_stream); - -- (*itr)->signal_done().push_front(std::tr1::bind(&DownloadFactory::receive_loaded, this)); -- (*itr)->signal_failed().push_front(std::tr1::bind(&DownloadFactory::receive_failed, this, std::tr1::placeholders::_1)); -+ (*itr)->signal_done().push_front(bind(&DownloadFactory::receive_loaded, this)); -+ (*itr)->signal_failed().push_front(bind(&DownloadFactory::receive_failed, this, STD_PLACEHOLDERS::_1)); - - m_variables["tied_to_file"] = (int64_t)false; - diff --git a/net/rtorrent/patches/patch-src_core_download__list.cc b/net/rtorrent/patches/patch-src_core_download__list.cc deleted file mode 100644 index 9a0ab518a00..00000000000 --- a/net/rtorrent/patches/patch-src_core_download__list.cc +++ /dev/null @@ -1,15 +0,0 @@ -$NetBSD: patch-src_core_download__list.cc,v 1.1 2013/05/09 14:28:25 joerg Exp $ - ---- src/core/download_list.cc.orig 2013-05-03 22:46:43.000000000 +0000 -+++ src/core/download_list.cc -@@ -181,8 +181,8 @@ DownloadList::insert(Download* download) - lt_log_print_info(torrent::LOG_TORRENT_INFO, download->info(), "download_list", "Inserting download."); - - try { -- (*itr)->data()->slot_initial_hash() = tr1::bind(&DownloadList::hash_done, this, download); -- (*itr)->data()->slot_download_done() = tr1::bind(&DownloadList::received_finished, this, download); -+ (*itr)->data()->slot_initial_hash() = bind(&DownloadList::hash_done, this, download); -+ (*itr)->data()->slot_download_done() = bind(&DownloadList::received_finished, this, download); - - // This needs to be separated into two different calls to ensure - // the download remains in the view. diff --git a/net/rtorrent/patches/patch-src_core_http__queue.cc b/net/rtorrent/patches/patch-src_core_http__queue.cc deleted file mode 100644 index b7f2fe55664..00000000000 --- a/net/rtorrent/patches/patch-src_core_http__queue.cc +++ /dev/null @@ -1,15 +0,0 @@ -$NetBSD: patch-src_core_http__queue.cc,v 1.1 2013/05/09 14:28:25 joerg Exp $ - ---- src/core/http_queue.cc.orig 2013-05-03 22:47:12.000000000 +0000 -+++ src/core/http_queue.cc -@@ -58,8 +58,8 @@ HttpQueue::insert(const std::string& url - - iterator itr = Base::insert(end(), h.get()); - -- h->signal_done().push_back(std::tr1::bind(&HttpQueue::erase, this, itr)); -- h->signal_failed().push_back(std::tr1::bind(&HttpQueue::erase, this, itr)); -+ h->signal_done().push_back(bind(&HttpQueue::erase, this, itr)); -+ h->signal_failed().push_back(bind(&HttpQueue::erase, this, itr)); - - (*itr)->start(); - diff --git a/net/rtorrent/patches/patch-src_core_manager.cc b/net/rtorrent/patches/patch-src_core_manager.cc deleted file mode 100644 index 2fcaef7798e..00000000000 --- a/net/rtorrent/patches/patch-src_core_manager.cc +++ /dev/null @@ -1,13 +0,0 @@ -$NetBSD: patch-src_core_manager.cc,v 1.1 2013/05/09 14:28:25 joerg Exp $ - ---- src/core/manager.cc.orig 2013-05-03 22:47:33.000000000 +0000 -+++ src/core/manager.cc -@@ -205,7 +205,7 @@ Manager::get_address_throttle(const sock - // Most of this should be possible to move out. - void - Manager::initialize_second() { -- torrent::Http::slot_factory() = std::tr1::bind(&CurlStack::new_object, m_httpStack); -+ torrent::Http::slot_factory() = bind(&CurlStack::new_object, m_httpStack); - m_httpQueue->slot_factory(sigc::mem_fun(m_httpStack, &CurlStack::new_object)); - - CurlStack::global_init(); diff --git a/net/rtorrent/patches/patch-src_core_manager.h b/net/rtorrent/patches/patch-src_core_manager.h deleted file mode 100644 index d29d333df3c..00000000000 --- a/net/rtorrent/patches/patch-src_core_manager.h +++ /dev/null @@ -1,21 +0,0 @@ -$NetBSD: patch-src_core_manager.h,v 1.1 2013/05/09 14:28:25 joerg Exp $ - ---- src/core/manager.h.orig 2013-05-03 23:23:20.000000000 +0000 -+++ src/core/manager.h -@@ -118,10 +118,12 @@ public: - - void handshake_log(const sockaddr* sa, int msg, int err, const torrent::HashString* hash); - -- static const int create_start = 0x1; -- static const int create_tied = 0x2; -- static const int create_quiet = 0x4; -- static const int create_raw_data = 0x8; -+ enum { -+ create_start = 0x1, -+ create_tied = 0x2, -+ create_quiet = 0x4, -+ create_raw_data = 0x8 -+ }; - - typedef std::vector<std::string> command_list_type; - diff --git a/net/rtorrent/patches/patch-src_core_view.cc b/net/rtorrent/patches/patch-src_core_view.cc deleted file mode 100644 index 24995f9f0b9..00000000000 --- a/net/rtorrent/patches/patch-src_core_view.cc +++ /dev/null @@ -1,13 +0,0 @@ -$NetBSD: patch-src_core_view.cc,v 1.1 2013/05/09 14:28:25 joerg Exp $ - ---- src/core/view.cc.orig 2013-05-03 22:47:53.000000000 +0000 -+++ src/core/view.cc -@@ -172,7 +172,7 @@ View::initialize(const std::string& name - m_focus = 0; - - set_last_changed(rak::timer()); -- m_delayChanged.slot() = std::tr1::bind(&signal_type::operator(), &m_signalChanged); -+ m_delayChanged.slot() = bind(&signal_type::operator(), &m_signalChanged); - } - - void diff --git a/net/rtorrent/patches/patch-src_display_frame.cc b/net/rtorrent/patches/patch-src_display_frame.cc deleted file mode 100644 index 1625327d2a9..00000000000 --- a/net/rtorrent/patches/patch-src_display_frame.cc +++ /dev/null @@ -1,47 +0,0 @@ -$NetBSD: patch-src_display_frame.cc,v 1.1 2013/05/09 14:28:25 joerg Exp $ - ---- src/display/frame.cc.orig 2013-05-03 22:39:08.000000000 +0000 -+++ src/display/frame.cc -@@ -38,7 +38,16 @@ - - #include <algorithm> - #include <functional> -+#if __cplusplus >= 201103L -+using std::function; -+using std::bind; -+#define STD_PLACEHOLDERS std::placeholders -+#else - #include <tr1/functional> -+using std::tr1::function; -+using std::tr1::bind; -+#define STD_PLACEHOLDERS std::tr1::placeholders -+#endif - #include <rak/algorithm.h> - #include <torrent/exceptions.h> - -@@ -367,9 +376,9 @@ Frame::balance_row(uint32_t x, uint32_t - // - // Else if we're short, only give each what they require. - std::stable_sort(dynamicFrames, dynamicFrames + dynamicSize, -- std::tr1::bind(std::greater<extent_type>(), -- std::tr1::bind(&dynamic_min_height, std::tr1::placeholders::_1), -- std::tr1::bind(&dynamic_min_height, std::tr1::placeholders::_2))); -+ bind(std::greater<extent_type>(), -+ bind(&dynamic_min_height, STD_PLACEHOLDERS::_1), -+ bind(&dynamic_min_height, STD_PLACEHOLDERS::_2))); - - bool retry; - -@@ -442,9 +451,9 @@ Frame::balance_column(uint32_t x, uint32 - // - // Else if we're short, only give each what they require. - std::stable_sort(dynamicFrames, dynamicFrames + dynamicSize, -- std::tr1::bind(std::greater<extent_type>(), -- std::tr1::bind(&dynamic_min_width, std::tr1::placeholders::_1), -- std::tr1::bind(&dynamic_min_width, std::tr1::placeholders::_2))); -+ bind(std::greater<extent_type>(), -+ bind(&dynamic_min_width, STD_PLACEHOLDERS::_1), -+ bind(&dynamic_min_width, STD_PLACEHOLDERS::_2))); - - bool retry; - diff --git a/net/rtorrent/patches/patch-src_display_manager.cc b/net/rtorrent/patches/patch-src_display_manager.cc deleted file mode 100644 index cafcbde7946..00000000000 --- a/net/rtorrent/patches/patch-src_display_manager.cc +++ /dev/null @@ -1,26 +0,0 @@ -$NetBSD: patch-src_display_manager.cc,v 1.1 2013/05/09 14:28:25 joerg Exp $ - ---- src/display/manager.cc.orig 2013-05-03 22:48:16.000000000 +0000 -+++ src/display/manager.cc -@@ -45,12 +45,20 @@ - #include "manager.h" - #include "window.h" - -+#if __cplusplus >= 201103L -+#include <functional> -+using std::bind; -+#else -+#include <tr1/functional> -+using std::tr1::bind; -+#endif -+ - namespace display { - - Manager::Manager() : - m_forceRedraw(false) { - -- m_taskUpdate.slot() = std::tr1::bind(&Manager::receive_update, this); -+ m_taskUpdate.slot() = bind(&Manager::receive_update, this); - } - - Manager::~Manager() { diff --git a/net/rtorrent/patches/patch-src_display_window.cc b/net/rtorrent/patches/patch-src_display_window.cc deleted file mode 100644 index e67cef29836..00000000000 --- a/net/rtorrent/patches/patch-src_display_window.cc +++ /dev/null @@ -1,28 +0,0 @@ -$NetBSD: patch-src_display_window.cc,v 1.1 2013/05/09 14:28:25 joerg Exp $ - ---- src/display/window.cc.orig 2013-05-03 22:49:02.000000000 +0000 -+++ src/display/window.cc -@@ -40,6 +40,14 @@ - - #include "window.h" - -+#if __cplusplus >= 201103L -+#include <functional> -+using std::bind; -+#else -+#include <tr1/functional> -+using std::tr1::bind; -+#endif -+ - namespace display { - - Window::SlotTimer Window::m_slotSchedule; -@@ -59,7 +67,7 @@ Window::Window(Canvas* canvas, int flags - m_maxWidth(maxWidth), - m_maxHeight(maxHeight) { - -- m_taskUpdate.slot() = std::tr1::bind(&Window::redraw, this); -+ m_taskUpdate.slot() = bind(&Window::redraw, this); - } - - Window::~Window() { diff --git a/net/rtorrent/patches/patch-src_display_window__file__list.cc b/net/rtorrent/patches/patch-src_display_window__file__list.cc deleted file mode 100644 index 1fa54d5f694..00000000000 --- a/net/rtorrent/patches/patch-src_display_window__file__list.cc +++ /dev/null @@ -1,12 +0,0 @@ -$NetBSD: patch-src_display_window__file__list.cc,v 1.1 2013/05/09 14:28:25 joerg Exp $ - ---- src/display/window_file_list.cc.orig 2013-05-03 22:49:37.000000000 +0000 -+++ src/display/window_file_list.cc -@@ -36,6 +36,7 @@ - - #include "config.h" - -+#include <locale> - #include <stdio.h> - #include <torrent/path.h> - #include <torrent/data/file.h> diff --git a/net/rtorrent/patches/patch-src_display_window__log.cc b/net/rtorrent/patches/patch-src_display_window__log.cc deleted file mode 100644 index 4824b1d1cb5..00000000000 --- a/net/rtorrent/patches/patch-src_display_window__log.cc +++ /dev/null @@ -1,33 +0,0 @@ -$NetBSD: patch-src_display_window__log.cc,v 1.1 2013/05/09 14:28:25 joerg Exp $ - ---- src/display/window_log.cc.orig 2013-05-03 22:50:09.000000000 +0000 -+++ src/display/window_log.cc -@@ -44,17 +44,25 @@ - #include "utils.h" - #include "window_log.h" - -+#if __cplusplus >= 201103L -+#include <functional> -+using std::bind; -+#else -+#include <tr1/functional> -+using std::tr1::bind; -+#endif -+ - namespace display { - - WindowLog::WindowLog(torrent::log_buffer* l) : - Window(new Canvas, 0, 0, 0, extent_full, extent_static), - m_log(l) { - -- m_taskUpdate.slot() = std::tr1::bind(&WindowLog::receive_update, this); -+ m_taskUpdate.slot() = bind(&WindowLog::receive_update, this); - -- unsigned int signal_index = torrent::main_thread()->signal_bitfield()->add_signal(std::tr1::bind(&WindowLog::receive_update, this)); -+ unsigned int signal_index = torrent::main_thread()->signal_bitfield()->add_signal(bind(&WindowLog::receive_update, this)); - -- m_log->lock_and_set_update_slot(std::tr1::bind(&torrent::thread_base::send_event_signal, torrent::main_thread(), signal_index, false)); -+ m_log->lock_and_set_update_slot(bind(&torrent::thread_base::send_event_signal, torrent::main_thread(), signal_index, false)); - } - - WindowLog::~WindowLog() { diff --git a/net/rtorrent/patches/patch-src_rpc_command.h b/net/rtorrent/patches/patch-src_rpc_command.h deleted file mode 100644 index 27f0fe8c77e..00000000000 --- a/net/rtorrent/patches/patch-src_rpc_command.h +++ /dev/null @@ -1,42 +0,0 @@ -$NetBSD: patch-src_rpc_command.h,v 1.1 2013/05/09 14:28:25 joerg Exp $ - ---- src/rpc/command.h.orig 2013-05-03 22:40:32.000000000 +0000 -+++ src/rpc/command.h -@@ -41,13 +41,17 @@ - #include <limits> - #include <inttypes.h> - #include <torrent/object.h> --#include <tr1/functional> - - #include <torrent/object.h> - #include <torrent/data/file_list_iterator.h> - - // Move into config.h or something. --namespace tr1 { using namespace std::tr1; } -+#if __cplusplus >= 201103L -+using std::function; -+#else -+#include <tr1/functional> -+using std::tr1::function; -+#endif - - namespace core { - class Download; -@@ -111,7 +115,7 @@ typedef rt_triple<int, void*, void*> tar - class command_base; - - typedef const torrent::Object (*command_base_call_type)(command_base*, target_type, const torrent::Object&); --typedef tr1::function<torrent::Object (target_type, const torrent::Object&)> base_function; -+typedef function<torrent::Object (target_type, const torrent::Object&)> base_function; - - template <typename tmpl> struct command_base_is_valid {}; - template <command_base_call_type tmpl_func> struct command_base_is_type {}; -@@ -250,7 +254,7 @@ command_base::_call(command_base* cmd, t - } - - #define COMMAND_BASE_TEMPLATE_TYPE(func_type, func_parm) \ -- template <typename T, int proper = target_type_id<T>::proper_type> struct func_type { typedef tr1::function<func_parm> type; }; \ -+ template <typename T, int proper = target_type_id<T>::proper_type> struct func_type { typedef function<func_parm> type; }; \ - \ - template <> struct command_base_is_valid<func_type<target_type>::type> { static const int value = 1; }; \ - template <> struct command_base_is_valid<func_type<core::Download*>::type> { static const int value = 1; }; \ diff --git a/net/rtorrent/patches/patch-src_rpc_command__scheduler.cc b/net/rtorrent/patches/patch-src_rpc_command__scheduler.cc deleted file mode 100644 index 59d5dcea886..00000000000 --- a/net/rtorrent/patches/patch-src_rpc_command__scheduler.cc +++ /dev/null @@ -1,13 +0,0 @@ -$NetBSD: patch-src_rpc_command__scheduler.cc,v 1.1 2013/05/09 14:28:25 joerg Exp $ - ---- src/rpc/command_scheduler.cc.orig 2013-05-03 22:51:00.000000000 +0000 -+++ src/rpc/command_scheduler.cc -@@ -71,7 +71,7 @@ CommandScheduler::insert(const std::stri - delete *itr; - - *itr = new CommandSchedulerItem(key); -- (*itr)->slot() = std::tr1::bind(&CommandScheduler::call_item, this, *itr); -+ (*itr)->slot() = bind(&CommandScheduler::call_item, this, *itr); - - return itr; - } diff --git a/net/rtorrent/patches/patch-src_rpc_command__scheduler__item.h b/net/rtorrent/patches/patch-src_rpc_command__scheduler__item.h deleted file mode 100644 index cf1afaf748c..00000000000 --- a/net/rtorrent/patches/patch-src_rpc_command__scheduler__item.h +++ /dev/null @@ -1,26 +0,0 @@ -$NetBSD: patch-src_rpc_command__scheduler__item.h,v 1.1 2013/05/09 14:28:25 joerg Exp $ - ---- src/rpc/command_scheduler_item.h.orig 2013-05-03 22:41:25.000000000 +0000 -+++ src/rpc/command_scheduler_item.h -@@ -39,14 +39,20 @@ - - #include "globals.h" - -+#if __cplusplus >= 201103L -+#include <functional> -+using std::function; -+#else - #include <tr1/functional> -+using std::tr1::function; -+#endif - #include <torrent/object.h> - - namespace rpc { - - class CommandSchedulerItem { - public: -- typedef std::tr1::function<void ()> slot_void; -+ typedef function<void ()> slot_void; - - CommandSchedulerItem(const std::string& key) : m_key(key), m_interval(0) {} - ~CommandSchedulerItem(); diff --git a/net/rtorrent/patches/patch-src_rpc_exec__file.cc b/net/rtorrent/patches/patch-src_rpc_exec__file.cc deleted file mode 100644 index 407a1c50dd2..00000000000 --- a/net/rtorrent/patches/patch-src_rpc_exec__file.cc +++ /dev/null @@ -1,19 +0,0 @@ -$NetBSD: patch-src_rpc_exec__file.cc,v 1.1 2013/05/09 14:28:25 joerg Exp $ - ---- src/rpc/exec_file.cc.orig 2013-05-03 23:11:48.000000000 +0000 -+++ src/rpc/exec_file.cc -@@ -52,6 +52,14 @@ namespace rpc { - - // Close m_logFd. - -+const unsigned int ExecFile::max_args = 128; -+const unsigned int ExecFile::buffer_size = 4096; -+ -+const int ExecFile::flag_expand_tilde = 0x1; -+const int ExecFile::flag_throw = 0x2; -+const int ExecFile::flag_capture = 0x4; -+const int ExecFile::flag_background = 0x8; -+ - int - ExecFile::execute(const char* file, char* const* argv, int flags) { - // Write the execued command and its parameters to the log fd. diff --git a/net/rtorrent/patches/patch-src_rpc_exec__file.h b/net/rtorrent/patches/patch-src_rpc_exec__file.h deleted file mode 100644 index 968f101bcbe..00000000000 --- a/net/rtorrent/patches/patch-src_rpc_exec__file.h +++ /dev/null @@ -1,24 +0,0 @@ -$NetBSD: patch-src_rpc_exec__file.h,v 1.1 2013/05/09 14:28:25 joerg Exp $ - ---- src/rpc/exec_file.h.orig 2013-05-03 23:11:46.000000000 +0000 -+++ src/rpc/exec_file.h -@@ -43,13 +43,13 @@ namespace rpc { - - class ExecFile { - public: -- static const unsigned int max_args = 128; -- static const unsigned int buffer_size = 4096; -+ static const unsigned int max_args; -+ static const unsigned int buffer_size; - -- static const int flag_expand_tilde = 0x1; -- static const int flag_throw = 0x2; -- static const int flag_capture = 0x4; -- static const int flag_background = 0x8; -+ static const int flag_expand_tilde; -+ static const int flag_throw; -+ static const int flag_capture; -+ static const int flag_background; - - ExecFile() : m_logFd(-1) {} - diff --git a/net/rtorrent/patches/patch-src_rpc_object__storage.cc b/net/rtorrent/patches/patch-src_rpc_object__storage.cc deleted file mode 100644 index e69de29bb2d..00000000000 --- a/net/rtorrent/patches/patch-src_rpc_object__storage.cc +++ /dev/null diff --git a/net/rtorrent/patches/patch-src_rpc_object__storage.h b/net/rtorrent/patches/patch-src_rpc_object__storage.h deleted file mode 100644 index f1e40997c58..00000000000 --- a/net/rtorrent/patches/patch-src_rpc_object__storage.h +++ /dev/null @@ -1,66 +0,0 @@ -$NetBSD: patch-src_rpc_object__storage.h,v 1.1 2013/05/09 14:28:25 joerg Exp $ - ---- src/rpc/object_storage.h.orig 2013-05-03 22:41:30.000000000 +0000 -+++ src/rpc/object_storage.h -@@ -42,7 +42,13 @@ - #define RTORRENT_RPC_OBJECT_STORAGE_H - - #include <cstring> -+#if __cplusplus >= 201103L -+#include <unordered_map> -+using std::unordered_map; -+#else - #include <tr1/unordered_map> -+using std::tr1::unordered_map; -+#endif - #include <torrent/object.h> - - #include "rak/unordered_vector.h" -@@ -56,7 +62,7 @@ struct object_storage_node { - char flags; - }; - --typedef std::tr1::unordered_map<fixed_key_type<64>, object_storage_node, hash_fixed_key_type> object_storage_base_type; -+typedef unordered_map<fixed_key_type<64>, object_storage_node, hash_fixed_key_type> object_storage_base_type; - - class object_storage : private object_storage_base_type { - public: -@@ -89,21 +95,23 @@ public: - using base_type::clear; - using base_type::find; - using base_type::erase; -- -- static const unsigned int flag_generic_type = 0x1; -- static const unsigned int flag_bool_type = 0x2; -- static const unsigned int flag_value_type = 0x3; -- static const unsigned int flag_string_type = 0x4; -- static const unsigned int flag_list_type = 0x5; -- static const unsigned int flag_function_type = 0x6; -- static const unsigned int flag_multi_type = 0x7; -- -- static const unsigned int mask_type = 0xf; -- -- static const unsigned int flag_constant = 0x10; -- static const unsigned int flag_static = 0x20; -- static const unsigned int flag_private = 0x40; -- static const unsigned int flag_rlookup = 0x80; -+ -+ enum { -+ flag_generic_type = 0x1, -+ flag_bool_type = 0x2, -+ flag_value_type = 0x3, -+ flag_string_type = 0x4, -+ flag_list_type = 0x5, -+ flag_function_type = 0x6, -+ flag_multi_type = 0x7, -+ -+ mask_type = 0xf, -+ -+ flag_constant = 0x10, -+ flag_static = 0x20, -+ flag_private = 0x40, -+ flag_rlookup = 0x80 -+ }; - - static const size_t key_size = key_type::max_size; - diff --git a/net/rtorrent/patches/patch-src_rpc_xmlrpc.h b/net/rtorrent/patches/patch-src_rpc_xmlrpc.h deleted file mode 100644 index bc73f86c48d..00000000000 --- a/net/rtorrent/patches/patch-src_rpc_xmlrpc.h +++ /dev/null @@ -1,34 +0,0 @@ -$NetBSD: patch-src_rpc_xmlrpc.h,v 1.1 2013/05/09 14:28:25 joerg Exp $ - ---- src/rpc/xmlrpc.h.orig 2013-05-03 22:41:35.000000000 +0000 -+++ src/rpc/xmlrpc.h -@@ -37,7 +37,12 @@ - #ifndef RTORRENT_RPC_XMLRPC_H - #define RTORRENT_RPC_XMLRPC_H - -+#if __cplusplus >= 201103L -+using std::function; -+#else - #include <tr1/functional> -+using std::tr1::function; -+#endif - #include <torrent/hash_string.h> - - namespace core { -@@ -54,11 +59,11 @@ namespace rpc { - - class XmlRpc { - public: -- typedef std::tr1::function<core::Download* (const char*)> slot_download; -- typedef std::tr1::function<torrent::File* (core::Download*, uint32_t)> slot_file; -- typedef std::tr1::function<torrent::Tracker* (core::Download*, uint32_t)> slot_tracker; -- typedef std::tr1::function<torrent::Peer* (core::Download*, const torrent::HashString&)> slot_peer; -- typedef std::tr1::function<bool (const char*, uint32_t)> slot_write; -+ typedef function<core::Download* (const char*)> slot_download; -+ typedef function<torrent::File* (core::Download*, uint32_t)> slot_file; -+ typedef function<torrent::Tracker* (core::Download*, uint32_t)> slot_tracker; -+ typedef function<torrent::Peer* (core::Download*, const torrent::HashString&)> slot_peer; -+ typedef function<bool (const char*, uint32_t)> slot_write; - - static const int dialect_generic = 0; - static const int dialect_i8 = 1; diff --git a/net/rtorrent/patches/patch-src_signal__handler.cc b/net/rtorrent/patches/patch-src_signal__handler.cc deleted file mode 100644 index 946e3b75e4c..00000000000 --- a/net/rtorrent/patches/patch-src_signal__handler.cc +++ /dev/null @@ -1,12 +0,0 @@ -$NetBSD: patch-src_signal__handler.cc,v 1.1 2013/05/09 14:28:25 joerg Exp $ - ---- src/signal_handler.cc.orig 2013-05-03 23:09:48.000000000 +0000 -+++ src/signal_handler.cc -@@ -38,6 +38,7 @@ - - #include <signal.h> - #include <stdexcept> -+#include <string> - #include "rak/error_number.h" - #include "signal_handler.h" - diff --git a/net/rtorrent/patches/patch-src_thread__base.cc b/net/rtorrent/patches/patch-src_thread__base.cc deleted file mode 100644 index d4918918536..00000000000 --- a/net/rtorrent/patches/patch-src_thread__base.cc +++ /dev/null @@ -1,28 +0,0 @@ -$NetBSD: patch-src_thread__base.cc,v 1.1 2013/05/09 14:28:25 joerg Exp $ - ---- src/thread_base.cc.orig 2013-05-03 23:10:27.000000000 +0000 -+++ src/thread_base.cc -@@ -53,6 +53,14 @@ - #include "control.h" - #include "core/manager.h" - -+#if __cplusplus >= 201103L -+#include <functional> -+using std::bind; -+#else -+#include <tr1/functional> -+using std::tr1::bind; -+#endif -+ - // Temporarly injected into config.h. - /* temp hack */ - //#define lt_cacheline_aligned __attribute__((__aligned__(128))) -@@ -109,7 +117,7 @@ public: - void throw_shutdown_exception() { throw torrent::shutdown_exception(); } - - ThreadBase::ThreadBase() { -- m_taskShutdown.slot() = std::tr1::bind(&throw_shutdown_exception); -+ m_taskShutdown.slot() = std::bind(&throw_shutdown_exception); - - m_threadQueue = new thread_queue_hack; - } diff --git a/net/rtorrent/patches/patch-src_ui_element__log__complete.cc b/net/rtorrent/patches/patch-src_ui_element__log__complete.cc deleted file mode 100644 index f35165b8e76..00000000000 --- a/net/rtorrent/patches/patch-src_ui_element__log__complete.cc +++ /dev/null @@ -1,30 +0,0 @@ -$NetBSD: patch-src_ui_element__log__complete.cc,v 1.1 2013/05/09 14:28:25 joerg Exp $ - ---- src/ui/element_log_complete.cc.orig 2013-05-03 22:55:48.000000000 +0000 -+++ src/ui/element_log_complete.cc -@@ -48,15 +48,23 @@ - #include "control.h" - #include "element_log_complete.h" - -+#if __cplusplus >= 201103L -+#include <functional> -+using std::bind; -+#else -+#include <tr1/functional> -+using std::tr1::bind; -+#endif -+ - namespace ui { - - ElementLogComplete::ElementLogComplete(torrent::log_buffer* l) : - m_window(NULL), - m_log(l) { - -- unsigned int signal_index = torrent::main_thread()->signal_bitfield()->add_signal(std::tr1::bind(&ElementLogComplete::received_update, this)); -+ unsigned int signal_index = torrent::main_thread()->signal_bitfield()->add_signal(bind(&ElementLogComplete::received_update, this)); - -- m_log->lock_and_set_update_slot(std::tr1::bind(&torrent::thread_base::send_event_signal, torrent::main_thread(), signal_index, false)); -+ m_log->lock_and_set_update_slot(bind(&torrent::thread_base::send_event_signal, torrent::main_thread(), signal_index, false)); - } - - void diff --git a/net/rtorrent/patches/patch-src_ui_element__peer__list.cc b/net/rtorrent/patches/patch-src_ui_element__peer__list.cc deleted file mode 100644 index cc580d8a08a..00000000000 --- a/net/rtorrent/patches/patch-src_ui_element__peer__list.cc +++ /dev/null @@ -1,33 +0,0 @@ -$NetBSD: patch-src_ui_element__peer__list.cc,v 1.1 2013/05/09 14:28:25 joerg Exp $ - ---- src/ui/element_peer_list.cc.orig 2013-05-03 22:56:26.000000000 +0000 -+++ src/ui/element_peer_list.cc -@@ -54,6 +54,16 @@ - #include "element_peer_list.h" - #include "element_text.h" - -+#if __cplusplus >= 201103L -+#include <functional> -+using std::bind; -+#define STD_PLACEHOLDERS std::placeholders -+#else -+#include <tr1/functional> -+using std::tr1::bind; -+#define STD_PLACEHOLDERS std::tr1::placeholders -+#endif -+ - namespace ui { - - ElementPeerList::ElementPeerList(core::Download* d) : -@@ -68,9 +78,9 @@ ElementPeerList::ElementPeerList(core::D - torrent::ConnectionList* connection_list = m_download->download()->connection_list(); - - m_peer_connected = connection_list->signal_connected().insert(connection_list->signal_connected().end(), -- tr1::bind(&ElementPeerList::receive_peer_connected, this, tr1::placeholders::_1)); -+ bind(&ElementPeerList::receive_peer_connected, this, STD_PLACEHOLDERS::_1)); - m_peer_disconnected = connection_list->signal_disconnected().insert(connection_list->signal_disconnected().end(), -- tr1::bind(&ElementPeerList::receive_peer_disconnected, this, tr1::placeholders::_1)); -+ bind(&ElementPeerList::receive_peer_disconnected, this, STD_PLACEHOLDERS::_1)); - - m_windowList = new display::WindowPeerList(m_download, &m_list, &m_listItr); - m_elementInfo = create_info(); |