mirror of
https://github.com/LostRuins/koboldcpp.git
synced 2026-09-19 01:05:09 +02:00
setenv return int
This commit is contained in:
+4
-3
@@ -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
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user