[PATCH] ash: avoid GLIBC'ism %m
Kang-Che Sung
explorer09 at gmail.com
Sun Jul 23 02:16:14 UTC 2017
On Sun, Jul 23, 2017 at 10:03 AM, Kang-Che Sung <explorer09 at gmail.com> wrote:
>
> How about wrapping the printf("%m") uses within the __GNU_LIBRARY__ macro?
> It seems that %m support has been there from the beginning of glibc.
Correction. It's since glibc 1.06.
I've looked in the old ChangeLog entries and saw this:
Tue Oct 20 18:36:40 1992 Roland McGrath (roland at geech.gnu.ai.mit.edu)
* configure: Write error message and lose for option with missing arg.
* stdio/__vfscanf.c: Add `a' modifier, which makes %s and %[ fill
in a char ** with a malloc'd string.
(STRING_ADD_CHAR, STRING_ARG): New macros to deal with this hair.
(%s, %[): Use them.
* posix/gnu/types.h [__GNUC__] (__fsid_t): Define as long long.
* stdio/vfprintf.c: Add %m, which is %s of strerror (errno).
So... the check would be probably like this:
#if __GNU_LIBRARY__ > 1
More information about the busybox
mailing list