Skip site navigation (1)Skip section navigation (2)
Date:      Tue, 4 Jul 2000 22:39:02 -0700
From:      Alfred Perlstein <alfred@FreeBSD.ORG>
To:        Bruce Evans <bde@zeta.org.au>
Cc:        arch@FreeBSD.ORG
Subject:   search.h cleanup (was: Re: cvs commit: src/include search.h)
Message-ID:  <20000704223902.L25571@fw.wintelcom.net>
In-Reply-To: <Pine.BSF.4.21.0007042327430.16211-100000@besplex.bde.org>; from bde@zeta.org.au on Tue, Jul 04, 2000 at 11:42:12PM %2B1000
References:  <20000701101919.I25571@fw.wintelcom.net> <Pine.BSF.4.21.0007042327430.16211-100000@besplex.bde.org>

next in thread | previous in thread | raw e-mail | index | archive | help
* Bruce Evans <bde@zeta.org.au> [000704 06:44] wrote:
> On Sat, 1 Jul 2000, Alfred Perlstein wrote:
> 
> > part 2)
> > repo copy the files insque.3 insque.c lsearch.3 lsearch.c and remque.c 
> > from src/lib/libcompat/4.3/ into src/lib/libc/stdlib and fixup the 
> > Makefiles.
> > 
> > part 3)
> > remove repo copied items from libcompat and fixup the manpages, the
> > interfaces are not obsolete, they are required by SUSv2.
> 
> Some were deprecated, and should remain so.  (What next?  SUSv2 even
> has [efg]cvt, which became obsolete when sprintf() was fully specified.)
> 
> > I also need feedback to know where this is incorrect and where
> > to actually dump the files if not libc/stdlib.
> 
> Maybe libc/compat-susv2, libc/tsearch (for the tsearch routines only),
> or even libc/gen.

Well they are already imported, in my own defense I did what NetBSD
did and put them in libc/stdlib, since it's already in there here's
what I'd like to do to clean things up and not ressurect the dead
interfaces:

Index: include/search.h
===================================================================
RCS file: /home/ncvs/src/include/search.h,v
retrieving revision 1.1
diff -u -u -r1.1 search.h
--- include/search.h	2000/07/01 06:55:11	1.1
+++ include/search.h	2000/07/05 02:29:39
@@ -41,18 +41,21 @@
 #endif
 
 __BEGIN_DECLS
+/* stdlib.h
 void	*bsearch __P((const void *, const void *, size_t, size_t,
 		      int (*)(const void *, const void *)));
+ */
 int	 hcreate __P((size_t));
 void	 hdestroy __P((void));
 ENTRY	*hsearch __P((ENTRY, ACTION));
-
+/* depricated interfaces (in libcompat)
 void	*lfind __P((const void *, const void *, size_t *, size_t,
 		      int (*)(const void *, const void *)));
 void	*lsearch __P((const void *, const void *, size_t *, size_t,
 		      int (*)(const void *, const void *)));
 void	 insque __P((void *, void *));
 void	 remque __P((void *));
+ */
 
 void	*tdelete __P((const void *, void **,
 		      int (*)(const void *, const void *)));
Index: lib/libc/db/hash/hsearch.c
===================================================================
RCS file: /home/ncvs/src/lib/libc/db/hash/hsearch.c,v
retrieving revision 1.2
diff -u -u -r1.2 hsearch.c
--- lib/libc/db/hash/hsearch.c	1996/07/21 02:23:02	1.2
+++ lib/libc/db/hash/hsearch.c	2000/07/05 02:30:17
@@ -44,14 +44,14 @@
 #include <string.h>
 
 #include <db.h>
-#include "search.h"
+#include <search.h>
 
 static DB *dbp = NULL;
 static ENTRY retval;
 
 extern int
 hcreate(nel)
-	u_int nel;
+	size_t nel;
 {
 	HASHINFO info;
 
cvs diff: lib/libc/db/hash/search.h was removed, no comparison available

Is this acceptable?

-- 
-Alfred Perlstein - [bright@wintelcom.net|alfred@freebsd.org]
"I have the heart of a child; I keep it in a jar on my desk."


To Unsubscribe: send mail to majordomo@FreeBSD.org
with "unsubscribe freebsd-arch" in the body of the message




Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?20000704223902.L25571>