Martin Husemann <[email protected]> écrit :
> On Tue, Feb 14, 2017 at 11:23:45AM +0100, Marc Baudoin wrote:
> > Hi,
> > 
> > I'm responsible for building the NetBSD binaries for the TeX Live
> > distribution.  We're preparing the 2017 release and I have a
> > problem with the new version of a component (dvisvgm).  It uses a
> > uselocale() function which doesn't seem to exist in
> > NetBSD-release.  It's supposed to be part of POSIX :
> > 
> > http://pubs.opengroup.org/onlinepubs/9699919799/functions/uselocale.html
> 
> We do not implement that. It is rarely usefull and only obfuscates code
> by separating the locale setting from the actual output that requires it.
> The C++ model is much more usefull...

Well, that piece of software happens to be written in C++.  I
dont't know why the author doesn't use that model.

> > How to handle this? Is there a replacement that could act as this
> > uselocale() function or emulate it?
> 
> Use printf_l(3) and friends. Most typical use in software is to force the
> C locale, which is even simpler by using LC_C_LOCALE, like:
> 
>       printf_l(LC_C_LOCALE, "this is a float value: %.2f\n", 2.5f);

Thanks, I'll suggest that to the author.

Reply via email to