Follow @Openwall on Twitter for new release announcements and other news
[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Date: Fri, 13 Jun 2014 19:33:31 -0700
From: Isaac Dunham <ibid.ag@...il.com>
To: musl@...ts.openwall.com
Subject: [RFC] [v2] Implement errc/warnc family of functions

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

View attachment "warnc-errc.diff" of type "text/plain" (2241 bytes)

Powered by blists - more mailing lists

Confused about mailing lists and their use? Read about mailing lists on Wikipedia and check out these guidelines on proper formatting of your messages.