From 58a81cf678cb578a82bfc11df76397ab1569dcbd Mon Sep 17 00:00:00 2001 From: Erik de Castro Lopo Date: Wed, 4 Jan 2017 06:30:42 +1100 Subject: [PATCH] Fix build with MSVC if UNICODE is enabled Patch-from: "lvqcl.mail" Closes: https://sourceforge.net/p/flac/bugs/447/ --- src/share/win_utf8_io/win_utf8_io.c | 2 +- src/utils/flactimer/main.cpp | 6 +++--- 2 files changed, 4 insertions(+), 4 deletions(-) diff --git a/src/share/win_utf8_io/win_utf8_io.c b/src/share/win_utf8_io/win_utf8_io.c index c61d27f3..bb07ccd0 100644 --- a/src/share/win_utf8_io/win_utf8_io.c +++ b/src/share/win_utf8_io/win_utf8_io.c @@ -110,7 +110,7 @@ int get_utf8_argv(int *argc, char ***argv) char **utf8argv; int ret, i; - if ((handle = LoadLibrary("msvcrt.dll")) == NULL) return 1; + if ((handle = LoadLibraryW(L"msvcrt.dll")) == NULL) return 1; if ((wgetmainargs = (wgetmainargs_t)GetProcAddress(handle, "__wgetmainargs")) == NULL) { FreeLibrary(handle); return 1; diff --git a/src/utils/flactimer/main.cpp b/src/utils/flactimer/main.cpp index f2777e23..a01945f6 100644 --- a/src/utils/flactimer/main.cpp +++ b/src/utils/flactimer/main.cpp @@ -116,13 +116,13 @@ int main(int argc, char *argv[]) //fprintf(stderr, "@@@ cmd=[%s] args=[%s]\n", argv[0], args); - STARTUPINFO si; - GetStartupInfo(&si); + STARTUPINFOA si; + GetStartupInfoA(&si); DWORD wallclock_msec = GetTickCount(); PROCESS_INFORMATION pi; - BOOL ok = CreateProcess( + BOOL ok = CreateProcessA( argv[0], // lpApplicationName args, // lpCommandLine NULL, // lpProcessAttributes