From: Akim Demaille Date: Wed, 6 Dec 2000 15:00:45 +0000 (+0000) Subject: * doc/autoconf.texi (Limitations of Usual Tools) : `for' on X-Git-Tag: autoconf-2.50~343 X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=89b05bc4aa004bd2464ca598fb0cf37f992afa72;p=thirdparty%2Fautoconf.git * doc/autoconf.texi (Limitations of Usual Tools) : `for' on arrays is nondeterministic across AWK implementations. * tests/tools.at (autoconf: forbidden tokens): Sort the error message to guarantee its uniqueness. --- diff --git a/ChangeLog b/ChangeLog index 89c3a4e8c..7b4ee7e50 100644 --- a/ChangeLog +++ b/ChangeLog @@ -1,3 +1,10 @@ +2000-12-06 Akim Demaille + + * doc/autoconf.texi (Limitations of Usual Tools) : `for' on + arrays is nondeterministic across AWK implementations. + * tests/tools.at (autoconf: forbidden tokens): Sort the error + message to guarantee its uniqueness. + 2000-12-06 Akim Demaille The SunOS' egrep fails to process properly the `egrep' invocations diff --git a/doc/autoconf.texi b/doc/autoconf.texi index cac52fd75..4d65bbbf6 100644 --- a/doc/autoconf.texi +++ b/doc/autoconf.texi @@ -5920,6 +5920,25 @@ $ gawk 'function die () @{ print "Aaaaarg!" @} Aaaaarg! @end example +If you want your program to be deterministic, don't depend on @code{for} +on arrays: + +@example +$ cat for.awk +END @{ + arr["foo"] = 1 + arr["bar"] = 1 + for (i in arr) + print i +@} +$ gawk -f for.awk err], 1) +# The output of autoconf is not deterministic here because it +# uses `for (ind in array)'. So be sure to have a unique representation. +AT_CHECK([sort