bug-gnulib
[Top][All Lists]
Advanced

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

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


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

I found myself fixing a project that used printf("%m") to work on BSD. That particular project is incompatible with GPL, so it would not benefit from gnulib, but it made me wonder if there is any interest in a gnulib module that provides guaranteed %m support on all platforms. It doesn't fit in the existing printf-posix module, so we'd have to make a new printf-gnu module (presumably GPLv3+, rather than trying to be LGPLv2+, as an LGPL project is better off sticking to the bare-bones printf-posix). 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.

--
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]