On Fri, Jun 13, 2014 at 12:33:23PM -0400, Rich Felker wrote: > On Thu, Jun 12, 2014 at 11:06:23PM -0700, Isaac Dunham wrote: > > I was trying to build netbsd sed, and it needed errc. > > So I wrote an errc implementation. > > There was another patch for this about a month ago; look back and see > the thread. I'm not opposed to adding it as long as we can minimize > the code duplication between these ugly functions (but they're pretty > small anyway). That was actually how this came to my attention at first; however, the implementation you refer to was nonsense, since vwarnx does *not* have the prototype void vwarnx(int, const char *, va_list); I'm not sure whether to go for adding it or not, since apparently netbsd doesn't have it in libc. I've also removed it from my local version of sed, andd am half-tempted to go ahead and use POSIX "formatted error messages", a.k.a. fmtmsg() ;) But if it's going in, vwarn(fmt, ap); is supposed to be equivalent to vwarnc(errno, fmt, ap); So I could easily shrink that part. I'm sending a second version, because it's trivial to fix. HTH, Isaac Dunham