PATCH: egcs_update problem

Zack Weinberg zack@rabi.columbia.edu
Tue Jan 19 19:29:00 GMT 1999


On Tue, 19 Jan 1999 21:14:34 +0100 (MET), Gerald Pfeifer wrote:
>On Wed, 13 Jan 1999, Mark Mitchell wrote:
>> With the first patch (the one that removes the use of xargs), the
>> names of the configure.in files spill across my screen, but there is
>> no error message:
>
>The first patch served to check where exactly the problem was, the
>second was a fix candidate.
>
>> So I think the second patch is the one that cures the problem.
>
>Yup. I have checked in the patch below which has been tested on
>sgi-irix-6.5, sparc-sun-solaris2.6 and i386-unknown-freebsd2.2.7.
>
>Let's hope this does not introduce problems on other platforms.

I think it will introduce problems on other platforms.  Specifically,
the list produced by the loop may hit variable length limits in
not-so-old shells.  Also, your use of && will trip a bug in
depressingly recent shells, where && will abort the entire script if
the left-hand side evaluates false.  (This was in the old version too;
it hasn't come up since that test only evaluates false under unusual
conditions.)

It probably isn't worth worrying about until it actually breaks for
someone, but I would do it like this:

find . -name configure.in -o -name '*.y' | while read name; do
	if [ -f $name -a -d `dirname $name`/CVS ]; then echo $name; fi
done >update.$$
cvs -q update `cat update.$$`
rm update.$$

zw

p.s. Could you please generate your patches with diff -u or diff -c in
the future?  Those formats are so much easier to read...



More information about the Gcc-bugs mailing list