some more fixes around TORRENT_DISABLE_EXTENSIONS
This commit is contained in:
parent
603eea7e60
commit
87f08265bc
|
@ -61,6 +61,7 @@ namespace
|
|||
|
||||
void add_extension(session& s, object const& e)
|
||||
{
|
||||
#ifndef TORRENT_DISABLE_EXTENSIONS
|
||||
if (!extract<std::string>(e).check()) return;
|
||||
|
||||
std::string name = extract<std::string>(e);
|
||||
|
@ -74,6 +75,7 @@ namespace
|
|||
s.add_extension(create_lt_trackers_plugin);
|
||||
else if (name == "metadata_transfer")
|
||||
s.add_extension(create_metadata_plugin);
|
||||
#endif // TORRENT_DISABLE_EXTENSIONS
|
||||
}
|
||||
|
||||
#ifndef TORRENT_NO_DEPRECATE
|
||||
|
|
|
@ -33,6 +33,8 @@ POSSIBILITY OF SUCH DAMAGE.
|
|||
#ifndef TORRENT_LT_TRACKERS_HPP_INCLUDED
|
||||
#define TORRENT_LT_TRACKERS_HPP_INCLUDED
|
||||
|
||||
#ifndef TORRENT_DISABLE_EXTENSIONS
|
||||
|
||||
#ifdef _MSC_VER
|
||||
#pragma warning(push, 1)
|
||||
#endif
|
||||
|
@ -55,5 +57,7 @@ namespace libtorrent
|
|||
boost::shared_ptr<torrent_plugin> TORRENT_EXPORT create_lt_trackers_plugin(torrent*, void*);
|
||||
}
|
||||
|
||||
#endif // TORRENT_DISABLE_EXTENSIONS
|
||||
|
||||
#endif // TORRENT_LT_TRACKERS_HPP_INCLUDED
|
||||
|
||||
|
|
|
@ -33,6 +33,8 @@ POSSIBILITY OF SUCH DAMAGE.
|
|||
#ifndef TORRENT_METADATA_TRANSFER_HPP_INCLUDED
|
||||
#define TORRENT_METADATA_TRANSFER_HPP_INCLUDED
|
||||
|
||||
#ifndef TORRENT_DISABLE_EXTENSIONS
|
||||
|
||||
#ifdef _MSC_VER
|
||||
#pragma warning(push, 1)
|
||||
#endif
|
||||
|
@ -61,5 +63,7 @@ namespace libtorrent
|
|||
#endif
|
||||
}
|
||||
|
||||
#endif // TORRENT_DISABLE_EXTENSIONS
|
||||
|
||||
#endif // TORRENT_METADATA_TRANSFER_HPP_INCLUDED
|
||||
|
||||
|
|
|
@ -33,6 +33,8 @@ POSSIBILITY OF SUCH DAMAGE.
|
|||
#ifndef TORRENT_UT_METADATA_HPP_INCLUDED
|
||||
#define TORRENT_UT_METADATA_HPP_INCLUDED
|
||||
|
||||
#ifndef TORRENT_DISABLE_EXTENSIONS
|
||||
|
||||
#ifdef _MSC_VER
|
||||
#pragma warning(push, 1)
|
||||
#endif
|
||||
|
@ -61,5 +63,6 @@ namespace libtorrent
|
|||
TORRENT_EXPORT boost::shared_ptr<torrent_plugin> create_ut_metadata_plugin(torrent*, void*);
|
||||
}
|
||||
|
||||
#endif // TORRENT_DISABLE_EXTENSIONS
|
||||
#endif // TORRENT_UT_METADATA_HPP_INCLUDED
|
||||
|
||||
|
|
|
@ -33,6 +33,8 @@ POSSIBILITY OF SUCH DAMAGE.
|
|||
#ifndef TORRENT_UT_PEX_EXTENSION_HPP_INCLUDED
|
||||
#define TORRENT_UT_PEX_EXTENSION_HPP_INCLUDED
|
||||
|
||||
#ifndef TORRENT_DISABLE_EXTENSIONS
|
||||
|
||||
#ifdef _MSC_VER
|
||||
#pragma warning(push, 1)
|
||||
#endif
|
||||
|
@ -60,4 +62,6 @@ namespace libtorrent
|
|||
TORRENT_EXPORT boost::shared_ptr<torrent_plugin> create_ut_pex_plugin(torrent*, void*);
|
||||
}
|
||||
|
||||
#endif // TORRENT_DISABLE_EXTENSIONS
|
||||
|
||||
#endif // TORRENT_UT_PEX_EXTENSION_HPP_INCLUDED
|
||||
|
|
|
@ -30,6 +30,8 @@ POSSIBILITY OF SUCH DAMAGE.
|
|||
|
||||
*/
|
||||
|
||||
#ifndef TORRENT_DISABLE_EXTENSIONS
|
||||
|
||||
#include "libtorrent/session.hpp"
|
||||
#include "libtorrent/session_settings.hpp"
|
||||
#include "libtorrent/hasher.hpp"
|
||||
|
@ -166,3 +168,7 @@ int test_main()
|
|||
return 0;
|
||||
}
|
||||
|
||||
#else
|
||||
int test_main() { return 0; }
|
||||
#endif // TORRENT_DISABLE_EXTENSIONS
|
||||
|
||||
|
|
|
@ -30,6 +30,8 @@ POSSIBILITY OF SUCH DAMAGE.
|
|||
|
||||
*/
|
||||
|
||||
#ifndef TORRENT_DISABLE_EXTENSIONS
|
||||
|
||||
#include "libtorrent/session.hpp"
|
||||
#include "libtorrent/hasher.hpp"
|
||||
#include "libtorrent/thread.hpp"
|
||||
|
@ -129,3 +131,7 @@ int test_main()
|
|||
return 0;
|
||||
}
|
||||
|
||||
#else
|
||||
int test_main() { return 0; }
|
||||
#endif // TORRENT_DISABLE_EXTENSIONS
|
||||
|
||||
|
|
Loading…
Reference in New Issue