diff options
author | Nick Mathewson <nickm@torproject.org> | 2004-10-20 23:30:38 +0000 |
---|---|---|
committer | Nick Mathewson <nickm@torproject.org> | 2004-10-20 23:30:38 +0000 |
commit | 6899b8001a10ed67fbca527352cd49137854125f (patch) | |
tree | 8327c2344efb5282c2c60ae8b62b4e479df518f1 | |
parent | 820ad3c66aad34233b1ea59ce15c99dad8818c0b (diff) | |
download | tor-6899b8001a10ed67fbca527352cd49137854125f.tar tor-6899b8001a10ed67fbca527352cd49137854125f.tar.gz |
Check for low _MSC_VER, not high. On windows, always use winsock.
svn:r2575
-rw-r--r-- | src/common/util.h | 10 | ||||
-rw-r--r-- | src/or/or.h | 11 | ||||
-rw-r--r-- | src/or/test.c | 2 |
3 files changed, 12 insertions, 11 deletions
diff --git a/src/common/util.h b/src/common/util.h index 5ef3a413d..4d21f64bc 100644 --- a/src/common/util.h +++ b/src/common/util.h @@ -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; diff --git a/src/or/or.h b/src/or/or.h index a6dd45193..540520df7 100644 --- a/src/or/or.h +++ b/src/or/or.h @@ -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 diff --git a/src/or/test.c b/src/or/test.c index 745a8fedc..5eec99ed9 100644 --- a/src/or/test.c +++ b/src/or/test.c @@ -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); |