Subject: Re: CVS commit: src
To: None <perry@piermont.com>
From: Ben Harris <bjh21@netbsd.org>
List: tech-userlevel
Date: 02/17/2003 11:30:20
In article <87znovqyag.fsf@snark.piermont.com> you write:
>If they're kernel calls, shouldn't they be in libc with all the other
>kernel calls? Is librt a POSIX mandated thing?

POSIX mandates that it be safe to specify -lrt on c99's command-line.  It
doesn't require that librt.a exist or that it contain anything if it does
exist.  A similar thing applies to all the other POSIX libraries (-lpthread
for thread functions, -lxnet for sockets, etc).

<http://www.opengroup.org/onlinepubs/007904975/utilities/c99.html>

Personally, I'd go for putting small things in libc, to save a proliferation
of tiny shared libraries.  We need an empty -lxnet anyway, so an empty -lrt
to go with it would seem reasonable.

Of course, it's irrelevant in this case, because POSIX mandates that
sigtimedwait(), sigwaitinfo(), and sigwait() be in -lc anyway (they're in
<signal.h>, and all of <signal.h> apart from pthread_kill() and
pthread_sigmask() is in -lc).

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