[PATCH] Ensure PSAPI_VERSION is 1 when building ldd
Jon Turney
jon.turney@dronecode.org.uk
Sat May 22 15:08:20 GMT 2021
On 20/05/2021 19:05, Corinna Vinschen wrote:
> Hi Jon,
>
> On May 20 18:46, Jon Turney wrote:
>> The default PSAPI_VERSION is controlled by WIN32_WINNT, which we set to
>> 0x0a00 when building ldd, which gets PSAPI_VERSION=2.
>>
>> This causes K32GetModuleFileNameEx to be used for GetFileNameFromHandle,
>> which isn't available on Windows Vista.
>
> Patch is ok, but the description needs a tweak. GetModuleFileNameEx is
> called from load_dll and print_dll, not from GetFileNameFromHandle.
Yeah, that part is just gibberish. Thanks. Fixed.
> In terms of GetFileNameFromHandle, given the GetFinalPathNameByHandle
> function is availabe since Vista, we should probably go ahead and use
> it in ldd.cc, too.
More information about the Cygwin-patches
mailing list