]> git.ipfire.org Git - thirdparty/tor.git/commitdiff
Check for low _MSC_VER, not high. On windows, always use winsock.
authorNick Mathewson <nickm@torproject.org>
Wed, 20 Oct 2004 23:30:38 +0000 (23:30 +0000)
committerNick Mathewson <nickm@torproject.org>
Wed, 20 Oct 2004 23:30:38 +0000 (23:30 +0000)
svn:r2575

src/common/util.h
src/or/or.h
src/or/test.c

index 5ef3a413d08c5bf1108594f551168ab91f1e6fef..4d21f64bc19818dd70bd4e6b06a0102c4014e010 100644 (file)
 #error "It seems your platform does not represent NULL as zero. We can't cope."
 #endif
 
-#ifdef HAVE_WINSOCK_H
+#ifdef MS_WINDOWS
+#if (_MSC_VER <= 1300)
 #include <winsock.h>
-#endif
-#if _MSC_VER > 1300
+#else
 #include <winsock2.h>
 #include <ws2tcpip.h>
-#elif defined(_MSC_VER)
-#include <winsock.h>
 #endif
+#endif
+
 #if !defined(HAVE_GETTIMEOFDAY) && !defined(HAVE_STRUCT_TIMEVAL_TV_SEC)
 struct timeval {
   time_t tv_sec;
index a6dd45193b2a906f44e00b31f19905bba786b0d1..540520df77b1f8aec5d864c9c6b87c1fbc715128 100644 (file)
 #ifdef HAVE_TIME_H
 #include <time.h>
 #endif
-#ifdef HAVE_WINSOCK_H
+
+
+#ifdef MS_WINDOWS
+#if (_MSC_VER <= 1300)
 #include <winsock.h>
-#endif
-#if _MSC_VER > 1300
+#else
 #include <winsock2.h>
 #include <ws2tcpip.h>
-#elif defined(_MSC_VER)
-#include <winsock.h>
+#endif
 #endif
 
 #ifdef MS_WINDOWS
index 745a8fedc00322dbea20c0289e3f24f42d605267..5eec99ed9eb78e2422d5747f43dc6debf7f3a665 100644 (file)
@@ -51,7 +51,7 @@ setup_directory()
   if (is_setup) return;
 
   sprintf(temp_dir, "/tmp/tor_test_%d", (int) getpid());
-#ifdef _MSC_VER
+#ifdef MS_WINDOWS
   r = mkdir(temp_dir);
 #else
   r = mkdir(temp_dir, 0700);