mirror of
https://github.com/neovim/neovim.git
synced 2025-09-27 05:28:33 +00:00
cleanup environment variable handling + unit tests
* removed a putenv() implementation which isn't needed anymore * mch_getenv() and mch_setenv() are now functions in src/os/env.c * removes direct calls to getenv() and setenv() outside of src/os/env.c * refactored the logic of get_env_name into mch_getenvname_at_index * added unittests for the functions in os/env.c
This commit is contained in:

committed by
Thiago de Arruda

parent
fc86866402
commit
f2433aedc8
@@ -280,14 +280,6 @@
|
||||
# else
|
||||
int mch_rename(const char *src, const char *dest);
|
||||
# endif
|
||||
# ifdef __MVS__
|
||||
/* on OS390 Unix getenv() doesn't return a pointer to persistent
|
||||
* storage -> use __getenv() */
|
||||
# define mch_getenv(x) (char_u *)__getenv((char *)(x))
|
||||
# else
|
||||
# define mch_getenv(x) (char_u *)getenv((char *)(x))
|
||||
# endif
|
||||
# define mch_setenv(name, val, x) setenv(name, val, x)
|
||||
|
||||
#if !defined(S_ISDIR) && defined(S_IFDIR)
|
||||
# define S_ISDIR(m) (((m) & S_IFMT) == S_IFDIR)
|
||||
|
Reference in New Issue
Block a user