Skip to content

Commit 4504d61

Browse files
mgeiserttyan0
authored andcommitted
Cygwin: Update search.h functions for POSIX.1-2024
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 [email protected].) Reported-by: Collin Funk <[email protected]> Addresses: https://cygwin.com/pipermail/cygwin/2025-April/258032.html Signed-off-by: Mark Geisert <[email protected]> Fixes: ec98d19 "* wininfo.h (wininfo::timer_active): Delete." (cherry picked from commit e6b915d)
1 parent 9b41897 commit 4504d61

File tree

1 file changed

+6
-4
lines changed

1 file changed

+6
-4
lines changed

winsup/cygwin/include/search.h

Lines changed: 6 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -39,6 +39,8 @@ typedef struct node
3939
} node_t;
4040
#endif
4141

42+
typedef void posix_tnode;
43+
4244
struct hsearch_data
4345
{
4446
struct internal_head *htable;
@@ -58,13 +60,13 @@ ENTRY *hsearch (ENTRY, ACTION);
5860
int hcreate_r (size_t, struct hsearch_data *);
5961
void hdestroy_r (struct hsearch_data *);
6062
int hsearch_r (ENTRY, ACTION, ENTRY **, struct hsearch_data *);
61-
void *tdelete (const void * __restrict, void ** __restrict,
63+
void *tdelete (const void * __restrict, posix_tnode ** __restrict,
6264
int (*) (const void *, const void *));
6365
void tdestroy (void *, void (*)(void *));
64-
void *tfind (const void *, void **,
66+
posix_tnode *tfind (const void *, posix_tnode *const *,
6567
int (*) (const void *, const void *));
66-
void *tsearch (const void *, void **, int (*) (const void *, const void *));
67-
void twalk (const void *, void (*) (const void *, VISIT, int));
68+
posix_tnode *tsearch (const void *, posix_tnode **, int (*) (const void *, const void *));
69+
void twalk (const posix_tnode *, void (*) (const posix_tnode *, VISIT, int));
6870
void *lfind (const void *, const void *, size_t *, size_t,
6971
int (*) (const void *, const void *));
7072
void *lsearch (const void *, void *, size_t *, size_t,

0 commit comments

Comments
 (0)