This is the mail archive of the
mailing list for the libstdc++ project.
Re: PATCH: Tweak 22_locale to hide more "expected errors"
- From: "Kaveh R. Ghazi" <ghazi at caip dot rutgers dot edu>
- To: drepper at redhat dot com, rittle at labs dot mot dot com
- Cc: dave at hiauly1 dot hia dot nrc dot ca, gcc-patches at gcc dot gnu dot org, libstdc++ at gcc dot gnu dot org
- Date: Thu, 13 Mar 2003 10:44:43 -0500 (EST)
- Subject: Re: PATCH: Tweak 22_locale to hide more "expected errors"
- References: <200303110547.h2B5ltxl087707@latour.rsch.comm.mot.com> <3E6D7A2D.firstname.lastname@example.org>
> From: Ulrich Drepper <drepper at redhat dot com>
> Loren James Rittle wrote:
> > Now, a basic improvement might be to support putenv() when it is
> > available and setenv() was not available (Kaveh wrote that putenv() is
> > more portable;
> Using putenv() is almost always wrong. Read the specs of the function.
> The string passes as the argument is added to the environment. Not a
> copy, the string itself. If the string is allocated on the stack the
> frame mustn't be left. If it's dynamically allocated the memory might
> leak when the entry gets replaced.
> Use setenv() and ignore this bad advise.
This is a red herring. We're talking about what to do when setenv is
Kaveh R. Ghazi ghazi at caip dot rutgers dot edu