Hello, the first diff contains the part i'm not to sure about: a.) for RtlOpenCurrentUser and NtCreateKey the same things like in my first advapi32 patch applies b.) in the console.c chunk i wasn't too sure if should cast to an INT or an UINT The second diff is the straight forward "int format, HANDLE arg" fix. License: LGPL, X11 Changelog: Michael Stefaniuc <mstefani@redhat.com> - compile the kernel dll with -DSTRICT bye michael -- Michael Stefaniuc Tel.: +49-711-96437-199 System Administration Fax.: +49-711-96437-111 Red Hat GmbH Email: mstefani@redhat.com Hauptstaetterstr. 58 http://www.redhat.de/ D-70178 Stuttgart
Index: dlls/kernel/locale.c =================================================================== RCS file: /home/wine/wine/dlls/kernel/locale.c,v retrieving revision 1.5 diff -u -r1.5 locale.c --- dlls/kernel/locale.c 13 Sep 2002 18:52:01 -0000 1.5 +++ dlls/kernel/locale.c 24 Oct 2002 21:33:57 -0000 @@ -83,7 +83,7 @@ UNICODE_STRING nameW; HKEY hkey; - if (RtlOpenCurrentUser( KEY_ALL_ACCESS, &hkey ) != STATUS_SUCCESS) return 0; + if (RtlOpenCurrentUser( KEY_ALL_ACCESS, (PHANDLE)&hkey ) != STATUS_SUCCESS) return 0; attr.Length = sizeof(attr); attr.RootDirectory = hkey; @@ -93,7 +93,7 @@ attr.SecurityQualityOfService = NULL; RtlInitUnicodeString( &nameW, intlW ); - if (NtCreateKey( &hkey, KEY_ALL_ACCESS, &attr, 0, NULL, 0, NULL ) != STATUS_SUCCESS) hkey = 0; + if (NtCreateKey( (PHANDLE)&hkey, KEY_ALL_ACCESS, &attr, 0, NULL, 0, NULL ) != STATUS_SUCCESS) hkey = 0; NtClose( attr.RootDirectory ); return hkey; } Index: dlls/kernel/console.c =================================================================== RCS file: /home/wine/wine/dlls/kernel/console.c,v retrieving revision 1.9 diff -u -r1.9 console.c --- dlls/kernel/console.c 3 Oct 2002 19:54:57 -0000 1.9 +++ dlls/kernel/console.c 24 Oct 2002 21:34:23 -0000 @@ -855,7 +855,7 @@ PROCESS_INFORMATION pi; /* FIXME: use dynamic allocation for most of the buffers below */ - ret = snprintf(buffer, sizeof(buffer), "%s --use-event=%d", appname, hEvent); + ret = snprintf(buffer, sizeof(buffer), "%s --use-event=%d", appname, (INT)hEvent); if ((ret > -1) && (ret < sizeof(buffer)) && CreateProcessA(NULL, buffer, NULL, NULL, TRUE, DETACHED_PROCESS, NULL, NULL, si, &pi))
Index: dlls/kernel/Makefile.in =================================================================== RCS file: /home/wine/wine/dlls/kernel/Makefile.in,v retrieving revision 1.46 diff -u -r1.46 Makefile.in --- dlls/kernel/Makefile.in 18 Oct 2002 23:46:29 -0000 1.46 +++ dlls/kernel/Makefile.in 24 Oct 2002 21:38:32 -0000 @@ -1,4 +1,3 @@ -EXTRADEFS = -DWINE_NO_STRICT TOPSRCDIR = @top_srcdir@ TOPOBJDIR = ../.. SRCDIR = @srcdir@ Index: dlls/kernel/comm.c =================================================================== RCS file: /home/wine/wine/dlls/kernel/comm.c,v retrieving revision 1.67 diff -u -r1.67 comm.c --- dlls/kernel/comm.c 23 Oct 2002 18:50:11 -0000 1.67 +++ dlls/kernel/comm.c 24 Oct 2002 21:38:33 -0000 @@ -589,10 +589,10 @@ int fd,direct=FALSE,result=FALSE; struct termios port; - TRACE("handle %d, function=%d\n", handle, nFunction); + TRACE("handle %p, function=%d\n", handle, nFunction); fd = FILE_GetUnixHandle( handle, GENERIC_READ ); if(fd<0) { - FIXME("handle %d not found.\n",handle); + FIXME("handle %p not found.\n",handle); return FALSE; } @@ -663,7 +663,7 @@ break; #endif default: - WARN("(handle=%d,nFunction=%d): Unknown function\n", + WARN("(handle=%p,nFunction=%d): Unknown function\n", handle, nFunction); break; } @@ -705,11 +705,11 @@ { int fd; - TRACE("handle %d, flags %lx\n", handle, flags); + TRACE("handle %p, flags %lx\n", handle, flags); fd = FILE_GetUnixHandle( handle, GENERIC_READ ); if(fd<0) { - FIXME("no handle %d found\n",handle); + FIXME("no handle %p found\n",handle); return FALSE; } @@ -751,7 +751,7 @@ fd=FILE_GetUnixHandle( handle, GENERIC_READ ); if(0>fd) { - FIXME("no handle %d found\n",handle); + FIXME("no handle %p found\n",handle); return FALSE; } @@ -778,7 +778,7 @@ WARN("ioctl returned error\n"); #endif - TRACE("handle %d cbInQue = %ld cbOutQue = %ld\n", + TRACE("handle %p cbInQue = %ld cbOutQue = %ld\n", handle, lpStat->cbInQue, lpStat->cbOutQue); } @@ -814,7 +814,7 @@ FIXME("insize %ld outsize %ld unimplemented stub\n", insize, outsize); fd=FILE_GetUnixHandle( handle, GENERIC_READ ); if(0>fd) { - FIXME("handle %d not found?\n",handle); + FIXME("handle %p not found?\n",handle); return FALSE; } close(fd); @@ -837,7 +837,7 @@ { BOOL ret; - TRACE("handle %d, mask %p\n", handle, evtmask); + TRACE("handle %p, mask %p\n", handle, evtmask); SERVER_START_REQ( get_serial_info ) { @@ -868,7 +868,7 @@ { BOOL ret; - TRACE("handle %d, mask %lx\n", handle, evtmask); + TRACE("handle %p, mask %lx\n", handle, evtmask); SERVER_START_REQ( set_serial_info ) { @@ -899,7 +899,7 @@ struct termios port; int fd, bytesize, stopbits; - TRACE("handle %d, ptr %p\n", handle, lpdcb); + TRACE("handle %p, ptr %p\n", handle, lpdcb); TRACE("bytesize %d baudrate %ld fParity %d Parity %d stopbits %d\n", lpdcb->ByteSize,lpdcb->BaudRate,lpdcb->fParity, lpdcb->Parity, (lpdcb->StopBits == ONESTOPBIT)?1: @@ -909,7 +909,7 @@ fd = FILE_GetUnixHandle( handle, GENERIC_READ ); if (fd < 0) { - FIXME("no handle %d found\n",handle); + FIXME("no handle %p found\n",handle); return FALSE; } @@ -1250,7 +1250,7 @@ struct termios port; int fd,speed; - TRACE("handle %d, ptr %p\n", handle, lpdcb); + TRACE("handle %p, ptr %p\n", handle, lpdcb); fd = FILE_GetUnixHandle( handle, GENERIC_READ ); if (fd < 0) @@ -1457,7 +1457,7 @@ BOOL r = FALSE; int fd; - WARN("(%x,'%c') not perfect!\n",hComm,chTransmit); + WARN("(%p,'%c') not perfect!\n",hComm,chTransmit); fd = FILE_GetUnixHandle( hComm, GENERIC_READ ); if ( fd < 0 ) @@ -1488,7 +1488,7 @@ { BOOL ret; - TRACE("(%x,%p)\n",hComm,lptimeouts); + TRACE("(%p,%p)\n",hComm,lptimeouts); if(!lptimeouts) { @@ -1536,7 +1536,7 @@ int fd; struct termios tios; - TRACE("(%x,%p)\n",hComm,lptimeouts); + TRACE("(%p,%p)\n",hComm,lptimeouts); if(!lptimeouts) { @@ -1561,7 +1561,7 @@ /* FIXME: move this stuff to the server */ fd = FILE_GetUnixHandle( hComm, GENERIC_READ ); if (fd < 0) { - FIXME("no fd for handle = %0x!.\n",hComm); + FIXME("no fd for handle = %p!.\n",hComm); return FALSE; } @@ -1750,7 +1750,7 @@ OVERLAPPED ov; int ret; - TRACE("(%x %p %p )\n",hFile, lpdwEvents,lpOverlapped); + TRACE("(%p %p %p )\n",hFile, lpdwEvents,lpOverlapped); if(lpOverlapped) return COMM_WaitCommEvent(hFile, lpdwEvents, lpOverlapped); @@ -1789,7 +1789,7 @@ HANDLE hFile, /* [in] handle of the comm port */ LPCOMMPROP lpCommProp) /* [out] pointer to struct to be filled */ { - FIXME("(%d %p )\n",hFile,lpCommProp); + FIXME("(%p %p )\n",hFile,lpCommProp); if(!lpCommProp) return FALSE; @@ -1864,7 +1864,7 @@ HMODULE hConfigModule; BOOL r; - TRACE("(%p %x %p)\n",lpszDevice, hWnd, lpCommConfig); + TRACE("(%p %p %p)\n",lpszDevice, hWnd, lpCommConfig); hConfigModule = LoadLibraryA(lpszSerialUI); if(!hConfigModule) @@ -1925,7 +1925,7 @@ { BOOL r; - TRACE("(%x %p)\n",hFile,lpCommConfig); + TRACE("(%p %p)\n",hFile,lpCommConfig); if(lpCommConfig == NULL) return FALSE; @@ -1960,7 +1960,7 @@ LPCOMMCONFIG lpCommConfig, /* [in] The desired configuration. */ DWORD dwSize) /* [in] size of the lpCommConfig struct */ { - TRACE("(%x %p)\n",hFile,lpCommConfig); + TRACE("(%p %p)\n",hFile,lpCommConfig); return SetCommState(hFile,&lpCommConfig->dcb); } Index: dlls/kernel/console.c =================================================================== RCS file: /home/wine/wine/dlls/kernel/console.c,v retrieving revision 1.9 diff -u -r1.9 console.c --- dlls/kernel/console.c 3 Oct 2002 19:54:57 -0000 1.9 +++ dlls/kernel/console.c 24 Oct 2002 21:38:34 -0000 @@ -190,7 +190,7 @@ { BOOL ret; - TRACE("(%d,%p,%ld,%p)\n", handle, buffer, count, written); + TRACE("(%p,%p,%ld,%p)\n", handle, buffer, count, written); if (written) *written = 0; SERVER_START_REQ( write_console_input ) @@ -253,7 +253,7 @@ int width, height, y; BOOL ret = TRUE; - TRACE("(%x,%p,(%d,%d),(%d,%d),(%d,%dx%d,%d)\n", + TRACE("(%p,%p,(%d,%d),(%d,%d),(%d,%dx%d,%d)\n", hConsoleOutput, lpBuffer, size.X, size.Y, coord.X, coord.Y, region->Left, region->Top, region->Right, region->Bottom); @@ -307,7 +307,7 @@ LPWSTR strW; DWORD lenW; - TRACE("(%d,%s,%ld,%dx%d,%p)\n", hConsoleOutput, + TRACE("(%p,%s,%ld,%dx%d,%p)\n", hConsoleOutput, debugstr_an(str, length), length, coord.X, coord.Y, lpNumCharsWritten); lenW = MultiByteToWideChar( GetConsoleOutputCP(), 0, str, length, NULL, 0 ); @@ -344,7 +344,7 @@ { BOOL ret; - TRACE("(%d,%p,%ld,%dx%d,%p)\n", hConsoleOutput,attr,length,coord.X,coord.Y,lpNumAttrsWritten); + TRACE("(%p,%p,%ld,%dx%d,%p)\n", hConsoleOutput,attr,length,coord.X,coord.Y,lpNumAttrsWritten); SERVER_START_REQ( write_console_output ) { @@ -407,7 +407,7 @@ { BOOL ret; - TRACE("(%d,%s,%ld,(%dx%d),%p)\n", + TRACE("(%p,%s,%ld,(%dx%d),%p)\n", hConsoleOutput, debugstr_wn(&ch, 1), length, coord.X, coord.Y, lpNumCharsWritten); SERVER_START_REQ( fill_console_output ) @@ -448,7 +448,7 @@ { BOOL ret; - TRACE("(%d,%d,%ld,(%dx%d),%p)\n", + TRACE("(%p,%d,%ld,(%dx%d),%p)\n", hConsoleOutput, attr, length, coord.X, coord.Y, lpNumAttrsWritten); SERVER_START_REQ( fill_console_output ) @@ -503,7 +503,7 @@ { BOOL ret; - TRACE( "(%d,%p,%ld,%dx%d,%p)\n", hConsoleOutput, buffer, count, coord.X, coord.Y, read_count ); + TRACE( "(%p,%p,%ld,%dx%d,%p)\n", hConsoleOutput, buffer, count, coord.X, coord.Y, read_count ); SERVER_START_REQ( read_console_output ) { @@ -531,7 +531,7 @@ { BOOL ret; - TRACE("(%d,%p,%ld,%dx%d,%p)\n", + TRACE("(%p,%p,%ld,%dx%d,%p)\n", hConsoleOutput, lpAttribute, length, coord.X, coord.Y, read_count); SERVER_START_REQ( read_console_output ) @@ -1039,7 +1039,7 @@ LPWSTR xbuf = (LPWSTR)lpBuffer; DWORD mode; - TRACE("(%d,%p,%ld,%p,%p)\n", + TRACE("(%p,%p,%ld,%p,%p)\n", hConsoleInput, lpBuffer, nNumberOfCharsToRead, lpNumberOfCharsRead, lpReserved); if (!GetConsoleMode(hConsoleInput, &mode)) @@ -1137,7 +1137,7 @@ { BOOL ret; - TRACE("(%d,%s,%ld,%dx%d,%p)\n", hConsoleOutput, + TRACE("(%p,%s,%ld,%dx%d,%p)\n", hConsoleOutput, debugstr_wn(str, length), length, coord.X, coord.Y, lpNumCharsWritten); SERVER_START_REQ( write_console_output ) @@ -1503,7 +1503,7 @@ { BOOL ret; - TRACE("(%x)\n", hConsoleOutput); + TRACE("(%p)\n", hConsoleOutput); SERVER_START_REQ( set_console_input_info ) { @@ -1568,7 +1568,7 @@ * empty the S_EditString buffer */ - TRACE("(%x,%lx) retval == %d\n", hcon, mode, ret); + TRACE("(%p,%lx) retval == %d\n", hcon, mode, ret); return ret; } @@ -1697,7 +1697,7 @@ CONSOLE_SCREEN_BUFFER_INFO csbi; int k, first = 0; - TRACE("%d %s %ld %p %p\n", + TRACE("%p %s %ld %p %p\n", hConsoleOutput, debugstr_wn(lpBuffer, nNumberOfCharsToWrite), nNumberOfCharsToWrite, lpNumberOfCharsWritten, lpReserved); @@ -1814,7 +1814,7 @@ int do_move = 0; int w, h; - TRACE("%x %d %d\n", hcon, pos.X, pos.Y); + TRACE("%p %d %d\n", hcon, pos.X, pos.Y); SERVER_START_REQ(set_console_output_info) { @@ -2072,14 +2072,14 @@ BOOL inside; if (lpClipRect) - TRACE("(%d,(%d,%d-%d,%d),(%d,%d-%d,%d),%d-%d,%p)\n", hConsoleOutput, + TRACE("(%p,(%d,%d-%d,%d),(%d,%d-%d,%d),%d-%d,%p)\n", hConsoleOutput, lpScrollRect->Left, lpScrollRect->Top, lpScrollRect->Right, lpScrollRect->Bottom, lpClipRect->Left, lpClipRect->Top, lpClipRect->Right, lpClipRect->Bottom, dwDestOrigin.X, dwDestOrigin.Y, lpFill); else - TRACE("(%d,(%d,%d-%d,%d),(nil),%d-%d,%p)\n", hConsoleOutput, + TRACE("(%p,(%d,%d-%d,%d),(nil),%d-%d,%p)\n", hConsoleOutput, lpScrollRect->Left, lpScrollRect->Top, lpScrollRect->Right, lpScrollRect->Bottom, dwDestOrigin.X, dwDestOrigin.Y, lpFill); Index: dlls/kernel/debugger.c =================================================================== RCS file: /home/wine/wine/dlls/kernel/debugger.c,v retrieving revision 1.23 diff -u -r1.23 debugger.c --- dlls/kernel/debugger.c 3 Oct 2002 19:54:57 -0000 1.23 +++ dlls/kernel/debugger.c 24 Oct 2002 21:38:34 -0000 @@ -282,7 +282,7 @@ { BOOL ret, self; - TRACE("(%08x)\n", hProc); + TRACE("(%p)\n", hProc); SERVER_START_REQ( debug_break ) { Index: dlls/kernel/sync.c =================================================================== RCS file: /home/wine/wine/dlls/kernel/sync.c,v retrieving revision 1.25 diff -u -r1.25 sync.c --- dlls/kernel/sync.c 4 Sep 2002 23:34:03 -0000 1.25 +++ dlls/kernel/sync.c 24 Oct 2002 21:38:34 -0000 @@ -696,7 +696,7 @@ OVERLAPPED ov; BOOL ret; - TRACE("(%d,%p)\n",hPipe, overlapped); + TRACE("(%p,%p)\n",hPipe, overlapped); if(overlapped) return SYNC_ConnectNamedPipe(hPipe,overlapped); @@ -728,7 +728,7 @@ { BOOL ret; - TRACE("(%d)\n",hPipe); + TRACE("(%p)\n",hPipe); SERVER_START_REQ( disconnect_named_pipe ) { @@ -747,7 +747,7 @@ HANDLE hPipe, LPVOID lpInput, DWORD dwInputSize, LPVOID lpOutput, DWORD dwOutputSize, LPDWORD lpBytesRead, LPOVERLAPPED lpOverlapped) { - FIXME("%d %p %ld %p %ld %p %p\n", + FIXME("%p %p %ld %p %ld %p %p\n", hPipe, lpInput, dwInputSize, lpOutput, dwOutputSize, lpBytesRead, lpOverlapped); if(lpBytesRead) @@ -764,7 +764,7 @@ { BOOL ret; - TRACE("%d %p %p %p %p\n", hNamedPipe, lpFlags, + TRACE("%p %p %p %p %p\n", hNamedPipe, lpFlags, lpOutputBufferSize, lpInputBufferSize, lpMaxInstances); SERVER_START_REQ( get_named_pipe_info ) @@ -789,7 +789,7 @@ LPDWORD lpMaxCollectionCount, LPDWORD lpCollectDataTimeout, LPSTR lpUsername, DWORD nUsernameMaxSize) { - FIXME("%d %p %p %p %p %p %ld\n", + FIXME("%p %p %p %p %p %p %ld\n", hNamedPipe, lpState, lpCurInstances, lpMaxCollectionCount, lpCollectDataTimeout, lpUsername, nUsernameMaxSize); @@ -805,7 +805,7 @@ LPDWORD lpMaxCollectionCount, LPDWORD lpCollectDataTimeout, LPWSTR lpUsername, DWORD nUsernameMaxSize) { - FIXME("%d %p %p %p %p %p %ld\n", + FIXME("%p %p %p %p %p %p %ld\n", hNamedPipe, lpState, lpCurInstances, lpMaxCollectionCount, lpCollectDataTimeout, lpUsername, nUsernameMaxSize); @@ -820,7 +820,7 @@ HANDLE hNamedPipe, LPDWORD lpMode, LPDWORD lpMaxCollectionCount, LPDWORD lpCollectDataTimeout) { - FIXME("%d %p %p %p\n", + FIXME("%p %p %p %p\n", hNamedPipe, lpMode, lpMaxCollectionCount, lpCollectDataTimeout); return FALSE; } Index: dlls/kernel/thunk.c =================================================================== RCS file: /home/wine/wine/dlls/kernel/thunk.c,v retrieving revision 1.34 diff -u -r1.34 thunk.c --- dlls/kernel/thunk.c 12 Sep 2002 22:07:02 -0000 1.34 +++ dlls/kernel/thunk.c 24 Oct 2002 21:38:35 -0000 @@ -2013,7 +2013,7 @@ */ BOOL WINAPI _KERNEL32_100(HANDLE threadid,DWORD exitcode,DWORD x) { - FIXME("(%d,%ld,0x%08lx): stub\n",threadid,exitcode,x); + FIXME("(%p,%ld,0x%08lx): stub\n",threadid,exitcode,x); return TRUE; } Index: dlls/kernel/wowthunk.c =================================================================== RCS file: /home/wine/wine/dlls/kernel/wowthunk.c,v retrieving revision 1.27 diff -u -r1.27 wowthunk.c --- dlls/kernel/wowthunk.c 18 Oct 2002 23:35:24 -0000 1.27 +++ dlls/kernel/wowthunk.c 24 Oct 2002 21:38:35 -0000 @@ -239,7 +239,7 @@ WORD WINAPI K32WOWHandle16( HANDLE handle, WOW_HANDLE_TYPE type ) { if ( HIWORD(handle ) ) - ERR( "handle 0x%08x of type %d has non-zero HIWORD\n", handle, type ); + ERR( "handle %p of type %d has non-zero HIWORD\n", handle, type ); switch ( type ) { @@ -266,7 +266,7 @@ return THREAD_IdToTEB((DWORD)handle)->htask16; default: - ERR( "handle 0x%08x of unknown type %d\n", handle, type ); + ERR( "handle %p of unknown type %d\n", handle, type ); return LOWORD(handle); } }
Attachment:
pgp00080.pgp
Description: PGP signature