]> git.lyx.org Git - lyx.git/blobdiff - src/support/environment.cpp
Cmake build:
[lyx.git] / src / support / environment.cpp
index 3c856d068b7b2b122ad83f752d9e3bba41877331..a364725c21173c137c00960c0ba3ea2cc3bb9270 100644 (file)
@@ -4,8 +4,8 @@
  * 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.
  */
@@ -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;