lib/util/charset Add back setlocale(), but only when called from binaries
Jelmer Vernooij
jelmer at samba.org
Fri Feb 18 05:33:27 MST 2011
On Fri, 2011-02-18 at 23:04 +1100, Andrew Bartlett wrote:
> On Fri, 2011-02-18 at 12:35 +0100, Jelmer Vernooij wrote:
> > On Fri, 2011-02-18 at 09:30 +0100, Andrew Bartlett wrote:
> > > - Log -----------------------------------------------------------------
> > > commit 1ad8e5229f618fc04af371ba52b81f2e7e1f88f5
> > > Author: Andrew Bartlett <abartlet at samba.org>
> > > Date: Fri Feb 18 13:59:05 2011 +1100
> > >
> > > lib/util/charset Add back setlocale(), but only when called from binaries
> > >
> > > When called from a library, we don't want to call this, as we may
> > > overwrite some of our calling program's context.
> > What in particular re-added the need for this?
> >
> > I'm worried about this change as it means we won't be testing the
> > library code that e.g. gets used as part of OpenChange and Evolution.
> >
> > It would be really nice if we could get rid of our reliance on the
> > system locale for once and for all. :-/
>
> Actually, the whole reason for this change was to ensure we don't break
> OpenChange and Evolution, while still allowing 'display charset =
> LOCALE', which is the default in Samba 3.x. I didn't continue the
> undocumented ability to use LOCALE for unix and dos charsets (where it
> makes no sense anyway).
What's the value of display charset = LOCALE if the locale is being
reset?
> When we are in a library, we don't want to call setlocale() (which
> imports the locale from the environment), so we do it here.
>
> Previously we would set it unconditionally in all Samba 3.x library
> uses, which is considered bad form.
I'm confused. Samba 3 never used this code as far as I know, only Samba
4 did.
Cheers,
jelmer
-------------- next part --------------
A non-text attachment was scrubbed...
Name: not available
Type: application/pgp-signature
Size: 836 bytes
Desc: This is a digitally signed message part
URL: <http://lists.samba.org/pipermail/samba-technical/attachments/20110218/665a5008/attachment.pgp>
More information about the samba-technical
mailing list