[svn.haxx.se] · SVN Dev · SVN Users · SVN Org · TSVN Dev · TSVN Users · Subclipse Dev · Subclipse Users · this month's index

Re: Error caught that would otherwise have been missed in configure

From: Colin Watson <cjwatson_at_flatline.org.uk>
Date: 2003-10-01 23:23:49 CEST

On Wed, Oct 01, 2003 at 11:49:01PM +0300, Jani Averbach wrote:
> And here is the offensive code:
>
> 3183 echo "${ECHO_T}$apr_version" >&6
> 3184
> 3185 if test `expr $apr_version : $APR_WANTED_REGEX` -eq 0 \
> 3186 -a `expr $apr_version : $APR_WANTED_REGEX_TOO` -eq 0; then
> 3187 echo "wanted regex is $APR_WANTED_REGEX or $APR_WANTED_REGEX_TOO"
> 3188 { { echo "$as_me:$LINENO: error: invalid apr version found" >&5
> 3189 echo "$as_me: error: invalid apr version found" >&2;}
> 3190 { (exit 1); exit 1; }; }
> 3191 fi

The -a option to test is not terribly portable and best avoided:

  if test `expr $apr_version : $APR_WANTED_REGEX` -eq 0 && \
     test `expr $apr_version : $APR_WANTED_REGEX_TOO` -eq 0; then

I'm not sure if this is the only problem, though; the lack of quoting
around both the variable substitutions and the entire backquote
expressions concerns me. (To justify the latter, word splitting happens
after command substitution.)

-- 
Colin Watson                                  [cjwatson@flatline.org.uk]
---------------------------------------------------------------------
To unsubscribe, e-mail: dev-unsubscribe@subversion.tigris.org
For additional commands, e-mail: dev-help@subversion.tigris.org
Received on Wed Oct 1 23:24:35 2003

This is an archived mail posted to the Subversion Dev mailing list.

This site is subject to the Apache Privacy Policy and the Apache Public Forum Archive Policy.