search.h: Declare posix_tnode as specified in POSIX-2024.
FreeBSD does the same.
This commit is contained in:
@@ -26,6 +26,8 @@ typedef enum {
|
|||||||
leaf
|
leaf
|
||||||
} VISIT;
|
} VISIT;
|
||||||
|
|
||||||
|
typedef void posix_tnode;
|
||||||
|
|
||||||
|
|
||||||
#ifdef __cplusplus
|
#ifdef __cplusplus
|
||||||
extern "C" {
|
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,
|
extern void *lsearch(const void *key, void *base, size_t *_elementCount,
|
||||||
size_t width, int (*compareFunction)(const void *, const void *));
|
size_t width, int (*compareFunction)(const void *, const void *));
|
||||||
extern void remque(void *element);
|
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 *));
|
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 *));
|
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 *));
|
int (*compare)(const void *, const void *));
|
||||||
extern void twalk(const void *root,
|
extern void twalk(const posix_tnode *root,
|
||||||
void (*action)(const void *, VISIT, int ));
|
void (*action)(const posix_tnode *, VISIT, int));
|
||||||
|
|
||||||
#ifdef _DEFAULT_SOURCE
|
#ifdef _DEFAULT_SOURCE
|
||||||
extern void tdestroy(void *root, void (*free_key)(void *));
|
extern void tdestroy(void *root, void (*free_key)(void *));
|
||||||
|
|||||||
Reference in New Issue
Block a user