GNU bug report logs - #10766
CXX gets the value 'CC' on Cygwin, but CC is in fact cc

Previous Next

Package: automake;

Reported by: Peter Rosin <peda <at> lysator.liu.se>

Date: Wed, 8 Feb 2012 21:06:01 UTC

Severity: minor

Tags: patch

Done: Stefano Lattarini <stefano.lattarini <at> gmail.com>

Bug is archived. No further changes may be made.

Full log


View this message in rfc822 format

From: Stefano Lattarini <stefano.lattarini <at> gmail.com>
To: Eric Blake <eblake <at> redhat.com>
Cc: Peter Rosin <peda <at> lysator.liu.se>, Max Horn <max <at> quendi.de>, 11893 <at> debbugs.gnu.org, "automake-patches <at> gnu.org" <automake-patches <at> gnu.org>, 10766 <at> debbugs.gnu.org
Subject: bug#10766: bug#11893: Regression in automake 1.12.1 on Mac OS X
Date: Thu, 12 Jul 2012 18:23:21 +0200
Hi Eric.

On 07/12/2012 05:48 PM, Eric Blake wrote:
> On 07/12/2012 08:37 AM, Stefano Lattarini wrote:
> 
>>>> Agreed (albeit it does its dirty work for now).  Any suggestion on
>>>> how to make it more reliable?
>>>
>>> Is test /usr/bin/CC -ef /usr/bin/cc portable enough?
>>>
>> I have no idea ...  it seems to work on Cygwin 1.5 though.
> 
> In general, 'test a -ef b' is not portable - it is not required by POSIX
> 2008 (although it has been proposed for a future version of POSIX).  But
> on Cygwin, /bin/sh happens to support it.  If you can guarantee that you
> are already on cygwin before using -ef, then this would work; or maybe
> if you pre-filter with 'test . -ef .' to ensure that -ef is understood,
> before then trying -ef to check for case insensitivity.
> 
> Other than that, the only supported method in existing POSIX for
> checking for equal files is by parsing 'ls -i' output; but I don't know
> if 'ls -i' is portable to ancient hosts.
> 
I was fearing this would have got quickly complex and messy ...

So I think I'll stick to my dumber and safer "test -f /bin/RMDIR" as a
way to detect case-insensible filesystems.

Thanks,
  Stefano




This bug report was last modified 13 years and 11 days ago.

Previous Next


GNU bug tracking system
Copyright (C) 1999 Darren O. Benham, 1997,2003 nCipher Corporation Ltd, 1994-97 Ian Jackson.