syslog and "ISO C++ does not support the ‘%m’ printf format"
I'm compiling my program (using the pedantic, Wall flags). I'm using the syslog facility for logging. The syslog manual specifically specifies that you can use %m in the format string, which will be replaced by the strerror(errno) string. However, when I use the %m, the compiler throws the warning "ISO C++ does not support the ‘%m’ printf format".
I reckon they use the specifier in the syslog function declaration that adds the printf-like checks. However, as %m is not valid in printf but it is valid in syslog, this feels wrong to me.
My question is: how can I work around this? How can I "fix" those warnings without having to hack the syslog.h include file.
Two side questions: does anybody know what the speed is for syslog? Is it fast? Also, I use it in a multi threaded environment; man pthreads says this is safe, but apparently it's not safe on BSD, where reentrent versions exist for these functions... Is it right that it is thread safe on Linux?