[PATCH] ash: support platforms that don't have '%m' printf specifier

Kang-Che Sung explorer09 at gmail.com
Thu Jul 27 14:50:17 UTC 2017


On Thu, Jul 27, 2017 at 8:53 PM, Ron Yorston <rmy at pobox.com> wrote:
> The '%m' conversion specifier prints an error message based on the
> current value of 'errno'.  It is available in the GNU C library,
> Cygwin (since 2012), uClibc and musl.
>
> It is not available in various BSDs, BSD-derived systems (MacOS,
> Android) or Microsoft Windows.
>
> Use a symbol defined in platform.h to control how error messages
> can be formatted to display the 'errno' message.  On platforms that
> support it use '%m'; on other platforms use '%s' and strerror().
>

dietlibc supports %m only if WANT_ERROR_PRINTF is defined in
<dietfeartures.h> when building, and its commented out by default.
I don't know how to check the macro WANT_ERROR_PRINTF in
the dietlibc build environment, but I think busybox needs to be
aware of this.


More information about the busybox mailing list