[Top][All Lists]
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: Critical : setlocale changes behavior in libc2.2
From: |
Jody Goldberg |
Subject: |
Re: Critical : setlocale changes behavior in libc2.2 |
Date: |
Wed, 29 Nov 2000 09:06:30 -0500 |
User-agent: |
Mutt/1.2.5i |
On Tue, Nov 28, 2000 at 09:36:43PM -0800, Ulrich Drepper wrote:
> Jody Goldberg <address@hidden> writes:
>
> > tmp = strdup (setlocale (LC_NUMERIC, NULL));
> > setlocale (LC_NUMERIC, "C");
> > <operation>
> > setlocale (LC_NUMERIC, tmp);
> > free (tmp);
>
> The info pages tell you to use strdup(). Anything else is wrong. Fix
> the applications which have problems.
We do use strdup. That no longer works with glic-2.2. setlocale is
not copying the string passed in. Later calls to
setlocale (LC_NUMERIC, NULL)
return the pointer to the freed tmp string.