aboutsummaryrefslogtreecommitdiff
path: root/include
diff options
context:
space:
mode:
authorEd Schouten <ed@FreeBSD.org>2016-10-13 18:25:40 +0000
committerEd Schouten <ed@FreeBSD.org>2016-10-13 18:25:40 +0000
commit4ef9bd22ed091dd6513f89cdca2dfd03b6e3ffd2 (patch)
treeed6ec4af5a29fb0742ce420a77c6d309f9e4221f /include
parentec7bbf1f794aab97014387c2e4f907263dfc49af (diff)
Notes
Diffstat (limited to 'include')
-rw-r--r--include/search.h23
1 files changed, 14 insertions, 9 deletions
diff --git a/include/search.h b/include/search.h
index 4c1f534c667a..068446fdcb88 100644
--- a/include/search.h
+++ b/include/search.h
@@ -34,16 +34,18 @@ typedef enum {
} VISIT;
#ifdef _SEARCH_PRIVATE
-typedef struct node {
- void *key;
- struct node *llink, *rlink;
- signed char balance;
-} node_t;
+typedef struct __posix_tnode {
+ void *key;
+ struct __posix_tnode *llink, *rlink;
+ signed char balance;
+} posix_tnode;
struct que_elem {
struct que_elem *next;
struct que_elem *prev;
};
+#else
+typedef void posix_tnode;
#endif
#if __BSD_VISIBLE
@@ -62,12 +64,15 @@ void *lfind(const void *, const void *, size_t *, size_t,
void *lsearch(const void *, void *, size_t *, size_t,
int (*)(const void *, const void *));
void remque(void *);
-void *tdelete(const void * __restrict, void ** __restrict,
+void *tdelete(const void * __restrict, posix_tnode ** __restrict,
int (*)(const void *, const void *));
-void *tfind(const void *, void * const *,
+posix_tnode *
+ tfind(const void *, posix_tnode * const *,
int (*)(const void *, const void *));
-void *tsearch(const void *, void **, int (*)(const void *, const void *));
-void twalk(const void *, void (*)(const void *, VISIT, int));
+posix_tnode *
+ tsearch(const void *, posix_tnode **,
+ int (*)(const void *, const void *));
+void twalk(const posix_tnode *, void (*)(const posix_tnode *, VISIT, int));
#if __BSD_VISIBLE
int hcreate_r(size_t, struct hsearch_data *);