From f795e8878912a16d0c9807197ac25384b1ab5b52 Mon Sep 17 00:00:00 2001 From: Alden Torres Date: Sat, 30 Jul 2016 18:03:06 -0400 Subject: [PATCH] don't define _WIN32_WINNT if not under windows --- Jamfile | 10 ++++++++-- test/setup_transfer.cpp | 3 --- test/setup_transfer.hpp | 1 - test/web_seed_suite.cpp | 3 +-- test/web_seed_suite.hpp | 1 - 5 files changed, 9 insertions(+), 9 deletions(-) diff --git a/Jamfile b/Jamfile index 4d9ea8640..d9a6d4a29 100644 --- a/Jamfile +++ b/Jamfile @@ -133,10 +133,10 @@ rule linking ( properties * ) result += gcrypt ; } - # socket functions on windows require winsock libraries if windows in $(properties) || cygwin in $(properties) { + # socket functions on windows require winsock libraries result += ws2_32 wsock32 iphlpapi @@ -152,6 +152,12 @@ rule linking ( properties * ) { result += advapi32 ; } + + # default to windows vista + if default in $(properties) + { + result += _WIN32_WINNT=0x0600 ; + } } if beos in $(properties) @@ -412,7 +418,7 @@ feature.compose on : TORRENT_USE_ASSERTS=1 ; feature.compose production : TORRENT_USE_ASSERTS=1 TORRENT_PRODUCTION_ASSERTS=1 ; feature.compose system : TORRENT_USE_ASSERTS=1 TORRENT_USE_SYSTEM_ASSERTS=1 ; -feature windows-version : vista win7 xp : composite propagated link-incompatible ; +feature windows-version : default vista win7 xp : composite propagated link-incompatible ; feature.compose vista : _WIN32_WINNT=0x0600 ; feature.compose win7 : _WIN32_WINNT=0x0601 ; feature.compose xp : _WIN32_WINNT=0x0501 ; diff --git a/test/setup_transfer.cpp b/test/setup_transfer.cpp index fd3c02ce5..2c7683f01 100644 --- a/test/setup_transfer.cpp +++ b/test/setup_transfer.cpp @@ -31,7 +31,6 @@ POSSIBILITY OF SUCH DAMAGE. */ #include -#include #include #include #include @@ -45,7 +44,6 @@ POSSIBILITY OF SUCH DAMAGE. #include "libtorrent/create_torrent.hpp" #include "libtorrent/socket_io.hpp" // print_endpoint #include "libtorrent/socket_type.hpp" -#include "libtorrent/instantiate_connection.hpp" #include "libtorrent/ip_filter.hpp" #include "libtorrent/session_stats.hpp" #include "libtorrent/random.hpp" @@ -1030,4 +1028,3 @@ libtorrent::address_v6 addr6(char const* ip) return ret; } #endif - diff --git a/test/setup_transfer.hpp b/test/setup_transfer.hpp index 8afd511f4..0424d2aba 100644 --- a/test/setup_transfer.hpp +++ b/test/setup_transfer.hpp @@ -119,4 +119,3 @@ EXPORT libtorrent::address_v6 addr6(char const* ip); #endif #endif - diff --git a/test/web_seed_suite.cpp b/test/web_seed_suite.cpp index 714075fb8..20b6e43f0 100644 --- a/test/web_seed_suite.cpp +++ b/test/web_seed_suite.cpp @@ -210,7 +210,7 @@ void test_transfer(lt::session& ses, boost::shared_ptr torrent_fil } else { - // if the web seed senr corrupt data and we banned it, we probably didn't + // if the web seed sent corrupt data and we banned it, we probably didn't // end up using all the cache anyway torrent_status st = th.status(); TEST_EQUAL(st.is_seeding, true); @@ -423,4 +423,3 @@ int EXPORT run_http_suite(int proxy, char const* protocol, bool test_url_seed stop_web_server(); return 0; } - diff --git a/test/web_seed_suite.hpp b/test/web_seed_suite.hpp index 27177cd20..b88b02a72 100644 --- a/test/web_seed_suite.hpp +++ b/test/web_seed_suite.hpp @@ -41,4 +41,3 @@ void EXPORT test_transfer(libtorrent::session& ses , int proxy = 0, char const* protocol = "http" , bool url_seed = true, bool chunked_encoding = false , bool test_ban = false, bool keepalive = true, bool proxy_peers = true); -