[OpenWrt-Devel] Is printf considered to be guaranteed?

Michael Heimpold mhei at heimpold.de
Fri Oct 12 14:53:07 EDT 2018


Am Donnerstag, 11. Oktober 2018, 22:44:53 CEST schrieb Sebastian Moeller:
> Dear Luiz,
> 
> thank you very much for this information. By now I have realized that printf
> evaluated locale (specifically LC_NUMERIC) at least on non-openwrt unices,
> which makes it unfortunately unusable for my purpose.

forcing local, e.g.
LANG=C printf "%0.3f" 47.11 
does not help? Maybe you could elaborate on your purpose?

Regards,
mhei

> 
> Best Regards
> 	Sebastian
> 
> > On Oct 11, 2018, at 19:58, Luiz Angelo Daros de Luca <luizluca at gmail.com>
> > wrote:
> > 
> > I think so. It is compiled by default:
> > 
> > $ grep PRINTF -A2 package/utils/busybox/Config-defaults.in
> > config BUSYBOX_DEFAULT_PRINTF
> > 
> >         bool
> >         default y
> > 
> > --
> > config BUSYBOX_DEFAULT_ASH_PRINTF
> > 
> >         bool
> >         default y
> > 
> > --
> > config BUSYBOX_DEFAULT_HUSH_PRINTF
> > 
> >         bool
> >         default n
> > 
> > Regards,
> 
> _______________________________________________
> openwrt-devel mailing list
> openwrt-devel at lists.openwrt.org
> https://lists.openwrt.org/mailman/listinfo/openwrt-devel





_______________________________________________
openwrt-devel mailing list
openwrt-devel at lists.openwrt.org
https://lists.openwrt.org/mailman/listinfo/openwrt-devel



More information about the openwrt-devel mailing list