[PATCH] stdio: Add %m

Rob Landley rob at landley.net
Tue Jun 20 15:55:13 UTC 2006


On Monday 19 June 2006 1:58 am, Rich Felker wrote:
> On Sun, Jun 18, 2006 at 10:10:17PM -0600, Shaun Jackman wrote:
> > On 6/13/06, Rich Felker <dalias at aerifal.cx> wrote:
> > >Notice that it's also broken (from a bloat standpoint) for printf to
> > >support %m, since that means that linking in printf will also link in
> > >strerror and all the error messages. Even basic hello world app grows
> > >by a significant amount..
> >
> > The newlib maintainers pointed this very bloat out as a reason to
> > reject my patch adding %m to newlib. They did suggest it could be
> > possible as a configuration option.
>
> Likewise I could consider adding code to silently ignore %m or print
> %m as "Error number %d", errno.. but I think it's an ugly hack to
> cater to broken code that's calling a standard C function in a
> nonstandard way and ignoring the fact that the behavior is undefined.

I don't care.

Rob
-- 
Never bet against the cheap plastic solution.



More information about the busybox mailing list