aboutsummaryrefslogtreecommitdiff
path: root/ports/libflac/uwp-library-console.patch
diff options
context:
space:
mode:
authorRobert Schumacher <roschuma@microsoft.com>2019-11-22 09:47:40 -0800
committerGitHub <noreply@github.com>2019-11-22 09:47:40 -0800
commit45f4b820e5743b89bca3508ba2028cdd5d8bbd17 (patch)
treef874a8c4a7392309bdbb86447288597ec0a4a281 /ports/libflac/uwp-library-console.patch
parent62d67d3bf8eeff1afa8009041fd08b8822676b7b (diff)
parent8831e8f25f1ff6546ee4a5291b91d599421637b3 (diff)
downloadvcpkg-45f4b820e5743b89bca3508ba2028cdd5d8bbd17.tar.gz
vcpkg-45f4b820e5743b89bca3508ba2028cdd5d8bbd17.zip
Merge branch 'master' into vcpkg_nuget
Diffstat (limited to 'ports/libflac/uwp-library-console.patch')
-rw-r--r--ports/libflac/uwp-library-console.patch12
1 files changed, 6 insertions, 6 deletions
diff --git a/ports/libflac/uwp-library-console.patch b/ports/libflac/uwp-library-console.patch
index bba2422c3..234758c75 100644
--- a/ports/libflac/uwp-library-console.patch
+++ b/ports/libflac/uwp-library-console.patch
@@ -1,5 +1,5 @@
diff --git a/src/share/win_utf8_io/win_utf8_io.c b/src/share/win_utf8_io/win_utf8_io.c
-index c61d27f..0870054 100644
+index bbb6a74a..8b20bbb7 100644
--- 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)
@@ -9,12 +9,12 @@ index c61d27f..0870054 100644
+#if defined (WINAPI_FAMILY_PARTITION) && !WINAPI_FAMILY_PARTITION(WINAPI_PARTITION_DESKTOP | WINAPI_PARTITION_SYSTEM)
+ if ((handle = LoadPackagedLibrary("msvcrt.dll", 0)) == NULL) return 1;
+#else
- if ((handle = LoadLibrary("msvcrt.dll")) == NULL) return 1;
+ if ((handle = LoadLibraryW(L"msvcrt.dll")) == NULL) return 1;
+#endif
if ((wgetmainargs = (wgetmainargs_t)GetProcAddress(handle, "__wgetmainargs")) == NULL) {
FreeLibrary(handle);
return 1;
-@@ -163,6 +167,9 @@ size_t strlen_utf8(const char *str)
+@@ -181,6 +185,9 @@ size_t strlen_utf8(const char *str)
/* get the console width in characters */
int win_get_console_width(void)
{
@@ -24,7 +24,7 @@ index c61d27f..0870054 100644
int width = 80;
CONSOLE_SCREEN_BUFFER_INFO csbi;
HANDLE hOut = GetStdHandle(STD_OUTPUT_HANDLE);
-@@ -170,6 +177,7 @@ int win_get_console_width(void)
+@@ -188,6 +195,7 @@ int win_get_console_width(void)
if (GetConsoleScreenBufferInfo(hOut, &csbi) != 0)
width = csbi.dwSize.X;
return width;
@@ -32,7 +32,7 @@ index c61d27f..0870054 100644
}
/* print functions */
-@@ -179,6 +187,10 @@ static int wprint_console(FILE *stream, const wchar_t *text, size_t len)
+@@ -197,6 +205,10 @@ static int wprint_console(FILE *stream, const wchar_t *text, size_t len)
DWORD out;
int ret;
@@ -43,7 +43,7 @@ index c61d27f..0870054 100644
do {
if (stream == stdout) {
HANDLE hOut = GetStdHandle(STD_OUTPUT_HANDLE);
-@@ -197,6 +209,7 @@ static int wprint_console(FILE *stream, const wchar_t *text, size_t len)
+@@ -215,6 +227,7 @@ static int wprint_console(FILE *stream, const wchar_t *text, size_t len)
return out;
}
} while(0);