WSARecvEx fix
Francois Gouget
fgouget at free.fr
Wed Sep 12 17:53:50 CDT 2001
Just like we have big problems with socket, we have a big problem
with recv. WSARecvEx was implemented as follows:
INT WINAPI WSARecvEx(SOCKET s, char *buf, INT len, INT *flags)
{
FIXME("(WSARecvEx) partial packet return value not set \n");
return recv(s, buf, len, *flags);
}
But the prototype for recv was the one from the Unix headers, cdecl
instead of stdcall, plus we are passing a SOCKET and not a Unix file
descriptor!!!
The right fix is to fully reimplement wsock32 in terms of calls to
ws2_32 and make no reference to the Unix sockets anymore. But until then
the following patch will have to do.
Changelog:
* dlls/wsock32/socket.c
Fix recv prototype for WSARecvEx
--
Francois Gouget fgouget at free.fr http://fgouget.free.fr/
Linux, WinNT, MS-DOS - also known as the Good, the Bad and the Ugly.
-------------- next part --------------
Index: dlls/wsock32/socket.c
===================================================================
RCS file: /home/wine/wine/dlls/wsock32/socket.c,v
retrieving revision 1.13
diff -u -r1.13 socket.c
--- dlls/wsock32/socket.c 2001/07/11 18:56:45 1.13
+++ dlls/wsock32/socket.c 2001/09/12 18:22:56
@@ -17,6 +17,7 @@
Until that happens we need this hack.
*/
#define socket linux_socket
+#define recv linux_recv
/* */
#include "config.h"
@@ -49,7 +50,9 @@
/* FIXME: The rest of the socket() cdecl<->stdapi stack corruption problem
discussed above. */
#undef socket
+#undef recv
extern SOCKET WINAPI socket(INT af, INT type, INT protocol);
+extern SOCKET WINAPI recv(SOCKET,char*,int,int);
/* */
More information about the wine-patches
mailing list