using _WIN32 appears safer than WIN32
This commit is contained in:
parent
0ce5a4c664
commit
98eabc63e9
|
@ -1681,7 +1681,7 @@ int main(int argc, char* argv[])
|
|||
|
||||
int tick = 0;
|
||||
|
||||
#ifndef WIN32
|
||||
#ifndef _WIN32
|
||||
signal(SIGTERM, signal_handler);
|
||||
signal(SIGINT, signal_handler);
|
||||
#endif
|
||||
|
@ -1725,7 +1725,7 @@ int main(int argc, char* argv[])
|
|||
if (c == ESCAPE_SEQ)
|
||||
{
|
||||
// escape code, read another character
|
||||
#ifdef WIN32
|
||||
#ifdef _WIN32
|
||||
int c = _getch();
|
||||
#else
|
||||
int c = getc(stdin);
|
||||
|
|
|
@ -265,7 +265,7 @@ POSSIBILITY OF SUCH DAMAGE.
|
|||
#define TORRENT_USE_PWRITEV 1
|
||||
|
||||
// ==== WINDOWS ===
|
||||
#elif defined WIN32
|
||||
#elif defined _WIN32
|
||||
#define TORRENT_WINDOWS
|
||||
#ifndef TORRENT_USE_GETIPFORWARDTABLE
|
||||
# define TORRENT_USE_GETIPFORWARDTABLE 1
|
||||
|
|
|
@ -141,7 +141,7 @@ namespace libtorrent
|
|||
|
||||
struct type_of_service
|
||||
{
|
||||
#ifdef WIN32
|
||||
#ifdef _WIN32
|
||||
typedef DWORD tos_t;
|
||||
#else
|
||||
typedef int tos_t;
|
||||
|
|
|
@ -99,7 +99,7 @@ std::string demangle(char const* name)
|
|||
free(unmangled);
|
||||
return ret;
|
||||
}
|
||||
#elif defined WIN32
|
||||
#elif defined _WIN32
|
||||
|
||||
#include "windows.h"
|
||||
#include "dbghelp.h"
|
||||
|
@ -142,7 +142,7 @@ TORRENT_EXPORT void print_backtrace(char* out, int len, int max_depth)
|
|||
}
|
||||
|
||||
// visual studio 9 and up appears to support this
|
||||
#elif defined WIN32 && _MSC_VER >= 1500
|
||||
#elif defined _WIN32 && _MSC_VER >= 1500
|
||||
|
||||
#include "windows.h"
|
||||
#include "libtorrent/utf8.hpp"
|
||||
|
|
|
@ -282,7 +282,7 @@ namespace libtorrent { namespace dht
|
|||
if (ec == boost::asio::error::connection_refused
|
||||
|| ec == boost::asio::error::connection_reset
|
||||
|| ec == boost::asio::error::connection_aborted
|
||||
#ifdef WIN32
|
||||
#ifdef _WIN32
|
||||
|| ec == error_code(ERROR_HOST_UNREACHABLE, system_category())
|
||||
|| ec == error_code(ERROR_PORT_UNREACHABLE, system_category())
|
||||
|| ec == error_code(ERROR_CONNECTION_REFUSED, system_category())
|
||||
|
|
|
@ -482,7 +482,7 @@ void udp_socket::on_read_impl(udp::endpoint const& ep
|
|||
&& e != boost::asio::error::operation_aborted
|
||||
&& e != boost::asio::error::network_reset
|
||||
&& e != boost::asio::error::network_unreachable
|
||||
#ifdef WIN32
|
||||
#ifdef _WIN32
|
||||
// ERROR_MORE_DATA means the same thing as EMSGSIZE
|
||||
&& e != error_code(ERROR_MORE_DATA, system_category())
|
||||
&& e != error_code(ERROR_HOST_UNREACHABLE, system_category())
|
||||
|
|
Loading…
Reference in New Issue