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

Re: [PATCH] eliminate test -a and test -o from configure bits

From: Malcolm Rowe <malcolm-svn-dev_at_farside.org.uk>
Date: 2005-12-12 14:06:24 CET

On Sat, Dec 10, 2005 at 01:05:48AM -0600, Peter Samuelson wrote:
> > That's not the only place in configure.in or build/ac-macros that
> > uses test -a. Care to work up a patch?
>
> Sorry, it took a couple days before I got around to it, but sure. It's
> not tested but it is a pretty simple transformation so looks safe.

> [[[
> Eliminate use of 'test -a' and 'test -o' from configure bits.
> While commonly supported, they're not POSIX-compliant, let alone
> compatible with arbitrary pre-POSIX environments.
> No functional changes.

That looks great, thanks. Although now I come to look at it, 'test -a'
and 'test -o' are documented as an XSI extension to POSIX. Are there any
real-life cases where we 'test -a' doesn't work? (not that we probably
shouldn't do this anyway - I just wonder if we're fixing anything concrete
by doing so).

> Index: build/ac-macros/svn-apache.m4
> ===================================================================
> --- build/ac-macros/svn-apache.m4 (revisione 17717)
> +++ build/ac-macros/svn-apache.m4 (copia locale)
> @@ -74,7 +74,7 @@
> APXS_EXPLICIT=1
> ])
>
> -if test "$BINNAME" = "" -a "$APXS" = ""; then
> +if test "$BINNAME $APXS" = " "; then

I don't like this change, though. I know that what you've got is
functionally equivalent, but I think it obscures the purpose of the test.
Can we not use something like 'test -z $BINNAME && test -z $APXS' here?

If you could post a new patch that takes care of that, I'll lightly test
it locally (though as you say, it should be pretty safe), and commit
it for you. You might want to wait a day to see if anyone else has any
more comments.

Regards,
Malcolm

---------------------------------------------------------------------
To unsubscribe, e-mail: dev-unsubscribe@subversion.tigris.org
For additional commands, e-mail: dev-help@subversion.tigris.org
Received on Mon Dec 12 14:08:41 2005

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