Angus Leeming wrote:

> Bennett Helm wrote:
> 
>> 
>> On Feb 14, 2005, at 11:11 AM, Angus Leeming wrote:
>> 
>>> Let's try and refine this. Do things work correctly if you use putenv
>>> rather than setenv? (Ie, maybe the problem lies with (our use of) gcc
>>> 2.95's setenv routine.)
>>>
>>> Could you alter this function in src/support/filetools.C? Do it in two
>>> steps. Ie, add (and use) the diagnostic below
> 
> [snip results]
> 
> Thanks, Bennett. What that tells me is that the problem doesn't lie in
> PutEnv at all. It lies in the code that calls PutEnv.
> 
> I have a nasty feeling that this, or something like it, will fix the
> problem (still in src/support/filetools.C)

Actually, while we're at it, let's add yet more diagnostic info:

 void setEnvPath(string const & name, vector<string> const & env)
 {
         char const separator(os::path_separator());
         std::ostringstream ss;
         vector<string>::const_iterator it = env.begin();
         vector<string>::const_iterator const end = env.end();
         for (; it != end; ++it) {
                 if (ss.tellp() > 0)
                         ss << separator;
                 ss << os::external_path(*it);
+                lyxerr << "setEnvPath elem: " 
+                       << os::external_path(*it) << '\n';
        }
-       PutEnv(name + "=" + ss.str());
+       string const env_str = name + "=" + string(STRCONV(ss.str()));
+       lyxerr << "setEnvPath calling PutEnv(" << env_str << ")" 
+              << std::endl;
+       PutEnv(env_str);
 }
 

-- 
Angus

Reply via email to