Maybe better to just use 'setenv' everywhere except Windows where it doesn't exist
This commit is contained in:
parent
21b459919b
commit
993bf78933
2
src/os.c
2
src/os.c
@ -97,7 +97,7 @@ static KrkClass * Environ;
|
|||||||
#define CURRENT_CTYPE KrkInstance*
|
#define CURRENT_CTYPE KrkInstance*
|
||||||
|
|
||||||
static int _setVar(KrkString * key, KrkString * val) {
|
static int _setVar(KrkString * key, KrkString * val) {
|
||||||
#ifndef putenv
|
#ifndef _WIN32
|
||||||
return setenv(key->chars, val->chars, 1);
|
return setenv(key->chars, val->chars, 1);
|
||||||
#else
|
#else
|
||||||
size_t len = key->length + val->length;
|
size_t len = key->length + val->length;
|
||||||
|
Loading…
Reference in New Issue
Block a user