mirror of
https://gitlab.torproject.org/tpo/core/tor.git
synced 2024-12-06 19:41:15 +01:00
Check for low _MSC_VER, not high. On windows, always use winsock.
svn:r2575
This commit is contained in:
@@ -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;
|
||||
|
||||
+6
-5
@@ -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
|
||||
|
||||
+1
-1
@@ -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);
|
||||
|
||||
Reference in New Issue
Block a user