summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorNick Mathewson <nickm@torproject.org>2004-05-02 20:23:35 +0000
committerNick Mathewson <nickm@torproject.org>2004-05-02 20:23:35 +0000
commit3dd1ef878364b7dee005d399076ff1da7118a748 (patch)
treedbd2a12be4a0d979b4edd68cbb136b09c355fa62
parentaf08c4f878827928109a59a257cd6681bca7d68c (diff)
downloadtor-3dd1ef878364b7dee005d399076ff1da7118a748.tar.gz
tor-3dd1ef878364b7dee005d399076ff1da7118a748.zip
Fix windows compile.
svn:r1776
-rw-r--r--src/common/fakepoll.c1
-rw-r--r--src/common/util.c12
2 files changed, 8 insertions, 5 deletions
diff --git a/src/common/fakepoll.c b/src/common/fakepoll.c
index 4fe10cdd3a..3051486b3a 100644
--- a/src/common/fakepoll.c
+++ b/src/common/fakepoll.c
@@ -26,6 +26,7 @@
#elif defined(_MSC_VER)
#include <winsock.h>
#endif
+#include <assert.h>
/* by default, windows handles only 64 fd's */
#if defined(MS_WINDOWS) && !defined(FD_SETSIZE)
diff --git a/src/common/util.c b/src/common/util.c
index 3ab2a9ae1c..eb02ee6ece 100644
--- a/src/common/util.c
+++ b/src/common/util.c
@@ -1116,7 +1116,7 @@ int tor_socket_errno(int sock)
*/
#ifdef MS_WINDOWS
#define E(code, s) { code, (s " [" #code " ]") }
-struct { int code; char *msg; } windows_socket_errors = {
+struct { int code; const char *msg; } windows_socket_errors[] = {
E(WSAEINTR, "Interrupted function call"),
E(WSAEACCES, "Permission denied"),
E(WSAEFAULT, "Bad address"),
@@ -1128,19 +1128,19 @@ struct { int code; char *msg; } windows_socket_errors = {
E(WSAENOTSOCK, "Socket operation on nonsocket"),
E(WSAEDESTADDRREQ, "Destination address required"),
E(WSAEMSGSIZE, "Message too long"),
- E(WASEPROTOTYPE, "Protocol wrong for socket"),
+ E(WSAEPROTOTYPE, "Protocol wrong for socket"),
E(WSAENOPROTOOPT, "Bad protocol option"),
E(WSAEPROTONOSUPPORT, "Protocol not supported"),
E(WSAESOCKTNOSUPPORT, "Socket type not supported"),
/* What's the difference between NOTSUPP and NOSUPPORT? :) */
- E(WASEOPNOTSUPP, "Operation not supported"),
+ E(WSAEOPNOTSUPP, "Operation not supported"),
E(WSAEPFNOSUPPORT, "Protocol family not supported"),
E(WSAEAFNOSUPPORT, "Address family not supported by protocol family"),
E(WSAEADDRINUSE, "Address already in use"),
E(WSAEADDRNOTAVAIL, "Cannot assign requested address"),
E(WSAENETDOWN, "Network is down"),
E(WSAENETUNREACH, "Network is unreachable"),
- E(WSAENETRESET, "Network dropped connection on reset")
+ E(WSAENETRESET, "Network dropped connection on reset"),
E(WSAECONNABORTED, "Software caused connection abort"),
E(WSAECONNRESET, "Connection reset by peer"),
E(WSAENOBUFS, "No buffer space avaialable"),
@@ -1156,8 +1156,10 @@ struct { int code; char *msg; } windows_socket_errors = {
E(WSASYSNOTREADY, "Network subsystem is unavailable"),
E(WSAVERNOTSUPPORTED, "Winsock.dll out of range"),
E(WSANOTINITIALISED, "Successful WSAStartup not yet performed"),
- E(WSAEDISCONN, "Graceful shutdown no in progress"),
+ E(WSAEDISCON, "Graceful shutdown now in progress"),
+#ifdef WSATYPE_NOT_FOUND
E(WSATYPE_NOT_FOUND, "Class type not found"),
+#endif
E(WSAHOST_NOT_FOUND, "Host not found"),
E(WSATRY_AGAIN, "Nonauthoritative host not found"),
E(WSANO_RECOVERY, "This is a nonrecoverable error"),