diff --git a/include/libtorrent/config.hpp b/include/libtorrent/config.hpp index 91ebe9841..e74ec158e 100644 --- a/include/libtorrent/config.hpp +++ b/include/libtorrent/config.hpp @@ -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 diff --git a/src/crc32c.cpp b/src/crc32c.cpp index 6fdff9e43..087f9e3ab 100644 --- a/src/crc32c.cpp +++ b/src/crc32c.cpp @@ -36,7 +36,7 @@ POSSIBILITY OF SUCH DAMAGE. #include "libtorrent/aux_/disable_warnings_push.hpp" #include -#ifdef _MSC_VER +#if (defined _MSC_VER && _MSC_VER >= 1600) #include #endif diff --git a/src/storage.cpp b/src/storage.cpp index 7511c4a45..97b00b3a1 100644 --- a/src/storage.cpp +++ b/src/storage.cpp @@ -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 { diff --git a/src/thread.cpp b/src/thread.cpp index 3dc2726b7..eec8c10b2 100644 --- a/src/thread.cpp +++ b/src/thread.cpp @@ -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);