diff --git a/headers/posix/search.h b/headers/posix/search.h index 8a7c41e26a..41271d92e4 100644 --- a/headers/posix/search.h +++ b/headers/posix/search.h @@ -26,6 +26,8 @@ typedef enum { leaf } VISIT; +typedef void posix_tnode; + #ifdef __cplusplus extern "C" { @@ -40,14 +42,14 @@ extern void *lfind(const void *key, const void *base, size_t *_elementCount, extern void *lsearch(const void *key, void *base, size_t *_elementCount, size_t width, int (*compareFunction)(const void *, const void *)); extern void remque(void *element); -extern void *tdelete(const void *key, void **_root, +extern void *tdelete(const void *key, posix_tnode **_root, int (*compare)(const void *, const void *)); -extern void *tfind(const void *key, void *const *root, +extern posix_tnode *tfind(const void *key, posix_tnode *const *root, int (*compare)(const void *, const void *)); -extern void *tsearch(const void *key, void **_root, +extern posix_tnode *tsearch(const void *key, posix_tnode **_root, int (*compare)(const void *, const void *)); -extern void twalk(const void *root, - void (*action)(const void *, VISIT, int )); +extern void twalk(const posix_tnode *root, + void (*action)(const posix_tnode *, VISIT, int)); #ifdef _DEFAULT_SOURCE extern void tdestroy(void *root, void (*free_key)(void *));