diff --git a/Jamfile b/Jamfile index 116ccb0e3..cbde085be 100755 --- a/Jamfile +++ b/Jamfile @@ -151,7 +151,8 @@ rule linking ( properties * ) result += tcmalloc ; } - if gcc in $(properties) + if ( gcc in $(properties) + || clang in $(properties) ) && linux in $(properties) && ( debug in $(properties) || on in $(properties) @@ -162,7 +163,7 @@ rule linking ( properties * ) { # for backtraces in assertion failures # which only works on ELF targets with gcc - result += -export-dynamic -rdynamic ; + result += -export-dynamic -rdynamic ; } if source in $(properties) diff --git a/include/libtorrent/config.hpp b/include/libtorrent/config.hpp index 0e64e3cc1..c076914a8 100644 --- a/include/libtorrent/config.hpp +++ b/include/libtorrent/config.hpp @@ -226,7 +226,8 @@ POSSIBILITY OF SUCH DAMAGE. #define TORRENT_HAVE_FDATASYNC 1 #endif // ANDROID -#if __amd64__ || __i386__ +#if defined _GLIBC_ && ( defined __x86_64__ || defined __i386 \ + || defined _M_X64 || defined _M_IX86 ) #define TORRENT_USE_EXECINFO 1 #endif @@ -275,7 +276,7 @@ POSSIBILITY OF SUCH DAMAGE. #define TORRENT_USE_PWRITEV 1 // ==== SOLARIS === -#elif defined sun || defined __sun +#elif defined sun || defined __sun #define TORRENT_SOLARIS #define TORRENT_COMPLETE_TYPES_REQUIRED 1 #define TORRENT_USE_IFCONF 1 diff --git a/src/assert.cpp b/src/assert.cpp index 6e2e58cd5..3857aa9e3 100644 --- a/src/assert.cpp +++ b/src/assert.cpp @@ -207,7 +207,10 @@ TORRENT_EXPORT void print_backtrace(char* out, int len, int max_depth) #else TORRENT_EXPORT void print_backtrace(char* out, int len, int max_depth) -{ out[0] = 0; } +{ + out[0] = 0; + strncat(out, "", len) +} #endif diff --git a/test/main.cpp b/test/main.cpp index f2082e4ce..0062ad380 100644 --- a/test/main.cpp +++ b/test/main.cpp @@ -102,6 +102,7 @@ void sig_handler(int sig) strcat(stack_text, __FUNCTION__); #else stack_text[0] = 0; + strcat(stack_text, ""); #endif char const* sig_name = 0; switch (sig) @@ -125,7 +126,7 @@ void sig_handler(int sig) output_test_log_to_terminal(); - exit(138); + exit(128 + sig); } void print_usage(char const* executable) diff --git a/test/test_http_connection.cpp b/test/test_http_connection.cpp index c4a82eedc..5699693af 100644 --- a/test/test_http_connection.cpp +++ b/test/test_http_connection.cpp @@ -135,7 +135,7 @@ void run_test(std::string const& url, int size, int status, int connected std::cerr << time_now_string() << " expected-size: " << size << std::endl; std::cerr << time_now_string() << " error_code: " << g_error_code.message() << std::endl; TEST_CHECK(connect_handler_called == connected); - TEST_CHECK(handler_called == 1); + TEST_CHECK(handler_called == 1); TEST_CHECK(data_size == size || size == -1); TEST_CHECK(!ec || g_error_code == *ec); TEST_CHECK(http_status == status || status == -1);