Commit 58a81cf6 authored by Erik de Castro Lopo's avatar Erik de Castro Lopo

Fix build with MSVC if UNICODE is enabled

Patch-from: "lvqcl.mail" <lvqcl.mail@gmail.com>
Closes: https://sourceforge.net/p/flac/bugs/447/
parent 230cffe0
......@@ -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;
......
......@@ -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
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment