On 11/29/18 12:47 PM, Paul Eggert wrote:
On 11/29/18 9:15 AM, Eric Blake wrote:
Or is better to just document in doc/posix-functions/*printf*.texi
that %m is not portable, and that the recommended workaround is to
manually pair "%s" with strerror(errno), rather than relying on gnulib.
That sounds better for now, since no Gnulib-using code apparently needs
%m. You might want to mention strerror_r too.
Which comes with its own portability headaches :)
It's also awkward that we have strerror_l() but not printf_l() for
getting localized %m output - but then again, printf_l() would be useful
even without %m for getting the right radix character and thousands
separators.
At any rate, I'll go ahead and patch the docs to mention %m.
--
Eric Blake, Principal Software Engineer
Red Hat, Inc. +1-919-301-3266
Virtualization: qemu.org | libvirt.org