Our use of "%m" in various error messages is testament to the
project's initial life on Linux - but other than Cygwin, I know
of no other platforms supporting that glibc extension.
We COULD audit the code and manually turn "%m" into
"%s"/strerror(errno), but that's a lot of churn. Instead, let's
fix the few outliers that can't be easily wrapped, then wrap
the remainder.
While I was able to test this on Linux (both that no wrapper is
used by default, and that faking that %m fails causes the wrapper
to do the right thing), I haven't actually tried it on a BSD box,
hence I'll wait for review before pushing.
Eric Blake (3):
main: Avoid fprintf(%m) for BSD builds
log: Ensure %m sees correct errno
log: Guarantee the operation of %m in nbdkit_error()
docs/nbdkit-filter.pod | 13 +++++++++----
docs/nbdkit-plugin.pod | 13 +++++++++----
configure.ac | 27 +++++++++++++++++++++++++++
src/internal.h | 6 ++++++
src/log-stderr.c | 4 ++--
src/log-syslog.c | 6 +++---
src/log.c | 21 +++++++++++++++++++++
src/main.c | 4 ++--
8 files changed, 79 insertions(+), 15 deletions(-)
--
2.17.2