Hi Collin,
On 4/23/2025 8:28 PM, Collin Funk via Cygwin wrote:
Hi,
While testing gnulib I noticed that tfind on cygwin is defined like:
void *tfind (const void *, void **,
int (*) (const void *, const void *));
But POSIX requires [1] (*):
void *tfind (const void *key, void *const *rootp,
int (*compar) (const void *, const void *));
For programs written expecting the POSIX prototype, there will be many
warnings that 'rootp' has it's const qualifier discarded.
Collin
[1] https://pubs.opengroup.org/onlinepubs/9799919799/functions/tfind.html
(*) Ignoring the fact that POSIX.1-2024 added the requirement for
'typedef void posix_tnode;'.
Thanks for the report. tfind() and friends are supplied by newlib. I
will look into what exactly to report there and/or send a patch there.
It appears a bit more from that POSIX version needs implementation.
..mark
--
Problem reports: https://cygwin.com/problems.html
FAQ: https://cygwin.com/faq/
Documentation: https://cygwin.com/docs.html
Unsubscribe info: https://cygwin.com/ml/#unsubscribe-simple