r11992@catbus: nickm | 2007-02-28 12:46:32 -0500

compile fix on mingw: mingw does not define _MSC_VER.


svn:r9682
This commit is contained in:
Nick Mathewson 2007-02-28 17:46:36 +00:00
parent deef370a1c
commit e1176ece5a
3 changed files with 3 additions and 3 deletions

View File

@ -13,7 +13,7 @@
#define WIN32_WINNT 0x400 #define WIN32_WINNT 0x400
#define _WIN32_WINNT 0x400 #define _WIN32_WINNT 0x400
#define WIN32_LEAN_AND_MEAN #define WIN32_LEAN_AND_MEAN
#if (_MSC_VER <= 1300) #if defined(_MSC_VER) && (_MSC_VER <= 1300)
#include <winsock.h> #include <winsock.h>
#else #else
#include <winsock2.h> #include <winsock2.h>

View File

@ -541,7 +541,7 @@ tor_parse_uint64(const char *s, int base, uint64_t min,
#ifdef HAVE_STRTOULL #ifdef HAVE_STRTOULL
r = (uint64_t)strtoull(s, &endptr, base); r = (uint64_t)strtoull(s, &endptr, base);
#elif defined(MS_WINDOWS) #elif defined(MS_WINDOWS)
#if _MSC_VER < 1300 #if defined(_MSC_VER) && _MSC_VER < 1300
tor_assert(base <= 10); tor_assert(base <= 10);
r = (uint64_t)_atoi64(s); r = (uint64_t)_atoi64(s);
endptr = (char*)s; endptr = (char*)s;

View File

@ -31,7 +31,7 @@
#endif #endif
#ifdef MS_WINDOWS #ifdef MS_WINDOWS
#if (_MSC_VER <= 1300) #if defined(_MSC_VER) && (_MSC_VER <= 1300)
#include <winsock.h> #include <winsock.h>
#else #else
#include <winsock2.h> #include <winsock2.h>