autoconf-patches
[Top][All Lists]
Advanced

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

Re: AS_EXECUTABLE_P enhancement


From: Stepan Kasal
Subject: Re: AS_EXECUTABLE_P enhancement
Date: Mon, 13 Dec 2004 09:42:15 +0100
User-agent: Mutt/1.4.1i

Hi,

> Can you please remind us why that patch is needed?

Current AS_EXECUTABLE_P is ``test -f'' which may wrongly suceed
on a regular non-executable file.

``test -x'' catches this, but it also succeds on directories

we cannot use ``test -d'' because of Cygwin and DJGPP:
        if both foo/ and foo.exe exist, ``test -d'' is also true.

So the best solution is ``test -f && test -x''.

>   test -x "$file" && test -f "$file"

I don't see any difference, as the cases when one test suceeds and the other
fails are rare.

>   test -f "$file" && test -f "$file"

What's wrong with my

        test -f "$file" && : "$file"

> It's a bit slower on older hosts, but that's not worth worrying about.

Sure.

I noticed that the patch can be simplified; an updated version is attached
to this mail.

Have a nice day,
        Stepan Kasal

Attachment: autoconf-20041212-test-x-2.patch
Description: Text document


reply via email to

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