mirror of https://github.com/xiph/flac
Fix build with MSVC if UNICODE is enabled
Patch-from: "lvqcl.mail" <lvqcl.mail@gmail.com> Closes: https://sourceforge.net/p/flac/bugs/447/
This commit is contained in:
parent
230cffe08f
commit
58a81cf678
|
@ -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
|
||||
|
|
Loading…
Reference in New Issue