On Fri, Oct 12, 2001 at 10:03:03PM -0400, Glenn Maynard wrote:
> PtyShell.cc:107: warning: deprecated conversion from string constant to `char *'
> PtyShell.cc:108: warning: deprecated conversion from string constant to `char *'
> PtyShell.cc:109: warning: deprecated conversion from string constant to `char *'
> 
> putenv() is a really stupid call--there seems to be no real way of
> knowing when a string in the environment that was put there by putenv()
> is gone and can be freed.

Right, but as you note below it either exits or execs just a bit later.
I need the environment change to avoid i18n in the ssh, I need the messages
in english for obvious reason - lftp has to parse them.

> Anyhow, quick fix attached.  Leaks the memory for the environment, but
> it doesn't matter since it either exec()s or _exit()'s immediately
> anyway.

I've put a cast to char* instead. The string is not going to be modified.

-- 
   Alexander.                      | http://www.yars.free.net/~lav/  

Reply via email to