www.delorie.com/archives/browse.cgi   search  
Mail Archives: cygwin/2025/08/08/02:06:52

DMARC-Filter: OpenDMARC Filter v1.4.2 delorie.com 57866pIp3625944
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 57866pIp3625944
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=Qqpp+XYE
X-Recipient: archive-cygwin AT delorie DOT com
DKIM-Filter: OpenDKIM Filter v2.11.0 sourceware.org C93B4385843F
DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=cygwin.com;
s=default; t=1754633208;
bh=rUkMyH7nHTiUN3FTCkIhI1TI6oXnfCIs4jypGwthxJs=;
h=Date:To:Cc:Subject:References:In-Reply-To:List-Id:
List-Unsubscribe:List-Archive:List-Post:List-Help:List-Subscribe:
From:Reply-To:From;
b=Qqpp+XYELN9iC4rZ0BYdTm4MFou0kQzx2UB7bgC4Ybsv9Gqa8ee9G/MrrMiDGSMEP
PxIBHQwbzTkz8R+LhcGJ+aajh+h3MSF3lM3u1uUYzdVp+IWj7ztJWYF41IVUxy5BRW
JPIRAs8dsOaV8x0ezdsGR9jSB/CheNGuR4Nmd1O4=
X-Original-To: cygwin AT cygwin DOT com
Delivered-To: cygwin AT cygwin DOT com
DMARC-Filter: OpenDMARC Filter v1.4.2 sourceware.org 205913858C40
ARC-Filter: OpenARC Filter v1.0.0 sourceware.org 205913858C40
ARC-Seal: i=1; a=rsa-sha256; d=sourceware.org; s=key; t=1754633185; cv=none;
b=I7QbJHBinyPDYJW/BrO6pFKVvUTTIqBM1h5PPKdmShTlh0QT9WdLUTpAvaPW8ILaaBBvg++GwlWJ7ibNHdq53y8nUgVVSjQR5qsOOjL3KSAEhT1mmp+fH2AMLyXDo7NkxaUp8WDG9QXt4pfwyrhpA7YsFJvnPBcplEwEZmIY9Wg=
ARC-Message-Signature: i=1; a=rsa-sha256; d=sourceware.org; s=key;
t=1754633185; c=relaxed/simple;
bh=RJlsp6RHm9ZnttMLb709EeV1l3F8kq0Ymbi5uint6po=;
h=DKIM-Signature:Date:From:To:Subject:Message-ID:MIME-Version;
b=JvUlzjpHKz14XR10ojeHa3Ot4JN4z9Jkb8BOJJYeNTu8RgCq6530/dupeRgwusobSPiCx8vLsiy37LXFifRgqdiTv7ZOeA16dhYjy2AJFM9kFYdb0xTZ+14M+kS07wzXUKQGqCtBlCsyo7QHNYn1NpkQWiDu3niP/TY8q57J5y8=
ARC-Authentication-Results: i=1; server2.sourceware.org
DKIM-Filter: OpenDKIM Filter v2.11.0 sourceware.org 205913858C40
Date: Fri, 8 Aug 2025 02:06:20 -0400
To: Jeremy Drake <cygwin AT jdrake DOT com>
Cc: cygwin AT cygwin DOT com
Subject: Re: getting the on-disk case for a path
Message-ID: <aJWT3FTbrF95oO6U@xps13>
References: <36a0093c-fc8b-f268-9cbf-71c1c1268ef7 AT jdrake DOT com>
MIME-Version: 1.0
In-Reply-To: <36a0093c-fc8b-f268-9cbf-71c1c1268ef7@jdrake.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: Glenn Strauss via Cygwin <cygwin AT cygwin DOT com>
Reply-To: Glenn Strauss <gs-cygwin DOT com AT gluelogic 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>

On Thu, Aug 07, 2025 at 05:31:11PM -0700, Jeremy Drake via Cygwin wrote:
> 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.  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".

Not directly answering your initial question, but I have found the -H
compiler flag useful for troubleshooting from where files are included:
If you change the compiler command line from gcc/clang "... -o foo.o"
to "-H", then the compiler outputs a list of header files paths as they
are included by the preprocessor.

Cheers, Glenn

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