]> git.ipfire.org Git - thirdparty/autoconf.git/commitdiff
Solaris' awk cannot take more than 99 fields.
authorStepan Kasal <kasal@ucw.cz>
Mon, 6 Jun 2005 08:01:30 +0000 (08:01 +0000)
committerStepan Kasal <kasal@ucw.cz>
Mon, 6 Jun 2005 08:01:30 +0000 (08:01 +0000)
ChangeLog
doc/autoconf.texi
lib/autotest/general.m4

index d4c206825eb710f479c290108fd69052e8f3415c..2b668a1a97b1465f7c695e2602b5a7d4e554ac87 100644 (file)
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,3 +1,17 @@
+2005-06-06  Ralf Menzel        <menzel@ls6.cs.uni-dortmund.de>  (trivial change)
+
+       * doc/autoconf.texi (Limitations of Usual Tools): Solaris' awk cannot
+         swallow records with more than 99 fields.
+       * lib/autotest/general.m4 (AT_INIT): Use the awk builtin `split' to 
+         parse the long line.
+
+2005-06-04  Stepan Kasal  <kasal@ucw.cz>
+
+       * doc/autoconf.texi (Limitations of Usual Tools): AIX awk cannot
+         swallow literals longer than 399.  Reported by Ralf Wildenhues.
+       * lib/autotest/general.m4 (AT_INIT): Pass $at_groups though stdin,
+         to workaround this limitation.
+
 2005-06-03  Steven G. Johnson  <stevenj@alum.mit.edu>
 
        * lib/autoconf/fortran.m4 (_AC_PROG_FC): Find g95 in addition
index cf4645dbe2ef8eb3e98977f9f438222fe8c046b5..0457da1cbccec308f5206ea0a641e806e8733b80 100644 (file)
@@ -11516,6 +11516,9 @@ or use a simple test to reject such AWK@.
 @acronym{AIX} version 5.2 limits on the maximal length of regular
 expressions and literal strings in the program to 399.
 
+Some @command{awk}, such as Solaris 9's native one, have a limit of 99
+fields in a record. You may be able to circumvent this problem by using
+the builtin function @code{split}.
 
 @item @command{cat}
 @c ----------------
index f116ad3fc956606b78858dbc1f1d6a9ea85ca7d3..e08f57c244db2cf68aaafe264add724c346b170e 100644 (file)
@@ -441,11 +441,13 @@ AT_TESTSUITE_NAME test groups:
       KEYWORDS
 
 _ATEOF
-  # "  1 42  45 " => "^(1|42|45);".
+  # Passing at_groups is tricky.  We cannot use it to form a literal string
+  # or regexp because of the limitation of AIX awk.  And Solaris' awk
+  # doesn't grok more than 99 fieldsin a record, so we have to use `split'.
   echo "$at_groups$as_nl$at_help_all" |
-    awk 'NR == 1 {
-          for (n = NF; n; n--) selected[[$n]] = 1
-          FS = ";"
+    awk 'BEGIN { FS = ";" }
+        NR == 1 {
+          for (n = split($ 0, a, " "); n; n--) selected[[a[n]]] = 1
           next
         }
         {