Hello,
Stepan Kasal <[EMAIL PROTECTED]> writes:
> I introduced the problem by the following command
>
> awk '/^ \t*case/,/^ \t*esac/{if(/\[\^.*\)/) exit(1)}'
>
> which I added to autotest. The testsuite is not working properly.
Hm, this seems to be part of the problem. See below.
> On Wed, May 25, 2005 at 02:21:45PM +0200, Ralf Menzel wrote:
>> I'm using a Solaris 9 machine and the Sun Workshop 9.0 compiler:
>
> Yes, Solaris' /bin/awk has a very limited capabilities. Every time
> I try to use awk, I run into this. Unfortunately, I don't have access
> to Solaris.
[snip]
> What may be the root of the problem?
> - the commma in: /re1/, /re2/
> - the regex in if: if(/re/)
Seems, like that is the problem. The Solaris awk expects an expression
as the argument of if. Since `if(/re/)' should be equivalent to
`if($0 ~ /re/)' I tried the following patch:
--- snip ---
Index: tests/local.at
===================================================================
RCS file: /cvsroot/autoconf/autoconf/tests/local.at,v
retrieving revision 1.15
diff -u -p -r1.15 local.at
--- tests/local.at 17 May 2005 09:29:05 -0000 1.15
+++ tests/local.at 25 May 2005 18:03:00 -0000
@@ -53,7 +53,7 @@ AT_CHECK([$at_diff "$1" "$2"])
m4_define([AT_CHECK_SHELL_SYNTAX],
[AS_IF([test x"$ac_cv_sh_n_works" != xno],
[AT_CHECK([/bin/sh -n $1], 0)], [$2])
-AT_CHECK([awk '/^[ \t]*case/,/^[ \t]*esac/{if(/\@<:@\^.*\)/) exit(1)}' $1])])
+AT_CHECK([awk '/^[ \t]*case/,/^[ \t]*esac/{if(@S|@0 ~ /\@<:@\^.*\)/) exit(1)}'
$1])])
m4_define([AT_CHECK_PERL_SYNTAX],
[AT_CHECK([autom4te_perllibdir=$abs_top_srcdir/lib $PERL -c
$abs_top_builddir/bin/$1],
--- snip ---
This reduced the number of failed tests from 151 to 179.
Shall I send the new testsuite.log?
> - or, most likely, the "exit"
I don't think so.
[snip]
> I'll look at it again later.
Thanks,
Ralf