diff options
author | Nick Mathewson <nickm@torproject.org> | 2008-12-30 04:16:49 +0000 |
---|---|---|
committer | Nick Mathewson <nickm@torproject.org> | 2008-12-30 04:16:49 +0000 |
commit | 52932d6f1a72b9cd3a0bd9571016fa763662d3d6 (patch) | |
tree | 29b3db3881b4bfb2bde2f1e79c6d9848088aaf5f /src/common/compat.c | |
parent | ffe22fab9b81f4b0dea35bc2fb756d4a60cf3ed3 (diff) | |
download | tor-52932d6f1a72b9cd3a0bd9571016fa763662d3d6.tar.gz tor-52932d6f1a72b9cd3a0bd9571016fa763662d3d6.zip |
Remove some code that is #ifdefed out, and that we no longer seem to use, if we ever did.
svn:r17827
Diffstat (limited to 'src/common/compat.c')
-rw-r--r-- | src/common/compat.c | 16 |
1 files changed, 4 insertions, 12 deletions
diff --git a/src/common/compat.c b/src/common/compat.c index d5de6f58e1..188c2a84fe 100644 --- a/src/common/compat.c +++ b/src/common/compat.c @@ -87,10 +87,6 @@ const char compat_c_id[] = #include <sys/file.h> #endif -#ifdef USE_BSOCKETS -#include <bsocket.h> -#endif - #include "log.h" #include "util.h" #include "container.h" @@ -630,9 +626,7 @@ tor_close_socket(int s) * tor_close_socket to close sockets, and always using close() on * files. */ -#ifdef USE_BSOCKETS - r = bclose(s); -#elif defined(MS_WINDOWS) +#if defined(MS_WINDOWS) r = closesocket(s); #else r = close(s); @@ -718,7 +712,7 @@ get_n_open_sockets(void) void set_socket_nonblocking(int socket) { -#if defined(MS_WINDOWS) && !defined(USE_BSOCKETS) +#if defined(MS_WINDOWS) unsigned long nonblocking = 1; ioctlsocket(socket, FIONBIO, (unsigned long*) &nonblocking); #else @@ -761,8 +755,6 @@ tor_socketpair(int family, int type, int protocol, int fd[2]) } } return r < 0 ? -errno : r; -#elif defined(USE_BSOCKETS) - return bsocketpair(family, type, protocol, fd); #else /* This socketpair does not work when localhost is down. So * it's really not the same thing at all. But it's close enough @@ -2082,7 +2074,7 @@ tor_threads_init(void) * should call tor_socket_errno <em>at most once</em> on the failing * socket to get the error. */ -#if defined(MS_WINDOWS) && !defined(USE_BSOCKETS) +#if defined(MS_WINDOWS) int tor_socket_errno(int sock) { @@ -2098,7 +2090,7 @@ tor_socket_errno(int sock) } #endif -#if defined(MS_WINDOWS) && !defined(USE_BSOCKETS) +#if defined(MS_WINDOWS) #define E(code, s) { code, (s " [" #code " ]") } struct { int code; const char *msg; } windows_socket_errors[] = { E(WSAEINTR, "Interrupted function call"), |