Function _get_wpgmptr() is available in msvcr80+, UCRT and also in i386 and x64 msvcrt.dll since Windows Vista. It is not available in arm msvcrt.dll. --- mingw-w64-crt/Makefile.am | 2 ++ mingw-w64-crt/lib-common/msvcrt.def.in | 2 +- mingw-w64-crt/misc/_get_wpgmptr.c | 20 ++++++++++++++++++++ 3 files changed, 23 insertions(+), 1 deletion(-) create mode 100644 mingw-w64-crt/misc/_get_wpgmptr.c
diff --git a/mingw-w64-crt/Makefile.am b/mingw-w64-crt/Makefile.am index 5f5b40cc0041..72bf5a1759e9 100644 --- a/mingw-w64-crt/Makefile.am +++ b/mingw-w64-crt/Makefile.am @@ -337,6 +337,7 @@ src_msvcrt=\ misc/_get_pgmptr.c \ misc/_get_timezone.c \ misc/_get_tzname.c \ + misc/_get_wpgmptr.c \ misc/_recalloc.c \ misc/_set_purecall_handler.c \ misc/imaxdiv.c \ @@ -888,6 +889,7 @@ src_pre_msvcr80=\ misc/_get_pgmptr.c \ misc/_get_timezone.c \ misc/_get_tzname.c \ + misc/_get_wpgmptr.c \ misc/_initterm_e.c \ misc/_recalloc.c \ misc/_set_errno.c \ diff --git a/mingw-w64-crt/lib-common/msvcrt.def.in b/mingw-w64-crt/lib-common/msvcrt.def.in index 270dfd399910..2e696f90979c 100644 --- a/mingw-w64-crt/lib-common/msvcrt.def.in +++ b/mingw-w64-crt/lib-common/msvcrt.def.in @@ -1438,7 +1438,7 @@ _get_wenviron F_X86_ANY(_get_winmajor) F_X86_ANY(_get_winminor) F_X86_ANY(_get_winver) -F_X86_ANY(_get_wpgmptr) +; F_X86_ANY(_get_wpgmptr) ; i386 and x64 _get_wpgmptr replaced by emu, arm32 and arm64 provided by emu _gmtime32 F_I386(== gmtime) ; i386 _gmtime32 replaced by alias F_ARM_ANY(_gmtime32_s) ; i386 and x64 _gmtime32_s replaced by emu F_ARM_ANY(_gmtime64_s) ; i386 and x64 _gmtime64_s replaced by emu diff --git a/mingw-w64-crt/misc/_get_wpgmptr.c b/mingw-w64-crt/misc/_get_wpgmptr.c new file mode 100644 index 000000000000..bb1346538904 --- /dev/null +++ b/mingw-w64-crt/misc/_get_wpgmptr.c @@ -0,0 +1,20 @@ +/** + * This file has no copyright assigned and is placed in the Public Domain. + * This file is part of the mingw-w64 runtime package. + * No warranty is given; refer to the file DISCLAIMER.PD within this package. + */ +#include <stdlib.h> +#include <errno.h> + +errno_t __cdecl _get_wpgmptr(wchar_t **value) +{ + if (!value) + { + errno = EINVAL; + return EINVAL; + } + + *value = _wpgmptr; + return 0; +} +errno_t (__cdecl *__MINGW_IMP_SYMBOL(_get_wpgmptr))(wchar_t **) = _get_wpgmptr; -- 2.20.1 _______________________________________________ Mingw-w64-public mailing list Mingw-w64-public@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/mingw-w64-public