> > Currently, syslog_r() avoids using strerror() since it is not > > reentrant. We have a reentrant strerror_r() so let's use it. > > > > OK? > > Perhaps add a comment explicitly stating that OpenBSD's strerror_r() > *is* reentrant?
Also, signal-handler safe. We've done something a little crazy -- pushing hard at libc to make our syslog_r function threadsafe + reentrant + and signal-handler safe, as long as the format string doesn't contain floating point. So Mark is right, any public layers below syslog_r should declare their safety conditions also, otherwise people may puzzle. Inside strerror_r, I'm unsure why there is a save_errno dance.