autoconf-patches
[Top][All Lists]
Advanced

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

fixed a FIXME for test -x


From: Paul Eggert
Subject: fixed a FIXME for test -x
Date: Wed, 04 Oct 2006 11:53:55 -0700
User-agent: Gnus/5.1008 (Gnus v5.10.8) Emacs/21.4 (gnu/linux)

I installed this:

2006-10-04  Paul Eggert  <address@hidden>

        * lib/m4sugar/m4sh.m4 (_AS_TEST_PREPARE): Use "test -x /" rather
        than creating a file to use with test -x; this is much faster.

--- lib/m4sugar/m4sh.m4 12 Sep 2006 07:07:32 -0000      1.193
+++ lib/m4sugar/m4sh.m4 4 Oct 2006 18:53:00 -0000
@@ -1017,18 +1017,12 @@ esac[]dnl
 # ----------------
 # Find out ahead of time whether ``test -x'' can be used to distinguish
 # executables from other regular files.
-# FIXME: This should use "test -x /"; that's much faster.
 m4_defun([_AS_TEST_PREPARE],
-[# Find out whether ``test -x'' works.  Don't use a zero-byte file, as
-# systems may use methods other than mode bits to determine executability.
-echo '#! /bin/sh' >conf$$.file
-chmod +x conf$$.file
-if test -x conf$$.file >/dev/null 2>&1; then
-  as_executable_p="test -x"
+[if test -x / >/dev/null 2>&1; then
+  as_executable_p='test -x'
 else
   as_executable_p=:
 fi
-rm -f conf$$.file
 ])# _AS_TEST_PREPARE
 
 




reply via email to

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