Use a 64-bit type to hold sockets on win64.
commitcfeafe5e77c9dd5587b1ec553eb1065f0bf841fd
authorNick Mathewson <nickm@torproject.org>
Mon, 23 May 2011 04:17:48 +0000 (23 00:17 -0400)
committerNick Mathewson <nickm@torproject.org>
Mon, 23 May 2011 04:17:48 +0000 (23 00:17 -0400)
treef720f8ec3f8dcc065ea47b2c10c1e2885403e082
parent1ba1bdee4bd8f3c00e603fe9b0fd2f14eeb60466
Use a 64-bit type to hold sockets on win64.

On win64, sockets are of type UINT_PTR; on win32 they're u_int;
elsewhere they're int.  The correct windows way to check a socket for
being set is to compare it with INVALID_SOCKET; elsewhere you see if
it is negative.

On Libevent 2, all callbacks take sockets as evutil_socket_t; we've
been passing them int.

This patch should fix compilation and correctness when built for
64-bit windows.  Fixes bug 3270.
16 files changed:
changes/bug3270 [new file with mode: 0644]
src/common/compat.c
src/common/compat.h
src/common/compat_libevent.h
src/common/util.c
src/common/util.h
src/or/buffers.c
src/or/buffers.h
src/or/connection.c
src/or/control.c
src/or/cpuworker.c
src/or/dnsserv.c
src/or/eventdns.c
src/or/eventdns.h
src/or/main.c
src/or/or.h