[PATCH v2] widl: Add option to not generate RPC includes.

Jacek Caban jacek at codeweavers.com
Fri Nov 16 07:23:35 CST 2018


On 11/16/18 12:42 PM, Józef Kucia wrote:
> On Fri, Nov 16, 2018 at 12:36 PM Jacek Caban <jacek at codeweavers.com> wrote:
>> We don't really need to worry about Wine itself. Note that in majority
>> cases those includes are useless as rpc.h and rpcndr.h are included in a
>> different ways. Mostly, if COM_NO_WINDOWS_H is not used, it will be
>> included from generated header -> ole2.h -> objbase.h. As a test, I just
>> put those includes inside #if 0 and Wine built fine.
> Yes, but I wanted to also guard windows.h and ole2.h. It would be a
> more complete solution, and it would allow me to remove
> COM_NO_WINDOWS_H from vkd3d headers.


I see, that makes sense. I would slightly prefer to not place Wine 
internal things like __WINESRC__ in all generated headers if it's easy 
to avoid, but it might make sense to introduce it here.


As a matter of fact we had __WINESRC__ check in the past (although back 
then it was to prevent windows.h include):

https://source.winehq.org/git/wine.git/commitdiff/42e583f1f6b2c0c9f963251495661ea8c11be005

Back then we simply didn't depend on those includes in Wine sources and 
included them explicitly in .c file whenever needed. In current 
situation, checking for _WIN32 but not __WINESRC__ in generated headers 
would have the same effect. It would require changing some Wine files to 
explicitly include windows.h and/or ole2.h, but it might not be too bad, 
I'm not sure.


Thanks,

Jacek




More information about the wine-devel mailing list