svn commit: trunk/uClibc/libc/misc/search
psm at uclibc.org
psm at uclibc.org
Mon Jan 23 19:12:47 UTC 2006
Author: psm
Date: 2006-01-23 11:12:45 -0800 (Mon, 23 Jan 2006)
New Revision: 13517
Log:
Reorganize a bit and mark tdestroy as GNU extension
Modified:
trunk/uClibc/libc/misc/search/tsearch.c
Changeset:
Modified: trunk/uClibc/libc/misc/search/tsearch.c
===================================================================
--- trunk/uClibc/libc/misc/search/tsearch.c 2006-01-23 18:40:08 UTC (rev 13516)
+++ trunk/uClibc/libc/misc/search/tsearch.c 2006-01-23 19:12:45 UTC (rev 13517)
@@ -31,10 +31,6 @@
#include <search.h>
#include <stdlib.h>
-libc_hidden_proto(tsearch)
-libc_hidden_proto(tfind)
-libc_hidden_proto(tdestroy)
-
/* This routine is not very bad. It makes many assumptions about
* the compiler. It assumpts that the first field in node must be
* the "key" field, which points to the datum. It is a very trick
@@ -54,6 +50,7 @@
int (*compar)(); ordering function
*/
+libc_hidden_proto(tsearch)
void *tsearch(__const void *key, void **vrootp, __compar_fn_t compar)
{
register node *q;
@@ -84,6 +81,7 @@
#endif
#ifdef L_tfind
+libc_hidden_proto(tfind)
void *tfind(__const void *key, void * __const *vrootp, __compar_fn_t compar)
{
register node **rootp = (node **) vrootp;
@@ -193,6 +191,7 @@
}
#endif
+#ifdef __USE_GNU
#ifdef L_tdestroy
/* The standardized functions miss an important functionality: the
tree cannot be removed easily. We provide a function to do this. */
@@ -209,6 +208,7 @@
free (root);
}
+libc_hidden_proto(tdestroy)
void tdestroy (void *vroot, __free_fn_t freefct)
{
node *root = (node *) vroot;
@@ -218,5 +218,6 @@
}
libc_hidden_def(tdestroy)
#endif
+#endif
/* tsearch.c ends here */
More information about the uClibc-cvs
mailing list