Browse Source

r11992@catbus: nickm | 2007-02-28 12:46:32 -0500
compile fix on mingw: mingw does not define _MSC_VER.


svn:r9682

Nick Mathewson 17 years ago
parent
commit
e1176ece5a
3 changed files with 3 additions and 3 deletions
  1. 1 1
      src/common/compat.h
  2. 1 1
      src/common/util.c
  3. 1 1
      src/tools/tor-resolve.c

+ 1 - 1
src/common/compat.h

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

+ 1 - 1
src/common/util.c

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

+ 1 - 1
src/tools/tor-resolve.c

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