delorie.com/archives/browse.cgi   search  
Mail Archives: cygwin/2025/04/25/17:38:41

DMARC-Filter: OpenDMARC Filter v1.4.2 delorie.com 53PLcf8i3544518
Authentication-Results: delorie.com; dmarc=pass (p=none dis=none) header.from=cygwin.com
Authentication-Results: delorie.com; spf=pass smtp.mailfrom=cygwin.com
DKIM-Filter: OpenDKIM Filter v2.11.0 delorie.com 53PLcf8i3544518
Authentication-Results: delorie.com;
dkim=pass (1024-bit key, unprotected) header.d=cygwin.com header.i=@cygwin.com header.a=rsa-sha256 header.s=default header.b=Y34FqxX7
X-Recipient: archive-cygwin AT delorie DOT com
DKIM-Filter: OpenDKIM Filter v2.11.0 sourceware.org A6C4A3857350
DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=cygwin.com;
s=default; t=1745617119;
bh=3klekZl+EoAyvRPnwrXiZ/Kj6gWuqk8DKL3jDGEvYUg=;
h=Date:Subject:To:References:In-Reply-To:List-Id:List-Unsubscribe:
List-Archive:List-Post:List-Help:List-Subscribe:From:Reply-To:
From;
b=Y34FqxX7gSvXP3daz460wXlUCjUPPKmLfB0+n/FGCv2tlUBOp6pFcXMGaxi5yIVET
YPXgZBgoB+HxVgEafM6BgaMdxxBpGeAFnEv7ixO3YW5l7yGaXEBIx2VsGR6JC+cwhC
QlQ68OMfx5NNDu/upB3RSpt/nLGcr2UpDS6wKWOw=
X-Original-To: cygwin AT cygwin DOT com
Delivered-To: cygwin AT cygwin DOT com
DMARC-Filter: OpenDMARC Filter v1.4.2 sourceware.org B2E163858D20
ARC-Filter: OpenARC Filter v1.0.0 sourceware.org B2E163858D20
ARC-Seal: i=1; a=rsa-sha256; d=sourceware.org; s=key; t=1745617057; cv=none;
b=MpN2qDlTncS/Cf0XMIo6beH4DqS2wLLhhKIXUJcZXBQc+qLSUEW3PODnPdoquO7Dn5yMYIQ8QqtSS+QsJ+ACfQ3syXBvK14xCwsAlhWQYkjNpXls9dVLbPsyd7XAbn+sUHwFcgDi+XWLCdU84gOWtsS1j85/jGTGMOERFkGa6bk=
ARC-Message-Signature: i=1; a=rsa-sha256; d=sourceware.org; s=key;
t=1745617057; c=relaxed/simple;
bh=rRJ2NVSAPfJrXFqE7wutvhy3SBUqNVH2dTH2UQlySYI=;
h=Message-ID:Date:MIME-Version:Subject:To:From;
b=uruixnOTrSWGd4kn+ZkwGS5ivO/OvwrGyQ9X0MQteNa7l09EjDZHjeHYGog3pKVOpKNLMdgoXOJE2fdI8p0pEH//yLsOrjfIt5z43s36uWMEAxgtgsPPtmXWPBcYEvDbEPth/Cebe9OrBYXv/0vf/hG9Rv1LGhkesWEEXstZTck=
ARC-Authentication-Results: i=1; server2.sourceware.org
DKIM-Filter: OpenDKIM Filter v2.11.0 sourceware.org B2E163858D20
Message-ID: <edd4aa3d-9c4d-4fa4-ac22-c70767f2c833@maxrnd.com>
Date: Fri, 25 Apr 2025 14:37:31 -0700
MIME-Version: 1.0
User-Agent: Mozilla Thunderbird
Subject: Re: tfind missing a const qualifier.
To: cygwin AT cygwin DOT com
References: <87tt6exmpo DOT fsf AT gmail DOT com>
In-Reply-To: <87tt6exmpo.fsf@gmail.com>
X-BeenThere: cygwin AT cygwin DOT com
X-Mailman-Version: 2.1.30
List-Id: General Cygwin discussions and problem reports <cygwin.cygwin.com>
List-Unsubscribe: <https://cygwin.com/mailman/options/cygwin>,
<mailto:cygwin-request AT cygwin DOT com?subject=unsubscribe>
List-Archive: <https://cygwin.com/pipermail/cygwin/>
List-Post: <mailto:cygwin AT cygwin DOT com>
List-Help: <mailto:cygwin-request AT cygwin DOT com?subject=help>
List-Subscribe: <https://cygwin.com/mailman/listinfo/cygwin>,
<mailto:cygwin-request AT cygwin DOT com?subject=subscribe>
From: Mark Geisert via Cygwin <cygwin AT cygwin DOT com>
Reply-To: Mark Geisert <mark AT maxrnd DOT com>
Errors-To: cygwin-bounces~archive-cygwin=delorie DOT com AT cygwin DOT com
Sender: "Cygwin" <cygwin-bounces~archive-cygwin=delorie DOT com AT cygwin DOT com>

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

- Raw text -


  webmaster     delorie software   privacy  
  Copyright © 2019   by DJ Delorie     Updated Jul 2019