Henri Verbeet : ddraw: Make sure pWineDirect3DCreate and pWineDirect3DCreateClipper match the header .

Rob Shearman robertshearman at gmail.com
Mon Nov 3 07:18:52 CST 2008


2008/11/3 Henri Verbeet <hverbeet at gmail.com>:
> 2008/11/3 Rob Shearman <robertshearman at gmail.com>:
>> 2008/10/24 Alexandre Julliard <julliard at winehq.org>:
>>> diff --git a/dlls/ddraw/ddraw_private.h b/dlls/ddraw/ddraw_private.h
>>> index 7ff3c5c..cd1ce15 100644
>>> --- a/dlls/ddraw/ddraw_private.h
>>> +++ b/dlls/ddraw/ddraw_private.h
>>> @@ -414,8 +414,7 @@ struct IDirectDrawClipperImpl
>>>
>>>  const IDirectDrawClipperVtbl IDirectDrawClipper_Vtbl;
>>>
>>> -typedef IWineD3DClipper* (WINAPI *fnWineDirect3DCreateClipper)(IUnknown *);
>>> -fnWineDirect3DCreateClipper pWineDirect3DCreateClipper;
>>> +typeof(WineDirect3DCreateClipper) *pWineDirect3DCreateClipper;
>>
>> This isn't portable to some compilers, like MSVC. Can this be reverted?
>>
> Sure, although you'd have to change the type of fnWineDirect3DCreate,
> since it has changed since that patch. I'm not sure if it would help
> much though, we use typeof in lots of other places in Wine as well.

I'm only really concerned with MSVC, although it is likely that there
exists other non-C99 compliant compilers that don't implement the
typeof keyword. Here are the full list of locations that cause an
error with MSVC when building using msvcmaker:
dlls\ddraw\main.c(89) : warning C4013: 'typeof' undefined; assuming
extern returning int
dlls\imm32\imm.c(55) : error C2061: syntax error : identifier 'typeof'
dlls\wineps.drv\download.c(76) : warning C4013: 'typeof' undefined;
assuming extern returning int

All of the other uses are in code where a shared object is being
loaded at runtime and so are configured out when the necessary header
file doesn't exist.

-- 
Rob Shearman



More information about the wine-devel mailing list