[PATCH v2 1/2] widl: Define _WIN64 for 64-bit targets.

Alistair Leslie-Hughes leslie_alistair at hotmail.com
Thu Dec 23 04:10:32 CST 2021



On 23/12/21 21:05, Bernhard Übelacker wrote:
> 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;")

^^^^^^^^^
remove the cpp_quote from the above line. That will define it for idl 
but make it conditional for the compiler.

Best regards
Alistair



More information about the wine-devel mailing list