[or-cvs] r9682: compile fix on mingw: mingw does not define _MSC_VER. (in tor/trunk: . src/common src/tools)

nickm at seul.org nickm at seul.org
Wed Feb 28 17:46:39 UTC 2007


Author: nickm
Date: 2007-02-28 12:46:36 -0500 (Wed, 28 Feb 2007)
New Revision: 9682

Modified:
   tor/trunk/
   tor/trunk/src/common/compat.h
   tor/trunk/src/common/util.c
   tor/trunk/src/tools/tor-resolve.c
Log:
 r11992 at catbus:  nickm | 2007-02-28 12:46:32 -0500
 compile fix on mingw: mingw does not define _MSC_VER.



Property changes on: tor/trunk
___________________________________________________________________
 svk:merge ticket from /tor/trunk [r11992] on 8246c3cf-6607-4228-993b-4d95d33730f1

Modified: tor/trunk/src/common/compat.h
===================================================================
--- tor/trunk/src/common/compat.h	2007-02-28 17:34:07 UTC (rev 9681)
+++ tor/trunk/src/common/compat.h	2007-02-28 17:46:36 UTC (rev 9682)
@@ -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>

Modified: tor/trunk/src/common/util.c
===================================================================
--- tor/trunk/src/common/util.c	2007-02-28 17:34:07 UTC (rev 9681)
+++ tor/trunk/src/common/util.c	2007-02-28 17:46:36 UTC (rev 9682)
@@ -541,7 +541,7 @@
 #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;

Modified: tor/trunk/src/tools/tor-resolve.c
===================================================================
--- tor/trunk/src/tools/tor-resolve.c	2007-02-28 17:34:07 UTC (rev 9681)
+++ tor/trunk/src/tools/tor-resolve.c	2007-02-28 17:46:36 UTC (rev 9682)
@@ -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>



More information about the tor-commits mailing list