bug-gnulib
[Top][All Lists]
Advanced

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

Re: [bug #31646] grep fails to build on Solaris 10, because it lacks gre


From: Bruno Haible
Subject: Re: [bug #31646] grep fails to build on Solaris 10, because it lacks grep
Date: Sun, 14 Nov 2010 17:25:06 +0100
User-agent: KMail/1.9.9

Paolo Bonzini wrote:
> +# Override grep during configure.
> +fn_grep () {

I would suggest more comments.
  - What is the purpose of this override?
  - What are its limitations?
10 years from now, no one will remember.

Suggestion:

# Set the GREP and EGREP variables to a dummy replacement for the 'grep'
# command, so that AC_PROG_GREP and AC_PROG_EGREP don't fail when no good
# 'grep' program is found. This makes it possible to build GNU grep on a
# Solaris machine that has only /usr/bin/grep and no /usr/xpg4/bin/grep.
# This function supports only restricted arguments:
#   - No file names as arguments, process only standard input.
#   - Only literal strings, no regular expressions.
#   - The only options are -e and -Ee.
# This function also does not support long lines, and backslash-processes
# the input.

> +  while read line; do

Note that this backslash-processes the input. This is probably not a big
problem, because preprocessed C code contains backslashes only in string
literals and in #include directives.

The alternative 'read -r' is not usable, because Solaris /bin/sh does not
support it (see the Autoconf manual).

Bruno



reply via email to

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