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