From 6899b8001a10ed67fbca527352cd49137854125f Mon Sep 17 00:00:00 2001 From: Nick Mathewson Date: Wed, 20 Oct 2004 23:30:38 +0000 Subject: [PATCH] Check for low _MSC_VER, not high. On windows, always use winsock. svn:r2575 --- src/common/util.h | 10 +++++----- src/or/or.h | 11 ++++++----- 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 5ef3a413d0..4d21f64bc1 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 -#endif -#if _MSC_VER > 1300 +#else #include #include -#elif defined(_MSC_VER) -#include #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 a6dd45193b..540520df77 100644 --- a/src/or/or.h +++ b/src/or/or.h @@ -94,14 +94,15 @@ #ifdef HAVE_TIME_H #include #endif -#ifdef HAVE_WINSOCK_H + + +#ifdef MS_WINDOWS +#if (_MSC_VER <= 1300) #include -#endif -#if _MSC_VER > 1300 +#else #include #include -#elif defined(_MSC_VER) -#include +#endif #endif #ifdef MS_WINDOWS diff --git a/src/or/test.c b/src/or/test.c index 745a8fedc0..5eec99ed9e 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); -- 2.47.3