* utilunix.c (mc_tmpdir): Use putenv(3) instead of setenv(3) if
the latter is not available. Needed for Solaris.
Этот коммит содержится в:
родитель
406054b8e7
Коммит
612e8238c9
@ -1,3 +1,8 @@
|
|||||||
|
2004-11-01 Roland Illig <roland.illig@gmx.de>
|
||||||
|
|
||||||
|
* utilunix.c (mc_tmpdir): Use putenv(3) instead of setenv(3) if
|
||||||
|
the latter is not available. Needed for Solaris.
|
||||||
|
|
||||||
2004-10-29 Pavel Tsekov <ptsekov@gmx.net>
|
2004-10-29 Pavel Tsekov <ptsekov@gmx.net>
|
||||||
|
|
||||||
* complete.c (completion_matches): Fix duplicate completion matches
|
* complete.c (completion_matches): Fix duplicate completion matches
|
||||||
|
@ -292,6 +292,16 @@ tilde_expand (const char *directory)
|
|||||||
return g_strconcat (passwd->pw_dir, PATH_SEP_STR, q, (char *) NULL);
|
return g_strconcat (passwd->pw_dir, PATH_SEP_STR, q, (char *) NULL);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
static void
|
||||||
|
mc_setenv (const char *name, const char *value, int overwrite_flag)
|
||||||
|
{
|
||||||
|
#if defined(HAVE_SETENV)
|
||||||
|
setenv (name, value, overwrite_flag);
|
||||||
|
#else
|
||||||
|
if (overwrite_flag || getenv (name) == NULL)
|
||||||
|
putenv (g_strconcat (name, "=", value, (char *) NULL));
|
||||||
|
#endif
|
||||||
|
}
|
||||||
|
|
||||||
/*
|
/*
|
||||||
* Return the directory where mc should keep its temporary files.
|
* Return the directory where mc should keep its temporary files.
|
||||||
@ -386,7 +396,7 @@ mc_tmpdir (void)
|
|||||||
}
|
}
|
||||||
|
|
||||||
if (!error)
|
if (!error)
|
||||||
setenv ("MC_TMPDIR", tmpdir, 1);
|
mc_setenv ("MC_TMPDIR", tmpdir, 1);
|
||||||
|
|
||||||
return tmpdir;
|
return tmpdir;
|
||||||
}
|
}
|
||||||
|
Загрузка…
Ссылка в новой задаче
Block a user