Source-Changes-D archive
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index][Old Index]
putenv/setenv changes
On Sat, 02 Oct 2010, Matthias Scheler wrote:
> Modified Files:
> src/lib/libc/stdlib: putenv.c setenv.c
>
> Log Message:
> Restore binary compatibility with application which use putenv(3) on
> contant strings (e.g. postdrop(1)):
> - Don't write to the environment string passed to putenv(3).
> - Don't overwrite the value of an existing in setenv(3) unless the memory
> was actually allocated by setenv(3).
Please document this.
I suggest a BUGS section in putenv(3) stating that that the interface
uses non-const char* for compatibility with POSIX brain damage, but the
implementation guarantees to treat it as read-only.
--apb (Alan Barrett)
Home |
Main Index |
Thread Index |
Old Index