mirror of
https://github.com/LostRuins/koboldcpp.git
synced 2026-05-19 08:00:25 +00:00
setenv return int
This commit is contained in:
parent
2fb97d9c2c
commit
9be810628e
2 changed files with 6 additions and 3 deletions
|
|
@ -403,12 +403,13 @@ extern "C"
|
|||
return gpttype_clear_state_kv(true);
|
||||
}
|
||||
|
||||
void set_environment_variable(const char * identifier, const char * value)
|
||||
int set_environment_variable(const char * identifier, const char * value)
|
||||
{
|
||||
if (!identifier || !value) return -1;
|
||||
#ifdef _WIN32
|
||||
_putenv_s(identifier, value);
|
||||
return _putenv_s(identifier, value);
|
||||
#else
|
||||
setenv(identifier, value, 1);
|
||||
return setenv(identifier, value, 1);
|
||||
#endif
|
||||
}
|
||||
}
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue