git-svn-id: svn://svn.lyx.org/lyx/lyx-devel/trunk@20892 a592a061-630c-0410-9148-cb99ea01b6c8
This commit is contained in:
André Pönitz 2007-10-11 06:17:52 +00:00
parent a4afd7b7e9
commit b55f17ecb5

View File

@ -62,10 +62,9 @@ bool setEnv(string const & name, string const & value)
string const encoded = to_local8bit(from_utf8(value));
#if defined (HAVE_SETENV)
return ::setenv(name.c_str(), encoded.c_str(), true) == 0;
#endif
return ::setenv(name.c_str(), encoded.c_str(), true);
#if defined (HAVE_PUTENV)
#elif defined (HAVE_PUTENV)
static std::map<string, char *> varmap;
string envstr = name + '=' + encoded;
@ -79,9 +78,8 @@ bool setEnv(string const & name, string const & value)
delete oldptr;
varmap[name] = newptr;
return retval == 0;
#endif
#if !(defined HAVE_SETENV) && !(defined HAVE_PUTENV)
#else
#error No environment-setting function has been defined.
#endif
return false;