From 8b0527b72d767c71d2a51418a9dc878eb6295419 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 --- trunk/src/common/util.h | 10 +++++----- trunk/src/or/or.h | 11 ++++++----- trunk/src/or/test.c | 2 +- 3 files changed, 12 insertions(+), 11 deletions(-) diff --git a/trunk/src/common/util.h b/trunk/src/common/util.h index 5ef3a413d0..4d21f64bc1 100644 --- a/trunk/src/common/util.h +++ b/trunk/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/trunk/src/or/or.h b/trunk/src/or/or.h index a6dd45193b..540520df77 100644 --- a/trunk/src/or/or.h +++ b/trunk/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/trunk/src/or/test.c b/trunk/src/or/test.c index 745a8fedc0..5eec99ed9e 100644 --- a/trunk/src/or/test.c +++ b/trunk/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);