don't define _WIN32_WINNT if not under windows

This commit is contained in:
Alden Torres 2016-07-30 18:03:06 -04:00
parent 0126f6f2c6
commit f795e88789
5 changed files with 9 additions and 9 deletions

10
Jamfile
View File

@ -133,10 +133,10 @@ rule linking ( properties * )
result += <library>gcrypt ;
}
# socket functions on windows require winsock libraries
if <target-os>windows in $(properties)
|| <target-os>cygwin in $(properties)
{
# socket functions on windows require winsock libraries
result += <library>ws2_32
<library>wsock32
<library>iphlpapi
@ -152,6 +152,12 @@ rule linking ( properties * )
{
result += <library>advapi32 ;
}
# default to windows vista
if <windows-version>default in $(properties)
{
result += <define>_WIN32_WINNT=0x0600 ;
}
}
if <target-os>beos in $(properties)
@ -412,7 +418,7 @@ feature.compose <asserts>on : <define>TORRENT_USE_ASSERTS=1 ;
feature.compose <asserts>production : <define>TORRENT_USE_ASSERTS=1 <define>TORRENT_PRODUCTION_ASSERTS=1 ;
feature.compose <asserts>system : <define>TORRENT_USE_ASSERTS=1 <define>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 <windows-version>vista : <define>_WIN32_WINNT=0x0600 ;
feature.compose <windows-version>win7 : <define>_WIN32_WINNT=0x0601 ;
feature.compose <windows-version>xp : <define>_WIN32_WINNT=0x0501 ;

View File

@ -31,7 +31,6 @@ POSSIBILITY OF SUCH DAMAGE.
*/
#include <fstream>
#include <deque>
#include <map>
#include <tuple>
#include <functional>
@ -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

View File

@ -119,4 +119,3 @@ EXPORT libtorrent::address_v6 addr6(char const* ip);
#endif
#endif

View File

@ -210,7 +210,7 @@ void test_transfer(lt::session& ses, boost::shared_ptr<torrent_info> 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;
}

View File

@ -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);