mirror of
https://github.com/UberGames/ioef.git
synced 2024-12-03 01:22:34 +00:00
MinGW doesn't have setenv() either, so.....
This commit is contained in:
parent
d86dd71327
commit
e48b56559d
1 changed files with 3 additions and 3 deletions
|
@ -2378,15 +2378,15 @@ void Com_Setenv_f(void)
|
||||||
{
|
{
|
||||||
char *arg2 = Cmd_ArgsFrom(2);
|
char *arg2 = Cmd_ArgsFrom(2);
|
||||||
|
|
||||||
#ifdef _MSC_VER
|
#ifdef _WIN32
|
||||||
// windows already removes env variable if value is an empty string
|
// windows already removes env variable if value is an empty string
|
||||||
_putenv_s(arg1, arg2);
|
_putenv_s(arg1, arg2);
|
||||||
#else
|
#else
|
||||||
if(!*arg2)
|
if(!*arg2)
|
||||||
unsetenv(arg1);
|
unsetenv(arg1);
|
||||||
else
|
else
|
||||||
setenv(arg1, arg2, 1);
|
setenv(arg1, arg2, 1);
|
||||||
#endif
|
#endif
|
||||||
}
|
}
|
||||||
else if(argc == 2)
|
else if(argc == 2)
|
||||||
{
|
{
|
||||||
|
|
Loading…
Reference in a new issue