summaryrefslogtreecommitdiff
path: root/gio/win32/gwinhttpvfs.c
diff options
context:
space:
mode:
authorOle André Vadla Ravnås <oleavr@gmail.com>2018-08-15 22:25:08 +0200
committerOle André Vadla Ravnås <oleavr@gmail.com>2021-01-05 21:42:59 +0100
commit0ab51f8d4eafacae84fd73d635e1b1469ccc8459 (patch)
tree113f7d5a5585c2abfb8a9d7beee9e2b6006cf465 /gio/win32/gwinhttpvfs.c
parent01b77666bc52d7ef2c4c20319153be1165f8643d (diff)
downloadglib-0ab51f8d4eafacae84fd73d635e1b1469ccc8459.tar.gz
gwin32: Always use unicode APIs
Instead of the legacy ANSI ones. This also means GLib behaves correctly when built with unicode preprocessor defines.
Diffstat (limited to 'gio/win32/gwinhttpvfs.c')
-rw-r--r--gio/win32/gwinhttpvfs.c14
1 files changed, 7 insertions, 7 deletions
diff --git a/gio/win32/gwinhttpvfs.c b/gio/win32/gwinhttpvfs.c
index 3dfac259e..03feaf983 100644
--- a/gio/win32/gwinhttpvfs.c
+++ b/gio/win32/gwinhttpvfs.c
@@ -39,20 +39,20 @@ static void
lookup_funcs (void)
{
HMODULE winhttp = NULL;
- char winhttp_dll[MAX_PATH + 100];
+ WCHAR winhttp_dll[MAX_PATH + 100];
int n;
if (lookup_done)
return;
- n = GetSystemDirectory (winhttp_dll, MAX_PATH);
+ n = GetSystemDirectoryW (winhttp_dll, MAX_PATH);
if (n > 0 && n < MAX_PATH)
{
- if (winhttp_dll[n-1] != '\\' &&
- winhttp_dll[n-1] != '/')
- strcat (winhttp_dll, "\\");
- strcat (winhttp_dll, "winhttp.dll");
- winhttp = LoadLibrary (winhttp_dll);
+ if (winhttp_dll[n-1] != L'\\' &&
+ winhttp_dll[n-1] != L'/')
+ wcscat (winhttp_dll, L"\\");
+ wcscat (winhttp_dll, L"winhttp.dll");
+ winhttp = LoadLibraryW (winhttp_dll);
}
if (winhttp != NULL)