[PATCH] 0001-Fixed-tests-in-dlls-ws2_32-tests-sock.c-for-simple_s.patch

ANDREW LOOK alook at ucla.edu
Wed Mar 11 06:52:32 CDT 2009


This patch is intended to help fix some of the failures in ws2_32.dll, particularly in the tests contained in 'dlls/ws2_32/tests/sock.c' when they are run in a 64-bit build.

The changes contained in this patch are all aimed at changing data structures and constants to be 64-bit compatible. 'include/winsock.h' required changes in two places; first, the definition of the constant FIONBIO needed to change from type u_long to ULONG to avoid a 64-bit conversion error resulting in the following message: "Test failed: simple_server (22): failed to set blocking mode: 10022." Next, the struct WS(in_addr) had a member variable S_addr defined as type u_long; This fix silenced errors such as "Test failed: simple_server (22): strange peer address" and "Test failed: bind() failed error: 10022". Changes made to 'dlls/dbghelp/type.c' were concerned only with correcting errors where pointers are cast into 32-bit DWORD values. These assignments were altered to instead cast the pointers into DWORD_PTR values; specifically, the changes proposed in this patch concern the function SymEnumTypes and its use of the SYMBOL_INFO structure.

Included below are the results of a 64-bit run of running ws2_32's tests under Ubuntu x64 8.10 on an AMD Turion64 x2 machine; First the test output of an unchanged build from the wine git tree is shown, then the test output after changes to winsock.h and type.c.

Thank you,
Andrew Look

--------BEFORE_PATCH--------

../../../../wine-git/tools/runtest -q -P wine -M ws2_32.dll -T ../../.. -p ws2_32_test.exe.so ../../../../wine-git/dlls/ws2_32/tests/sock.c && touch sock.ok
wine client error:13: write: Bad file descriptor
wine client error:14: write: Bad file descriptor
err:process:__wine_kernel_init boot event wait timed out
sock.c:996: Test failed: bind(s1) failed error: 10022
sock.c:1018: Test failed: bind() failed error: 10022
sock.c:415: Test failed: simple_server (22): failed to set blocking mode: 10022
sock.c:430: Test failed: simple_server (22): strange peer address
sock.c:610: Test failed: simple_client (24): failed to set blocking mode
sock.c:610: Test failed: simple_client (23): failed to set blocking mode
sock.c:430: Test failed: wine client error:23: write: Bad file descriptor
Segmentation fault
make: *** [sock.ok] Error 139


--------AFTER PATCH--------

../../../../wine-git/tools/runtest -q -P wine -M ws2_32.dll -T ../../.. -p ws2_32_test.exe.so ../../../../wine-git/dlls/ws2_32/tests/sock.c && touch sock.ok
wine client error:27: write: Bad file descriptor
Segmentation fault
make: *** [sock.ok] Error 139

-------------- next part --------------
A non-text attachment was scrubbed...
Name: 0001-Fixed-tests-in-dlls-ws2_32-tests-sock.c-for-simple_s.patch
Type: application/octet-stream
Size: 2103 bytes
Desc: not available
URL: <http://www.winehq.org/pipermail/wine-patches/attachments/20090311/10772f88/attachment.obj>


More information about the wine-patches mailing list