From fefac2c941149fb49bcb5126060be74494d0c287 Mon Sep 17 00:00:00 2001 From: wm4 Date: Thu, 30 Jul 2015 21:50:11 +0200 Subject: win32: more wchar_t -> WCHAR replacements This was essentially missing from commit 0b52ac8a. Since L"..." string literals have the type wchar_t[], we can't use them for UTF-16 strings. Use C11 u"..." string literals instead. These have the type char16_t[], but we simply assume char16_t is the same underlying type as WCHAR. In practice, they're both unsigned short. For this reason use -std=c11 on Windows. Since Windows is a "special" environment (we require either MinGW or Cygwin), we don't need to worry too much about compiler compatibility. --- osdep/subprocess-win.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'osdep') diff --git a/osdep/subprocess-win.c b/osdep/subprocess-win.c index 3f0330958b..9e61262e8e 100644 --- a/osdep/subprocess-win.c +++ b/osdep/subprocess-win.c @@ -112,7 +112,7 @@ static int create_overlapped_pipe(HANDLE *read, HANDLE *write) unsigned long id = atomic_fetch_add(&counter, 1); unsigned pid = GetCurrentProcessId(); wchar_t buf[36]; - swprintf(buf, sizeof(buf), L"\\\\.\\pipe\\mpv-anon-%08x-%08lx", pid, id); + swprintf(buf, sizeof(buf), u"\\\\.\\pipe\\mpv-anon-%08x-%08lx", pid, id); // The function for creating anonymous pipes (CreatePipe) can't create // overlapped pipes, so instead, use a named pipe with a unique name -- cgit v1.2.3