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

Re: [PATCH] if ! is not portable

From: Greg Hudson <ghudson_at_MIT.EDU>
Date: 2002-02-10 00:32:17 CET

On Sat, 2002-02-09 at 13:28, Zack Weinberg wrote:
> The only other portable way to do this is
>
> cmp -s ./ac-helpers/find_apr.m4 ./apr/build/find_apr.m4
> if [ $? -ne 0 ]; then

Well... there is one other way:

cmp -s ./ac-helpers/find_apr.m4 ./apr/build/find_apr.m4 || {
  ...
}

but while it is more elegant, it is less clear (to my mind, anyway). So
the if-with-empty-then-branch is probably better.

---------------------------------------------------------------------
To unsubscribe, e-mail: dev-unsubscribe@subversion.tigris.org
For additional commands, e-mail: dev-help@subversion.tigris.org
Received on Sat Oct 21 14:37:06 2006

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.