[PATCH v2 1/2] widl: Define _WIN64 for 64-bit targets.
Bernhard Übelacker
bernhardu at mailbox.org
Thu Dec 23 04:05:27 CST 2021
Am 23.12.21 um 09:58 schrieb Alexandre Julliard:
> Bernhard Übelacker <bernhardu at mailbox.org> writes:
>
>> @@ -849,6 +849,8 @@ int main(int argc,char *argv[])
>>
>> add_widl_version_define();
>> wpp_add_cmdline_define("_WIN32=1");
>> + if (pointer_size == 8)
>> + wpp_add_cmdline_define("_WIN64=1");
>
> You can't use #ifdef _WIN64 in idl files, this would make the generated
> headers platform-dependent.
>
Thanks for looking into it.
I guess I could then delay this decision in the idl file like this:
cpp_quote("#ifdef _WIN64")
cpp_quote("typedef long ADO_LONGPTR;")
cpp_quote("#else")
cpp_quote("typedef __int64 ADO_LONGPTR;")
cpp_quote("#endif")
But then the type is not known to widl:
.../include/msado15_backcompat.idl:639: error: type 'ADO_LONGPTR' not found in global namespace
How has such a type made known to widl?
Kind regards,
Bernhard
More information about the wine-devel
mailing list