automake-patches
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: bug#11893: Regression in automake 1.12.1 on Mac OS X


From: Eric Blake
Subject: Re: bug#11893: Regression in automake 1.12.1 on Mac OS X
Date: Thu, 12 Jul 2012 11:06:07 -0600
User-agent: Mozilla/5.0 (X11; Linux x86_64; rv:13.0) Gecko/20120615 Thunderbird/13.0.1

On 07/12/2012 10:23 AM, Stefano Lattarini wrote:

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

Assuming it was intentional, I like your re-wording of
"case-insensible", as an apt description of the pain case-insensitive
systems cause on portability :)

That said, /bin/RMDIR is probably completely portable, but seems like it
would be reliable in practice.  POSIX doesn't reqiure /bin/rmdir to
exist (about the only files that you can guarantee with POSIX are /tmp,
/dev/null, /dev/tty, and /dev/console).  Since /dev/ generally doesn't
exist on mingw, that almost limits you to just testing if /tmp and /TMP
are the same directory to detect a case-insensitive system.  But I don't
know of any systems that lack /bin/rmdir on a default installation, nor
do I suspect many users intentionally create /bin/RMDIR (or even better,
/bIn/rMdIr), so using it as a hueristic seems okay for a first cut at
the problem at hand.  Or, maybe you should just create a file in /tmp
under one spelling and check existence of the file by another spelling.

-- 
Eric Blake   address@hidden    +1-919-301-3266
Libvirt virtualization library http://libvirt.org



Attachment: signature.asc
Description: OpenPGP digital signature


reply via email to

[Prev in Thread] Current Thread [Next in Thread]