diff options
author | Matt Kline <matt@bitbashing.io> | 2018-06-18 09:24:34 -0800 |
---|---|---|
committer | Justin M. Keyes <justinkz@gmail.com> | 2018-06-18 19:24:34 +0200 |
commit | 09cd4d0a4340b8ba731f9ba9b3a51a002e9da75f (patch) | |
tree | e54aa846ad6f2ac48a8d25003f789f7b0b733e8d /src/nvim/os/env.c | |
parent | 66a39fce6c70222a7f4a2dbd223a6d0c3a4a5789 (diff) | |
download | rneovim-09cd4d0a4340b8ba731f9ba9b3a51a002e9da75f.tar.gz rneovim-09cd4d0a4340b8ba731f9ba9b3a51a002e9da75f.tar.bz2 rneovim-09cd4d0a4340b8ba731f9ba9b3a51a002e9da75f.zip |
use wchar_t instead of WCHAR #6998
wchar_t has better cross-platform support and seems to fix an issue
on MinGW when building with `-std=c99`.
Diffstat (limited to 'src/nvim/os/env.c')
-rw-r--r-- | src/nvim/os/env.c | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/src/nvim/os/env.c b/src/nvim/os/env.c index 25c4cc4f92..0df857352b 100644 --- a/src/nvim/os/env.c +++ b/src/nvim/os/env.c @@ -56,7 +56,7 @@ int os_setenv(const char *name, const char *value, int overwrite) char *envbuf = xmalloc(envbuflen); snprintf(envbuf, envbuflen, "%s=%s", name, value); - WCHAR *p; + wchar_t *p; utf8_to_utf16(envbuf, &p); xfree(envbuf); if (p == NULL) { @@ -146,7 +146,7 @@ void os_get_hostname(char *hostname, size_t size) xstrlcpy(hostname, vutsname.nodename, size); } #elif defined(WIN32) - WCHAR host_utf16[MAX_COMPUTERNAME_LENGTH + 1]; + wchar_t host_utf16[MAX_COMPUTERNAME_LENGTH + 1]; DWORD host_wsize = sizeof(host_utf16) / sizeof(host_utf16[0]); if (GetComputerNameW(host_utf16, &host_wsize) == 0) { *hostname = '\0'; |