[or-cvs] Check for low _MSC_VER, not high. On windows, always use w...

Nick Mathewson nickm at seul.org
Wed Oct 20 23:30:40 UTC 2004


Update of /home/or/cvsroot/src/or
In directory moria.mit.edu:/tmp/cvs-serv9358/src/or

Modified Files:
	or.h test.c 
Log Message:
Check for low _MSC_VER, not high.  On windows, always use winsock.

Index: or.h
===================================================================
RCS file: /home/or/cvsroot/src/or/or.h,v
retrieving revision 1.441
retrieving revision 1.442
diff -u -d -r1.441 -r1.442
--- or.h	19 Oct 2004 18:19:59 -0000	1.441
+++ or.h	20 Oct 2004 23:30:38 -0000	1.442
@@ -94,14 +94,15 @@
 #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: test.c
===================================================================
RCS file: /home/or/cvsroot/src/or/test.c,v
retrieving revision 1.132
retrieving revision 1.133
diff -u -d -r1.132 -r1.133
--- test.c	19 Oct 2004 18:19:59 -0000	1.132
+++ test.c	20 Oct 2004 23:30:38 -0000	1.133
@@ -51,7 +51,7 @@
   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);



More information about the tor-commits mailing list