merged changes from RC_1_0

This commit is contained in:
Arvid Norberg 2014-11-30 10:07:19 +00:00
parent 95fbf93e52
commit 362b54421d
6 changed files with 38 additions and 8 deletions

View File

@ -3,8 +3,8 @@ test_dirs:
- test - test
features: features:
- variant=release asserts=production debug-symbols=on - variant=test_release
- encryption=openssl logging=verbose disk-stats=on dht=logging request-log=on allocator=debug debug-iterators=on - variant=test_debug
# all build_features are built in these directories # all build_features are built in these directories
build_dirs: build_dirs:
@ -20,7 +20,7 @@ build_features:
- asserts=off - asserts=off
- asserts=production debug - asserts=production debug
- asserts=on release - asserts=on release
- ipv6=off dht=off extensions=off logging=none deprecated-functions=off invariant-checks=off - variant=test_barebones
project: libtorrent project: libtorrent

21
Jamfile
View File

@ -440,6 +440,27 @@ feature.compose <profile-calls>on : <define>TORRENT_PROFILE_CALLS=1 ;
# libtorrent functions. Used for unit testing # libtorrent functions. Used for unit testing
feature export-extra : off on : composite propagated ; 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 # required for openssl on windows
lib ssleay32 : : <name>ssleay32 ; lib ssleay32 : : <name>ssleay32 ;
lib libeay32 : : <name>libeay32 ; lib libeay32 : : <name>libeay32 ;

View File

@ -34,7 +34,12 @@ POSSIBILITY OF SUCH DAMAGE.
#include "libtorrent/config.hpp" #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> #include <string>
std::string demangle(char const* name); std::string demangle(char const* name);
TORRENT_EXPORT void print_backtrace(char* out, int len, int max_depth = 0); TORRENT_EXPORT void print_backtrace(char* out, int len, int max_depth = 0);

View File

@ -34,6 +34,7 @@ POSSIBILITY OF SUCH DAMAGE.
#define TORRENT_SLIDING_AVERAGE_HPP_INCLUDED #define TORRENT_SLIDING_AVERAGE_HPP_INCLUDED
#include <boost/cstdint.hpp> #include <boost/cstdint.hpp>
#include <cstdlib> // for std::abs
namespace libtorrent namespace libtorrent
{ {
@ -52,7 +53,7 @@ struct sliding_average
int deviation; int deviation;
if (m_num_samples > 0) if (m_num_samples > 0)
deviation = abs(m_mean - s); deviation = std::abs(m_mean - s);
if (m_num_samples < inverted_gain) if (m_num_samples < inverted_gain)
++m_num_samples; ++m_num_samples;

View File

@ -181,9 +181,8 @@ namespace libtorrent
#undef PROT_WRITE #undef PROT_WRITE
#endif #endif
#if defined __linux__ || (defined __APPLE__ && MAC_OS_X_VERSION_MIN_REQUIRED >= 1050)
print_backtrace(h->stack, sizeof(h->stack)); print_backtrace(h->stack, sizeof(h->stack));
#endif
#endif // TORRENT_DEBUG_BUFFERS #endif // TORRENT_DEBUG_BUFFERS
#ifdef TORRENT_WINDOWS #ifdef TORRENT_WINDOWS

View File

@ -36,7 +36,11 @@ POSSIBILITY OF SUCH DAMAGE.
#include <boost/atomic.hpp> #include <boost/atomic.hpp>
#endif #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__ #ifdef __APPLE__
#include <AvailabilityMacros.h> #include <AvailabilityMacros.h>