[pypy-svn] r18687 - pypy/dist/pypy/translator/c/src

afa at codespeak.net afa at codespeak.net
Sun Oct 16 15:01:54 CEST 2005


Author: afa
Date: Sun Oct 16 15:01:45 2005
New Revision: 18687

Modified:
   pypy/dist/pypy/translator/c/src/ll__socket.h
   pypy/dist/pypy/translator/c/src/thread_nt.h
Log:
Fix socket module compilation on windows

Modified: pypy/dist/pypy/translator/c/src/ll__socket.h
==============================================================================
--- pypy/dist/pypy/translator/c/src/ll__socket.h	(original)
+++ pypy/dist/pypy/translator/c/src/ll__socket.h	Sun Oct 16 15:01:45 2005
@@ -1,9 +1,8 @@
 
 #ifdef MS_WINDOWS
-    #include <winsock2.h>
-    #include <ws2tcpip.h>
+# pragma comment(lib, "ws2_32.lib")
 #else
-    #include <arpa/inet.h>
+# include <arpa/inet.h>
 #endif
 
 int LL__socket_ntohs(int htons);

Modified: pypy/dist/pypy/translator/c/src/thread_nt.h
==============================================================================
--- pypy/dist/pypy/translator/c/src/thread_nt.h	(original)
+++ pypy/dist/pypy/translator/c/src/thread_nt.h	Sun Oct 16 15:01:45 2005
@@ -4,6 +4,10 @@
 /* Fast NonRecursiveMutex support by Yakov Markovitch, markovitch at iso.ru */
 /* Eliminated some memory leaks, gsw at agere.com */
 
+/* Windows.h includes winsock.h, but the socket module needs */ 
+/* winsock2.h. So I include it before. Ugly. */
+#include <winsock2.h>
+
 #include <windows.h>
 #include <limits.h>
 #include <process.h>



More information about the Pypy-commit mailing list