]> git.lyx.org Git - features.git/commitdiff
shut up
authorAndré Pönitz <poenitz@gmx.net>
Thu, 11 Oct 2007 06:17:52 +0000 (06:17 +0000)
committerAndré Pönitz <poenitz@gmx.net>
Thu, 11 Oct 2007 06:17:52 +0000 (06:17 +0000)
git-svn-id: svn://svn.lyx.org/lyx/lyx-devel/trunk@20892 a592a061-630c-0410-9148-cb99ea01b6c8

src/support/environment.cpp

index e3469f1fa3169dbac2e62471b5694a628d773e53..3e1494e016a232424ed393208e2530c6839d959d 100644 (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;