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 <[email protected]>
> ---
>  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   [email protected]    +1-919-301-3266
Libvirt virtualization library http://libvirt.org

Attachment: signature.asc
Description: OpenPGP digital signature

Reply via email to