* Modified the fallocate configure check so it will fail if 'fallocate' can't be found.

* Changed more commands to the new format.


git-svn-id: svn://rakshasa.no/libtorrent/trunk/rtorrent@1153 e378c898-3ddf-0310-93e7-cc216c733640
This commit is contained in:
rakshasa
2010-03-24 20:23:48 +00:00
parent db2b813fc4
commit bc96dbfa2d
18 changed files with 316 additions and 345 deletions
+18 -6
View File
@@ -161,18 +161,30 @@ template <> struct target_type_id<Command::file_itr_slot> { static const in
template <> struct target_type_id<Command::download_pair_slot> { static const int value = Command::target_download_pair; };
template <> struct target_type_id<> { static const int value = Command::target_generic; };
template <> struct target_type_id<target_type> { static const int value = Command::target_any; };
template <> struct target_type_id<core::Download*> { static const int value = Command::target_download; };
template <> struct target_type_id<torrent::Peer*> { static const int value = Command::target_peer; };
template <> struct target_type_id<torrent::Tracker*> { static const int value = Command::target_tracker; };
template <> struct target_type_id<torrent::File*> { static const int value = Command::target_file; };
template <> struct target_type_id<torrent::FileListIterator*> { static const int value = Command::target_file_itr; };
template <> struct target_type_id<target_type> { static const int value = Command::target_any; static const int proper_type = 1; };
template <> struct target_type_id<core::Download*> { static const int value = Command::target_download; static const int proper_type = 1; };
template <> struct target_type_id<torrent::Peer*> { static const int value = Command::target_peer; static const int proper_type = 1; };
template <> struct target_type_id<torrent::Tracker*> { static const int value = Command::target_tracker; static const int proper_type = 1; };
template <> struct target_type_id<torrent::File*> { static const int value = Command::target_file; static const int proper_type = 1; };
template <> struct target_type_id<torrent::FileListIterator*> { static const int value = Command::target_file_itr; static const int proper_type = 1; };
template <> struct target_type_id<core::Download*, core::Download*> { static const int value = Command::target_download_pair; };
template <typename T> inline bool
is_target_compatible(const target_type& target) { return target.first == target_type_id<T>::value; }
template <> inline bool
is_target_compatible<target_type>(const target_type& target) { return true; }
// Splitting pairs into separate targets.
inline bool is_target_pair(const target_type& target) { return target.first >= Command::target_download_pair; }
template <typename T> inline T
get_target_cast(target_type target, int type = target_type_id<T>::value) { return (T)target.second; }
template <> inline target_type
get_target_cast<target_type>(target_type target, int type) { return target; }
inline target_type get_target_left(const target_type& target) { return target_type(target.first - 5, target.second); }
inline target_type get_target_right(const target_type& target) { return target_type(target.first - 5, target.third); }