autoconf
[Top][All Lists]
Advanced

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

Re: AS_EXECUTABLE_P again -- summary


From: Eli Zaretskii
Subject: Re: AS_EXECUTABLE_P again -- summary
Date: Sun, 23 Jan 2005 06:46:54 +0200

> Date: Sat, 22 Jan 2005 19:51:06 -0700
> From: Eric Blake <address@hidden>
> CC: Stepan Kasal <address@hidden>,  address@hidden,  address@hidden
> 
> >>2) On Cygwin, both `test -x foo' and `test -f foo' look for foo.exe.
> > 
> > That's a bug, IMHO.
> 
> It's actually a design decision, and seems correct to me.  As -x applies
> to more than just executables (for example, directories), you really DO
> want to find a file that is both -f (regular file) and -x (executable), so
> both checks need to look for the .exe extension not required in normal
> Unix.  Cygwin intercepts all POSIX system calls through cygwin1.dll, which
> all cygwin programs link against, and for every call that operates on any
> file name, such as open(), cygwin checks for the first existing file among
> "foo", "foo.exe", "foo.exe.lnk", and "foo.lnk".  The .lnk checks are
> necessary to use the normal Windows link file extension with cygwin
> additions embedded in them to provide both hard and soft links.

Then how can I, with the Cygwin Bash, make a reliable test for the
existence of `foo'?  Suppose that `foo' doesn't exist, but `foo.exe'
does--how can one test for that?




reply via email to

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