[Top][All Lists]
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: AT_KEYWORDS failure: cmdline OR-combinations
From: |
Stepan Kasal |
Subject: |
Re: AT_KEYWORDS failure: cmdline OR-combinations |
Date: |
Fri, 26 Aug 2005 18:12:52 +0200 |
User-agent: |
Mutt/1.4.1i |
Hello Paul,
regarding the test failures reported by Ralf Wildenhues in
http://lists.gnu.org/archive/html/autoconf-patches/2005-08/msg00055.html
As Ralf has already told you, we have a solution for them.
(Yes, we have also analyzed the problem with test 66, and I'll send a mail
about it soon.)
I apologize that I haven't published our results earlier.
On Thu, Aug 25, 2005 at 02:31:30PM -0700, Paul Eggert wrote:
> Ralf Wildenhues writes:
> > + if (v1"" == "") d1 = v1; else { d1 = substr(v1, 1, 1); v1 =
> > substr(v1,2) }
> > + if (v2"" == "") d2 = v2; else { d2 = substr(v2, 1, 1); v2 =
> > substr(v2,2) }
>
> That looks fairly safe, but even safer would be to use the length function,
> since earlier bits of the code already do that. I installed this:
[...]
> + if (length(v1)) { d1 = substr(v1, 1, 1); v1 = substr(v1,2) } else d1=v1
> + if (length(v2)) { d2 = substr(v2, 1, 1); v2 = substr(v2,2) } else d2=v2
But your fix also induces the failure reported by Ralf:
| 21. m4sh.at:252: testing ...
| ../../autoconf-2.59c/tests/m4sh.at:285: autom4te --language=m4sh script.as -o
script
| ../../autoconf-2.59c/tests/m4sh.at:286: ./script
| 0a1
| > script: error: version = 000; should be < 000
| ../../autoconf-2.59c/tests/m4sh.at:286: exit code was 1, expected 0
| 21. m4sh.at:252: 21. AS_VERSION_COMPARE (m4sh.at:252): FAILED (m4sh.at:286)
The problem is that /usr/xpg4/bin/awk on Solaris 8 (and probably also the above
versions) thinks that empty string might be a numerical string.
Moreover, substr propagates the "numerical string" flag.
So we have:
/usr/xpg4/bin/awk 'END{d1=v1;d2=substr(v2,1,1); if(v1==v2) print "error"}' \
v1= v2=000 /dev/null
This is why the script compares versions "" and "000" as being equal, hence
the error quoted above.
I don't have access to any Solaris. If you could verify that the above bug,
and hence the failure of test 21, is still present on Solaris 10, it would
be nice.
I plan to document these bugs, but they cannot be described by one sentence,
so it'll take some time until I fond time to do it.
(I hesitated to submit the patch without the corresponding doc. Sorry again.)
Attached please find a patch which fixes the problem. Ralf verified it
works with /usr/xpg4/bin/awk and /bin/awk on Solaris 8 and 9.
(The patch applies to current CVS.)
OK to commit?
Stepan
autoconf-20050826-solaris-version.patch
Description: Text document
- Re: AT_KEYWORDS failure: cmdline OR-combinations, (continued)
- Re: AT_KEYWORDS failure: cmdline OR-combinations, Ralf Wildenhues, 2005/08/16
- Re: AT_KEYWORDS failure: cmdline OR-combinations, Stepan Kasal, 2005/08/17
- Re: AT_KEYWORDS failure: cmdline OR-combinations, Ralf Wildenhues, 2005/08/17
- Re: AT_KEYWORDS failure: cmdline OR-combinations, Stepan Kasal, 2005/08/17
- Re: AT_KEYWORDS failure: cmdline OR-combinations, Stepan Kasal, 2005/08/23
- Re: AT_KEYWORDS failure: cmdline OR-combinations, Ralf Wildenhues, 2005/08/17
- Re: AT_KEYWORDS failure: cmdline OR-combinations, Stepan Kasal, 2005/08/17
- Re: AT_KEYWORDS failure: cmdline OR-combinations, Ralf Wildenhues, 2005/08/19
- Re: AT_KEYWORDS failure: cmdline OR-combinations, Paul Eggert, 2005/08/25
- Re: AT_KEYWORDS failure: cmdline OR-combinations, Ralf Wildenhues, 2005/08/25
- Re: AT_KEYWORDS failure: cmdline OR-combinations,
Stepan Kasal <=
- Re: AT_KEYWORDS failure: cmdline OR-combinations, Paul Eggert, 2005/08/26
- Re: AT_KEYWORDS failure: cmdline OR-combinations, Ralf Wildenhues, 2005/08/27
- Re: AT_KEYWORDS failure: cmdline OR-combinations, Stepan Kasal, 2005/08/28
- Re: AT_KEYWORDS failure: cmdline OR-combinations, Ralf Wildenhues, 2005/08/28