Add type posix_tnode. Change certain uses of "void" to "posix_tnode" in both the prototypes and definitions of functions associated with <search.h>.
(Necessary changes to Newlib's /libc/include/search.h have already been submitted in a patch sent to new...@sourceware.org.) Reported-by: Collin Funk <collin.fu...@gmail.com> Addresses: https://cygwin.com/pipermail/cygwin/2025-April/258032.html Signed-off-by: Mark Geisert <m...@maxrnd.com> Fixes: ec98d19a08c2 "* wininfo.h (wininfo::timer_active): Delete." --- winsup/cygwin/include/search.h | 10 ++++++---- 1 files changed, 6 insertions(+), 4 deletions(-) diff --git a/winsup/cygwin/include/search.h b/winsup/cygwin/include/search.h index f532eae55..7c6d7b4cf 100644 --- a/winsup/cygwin/include/search.h +++ b/winsup/cygwin/include/search.h @@ -39,6 +39,8 @@ typedef struct node } node_t; #endif +typedef void posix_tnode; + struct hsearch_data { struct internal_head *htable; @@ -58,13 +60,13 @@ ENTRY *hsearch (ENTRY, ACTION); int hcreate_r (size_t, struct hsearch_data *); void hdestroy_r (struct hsearch_data *); int hsearch_r (ENTRY, ACTION, ENTRY **, struct hsearch_data *); -void *tdelete (const void * __restrict, void ** __restrict, +void *tdelete (const void * __restrict, posix_tnode ** __restrict, int (*) (const void *, const void *)); void tdestroy (void *, void (*)(void *)); -void *tfind (const void *, void **, +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)); void *lfind (const void *, const void *, size_t *, size_t, int (*) (const void *, const void *)); void *lsearch (const void *, void *, size_t *, size_t, -- 2.45.1