[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/common
In directory moria.mit.edu:/tmp/cvs-serv9358/src/common

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

Index: util.h
===================================================================
RCS file: /home/or/cvsroot/src/common/util.h,v
retrieving revision 1.103
retrieving revision 1.104
diff -u -d -r1.103 -r1.104
--- util.h	20 Oct 2004 23:23:53 -0000	1.103
+++ util.h	20 Oct 2004 23:30:37 -0000	1.104
@@ -24,15 +24,15 @@
 #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;



More information about the tor-commits mailing list