Changelog: * dlls/kernel/tests/alloc.c, dlls/kernel/tests/file.c, dlls/kernel/tests/process.c, dlls/kernel/tests/thread.c, dlls/oleaut32/tests/vartest.c, dlls/shlwapi/tests/shreg.c, dlls/user/tests/class.c, dlls/user/tests/wsprintf.c, dlls/winsock/tests/sock.c Make the tests compile with Visual C++ -- Francois Gouget fgouget@free.fr http://fgouget.free.fr/ Cahn's Axiom: When all else fails, read the instructions. Index: dlls/kernel/tests/alloc.c =================================================================== RCS file: /home/wine/wine/dlls/kernel/tests/alloc.c,v retrieving revision 1.1 diff -u -r1.1 alloc.c --- dlls/kernel/tests/alloc.c 27 Mar 2002 21:03:50 -0000 1.1 +++ dlls/kernel/tests/alloc.c 20 May 2002 22:43:29 -0000 @@ -18,9 +18,9 @@ * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA */ +#include "wine/test.h" #include "winbase.h" #include "winerror.h" -#include "wine/test.h" /* Currently Wine doesn't have macros for LocalDiscard and GlobalDiscard so I am disableing the checks for them. These macros are equivalent Index: dlls/kernel/tests/file.c =================================================================== RCS file: /home/wine/wine/dlls/kernel/tests/file.c,v retrieving revision 1.4 diff -u -r1.4 file.c --- dlls/kernel/tests/file.c 10 May 2002 01:10:04 -0000 1.4 +++ dlls/kernel/tests/file.c 20 May 2002 22:43:29 -0000 @@ -19,13 +19,12 @@ * */ -#include "winbase.h" -#include "winerror.h" -#include "wine/test.h" - - #include <stdlib.h> #include <time.h> + +#include "wine/test.h" +#include "winbase.h" +#include "winerror.h" LPCSTR filename = "testfile.xxx"; Index: dlls/kernel/tests/process.c =================================================================== RCS file: /home/wine/wine/dlls/kernel/tests/process.c,v retrieving revision 1.2 diff -u -r1.2 process.c --- dlls/kernel/tests/process.c 12 May 2002 03:16:39 -0000 1.2 +++ dlls/kernel/tests/process.c 20 May 2002 22:43:30 -0000 @@ -21,9 +21,10 @@ #include <assert.h> #include <stdio.h> #include <stdlib.h> + +#include "wine/test.h" #include "winbase.h" #include "winuser.h" -#include "wine/test.h" static char base[MAX_PATH]; static char selfname[MAX_PATH]; Index: dlls/kernel/tests/thread.c =================================================================== RCS file: /home/wine/wine/dlls/kernel/tests/thread.c,v retrieving revision 1.2 diff -u -r1.2 thread.c --- dlls/kernel/tests/thread.c 3 Apr 2002 02:33:13 -0000 1.2 +++ dlls/kernel/tests/thread.c 20 May 2002 22:43:30 -0000 @@ -18,6 +18,9 @@ * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA */ +/* Define _WIN32_WINNT to get SetThreadIdealProcessor on Windows */ +#define _WIN32_WINNT 0x0500 + #include "wine/test.h" #include <winbase.h> #include <winnt.h> @@ -45,7 +48,7 @@ #include "wine/exception.h" #endif #endif -typedef HANDLE WINAPI (*OPENTHREADPTR)(DWORD,BOOL,DWORD); +typedef HANDLE (WINAPI *OPENTHREADPTR)(DWORD,BOOL,DWORD); OPENTHREADPTR OpenThreadPtr; HANDLE WINAPI OpenThreadDefault(DWORD dwDesiredAccess, BOOL bInheritHandle, Index: dlls/oleaut32/tests/vartest.c =================================================================== RCS file: /home/wine/wine/dlls/oleaut32/tests/vartest.c,v retrieving revision 1.1 diff -u -r1.1 vartest.c --- dlls/oleaut32/tests/vartest.c 26 Mar 2002 01:54:25 -0000 1.1 +++ dlls/oleaut32/tests/vartest.c 20 May 2002 22:43:33 -0000 @@ -57,22 +57,21 @@ #include <stdio.h> #include <stdlib.h> -#include <winbase.h> -#include <winuser.h> -#include <wingdi.h> -#include <winnls.h> -#include <winerror.h> -#include <winnt.h> - -#include <oleauto.h> - #include <math.h> #include <float.h> #include <time.h> -#include <windef.h> - #include "wine/test.h" +#include "winbase.h" +#include "winuser.h" +#include "wingdi.h" +#include "winnls.h" +#include "winerror.h" +#include "winnt.h" + +#include "wtypes.h" +#include "oleauto.h" + #define MAX_BUFFER 1024 Index: dlls/shlwapi/tests/shreg.c =================================================================== RCS file: /home/wine/wine/dlls/shlwapi/tests/shreg.c,v retrieving revision 1.1 diff -u -r1.1 shreg.c --- dlls/shlwapi/tests/shreg.c 9 May 2002 19:48:08 -0000 1.1 +++ dlls/shlwapi/tests/shreg.c 20 May 2002 22:43:33 -0000 @@ -23,10 +23,9 @@ #include "wine/test.h" #include "winbase.h" +#include "winerror.h" #include "winreg.h" #include "winuser.h" -#include "wine/obj_base.h" -#include "wine/obj_storage.h" #include "shlwapi.h" static char * sTestpath1 = "%SYSTEMROOT%\\subdir1"; Index: dlls/user/tests/class.c =================================================================== RCS file: /home/wine/wine/dlls/user/tests/class.c,v retrieving revision 1.1 diff -u -r1.1 class.c --- dlls/user/tests/class.c 21 Apr 2002 22:05:42 -0000 1.1 +++ dlls/user/tests/class.c 20 May 2002 22:43:33 -0000 @@ -20,11 +20,12 @@ #include <assert.h> #include <stdlib.h> #include <stdio.h> + +#include "wine/test.h" #include "winbase.h" #include "winreg.h" #include "wingdi.h" #include "winuser.h" -#include "wine/test.h" #define NUMCLASSWORDS 4 Index: dlls/user/tests/wsprintf.c =================================================================== RCS file: /home/wine/wine/dlls/user/tests/wsprintf.c,v retrieving revision 1.1 diff -u -r1.1 wsprintf.c --- dlls/user/tests/wsprintf.c 24 Apr 2002 21:16:52 -0000 1.1 +++ dlls/user/tests/wsprintf.c 20 May 2002 22:43:34 -0000 @@ -21,9 +21,10 @@ #include <stdlib.h> #include <string.h> #include <stdio.h> + +#include "wine/test.h" #include "winbase.h" #include "winuser.h" -#include "wine/test.h" static BOOL wsprintfATest (void) { Index: dlls/winsock/tests/sock.c =================================================================== RCS file: /home/wine/wine/dlls/winsock/tests/sock.c,v retrieving revision 1.1 diff -u -r1.1 sock.c --- dlls/winsock/tests/sock.c 27 Apr 2002 01:27:34 -0000 1.1 +++ dlls/winsock/tests/sock.c 20 May 2002 22:43:34 -0000 @@ -622,45 +623,53 @@ /************* Array containing the tests to run **********/ #define STD_STREAM_SOCKET \ - sock_type: SOCK_STREAM, \ - sock_prot: 0, \ - inet_addr: "127.0.0.1", \ - inet_port: 9374 + SOCK_STREAM, \ + 0, \ + "127.0.0.1", \ + 9374 static test_setup tests [NUM_TESTS] = { /* Test 0: synchronous client and server */ { - general: { + { STD_STREAM_SOCKET, - chunk_size: 2048, - n_chunks: 16, - n_clients: 2 + 2048, + 16, + 2 }, - srv: simple_server, - srv_params: { - buflen: 64 + simple_server, + { + NULL, + 0, + 64 }, - clt: simple_client, - clt_params: { - buflen: 128 + simple_client, + { + NULL, + 0, + 128 } }, /* Test 1: event-driven client, synchronous server */ { - general: { + { STD_STREAM_SOCKET, - chunk_size: 2048, - n_chunks: 16, - n_clients: 2 + 2048, + 16, + 2 }, - srv: simple_server, - srv_params: { - buflen: 64 + simple_server, + { + NULL, + 0, + 64 }, - clt: event_client, - clt_params: { - buflen: 128 + event_client, + { + NULL, + 0, + 128 } } };