diff options
author | Nick Mathewson <nickm@torproject.org> | 2003-08-12 08:18:13 +0000 |
---|---|---|
committer | Nick Mathewson <nickm@torproject.org> | 2003-08-12 08:18:13 +0000 |
commit | bbd4032fc14fb23edf7633382ed26788523ac728 (patch) | |
tree | b750c6470d44414897d7a977ed14c7f6ba809d6f /src/common/util.c | |
parent | 25c9c837eb6fde0e7a6ef84b76602450e5672d53 (diff) | |
download | tor-bbd4032fc14fb23edf7633382ed26788523ac728.tar.gz tor-bbd4032fc14fb23edf7633382ed26788523ac728.zip |
Make windows happier still
svn:r392
Diffstat (limited to 'src/common/util.c')
-rw-r--r-- | src/common/util.c | 15 |
1 files changed, 15 insertions, 0 deletions
diff --git a/src/common/util.c b/src/common/util.c index c313fb5db8..378612d10e 100644 --- a/src/common/util.c +++ b/src/common/util.c @@ -3,6 +3,13 @@ /* $Id$ */ #include "../or/or.h" + +#ifdef _MSC_VER +#include <io.h> +#include <limits.h> +#include <process.h> +#endif + #include "util.h" #include "log.h" @@ -146,7 +153,11 @@ tor_socketpair(int family, int type, int protocol, int fd[2]) || family != AF_UNIX #endif ) { +#ifdef _MSC_VER + errno = WSAEAFNOSUPPORT; +#else errno = EAFNOSUPPORT; +#endif return -1; } if (!fd) { @@ -202,7 +213,11 @@ tor_socketpair(int family, int type, int protocol, int fd[2]) return 0; abort_tidy_up_and_fail: +#ifdef _MSC_VER + errno = WSAECONNABORTED; +#else errno = ECONNABORTED; /* I hope this is portable and appropriate. */ +#endif tidy_up_and_fail: { int save_errno = errno; |