Am Donnerstag, 24. Juli 2008 schrieb Sam Varshavchik:
> David Diffenbaugh writes:
> > I found an error in the patch I just posted, I have attached the
> > correction. I had used sizeof() where it should have been strlen().
>
> Linux documentation for putenv reads:
>
>                     The string pointed to by string becomes part of
>        the environment, so altering the string changes the environment.
>
> You free()ing the string alters the environment, and this breaks on Linux.
>
> The Linux man page for putenv contains a bit of history of the various
> versions of putenv and its behavior according to a number of historical
> standards: http://manpages.courier-mta.org/htmlman3/putenv.3.html
>
> Given all this mess, that's why the code was changed to use setenv(), whose
> semantics are somewhat more stable. This is not the correct solution for
> this issue, a different approach will probably be necessary -- something
> that's conditionally compiled only for Solaris 9.

Something like a special file that implements setenv() using putenv() and that 
is only linked in if compiled on Solaris.

Eike

Attachment: signature.asc
Description: This is a digitally signed message part.

-------------------------------------------------------------------------
This SF.Net email is sponsored by the Moblin Your Move Developer's challenge
Build the coolest Linux based applications with Moblin SDK & win great prizes
Grand prize is a trip for two to an Open Source event anywhere in the world
http://moblin-contest.org/redirect.php?banner_id=100&url=/
_______________________________________________
Courier-imap mailing list
[email protected]
Unsubscribe: https://lists.sourceforge.net/lists/listinfo/courier-imap

Reply via email to