[PATCH] stdio: Add %m

Rich Felker dalias at aerifal.cx
Mon Jun 19 05:58:44 UTC 2006


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.

Rich




More information about the busybox mailing list