2017-11-21 12:46:58 +08:00
|
|
|
diff --git a/src/share/win_utf8_io/win_utf8_io.c b/src/share/win_utf8_io/win_utf8_io.c
|
2019-11-22 09:03:32 +08:00
|
|
|
index bbb6a74a..8b20bbb7 100644
|
2017-11-21 12:46:58 +08:00
|
|
|
--- a/src/share/win_utf8_io/win_utf8_io.c
|
|
|
|
+++ b/src/share/win_utf8_io/win_utf8_io.c
|
|
|
|
@@ -110,7 +110,11 @@ int get_utf8_argv(int *argc, char ***argv)
|
|
|
|
char **utf8argv;
|
|
|
|
int ret, i;
|
|
|
|
|
|
|
|
+#if defined (WINAPI_FAMILY_PARTITION) && !WINAPI_FAMILY_PARTITION(WINAPI_PARTITION_DESKTOP | WINAPI_PARTITION_SYSTEM)
|
|
|
|
+ if ((handle = LoadPackagedLibrary("msvcrt.dll", 0)) == NULL) return 1;
|
|
|
|
+#else
|
2019-11-22 09:03:32 +08:00
|
|
|
if ((handle = LoadLibraryW(L"msvcrt.dll")) == NULL) return 1;
|
2017-11-21 12:46:58 +08:00
|
|
|
+#endif
|
|
|
|
if ((wgetmainargs = (wgetmainargs_t)GetProcAddress(handle, "__wgetmainargs")) == NULL) {
|
|
|
|
FreeLibrary(handle);
|
|
|
|
return 1;
|