From: Nick Mathewson Date: Wed, 20 Oct 2004 23:30:38 +0000 (+0000) Subject: Check for low _MSC_VER, not high. On windows, always use winsock. X-Git-Tag: debian-version-0.0.8+0.0.9pre5-1~206 X-Git-Url: http://git.ipfire.org/gitweb.cgi?a=commitdiff_plain;h=6899b8001a10ed67fbca527352cd49137854125f;p=thirdparty%2Ftor.git Check for low _MSC_VER, not high. On windows, always use winsock. svn:r2575 --- 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);