Bug 14954

Summary: search.h is missing
Product: Base System Reporter: Tony Finch <dot>
Component: binAssignee: freebsd-bugs (Nobody) <bugs>
Status: Closed FIXED    
Severity: Affects Only Me    
Priority: Normal    
Version: 3.3-STABLE   
Hardware: Any   
OS: Any   

Description Tony Finch 1999-11-17 20:10:00 UTC
FreeBSD is missing the <search.h> header from SVID, but it is present
in NetBSD and OpenBSD. They also have implementations of the tsearch
etc. routines originally obtained from public domain sources by ESR.
There is an hsearch compatible interface to Berkeley DB which is
already in FreeBSD's libc.

Since these functions are in GNU libc I expect that in the near future
there will be more software out there that uses them.
Comment 1 Sheldon Hearn 1999-11-18 10:52:06 UTC
On Wed, 17 Nov 1999 19:59:29 GMT, Tony Finch wrote:

> FreeBSD is missing the <search.h> header from SVID, but it is present
> in NetBSD and OpenBSD. They also have implementations of the tsearch
> etc. routines originally obtained from public domain sources by ESR.
> There is an hsearch compatible interface to Berkeley DB which is
> already in FreeBSD's libc.

So is it a simple case of importing the header file, or are there
interfaces missing in the API?

Ciao,
Sheldon.
Comment 2 Tony Finch 1999-11-18 11:26:19 UTC
Sheldon Hearn <sheldonh@uunet.co.za> wrote:
> On Wed, 17 Nov 1999 19:59:29 GMT, Tony Finch wrote:
> 
> > FreeBSD is missing the <search.h> header from SVID, but it is present
> > in NetBSD and OpenBSD. They also have implementations of the tsearch
> > etc. routines originally obtained from public domain sources by ESR.
> > There is an hsearch compatible interface to Berkeley DB which is
> > already in FreeBSD's libc.
> 
> So is it a simple case of importing the header file, or are there
> interfaces missing in the API?

You also need the tsearch.[c3] and tfind.c files from
src/lib/libc/stdlib in {Net,Open}BSD.

There might be a better alternative to using Berkeley DB for the
hsearch functions, but I couldn't find any other suitable existing
code out there.

Tony.
-- 
I'm the dot in dot at
Comment 3 Tony Finch 2000-10-09 15:04:09 UTC
The API is now available in -CURRENT so this PR can be closed.

Tony.
-- 
en oeccget g mtcaa    f.a.n.finch
v spdlkishrhtewe y    dot@dotat.at
eatp o v eiti i d.    fanf@covalent.net
Comment 4 dwmalone freebsd_committer freebsd_triage 2000-10-09 18:06:17 UTC
State Changed
From-To: open->closed

Closed at submitter's request.