bug-gnulib
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: Interest in a printf-gnu module for printf("%m")?


From: Eric Blake
Subject: Re: Interest in a printf-gnu module for printf("%m")?
Date: Thu, 29 Nov 2018 13:21:00 -0600
User-agent: Mozilla/5.0 (X11; Linux x86_64; rv:60.0) Gecko/20100101 Thunderbird/60.3.0

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



reply via email to

[Prev in Thread] Current Thread [Next in Thread]