Hello, this patch was lying around. It makes wine compile with all handles (even HANDLE) converted to a void*. License: LGPL, X11 Changelog: Michael Stefaniuc <mstefani@redhat.com> - compile fix when all handles are converted to a void* 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/user/lstr.c =================================================================== RCS file: /home/wine/wine/dlls/user/lstr.c,v retrieving revision 1.23 diff -u -r1.23 lstr.c --- dlls/user/lstr.c 13 Jun 2002 23:54:55 -0000 1.23 +++ dlls/user/lstr.c 13 Oct 2002 14:39:20 -0000 @@ -627,7 +627,7 @@ } if (dwFlags & FORMAT_MESSAGE_FROM_HMODULE) { INT16 bufsize; - HINSTANCE16 hinst16 = ((HMODULE)lpSource & 0xffff); + HINSTANCE16 hinst16 = ((HINSTANCE16)lpSource & 0xffff); dwMessageId &= 0xFFFF; bufsize=LoadString16(hinst16,dwMessageId,NULL,0); Index: dlls/winmm/lolvldrv.c =================================================================== RCS file: /home/wine/wine/dlls/winmm/lolvldrv.c,v retrieving revision 1.33 diff -u -r1.33 lolvldrv.c --- dlls/winmm/lolvldrv.c 3 Oct 2002 19:43:10 -0000 1.33 +++ dlls/winmm/lolvldrv.c 13 Oct 2002 14:39:21 -0000 @@ -2031,15 +2031,15 @@ /* find an empty slot in MM_MLDrvs table */ for (*hndl = 0; *hndl < MAX_MM_MLDRVS; (*hndl)++) { - if (!MM_MLDrvs[*hndl]) break; + if (!MM_MLDrvs[(UINT)*hndl]) break; } if (*hndl == MAX_MM_MLDRVS) { /* the MM_MLDrvs table could be made growable in the future if needed */ ERR("Too many open drivers\n"); return NULL; } - MM_MLDrvs[*hndl] = mld; - *hndl |= 0x8000; + MM_MLDrvs[(UINT)*hndl] = mld; + (UINT)*hndl |= 0x8000; mld->type = type; if ((UINT)*hndl < MMDRV_GetNum(type) || HIWORD(*hndl) != 0) { @@ -2067,8 +2067,8 @@ */ void MMDRV_Free(HANDLE hndl, LPWINE_MLD mld) { - if (hndl & 0x8000) { - unsigned idx = hndl & ~0x8000; + if ((UINT)hndl & 0x8000) { + unsigned idx = (UINT)hndl & ~0x8000; if (idx < sizeof(MM_MLDrvs) / sizeof(MM_MLDrvs[0])) { MM_MLDrvs[idx] = NULL; HeapFree(GetProcessHeap(), 0, mld); @@ -2153,14 +2153,14 @@ if ((UINT)hndl >= llTypes[type].wMaxId && hndl != (UINT16)-1 && hndl != (UINT)-1) { - if (hndl & 0x8000) { - hndl &= ~0x8000; + if ((UINT)hndl & 0x8000) { + (UINT)hndl &= ~0x8000; if (hndl < sizeof(MM_MLDrvs) / sizeof(MM_MLDrvs[0])) { - mld = MM_MLDrvs[hndl]; + mld = MM_MLDrvs[(UINT)hndl]; if (!mld || !HeapValidate(GetProcessHeap(), 0, mld) || mld->type != type) mld = NULL; } - hndl |= 0x8000; + (UINT)hndl |= 0x8000; } } if (mld == NULL && bCanBeID) { Index: windows/painting.c =================================================================== RCS file: /home/wine/wine/windows/painting.c,v retrieving revision 1.75 diff -u -r1.75 painting.c --- windows/painting.c 2 Oct 2002 19:45:49 -0000 1.75 +++ windows/painting.c 13 Oct 2002 14:39:22 -0000 @@ -430,7 +430,7 @@ { if( hRgn > 1 ) { - switch( wndPtr->hrgnUpdate ) + switch ((UINT)wndPtr->hrgnUpdate) { default: CombineRgn( wndPtr->hrgnUpdate, wndPtr->hrgnUpdate, hRgn, RGN_OR );
Attachment:
pgp00054.pgp
Description: PGP signature