[PATCH] Define PSAPI_VERSION as 1 before including psapi.h

Corinna Vinschen corinna-cygwin@cygwin.com
Tue Jul 6 13:55:44 GMT 2021


Hi Jon,

On Jun 20 14:37, Jon Turney wrote:
> The default PSAPI_VERSION is controlled by WIN32_WINNT, which we set to
> 0x0a00 when building utils since 48a76190 (and is the default in w32api
> >= 9.0.0)
> 
> In order for the built executables to run on Windows Vista, we must also
> define PSAPI_VERSION as 1 (otherwise '#define GetModuleFileNameExA
> K32GetModuleFileNameExA' causes a 'The procedure entry point
> K32GetModuleFilenameExA could not be located in the dynamic link library
> kernel32.dll' error at run time).
> 
> Also drop uneeded psapi.h from dlfcn.cc (31ddf45d), resource.cc
> (34a6eeab) and ps.cc (1def2148).
> ---
>  winsup/cygwin/dlfcn.cc      | 1 -
>  winsup/cygwin/resource.cc   | 1 -
>  winsup/utils/dumper.cc      | 1 +
>  winsup/utils/ldd.cc         | 2 +-
>  winsup/utils/mingw/bloda.cc | 1 +
>  winsup/utils/module_info.cc | 1 +
>  winsup/utils/pldd.c         | 1 +
>  winsup/utils/ps.cc          | 1 -
>  8 files changed, 5 insertions(+), 4 deletions(-)

+1.  You really don't have to wait for me to push stuff like that.


Thanks,
Corinna


More information about the Cygwin-patches mailing list