[PATCH] stdio: Add %m

Peter S. Mazinger ps.m at gmx.net
Tue Jun 20 10:57:47 PDT 2006


On Tue, 20 Jun 2006, Rich Felker wrote:

> On Tue, Jun 20, 2006 at 11:55:13AM -0400, Rob Landley wrote:
> > 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.
> 
> Would you object to replacing %m by a macro that would expand to
> either "%m" or some generic text depending on platform.h? I doubt my
> system is the only one without %m.
> 
> Rich

uClibc has %m as a config option

Peter

-- 
Peter S. Mazinger <ps dot m at gmx dot net>           ID: 0xA5F059F2
Key fingerprint = 92A4 31E1 56BC 3D5A 2D08  BB6E C389 975E A5F0 59F2



More information about the busybox mailing list