fix msvc-8.0 build (#860)

This commit is contained in:
terry zhao 2016-06-28 01:46:15 +08:00 committed by Arvid Norberg
parent b97ac65c01
commit 1a3e75b50a
4 changed files with 5 additions and 9 deletions

View File

@ -697,7 +697,7 @@ int snprintf(char* buf, int len, char const* fmt, ...)
#if (defined _M_AMD64 || defined _M_IX86 || defined _M_X64 \
|| defined __amd64__ || defined __i386 || defined __i386__ \
|| defined __x86_64__ || defined __x86_64) \
&& (defined __GNUC__ || defined _MSC_VER)
&& (defined __GNUC__ || (defined _MSC_VER && _MSC_VER >= 1600))
#define TORRENT_HAS_SSE 1
#else
#define TORRENT_HAS_SSE 0

View File

@ -36,7 +36,7 @@ POSSIBILITY OF SUCH DAMAGE.
#include "libtorrent/aux_/disable_warnings_push.hpp"
#include <boost/crc.hpp>
#ifdef _MSC_VER
#if (defined _MSC_VER && _MSC_VER >= 1600)
#include <nmmintrin.h>
#endif

View File

@ -230,9 +230,7 @@ namespace libtorrent
, m_flags(flags)
{}
int file_op(int const file_index
, boost::int64_t const file_offset
, int const size
int file_op(int file_index, boost::int64_t file_offset, int size
, file::iovec_t const* bufs, storage_error& ec)
TORRENT_OVERRIDE TORRENT_FINAL
{
@ -321,9 +319,7 @@ namespace libtorrent
, m_flags(flags)
{}
int file_op(int const file_index
, boost::int64_t const file_offset
, int const size
int file_op(int file_index, boost::int64_t file_offset, int size
, file::iovec_t const* bufs, storage_error& ec)
TORRENT_OVERRIDE TORRENT_FINAL
{

View File

@ -105,7 +105,7 @@ namespace libtorrent
condition_variable::condition_variable()
: m_num_waiters(0)
{
#if _WIN32_WINNT == 0x0501
#if _WIN32_WINNT <= 0x0501
m_sem = CreateSemaphore(0, 0, INT_MAX, 0);
#else
m_sem = CreateSemaphoreEx(0, 0, INT_MAX, 0, 0, SEMAPHORE_ALL_ACCESS);