diff options
| author | Ed Schouten <ed@FreeBSD.org> | 2016-10-29 14:41:22 +0000 |
|---|---|---|
| committer | Ed Schouten <ed@FreeBSD.org> | 2016-10-29 14:41:22 +0000 |
| commit | ad9254ed9d587574c25507cc03ab19f0aafa0752 (patch) | |
| tree | 96359a06310ef1f91c3a76c17d1cd738278f0e30 /include | |
| parent | 28b3c2609c44fa05e6612e10e463c1cf5112a67c (diff) | |
Notes
Diffstat (limited to 'include')
| -rw-r--r-- | include/search.h | 23 |
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 *); |
