[Author Prev][Author Next][Thread Prev][Thread Next][Author Index][Thread Index]
[tor-commits] [tor/release-0.2.2] Fix SOCKET_OK test on win64.
commit dd4b1a2ac605ff53c0eda4ebf44ddd84c3b243c0
Author: Nick Mathewson <nickm@xxxxxxxxxxxxxx>
Date: Wed Jan 18 10:47:22 2012 -0500
Fix SOCKET_OK test on win64.
Bugfix on 0.2.2.29-beta; partial fix for 4533; found by wanoskarnet
---
changes/bug4533_part2 | 5 +++++
src/common/compat.h | 2 +-
2 files changed, 6 insertions(+), 1 deletions(-)
diff --git a/changes/bug4533_part2 b/changes/bug4533_part2
new file mode 100644
index 0000000..7e0f7c3
--- /dev/null
+++ b/changes/bug4533_part2
@@ -0,0 +1,5 @@
+ o Major bugfixes:
+ - Fix the SOCKET_OK test that we use to tell when socket
+ creation fails so that it works on Win64. Fixes part of bug
+ 4533; bugfix on 0.2.2.29-beta. Bug found by wanoskarnet.
+
diff --git a/src/common/compat.h b/src/common/compat.h
index e0b074c..d2f1fd1 100644
--- a/src/common/compat.h
+++ b/src/common/compat.h
@@ -396,7 +396,7 @@ typedef int socklen_t;
#ifdef MS_WINDOWS
#define tor_socket_t intptr_t
-#define SOCKET_OK(s) ((unsigned)(s) != INVALID_SOCKET)
+#define SOCKET_OK(s) ((SOCKET)(s) != INVALID_SOCKET)
#else
#define tor_socket_t int
#define SOCKET_OK(s) ((s) >= 0)
_______________________________________________
tor-commits mailing list
tor-commits@xxxxxxxxxxxxxxxxxxxx
https://lists.torproject.org/cgi-bin/mailman/listinfo/tor-commits