fix msvc build issue
This commit is contained in:
parent
f0336017d1
commit
2fb1a0f3c7
|
@ -260,6 +260,8 @@ endif()
|
|||
if (WIN32)
|
||||
target_link_libraries(torrent-rasterbar wsock32 ws2_32)
|
||||
add_definitions(-D_WIN32_WINNT=0x0600)
|
||||
# prevent winsock1 to be included
|
||||
add_definitions(-DWIN32_LEAN_AND_MEAN)
|
||||
if (MSVC)
|
||||
set(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} /MP") # multicore compilation
|
||||
endif()
|
||||
|
|
|
@ -34,29 +34,6 @@ POSSIBILITY OF SUCH DAMAGE.
|
|||
#define TORRENT_PEER_CONNECTION_HPP_INCLUDED
|
||||
|
||||
#include "libtorrent/config.hpp"
|
||||
|
||||
#ifndef TORRENT_DISABLE_LOGGING
|
||||
#include "libtorrent/debug.hpp"
|
||||
#endif
|
||||
|
||||
#include "libtorrent/aux_/disable_warnings_push.hpp"
|
||||
|
||||
#include <ctime>
|
||||
#include <algorithm>
|
||||
#include <vector>
|
||||
#include <string>
|
||||
|
||||
#include <boost/smart_ptr.hpp>
|
||||
#include <boost/weak_ptr.hpp>
|
||||
#include <boost/noncopyable.hpp>
|
||||
#include <boost/array.hpp>
|
||||
#include <boost/optional.hpp>
|
||||
#include <boost/cstdint.hpp>
|
||||
#include <boost/pool/pool.hpp>
|
||||
#include <boost/aligned_storage.hpp>
|
||||
|
||||
#include "libtorrent/aux_/disable_warnings_pop.hpp"
|
||||
|
||||
#include "libtorrent/buffer.hpp"
|
||||
#include "libtorrent/peer_id.hpp"
|
||||
#include "libtorrent/stat.hpp"
|
||||
|
@ -83,6 +60,28 @@ POSSIBILITY OF SUCH DAMAGE.
|
|||
#include "libtorrent/io_service_fwd.hpp"
|
||||
#include "libtorrent/receive_buffer.hpp"
|
||||
|
||||
#ifndef TORRENT_DISABLE_LOGGING
|
||||
#include "libtorrent/debug.hpp"
|
||||
#endif
|
||||
|
||||
#include "libtorrent/aux_/disable_warnings_push.hpp"
|
||||
|
||||
#include <ctime>
|
||||
#include <algorithm>
|
||||
#include <vector>
|
||||
#include <string>
|
||||
|
||||
#include <boost/smart_ptr.hpp>
|
||||
#include <boost/weak_ptr.hpp>
|
||||
#include <boost/noncopyable.hpp>
|
||||
#include <boost/array.hpp>
|
||||
#include <boost/optional.hpp>
|
||||
#include <boost/cstdint.hpp>
|
||||
#include <boost/pool/pool.hpp>
|
||||
#include <boost/aligned_storage.hpp>
|
||||
|
||||
#include "libtorrent/aux_/disable_warnings_pop.hpp"
|
||||
|
||||
namespace libtorrent
|
||||
{
|
||||
class torrent;
|
||||
|
|
|
@ -988,7 +988,7 @@ namespace libtorrent
|
|||
int num_connect_candidates() const { return m_peer_list ? m_peer_list->num_connect_candidates() : 0; }
|
||||
|
||||
piece_manager& storage();
|
||||
bool has_storage() const { return m_storage.get(); }
|
||||
bool has_storage() const { return m_storage; }
|
||||
|
||||
torrent_info const& torrent_file() const
|
||||
{ return *m_torrent_file; }
|
||||
|
|
|
@ -1193,7 +1193,7 @@ void block_cache::insert_blocks(cached_piece_entry* pe, int block, file::iovec_t
|
|||
== m_deleted_storages.end());
|
||||
#endif
|
||||
|
||||
cache_hit(pe, j->requester, j->flags & disk_io_job::volatile_read);
|
||||
cache_hit(pe, j->requester, (j->flags & disk_io_job::volatile_read) != 0);
|
||||
|
||||
TORRENT_ASSERT(pe->in_use);
|
||||
|
||||
|
|
|
@ -30,6 +30,8 @@ POSSIBILITY OF SUCH DAMAGE.
|
|||
|
||||
*/
|
||||
|
||||
#include "libtorrent/config.hpp"
|
||||
|
||||
#include "libtorrent/aux_/disable_warnings_push.hpp"
|
||||
|
||||
#include <ctime>
|
||||
|
|
|
@ -31,15 +31,6 @@ POSSIBILITY OF SUCH DAMAGE.
|
|||
*/
|
||||
|
||||
#include "libtorrent/config.hpp"
|
||||
|
||||
#ifndef TORRENT_DISABLE_EXTENSIONS
|
||||
|
||||
#include "libtorrent/aux_/disable_warnings_push.hpp"
|
||||
|
||||
#include <boost/shared_ptr.hpp>
|
||||
|
||||
#include "libtorrent/aux_/disable_warnings_pop.hpp"
|
||||
|
||||
#include "libtorrent/peer_connection.hpp"
|
||||
#include "libtorrent/bt_peer_connection.hpp"
|
||||
#include "libtorrent/bencode.hpp"
|
||||
|
@ -58,6 +49,14 @@ POSSIBILITY OF SUCH DAMAGE.
|
|||
#include "libtorrent/lazy_entry.hpp"
|
||||
#endif
|
||||
|
||||
#ifndef TORRENT_DISABLE_EXTENSIONS
|
||||
|
||||
#include "libtorrent/aux_/disable_warnings_push.hpp"
|
||||
|
||||
#include <boost/shared_ptr.hpp>
|
||||
|
||||
#include "libtorrent/aux_/disable_warnings_pop.hpp"
|
||||
|
||||
namespace libtorrent { namespace
|
||||
{
|
||||
const char extension_name[] = "ut_pex";
|
||||
|
|
Loading…
Reference in New Issue