]> git.ipfire.org Git - thirdparty/tor.git/commitdiff
Fix windows compile.
authorNick Mathewson <nickm@torproject.org>
Sun, 2 May 2004 20:23:35 +0000 (20:23 +0000)
committerNick Mathewson <nickm@torproject.org>
Sun, 2 May 2004 20:23:35 +0000 (20:23 +0000)
svn:r1776

src/common/fakepoll.c
src/common/util.c

index 4fe10cdd3a6e01ca0ea3a2e5652652b5ff851bd7..3051486b3a7c9a076a840ff1aa020ffb8482c934 100644 (file)
@@ -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)
index 3ab2a9ae1cb3bc502e85f5d8e7f64a794c84d49b..eb02ee6ece0ce39636ecfb664c3d9a488f46c293 100644 (file)
@@ -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"),