mirror of
https://git.lyx.org/repos/lyx.git
synced 2024-11-15 07:16:48 +00:00
Putenv requires a char *, for some reason.
This commit is contained in:
parent
36bec04a13
commit
9670fabe97
@ -129,10 +129,10 @@ bool unsetEnv(string const & name)
|
|||||||
{
|
{
|
||||||
#if defined(HAVE_UNSETENV)
|
#if defined(HAVE_UNSETENV)
|
||||||
// FIXME: does it leak?
|
// FIXME: does it leak?
|
||||||
return unsetenv(name.c_str()) == 0;
|
return ::unsetenv(name.c_str()) == 0;
|
||||||
#elif defined(HAVE_PUTENV)
|
#elif defined(HAVE_PUTENV)
|
||||||
// This is OK with MSVC and MinGW at least.
|
// This is OK with MSVC and MinGW at least.
|
||||||
return putenv((name + "=").c_str()) == 0;
|
return ::putenv(const_cast<char*>((name + "=").c_str())) == 0;
|
||||||
#else
|
#else
|
||||||
#error No environment-unsetting function has been defined.
|
#error No environment-unsetting function has been defined.
|
||||||
#endif
|
#endif
|
||||||
|
Loading…
Reference in New Issue
Block a user