forked from premiere/premiere-libtorrent
merged changes from RC_1_0
This commit is contained in:
parent
95fbf93e52
commit
362b54421d
|
@ -3,8 +3,8 @@ test_dirs:
|
|||
- test
|
||||
|
||||
features:
|
||||
- variant=release asserts=production debug-symbols=on
|
||||
- encryption=openssl logging=verbose disk-stats=on dht=logging request-log=on allocator=debug debug-iterators=on
|
||||
- variant=test_release
|
||||
- variant=test_debug
|
||||
|
||||
# all build_features are built in these directories
|
||||
build_dirs:
|
||||
|
@ -20,7 +20,7 @@ build_features:
|
|||
- asserts=off
|
||||
- asserts=production debug
|
||||
- asserts=on release
|
||||
- ipv6=off dht=off extensions=off logging=none deprecated-functions=off invariant-checks=off
|
||||
- variant=test_barebones
|
||||
|
||||
project: libtorrent
|
||||
|
||||
|
|
21
Jamfile
21
Jamfile
|
@ -440,6 +440,27 @@ feature.compose <profile-calls>on : <define>TORRENT_PROFILE_CALLS=1 ;
|
|||
# libtorrent functions. Used for unit testing
|
||||
feature export-extra : off on : composite propagated ;
|
||||
|
||||
|
||||
# this is a trick to get filename paths to targets to become shorter
|
||||
# making it possible to build on windows, especially mingw seems particular
|
||||
variant test_release
|
||||
: release : <asserts>production <debug-symbols>on
|
||||
<invariant-checks>full <boost-link>shared
|
||||
<export-extra>on <debug-iterators>on <boost>source <threading>multi
|
||||
;
|
||||
variant test_debug : debug
|
||||
: <encryption>openssl <logging>verbose <disk-stats>on
|
||||
<dht>logging <request-log>on <allocator>debug <debug-iterators>on
|
||||
<invariant-checks>full <boost-link>shared
|
||||
<export-extra>on <debug-iterators>on <boost>source <threading>multi
|
||||
;
|
||||
variant test_barebones : debug
|
||||
: <ipv6>off <dht>off <extensions>off <logging>none <boost-link>shared
|
||||
<deprecated-functions>off <invariant-checks>off
|
||||
<export-extra>on <debug-iterators>on <boost>source <threading>multi
|
||||
;
|
||||
|
||||
|
||||
# required for openssl on windows
|
||||
lib ssleay32 : : <name>ssleay32 ;
|
||||
lib libeay32 : : <name>libeay32 ;
|
||||
|
|
|
@ -34,7 +34,12 @@ POSSIBILITY OF SUCH DAMAGE.
|
|||
|
||||
#include "libtorrent/config.hpp"
|
||||
|
||||
#if defined TORRENT_DEBUG || defined TORRENT_ASIO_DEBUGGING || TORRENT_RELEASE_ASSERTS
|
||||
#if (defined TORRENT_DEBUG && !TORRENT_NO_ASSERTS) \
|
||||
|| defined TORRENT_ASIO_DEBUGGING \
|
||||
|| defined TORRENT_PROFILE_CALLS \
|
||||
|| TORRENT_RELEASE_ASSERTS \
|
||||
|| defined TORRENT_DEBUG_BUFFERS
|
||||
|
||||
#include <string>
|
||||
std::string demangle(char const* name);
|
||||
TORRENT_EXPORT void print_backtrace(char* out, int len, int max_depth = 0);
|
||||
|
|
|
@ -34,6 +34,7 @@ POSSIBILITY OF SUCH DAMAGE.
|
|||
#define TORRENT_SLIDING_AVERAGE_HPP_INCLUDED
|
||||
|
||||
#include <boost/cstdint.hpp>
|
||||
#include <cstdlib> // for std::abs
|
||||
|
||||
namespace libtorrent
|
||||
{
|
||||
|
@ -52,7 +53,7 @@ struct sliding_average
|
|||
int deviation;
|
||||
|
||||
if (m_num_samples > 0)
|
||||
deviation = abs(m_mean - s);
|
||||
deviation = std::abs(m_mean - s);
|
||||
|
||||
if (m_num_samples < inverted_gain)
|
||||
++m_num_samples;
|
||||
|
|
|
@ -181,9 +181,8 @@ namespace libtorrent
|
|||
#undef PROT_WRITE
|
||||
#endif
|
||||
|
||||
#if defined __linux__ || (defined __APPLE__ && MAC_OS_X_VERSION_MIN_REQUIRED >= 1050)
|
||||
print_backtrace(h->stack, sizeof(h->stack));
|
||||
#endif
|
||||
|
||||
#endif // TORRENT_DEBUG_BUFFERS
|
||||
|
||||
#ifdef TORRENT_WINDOWS
|
||||
|
|
|
@ -36,7 +36,11 @@ POSSIBILITY OF SUCH DAMAGE.
|
|||
#include <boost/atomic.hpp>
|
||||
#endif
|
||||
|
||||
#if (defined TORRENT_DEBUG && !TORRENT_NO_ASSERTS) || defined TORRENT_ASIO_DEBUGGING || defined TORRENT_PROFILE_CALLS || TORRENT_RELEASE_ASSERTS
|
||||
#if (defined TORRENT_DEBUG && !TORRENT_NO_ASSERTS) \
|
||||
|| defined TORRENT_ASIO_DEBUGGING \
|
||||
|| defined TORRENT_PROFILE_CALLS \
|
||||
|| TORRENT_RELEASE_ASSERTS \
|
||||
|| defined TORRENT_DEBUG_BUFFERS
|
||||
|
||||
#ifdef __APPLE__
|
||||
#include <AvailabilityMacros.h>
|
||||
|
|
Loading…
Reference in New Issue