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

Jacek Caban jacek at codeweavers.com
Fri Nov 16 05:36:20 CST 2018


Hi Józef,

On 11/16/18 12:16 PM, Józef Kucia wrote:
> Hi Jacek,
>
> Thanks for your feedback.
>
> On Thu, Nov 15, 2018 at 7:06 PM Jacek Caban <jacek at codeweavers.com> wrote:
>> Also could we just guard RPC includes with #ifdef _WIN32 instead? This
>> wouldn't need a new command line option and would just make all
>> generated headers usable on non-windows builds (at least to the same
>> extend as --no-rpc-includes does). You could then use identical header
>> in Wine and vkd3d.
> #ifdef _WIN32 works for me, if that is acceptable change for all
> headers generated by widl.
>
> However, note that Wine code isn't compiled with _WIN32. We might need
> to use e.g. #if defined(_WIN32) || defined(__WINESRC__).


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.


Thanks,

Jacek




More information about the wine-devel mailing list