[PATCH] ash: avoid GLIBC'ism %m

Jody Bruchon jody at jodybruchon.com
Wed Jul 19 01:47:05 UTC 2017


On 2017-07-18 9:15 PM, Kang-Che Sung wrote:
> On Wed, Jul 19, 2017 at 2:11 AM, Markus Gothe 
> <nietzsche at lysator.liu.se> wrote:
>> Actually last time I checked ‘%m’ is POSIX contrary to glibc’s 
>> deprecated '%a’. However, I agree that it should not be used since at 
>> least uClibc can be built without support for it. 
> How come %m is POSIX when I didn't see any mention of it in this page? 
> http://pubs.opengroup.org/onlinepubs/9699919799/functions/fprintf.html
It does not appear to be part of POSIX or the Single UNIX Specification. 
The glibc man page (as of 2016-12-12) even indicates that it is a 
glibc-specific extension:

*m *(Glibc extension; supported by uClibc and musl.) Print output of 
/strerror(errno)/. No argument is required.

The Gnulib manual has a pretty nice page mentioning several printf() 
incompatibilities and the operating systems they don't play nicely with: 
https://www.gnu.org/software/gnulib/manual/html_node/fprintf.html


-Jody Bruchon


More information about the busybox mailing list