* Licence details can be found in the file COPYING.
*
* \author Angus Leeming
- * \author João Luis M. Assirati
- * \author Lars Gullik Bjønnes
+ * \author João Luis M. Assirati
+ * \author Lars Gullik Bjønnes
*
* Full author contact details are available in file CREDITS.
*/
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;