mirror of
https://github.com/neovim/neovim.git
synced 2025-02-25 18:55:25 -06: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:
@@ -47,17 +47,8 @@ if(Iconv_FOUND)
|
||||
set(HAVE_ICONV 1)
|
||||
endif()
|
||||
|
||||
check_function_exists(_putenv_s HAVE_PUTENV_S)
|
||||
if(WIN32 AND NOT HAVE_PUTENV_S)
|
||||
message(SEND_ERROR "_putenv_s() function not found on your system.")
|
||||
endif()
|
||||
check_function_exists(opendir HAVE_OPENDIR)
|
||||
check_function_exists(readlink HAVE_READLINK)
|
||||
check_function_exists(setenv HAVE_SETENV)
|
||||
if(UNIX AND NOT HAVE_SETENV)
|
||||
message(SEND_ERROR "setenv() function not found on your system.")
|
||||
endif()
|
||||
check_function_exists(unsetenv HAVE_UNSETENV)
|
||||
check_function_exists(setpgid HAVE_SETPGID)
|
||||
check_function_exists(setsid HAVE_SETSID)
|
||||
check_function_exists(sigaction HAVE_SIGACTION)
|
||||
|
||||
@@ -32,8 +32,6 @@
|
||||
#cmakedefine HAVE_UV_TRANSLATE_SYS_ERROR
|
||||
// TODO: add proper cmake check
|
||||
// #define HAVE_SELINUX 1
|
||||
#cmakedefine HAVE_SETENV
|
||||
#cmakedefine HAVE_UNSETENV
|
||||
#cmakedefine HAVE_SETPGID
|
||||
#cmakedefine HAVE_SETSID
|
||||
#cmakedefine HAVE_SIGACTION
|
||||
|
||||
Reference in New Issue
Block a user