mirror of
https://github.com/neovim/neovim.git
synced 2025-09-14 15:28:17 +00:00
os/env: use libuv v1.12 getenv/setenv API
- Minimum required libuv is now v1.12 - Because `uv_os_getenv` requires allocating, we must manage a map (`envmap` in `env.c`) to maintain the old behavior of `os_getenv` . - free() map-items after removal. khash.h does not make copies of anything, so even its keys must be memory-managed by the caller. closes #8398 closes #9267
This commit is contained in:
@@ -2271,7 +2271,7 @@ int path_is_absolute(const char_u *fname)
|
||||
void path_guess_exepath(const char *argv0, char *buf, size_t bufsize)
|
||||
FUNC_ATTR_NONNULL_ALL
|
||||
{
|
||||
char *path = getenv("PATH");
|
||||
const char *path = os_getenv("PATH");
|
||||
|
||||
if (path == NULL || path_is_absolute((char_u *)argv0)) {
|
||||
xstrlcpy(buf, argv0, bufsize);
|
||||
|
Reference in New Issue
Block a user