Subject: Re: This should be the final cat(1) patch...
To: Mason Loring Bliss <mason@acheron.middleboro.ma.us>
From: Ben Harris <bjh21@netbsd.org>
List: tech-userlevel
Date: 06/08/2002 18:47:38
On Sat, 8 Jun 2002, Mason Loring Bliss wrote:

> I'm researching this right now, trying to understand where and how err(3)
> and warn(3) are actually defined on a system with no err.h... Given that
> part of this exercise is to produce a new host tool for inclusion in
> TOOLDIR, using non-standard function calls seems uncool. (This is, for
> instance, why I'm using fcntl(2) instead of the much simpler flock(2).)

err() and warn(), like flock() are provided by libnbcompat on systems that
don't have them natively.  Look in tools/compat for the mechanisms that do
this.  As far as you're concerned, you can just use them as usual.

> On Sat, Jun 08, 2002 at 04:20:48PM +0100, Ben Harris wrote:
>
> > Erm, if you change that, you should probably also change install(1) to use
> > fcntl() as well.  I'm not sure how nicely they play together.
>
> They mix quite well. It's still an exclusive advisory lock - they don't
> differ qualitatively. But, still, Luke is in fact moving install(1) over
> to using fcntl(2) instead of flock(2). I don't know if it's been committed
> yet.

Cool.

-- 
Ben Harris                                                   <bjh21@netbsd.org>
Portmaster, NetBSD/acorn26           <URL:http://www.netbsd.org/Ports/acorn26/>