* environment.cpp:

- correct return value of setenv.

git-svn-id: svn://svn.lyx.org/lyx/lyx-devel/trunk@28182 a592a061-630c-0410-9148-cb99ea01b6c8
This commit is contained in:
Jürgen Spitzmüller 2009-01-16 14:41:24 +00:00
parent 650a0261a6
commit b0edde64a0

View File

@ -62,7 +62,7 @@ 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);
return ::setenv(name.c_str(), encoded.c_str(), 1) == 0;
#elif defined (HAVE_PUTENV)
static map<string, string> varmap;
varmap[name] = name + '=' + encoded;