autoconf-patches
[Top][All Lists]
Advanced

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

Re: [PATCH] m4sh: require that 'test -x' works


From: Eric Blake
Subject: Re: [PATCH] m4sh: require that 'test -x' works
Date: Fri, 24 Feb 2012 21:48:07 -0700
User-agent: Mozilla/5.0 (X11; Linux x86_64; rv:10.0.1) Gecko/20120209 Thunderbird/10.0.1

On 02/24/2012 09:39 PM, Eric Blake wrote:
> 4.3BSD is no longer a reasonable portability target; and we are
> pretty sure that these days we can find at least one shell on any
> platform that supports 'test -x'.  Drop a horribly unsafe use of
> eval as a result. :)
> 
> Libtool still uses $as_executable_p without so much as calling
> either AS_TEST_X or AS_EXECUTABLE_P, even though the latter has
> existed, although undocumented, since at least 2.59; furthermore,
> libtool uses it in a context where filtering out directories
> would have been desirable.  Shame on them.
> 
> * lib/m4sugar/m4sh.m4 (_AS_TEST_X_WORKS): New probe.
> (AS_SHELL_SANITIZE, AS_INIT): Use it in shell searching.
> (AS_TEST_X, AS_EXECUTABLE_P): Simplify.
> 
> Signed-off-by: Eric Blake <address@hidden>
> ---
>  lib/m4sugar/m4sh.m4 |   49 ++++++++++++++-----------------------------------
>  1 files changed, 14 insertions(+), 35 deletions(-)

And here's why I'm waiting for a review on this one, rather than pushing
immediately:

> +[as_test_x='test x'

Obviously, that should be 'test -x'.

I'm also working on a followup patch that documents AS_EXECUTABLE_P, as
well as defines $as_executable_p as a shell function, so that libtool's
lone use of that function will filter out directories, as if they had
properly used the macro rather than the internal shell variable, in the
first place.

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