summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorErik de Castro Lopo <erikd@mega-nerd.com>2017-01-04 06:30:42 +1100
committerErik de Castro Lopo <erikd@mega-nerd.com>2017-01-04 06:31:52 +1100
commit58a81cf678cb578a82bfc11df76397ab1569dcbd (patch)
tree5567eb0ca3f15dc9c01924c431f677cb838c465b
parent230cffe08ff0c965de2ce111afe4513286bfda89 (diff)
downloadflac-58a81cf678cb578a82bfc11df76397ab1569dcbd.tar.gz
Fix build with MSVC if UNICODE is enabled
Patch-from: "lvqcl.mail" <lvqcl.mail@gmail.com> Closes: https://sourceforge.net/p/flac/bugs/447/
-rw-r--r--src/share/win_utf8_io/win_utf8_io.c2
-rw-r--r--src/utils/flactimer/main.cpp6
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