delorie.com/archives/browse.cgi   search  
Mail Archives: cygwin/2025/08/08/18:20:42

DMARC-Filter: OpenDMARC Filter v1.4.2 delorie.com 578MKghK3976385
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 578MKghK3976385
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=UagsUOaf
X-Recipient: archive-cygwin AT delorie DOT com
DKIM-Filter: OpenDKIM Filter v2.11.0 sourceware.org 673D2385781A
DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=cygwin.com;
s=default; t=1754691640;
bh=pStwdPDXiEZBs+8X9OT7YJquvmW2UFlMt1koGkDkZMY=;
h=Date:Subject:To:References:In-Reply-To:List-Id:List-Unsubscribe:
List-Archive:List-Post:List-Help:List-Subscribe:From:Reply-To:Cc:
From;
b=UagsUOaf6UBskDeBO01uZjbCU2qeIb4ayM1P595+Vi8fVO40T6+BLv2cBT3Hv5Mii
KoL2MWJ+YMgOSqy9pcH/Vt0NmcwSmJYKYnZH9wHqr1U2OEgbdRvAUzoC7ciMVwLCOs
Sv+mCqZllF4EiXu+PdU7avTQtydxusTRUdGnuDbk=
X-Original-To: cygwin AT cygwin DOT com
Delivered-To: cygwin AT cygwin DOT com
DMARC-Filter: OpenDMARC Filter v1.4.2 sourceware.org E120A3857737
ARC-Filter: OpenARC Filter v1.0.0 sourceware.org E120A3857737
ARC-Seal: i=1; a=rsa-sha256; d=sourceware.org; s=key; t=1754691563; cv=none;
b=BfXBXJSzCsU+nlgaZN08BFYF7VR+U9AkG4jFSsZPjh83GVLQ7HBQwvAbE21xd8xAMorNQgtHi3l2xNXC1QqLYA/TtgLVNUkVErnQjVUG8N8PAr9ZGIhB46+TXt0sW2YAm9vvc2H19e1/lUjy+aRjEbnNSzWaG0uSp9wuCfexcvs=
ARC-Message-Signature: i=1; a=rsa-sha256; d=sourceware.org; s=key;
t=1754691563; c=relaxed/simple;
bh=XfabCJlj9tApBknTMOIBmGKl7iP9IjrYIGcftG+tp/8=;
h=Message-ID:Date:MIME-Version:From:Subject:To:DKIM-Signature;
b=IsMC5k+0xM5x2gLkBrsIkGQAEQ7VG2M7kKCFiv8CkJSVEqqNczRyHv6+G2XyrnVmtwlxfQd5D7048b0tV6Bsq1jsauL+Y4PivWJeln7Alu8DG3k0ge/g91oczMHO3x6YtcT9ywOAR7DljTT1kF/yxrVIAWwKDjguN44WwrQ8BMo=
ARC-Authentication-Results: i=1; server2.sourceware.org
DKIM-Filter: OpenDKIM Filter v2.11.0 sourceware.org E120A3857737
Message-ID: <585f65a8-a675-4a1e-a774-5dc4ff2337f8@systematicsw.ab.ca>
Date: Fri, 8 Aug 2025 16:19:20 -0600
MIME-Version: 1.0
User-Agent: Mozilla Thunderbird
Subject: Re: getting the on-disk case for a path
To: cygwin AT cygwin DOT com
References: <36a0093c-fc8b-f268-9cbf-71c1c1268ef7 AT jdrake DOT com>
<11a5bd41-e977-4f25-9bf8-4917f1c65934 AT towo DOT net>
Organization: Systematic Software
In-Reply-To: <11a5bd41-e977-4f25-9bf8-4917f1c65934@towo.net>
X-Stat-Signature: 3p4cy31cenjhzmoahmf1fj4nu8hjgry5
X-Rspamd-Server: rspamout01
X-Rspamd-Queue-Id: 114BA20037
X-Session-Marker: 427269616E2E496E676C69734053797374656D6174696353572E61622E6361
X-Session-ID: U2FsdGVkX1/5Q2PD38VFI6Re3yc+0x94ocbf+8xYHuA=
X-HE-Tag: 1754691560-814762
X-HE-Meta: U2FsdGVkX1+xfXFCA57dx+kOBuRNzlFSRSx6zc0CeQQtLzwwCpJzKGdOJECpK2aWbok5gQeF/aww7cMytchPQm9HpvPy+mrKTWELp1ig6fKzBDpiqOZ3B0OmaBGwgp1RmDOVEqnDhbibX2mp93ry9HbpTgTjzSv3IhsQYVcLcYyKMaD14s2Tj56nLwfjB/A77fpEr69xtJ4lxkdURgduVXyzS1vygXnhgHOYKgvSoP2yOY5cg52sQwWoVtrUT2C2Nnqa5pKTEnJWlw3RRraXhY3hn3B10TwIPXNtlqFq8PL5MGEYPzpD2af0THjJ+0HdEt0QN+H1dEZk+uzPTJO+lRIuPQ9ir6SjwSZft+cAO8GlmupaZ92LyA==
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: Brian Inglis via Cygwin <cygwin AT cygwin DOT com>
Reply-To: cygwin AT cygwin DOT com
Cc: brian DOT inglis AT systematicsw DOT ab DOT ca
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>
X-MIME-Autoconverted: from base64 to 8bit by delorie.com id 578MKghK3976385

On 2025-08-08 00:53, Thomas Wolff via Cygwin wrote:
> Am 08.08.2025 um 02:31 schrieb Jeremy Drake via Cygwin:
>> On a case-insensitive but case-preserving filesystem, is there a Cygwin
>> API to get the on-disk case for a given path?  It seems like `realpath`
>> ought to do it but running
>> $ touch case-test
>> $ realpath CASE-TEST
>> returns CASE-TEST.
> On the command line, you could use
> ls | grep -i
> 
>> Regardless, canonicalize_file_name or realpath may not
>> be what I want because it would dereference symlinks.
>>
>> Background: I'm trying to debug some test failures in Clang, due to a
>> warning that's supposed to be issued when you #include "foo.h" but the
>> file on disk that it opened is "Foo.h".

Looks like if you use wildcards, it should work correctly:

$ lsattr -dl .
.                            ---
$ l *_exit*
_Exit.2  _exit.3
$ l _exit.?
_Exit.2  _exit.3
$ l _exit.[23]
_Exit.2  _exit.3
$ l *EXIT-TEST*
exit-test
$ l *exit*
_Exit.2  _exit.3  EXIT  exit-test

also, you could just opendir(3)/readdir(3)/closedir(3) and strcasecmp(3).

-- 
Take care. Thanks, Brian Inglis              Calgary, Alberta, Canada

La perfection est atteinte                   Perfection is achieved
non pas lorsqu'il n'y a plus rien à ajouter  not when there is no more to add
mais lorsqu'il n'y a plus rien à retrancher  but when there is no more to cut
                                 -- Antoine de Saint-Exupéry

-- 
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