autoconf-patches
[Top][All Lists]
Advanced

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

Re: 3-gary-new-AC_PROG_SED.patch


From: Paul Eggert
Subject: Re: 3-gary-new-AC_PROG_SED.patch
Date: 22 Jan 2004 11:07:44 -0800
User-agent: Gnus/5.09 (Gnus v5.9.0) Emacs/21.3

"Gary V. Vaughan" <address@hidden> writes:

> +AC_CACHE_VAL(ac_cv_path_sed,
> +[# Loop through the user's path and test for sed and gsed.
> +# Then use that list of sed's as ones to test for truncation.
> +_AS_PATH_WALK([$PATH],
> +[for ac_prog in sed gsed; do
> +  for ac_exec_ext in '' $ac_executable_extensions; do
> +    if AS_EXECUTABLE_P(["$as_dir/$ac_prog$ac_exec_ext"]); then
> +      _sed_list="$_sed_list $as_dir/$ac_prog$ac_exec_ext"
> +    fi
> +  done
> +done])
> +AS_TMPDIR([sed])
> +_max=0
> +# Add /usr/xpg4/bin/sed as it is typically found on Solaris
> +# along with /bin/sed that truncates output.
> +for _sed in $_sed_list /usr/xpg4/bin/sed; do

Wouldn't it be simpler just to invoke 
_AS_PATH_WALK([$PATH /usr/xpg4/bin]
and omit the two for loops?

Local variables should start with ac_, not _ (e.g., "ac_sed" not "_sed").

> +    echo >>conftest.nl

I vaguely recall that plain "echo" outputs nothing on some hosts.
"echo ''" is safer.

> +    $_sed -e 's/a$//' < conftest.nl >conftest.out || break
> +    cmp -s conftest.out conftest.nl || break

Is cmp -s portable?  It might be more portable to use plain "cmp"
and redirect output to /dev/null.

> +    # 10000 chars as input seems more than enough
> +    test $_count -gt 10 && break

This comment is confusing as the "10" and the "10000" seem linked,
but they're not really.


Could you please resubmit after addressing the above issues?  Thanks.




reply via email to

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