crt: Provide __p__pgmptr() function for all CRT import libraries

Function __p__pgmptr() returns pointer to global variable _pgmptr and is
available since VC20, it is available also in UCRT, and also in x86 version
of OS system version msvcrt.dll.

For all other CRT import libraries (crtdll.dll, msvcrt10.dll and
x64/arm32/arm64 msvcrt.dll) provide mingw-w64 version of __p__pgmptr()
function defined via global variable _pgmptr.

Global variable _pgmptr is available in all CRT libraries except UCRT.

Signed-off-by: Martin Storsjö <martin@martin.st>
2 files changed