autoconf-patches
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: divert()/m4_divert() broken in autoconf-2.64+


From: Eric Blake
Subject: Re: divert()/m4_divert() broken in autoconf-2.64+
Date: Sat, 28 Nov 2009 14:56:45 -0700
User-agent: Mozilla/5.0 (Windows; U; Windows NT 5.1; en-US; rv:1.8.1.23) Gecko/20090812 Thunderbird/2.0.0.23 Mnenhy/0.7.6.666

-----BEGIN PGP SIGNED MESSAGE-----
Hash: SHA1

According to Ralf Wildenhues on 11/27/2009 1:20 PM:
>> Maybe I should document the diversion names of DEFAULTS and
>> INIT_PREPARE; I'm a bit undecided on that one.  But I don't want to
>> document the values associated with named diversions, so that we are
>> free to change the underlying value at a later date (maybe
>> INIT_PREPARE will move to 350 if we add a new named diversion that
>> needs to be at 300); as long as you go through named interfaces rather
>> than raw numbers, then we can make such changes under the hood without
>> breaking compatibility with your configure.ac.
> 
> Hmm, is it somehow possible for the user to define a new diversion
> number between DEFAULTS and INIT_PREPARE by referring to these symbols
> only?  If yes, is that something you'd want to allow the user to do?

Not really possible with documented interfaces at the moment; if it's
something we want, though, I could probably come up with an API to expose
that.  Maybe:

# m4_divert_create(NAME, BASE)
# Create a named diversion NAME that expands immediately after the
# named diversion BASE
m4_define([m4_divert_create],
[m4_define([_m4_divert($1)], m4_incr(_m4_divert([$2])))])

At any rate, here's the patch I'm currently testing, to issue a syntax
warning when not using a named diversion, and to document the fallout from
this thread.

- --
Don't work too hard, make some time for fun as well!

Eric Blake             address@hidden
-----BEGIN PGP SIGNATURE-----
Version: GnuPG v1.4.9 (Cygwin)
Comment: Public key at home.comcast.net/~ericblake/eblake.gpg
Comment: Using GnuPG with Mozilla - http://enigmail.mozdev.org/

iEYEARECAAYFAksRnJ0ACgkQ84KuGfSFAYB1XgCgvs2ybcxG9ccVD8ukuUQuyl92
wDoAnR+JcyWy6Pal+VP1HB5uqbmWfQ31
=AW33
-----END PGP SIGNATURE-----
>From f4849149279030a9621898026718480d0678ec79 Mon Sep 17 00:00:00 2001
From: Eric Blake <address@hidden>
Date: Tue, 24 Nov 2009 17:20:33 -0700
Subject: [PATCH] Warn if using unnamed diversion.

* lib/m4sugar/m4sugar.m4 (_m4_divert, m4_divert_push): Add
optional parameter, which controls warning.
(m4_divert_pop, m4_cleardivert, m4_divert_require)
(_m4_require_call): Adjust callers.
* lib/m4sugar/m4sh.m4 (AS_REQUIRE): Likewise.
* tests/m4sh.at (AT_DATA_LINENO): Avoid triggering the warning.
* tests/tools.at (autom4te and whitespace in file names)
(autoconf: the empty token): Likewise.
* tests/m4sugar.at (AT_CHECK_M4SUGAR_TEXT, m4@&address@hidden)
(m4@&address@hidden, recursion): Likewise.
(m4@&address@hidden, m4@&address@hidden): Adjust expected output.
* NEWS: Document the warning.
* doc/autoconf.texi (Redefined M4 Macros) <m4_divert>,
<m4_undivert>: Make even more explicit that using these directly
is discouraged.
(Diversion support): Further warn against improper diversion
changes.
<m4_divert_text>: Give an example of proper use.
Reported by Mike Frysinger.

Signed-off-by: Eric Blake <address@hidden>
---
 ChangeLog              |   23 +++++++++++++++
 NEWS                   |    3 ++
 doc/autoconf.texi      |   71 +++++++++++++++++++++++++++++++++++++++++++-----
 lib/m4sugar/m4sh.m4    |    2 +-
 lib/m4sugar/m4sugar.m4 |   26 ++++++++++-------
 tests/m4sh.at          |    2 +-
 tests/m4sugar.at       |   60 ++++++++++++++++++++++++----------------
 tests/tools.at         |    8 +++---
 8 files changed, 147 insertions(+), 48 deletions(-)

diff --git a/ChangeLog b/ChangeLog
index 572d645..1772e9e 100644
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,3 +1,26 @@
+2009-11-28  Eric Blake  <address@hidden>
+
+       Warn if using unnamed diversion.
+       * lib/m4sugar/m4sugar.m4 (_m4_divert, m4_divert_push): Add
+       optional parameter, which controls warning.
+       (m4_divert_pop, m4_cleardivert, m4_divert_require)
+       (_m4_require_call): Adjust callers.
+       * lib/m4sugar/m4sh.m4 (AS_REQUIRE): Likewise.
+       * tests/m4sh.at (AT_DATA_LINENO): Avoid triggering the warning.
+       * tests/tools.at (autom4te and whitespace in file names)
+       (autoconf: the empty token): Likewise.
+       * tests/m4sugar.at (AT_CHECK_M4SUGAR_TEXT, m4@&address@hidden)
+       (m4@&address@hidden, recursion): Likewise.
+       (m4@&address@hidden, m4@&address@hidden): Adjust expected output.
+       * NEWS: Document the warning.
+       * doc/autoconf.texi (Redefined M4 Macros) <m4_divert>,
+       <m4_undivert>: Make even more explicit that using these directly
+       is discouraged.
+       (Diversion support): Further warn against improper diversion
+       changes.
+       <m4_divert_text>: Give an example of proper use.
+       Reported by Mike Frysinger.
+
 2009-11-27  Paolo Bonzini  <address@hidden>

        Bump m4.m4 serial number.
diff --git a/NEWS b/NEWS
index 32fa957..97dcab0 100644
--- a/NEWS
+++ b/NEWS
@@ -5,6 +5,9 @@ GNU Autoconf NEWS - User visible changes.

 ** AC_FUNC_MMAP works in C++ mode again.  Regression introduced in 2.64.

+** Use of m4_divert without a named diversion now issues a syntax warning,
+   since it is seldom right to change diversions behind autoconf's back.
+
 * Major changes in Autoconf 2.65 (2009-11-21) [stable]
   Released by Eric Blake, based on git versions 2.64.*.

diff --git a/doc/autoconf.texi b/doc/autoconf.texi
index 0177831..01c41c5 100644
--- a/doc/autoconf.texi
+++ b/doc/autoconf.texi
@@ -11116,7 +11116,11 @@ Redefined M4 Macros
 @end example
 @noindent
 @xref{Diversion support}, for more details about the use of the
-diversion stack.
+diversion stack.  In particular, this implies that @var{diversion}
+should be a named diversion rather than a raw number.  But be aware that
+it is seldom necessary to explicitly change the diversion stack, and
+that when done incorrectly, it can lead to syntactically invalid
+scripts.
 @end defmac

 @defmac m4_dumpdef (@address@hidden)
@@ -11210,7 +11214,9 @@ Redefined M4 Macros
 Also, since the M4sugar diversion stack prefers named
 diversions, the use of @code{m4_undivert} to include files is risky.
 @xref{Diversion support}, for more details about the use of the
-diversion stack.
+diversion stack.  But be aware that it is seldom necessary to explicitly
+change the diversion stack, and that when done incorrectly, it can lead
+to syntactically invalid scripts.
 @end defmac

 @defmac m4_wrap (@var{text})
@@ -11298,12 +11304,19 @@ Diagnostic Macros
 @node Diversion support
 @subsection Diversion support

-M4sugar makes heavy use of diversions, because it is often the case that
+M4sugar makes heavy use of diversions under the hood, because it is
+often the case that
 text that must appear early in the output is not discovered until late
 in the input.  Additionally, some of the topological sorting algorithms
 used in resolving macro dependencies use diversions.  However, most
 macros should not need to change diversions directly, but rather rely on
-higher-level M4sugar macros to manage diversions transparently.
+higher-level M4sugar macros to manage diversions transparently.  If you
+change diversions improperly, you risk generating a syntactically
+invalid script, because an incorrect diversion will violate assumptions
+made by many macros about whether prerequisite text has been previously
+output.  In short, if you manually change the diversion, you should not
+expect any macros provided by the Autoconf package to work until you
+have restored the diversion stack back to its original state.

 In the rare case that it is necessary to write a macro that explicitly
 outputs text to a different diversion, it is important to be aware of an
@@ -11334,9 +11347,10 @@ Diversion support

 To make diversion management easier, M4sugar uses the concept of named
 diversions.  Rather than using diversion numbers directly, it is nicer
-to associate a name with each diversion; the diversion number associated
-with a particular diversion name is an implementation detail, so you
-should only use diversion names.  In general, you should not output text
+to associate a name with each diversion.  The diversion number associated
+with a particular diversion name is an implementation detail, and a
+syntax warning is issued if a diversion number is used instead of a
+name.  In general, you should not output text
 to a named diversion until after calling the appropriate initialization
 routine for your language (@code{m4_init}, @code{AS_INIT},
 @code{AT_INIT}, @dots{}), although there are some exceptions documented
@@ -11386,6 +11400,26 @@ Diversion support
 will work even before @code{AT_INIT}.
 @end table

+Autoconf inherits diversions from M4sh, and adds the following named
+diversions which developers can utilize.
address@hidden @code
address@hidden DEFAULTS
+This diversion contains shell variable assignments to set defaults that
+must be in place before arguments are parsed.  This diversion is placed
+early enough in @file{configure} that it is unsafe to expand any
+autoconf macros into this diversion.
address@hidden HELP_ENABLE
+If @code{AC_PRESERVE_HELP_ORDER} was used, then it is safe to use
address@hidden in this diversion to insert additional text into the
address@hidden output of @file{configure}.
address@hidden INIT_PREPARE
+This diversion occurs after all command line options have been parsed,
+but prior to the main body of the @file{configure} script.  This
+diversion is the last chance to insert shell code such as variable
+assignments or shell function declarations that will used by the
+expansion of other macros.
address@hidden table
+
 For now, the named diversions of Autoconf and Autoheader, and the
 remaining diversions of Autotest, are not documented.  In other words,
 intentionally outputting text into an undocumented diversion is subject
@@ -11428,6 +11462,29 @@ Diversion support
 m4_divert_push(address@hidden)@var{content}
 m4_divert_pop(address@hidden)dnl
 @end example
+
+One use of @code{m4_divert_text} is to develop two related macros, where
+macro @samp{MY_A} does the work, but adjusts what work is performed
+based on whether the optional macro @samp{MY_B} has also been expanded.
+Of course, it is possible to use @code{AC_BEFORE} within @code{MY_A} to
+require that @samp{MY_B} occurs first, if it occurs at all.  But this
+imposes an ordering restriction on the user; it would be nicer if macros
address@hidden and @samp{MY_B} can be invoked in either order.  The trick
+is to let @samp{MY_B} leave a breadcrumb in an early diversion, which
address@hidden can then use to determine whether @samp{MY_B} has been
+expanded.
+
address@hidden
+AC_DEFUN([MY_A],
+[# various actions
+if test -n "$b_was_used"; then
+  # extra action
+fi])
+AC_DEFUN([MY_B],
+[AC_REQUIRE([MY_A])dnl
+m4_divert_text([INIT_PREPARE], [b_was_used=true])])
address@hidden example
+
 @end defmac

 @defmac m4_init
diff --git a/lib/m4sugar/m4sh.m4 b/lib/m4sugar/m4sh.m4
index 50dc71c..436474f 100644
--- a/lib/m4sugar/m4sh.m4
+++ b/lib/m4sugar/m4sh.m4
@@ -345,7 +345,7 @@ m4_divert_pop[]])
 # either m4_require([$1], [$2]) or m4_divert_require(desired, [$1], [$2]).
 m4_defun([AS_REQUIRE],
 [m4_define([_m4_divert_desired], [m4_default_quoted([$3], [M4SH-INIT])])]dnl
-[m4_if(m4_eval(_m4_divert_dump - 0 <= _m4_divert(_m4_divert_desired)),
+[m4_if(m4_eval(_m4_divert_dump - 0 <= _m4_divert(_m4_divert_desired, [-])),
        1, [m4_require(],
          [m4_divert_require(_m4_divert_desired,]) [$1], [$2])])

diff --git a/lib/m4sugar/m4sugar.m4 b/lib/m4sugar/m4sugar.m4
index e0cacfb..cfdef72 100644
--- a/lib/m4sugar/m4sugar.m4
+++ b/lib/m4sugar/m4sugar.m4
@@ -1374,17 +1374,19 @@ m4_define([_m4_stack_reverse],
 m4_define([m4_cleardivert],
 [m4_if([$#], [0], [m4_fatal([$0: missing argument])],
        [_m4_divert_raw([-1])m4_undivert($@)_m4_divert_raw(
-        _m4_divert(_m4_defn([_m4_divert_diversion])))])])
+        _m4_divert(_m4_defn([_m4_divert_diversion]), [-]))])])


-# _m4_divert(DIVERSION-NAME or NUMBER)
-# ------------------------------------
+# _m4_divert(DIVERSION-NAME or NUMBER, [NOWARN])
+# ----------------------------------------------
 # If DIVERSION-NAME is the name of a diversion, return its number,
-# otherwise if it is a NUMBER return it.
+# otherwise if it is a NUMBER return it.  Issue a warning about
+# the use of a number instead of a name, unless NOWARN is provided.
 m4_define([_m4_divert],
 [m4_ifdef([_m4_divert($1)],
          [m4_indir([_m4_divert($1)])],
-         [$1])])
+         [m4_if([$2], [], [m4_warn([syntax],
+            [prefer named diversions])])$1])])

 # KILL is only used to suppress output.
 m4_define([_m4_divert(KILL)],           -1)
@@ -1420,13 +1422,15 @@ m4_define([m4_divert],
 [_m4_divert_raw(_m4_divert([$1]))])


-# m4_divert_push(DIVERSION-NAME)
-# ------------------------------
+# m4_divert_push(DIVERSION-NAME, [NOWARN])
+# ----------------------------------------
 # Change the diversion stream to DIVERSION-NAME, while stacking old values.
+# For internal use only: if NOWARN is not empty, DIVERSION-NAME can be a
+# number instead of a name.
 m4_define([m4_divert_push],
 [m4_divert_stack_push([$0], [$1])]dnl
 [m4_pushdef([_m4_divert_diversion], [$1])]dnl
-[_m4_divert_raw(_m4_divert([$1]))])
+[_m4_divert_raw(_m4_divert([$1], [$2]))])


 # m4_divert_pop([DIVERSION-NAME])
@@ -1442,7 +1446,7 @@ m4_define([m4_divert_pop],
 [_m4_popdef([_m4_divert_stack], [_m4_divert_diversion])]dnl
 [m4_ifdef([_m4_divert_diversion], [],
           [m4_fatal([too many m4_divert_pop])])]dnl
-[_m4_divert_raw(_m4_divert(_m4_defn([_m4_divert_diversion])))])
+[_m4_divert_raw(_m4_divert(_m4_defn([_m4_divert_diversion]), [-]))])


 # m4_divert_text(DIVERSION-NAME, CONTENT)
@@ -1928,7 +1932,7 @@ m4_define([m4_divert_require],
 [m4_if(_m4_divert_dump, [],
   [m4_fatal([$0($2): cannot be used outside of an m4_defun'd macro])])]dnl
 [m4_provide_if([$2], [],
-  [_m4_require_call([$2], [$3], _m4_divert([$1]))])])
+  [_m4_require_call([$2], [$3], _m4_divert([$1], [-]))])])


 # m4_defun(NAME, EXPANSION, [MACRO = m4_define])
@@ -2079,7 +2083,7 @@ m4_if([$0], [m4_require], [[m4_defun]], [[AC_DEFUN]])['d 
macro])])]dnl
 m4_define([_m4_require_call],
 [m4_pushdef([_m4_divert_grow], m4_decr(_m4_divert_grow))]dnl
 [m4_pushdef([_m4_diverting([$1])])m4_pushdef([_m4_diverting], [$1])]dnl
-[m4_divert_push(_m4_divert_grow)]dnl
+[m4_divert_push(_m4_divert_grow, [-])]dnl
 [m4_if([$2], [], [$1], [$2])
 m4_provide_if([$1], [m4_set_remove([_m4_provide], [$1])],
   [m4_warn([syntax], [$1 is m4_require'd but not m4_defun'd])])]dnl
diff --git a/tests/m4sh.at b/tests/m4sh.at
index 5ff9fe8..ab623b4 100644
--- a/tests/m4sh.at
+++ b/tests/m4sh.at
@@ -50,7 +50,7 @@ AT_CHECK([test -n "${ZSH_VERSION+set}" && exit 77], ignore)
 m4_define([AT_DATA_LINENO],
 [AT_DATA([$1.tas],
 [[AS@&address@hidden
-m4@&address@hidden([0], [
+m4@&address@hidden([], [
 if $2; then
   AS@&address@hidden([LINENO])
 fi
diff --git a/tests/m4sugar.at b/tests/m4sugar.at
index aa30291..a96583c 100644
--- a/tests/m4sugar.at
+++ b/tests/m4sugar.at
@@ -26,9 +26,9 @@ m4_define([AT_CHECK_M4SUGAR_TEXT],
 [
 AT_DATA_M4SUGAR([script.4s],
 [[m4_init
-m4_divert_push(0)[]dnl
+m4_divert_push([])[]dnl
 ]$1[[]dnl
-m4_divert_pop(0)
+m4_divert_pop([])
 ]])

 AT_CHECK_M4SUGAR([-o-],, [$2], [$3])
@@ -263,11 +263,13 @@ m4_warn([syntax], [syntax])dnl
 ]])

 AT_CHECK_M4SUGAR([-o-], 0, [],
-[script.4s:7: warning: syntax
+[script.4s:4: warning: prefer named diversions
+script.4s:7: warning: syntax
 ])

 AT_CHECK_M4SUGAR([-o- -Wall -f], 0, [],
-[script.4s:5: warning: obsolete
+[script.4s:4: warning: prefer named diversions
+script.4s:5: warning: obsolete
 script.4s:6: warning: cross
 script.4s:2: cross_warning is expanded from...
 script.4s:6: the top level
@@ -297,25 +299,29 @@ AT_SETUP([m4@&address@hidden)
 AT_KEYWORDS([m4@&address@hidden m4@&address@hidden m4@&address@hidden
 m4@&address@hidden m4@&address@hidden m4@&address@hidden)

-AT_CHECK_M4SUGAR_TEXT([[1.m4_divert_stack
-m4_divert_push([10])2.m4_divert_stack
-m4_divert_text([20], [3.m4_divert_stack])dnl
-m4_divert([30])4.m4_divert_stack
-m4_divert_pop([30])dnl
-5.m4_undivert([20], [30])
+dnl This test names some diversions to avoid a warning.
+AT_CHECK_M4SUGAR_TEXT([[m4_define([_m4_divert(ten)], [10])dnl
+m4_define([_m4_divert(twenty)], [20])dnl
+m4_define([_m4_divert(thirty)], [30])dnl
+1.m4_divert_stack
+m4_divert_push([ten])2.m4_divert_stack
+m4_divert_text([twenty], [3.m4_divert_stack])dnl
+m4_divert([thirty])4.m4_divert_stack
+m4_divert_pop([thirty])dnl
+5.m4_undivert([twenty], [thirty])
 m4_pattern_allow([^m4_divert])dnl
-]], [[1.script.4s:2: m4@&address@hidden: 0
+]], [[1.script.4s:2: m4@&address@hidden:
 script.4s:1: m4@&address@hidden: KILL
-5.3.script.4s:5: m4@&address@hidden: 20
-script.4s:4: m4@&address@hidden: 10
-script.4s:2: m4@&address@hidden: 0
+5.3.script.4s:8: m4@&address@hidden: twenty
+script.4s:7: m4@&address@hidden: ten
+script.4s:2: m4@&address@hidden:
 script.4s:1: m4@&address@hidden: KILL
-4.script.4s:6: m4@&address@hidden: 30
-script.4s:2: m4@&address@hidden: 0
+4.script.4s:9: m4@&address@hidden: thirty
+script.4s:2: m4@&address@hidden:
 script.4s:1: m4@&address@hidden: KILL

-2.script.4s:4: m4@&address@hidden: 10
-script.4s:2: m4@&address@hidden: 0
+2.script.4s:7: m4@&address@hidden: ten
+script.4s:2: m4@&address@hidden:
 script.4s:1: m4@&address@hidden: KILL
 ]])

@@ -328,6 +334,12 @@ m4_cleardivert([2], [3])dnl
 ]],
 [[one
 four
+]],
+[[script.4s:4: warning: prefer named diversions
+script.4s:5: warning: prefer named diversions
+script.4s:6: warning: prefer named diversions
+script.4s:7: warning: prefer named diversions
+script.4s:8: warning: prefer named diversions
 ]])

 AT_DATA_M4SUGAR([script.4s],
@@ -1004,7 +1016,7 @@ AT_DATA_M4SUGAR([script.4s],
 [[m4_init[]dnl
 m4_append_uniq([str], [a], [ ])
 m4_append_uniq([str], [a b], [ ])
-m4_divert([0])dnl
+m4_divert([])dnl
 str
 ]])

@@ -1134,7 +1146,7 @@ AT_KEYWORDS([m4@&address@hidden)
 # m4-listification.

 AT_DATA_M4SUGAR([script.4s],
-[[m4_init[]m4_divert([0])dnl
+[[m4_init[]m4_divert([])dnl
 m4_define([a], [OOPS])dnl
 m4_escape([a[b $c#]d])
 m4_if(m4_escape([a[b $c#]d]), [a[b $c#]d], [oops],
@@ -1820,7 +1832,7 @@ dnl are testing with m4 1.6, we can rerun the test with 
__m4_version__
 dnl undefined to exercise the alternate code path.
 AT_DATA_M4SUGAR([script.4s],
 [[m4_init
-m4_divert_push(0)[]dnl
+m4_divert_push([])[]dnl
 m4_len(m4_foreach_w([j], m4_do(m4_for([i], [1], [10000], [], [,i ])), [j ]))
 m4_shiftn(9998m4_for([i], [1], [10000], [], [,i]))
 m4_len(m4_join([--],, m4_dquote_elt(m4_for([i], [1], [10000], [], [,i])),))
@@ -1841,7 +1853,7 @@ m4_define([up], [m4_define([$1], 
m4_incr($1))$1])m4_define([j], 0)dnl
 m4_cond(m4_for([i], [1], [10000], [], [[up([j])], [9990], i,]) [oops]) j
 m4_count(m4_map_args_pair([,m4_quote], []m4_map_args([,m4_echo]m4_for([i],
   [1], [10000], [], [,i]))))
-m4_divert_pop(0)
+m4_divert_pop([])
 ]])

 AT_CHECK_M4SUGAR([-o-], [0], [[48894
@@ -1877,7 +1889,7 @@ A
 5001
 m4_exit([0])])
 m4_init
-m4_divert_push(0)[]dnl
+m4_divert_push([])[]dnl
 m4_len(m4_foreach_w([j], m4_do(m4_for([i], [1], [10000], [], [,i ])), [j ]))
 m4_shiftn(9998m4_for([i], [1], [10000], [], [,i]))
 m4_len(m4_join([--],, m4_dquote_elt(m4_for([i], [1], [10000], [], [,i])),))
@@ -1898,7 +1910,7 @@ m4_define([up], [m4_define([$1], 
m4_incr($1))$1])m4_define([j], 0)dnl
 m4_cond(m4_for([i], [1], [10000], [], [[up([j])], [9990], i,]) [oops]) j
 m4_count(m4_map_args_pair([,m4_quote], []m4_map_args([,m4_echo]m4_for([i],
   [1], [10000], [], [,i]))))
-m4_divert_pop(0)
+m4_divert_pop([])
 ]])

 AT_CHECK_M4SUGAR([-o-], [0], [[48894
diff --git a/tests/tools.at b/tests/tools.at
index e23ac04..751975f 100644
--- a/tests/tools.at
+++ b/tests/tools.at
@@ -164,7 +164,7 @@ do

   cat >"$file" <<'END'
 [m4@&address@hidden@&address@hidden(foo.m4)
-m4@&address@hidden(0)d@&address@hidden
+m4@&address@hidden([])d@&address@hidden
 FOO]
 END
   cat >"$dir"/foo.m4 <<'END'
@@ -186,7 +186,7 @@ END
   cat >"$file" <<'END'
 [m4@&address@hidden@&address@hidden(foo.m4)
 m4@&address@hidden([^bar$])
-m4@&address@hidden(0)d@&address@hidden
+m4@&address@hidden([])d@&address@hidden
 FOO]
 END
   rm -rf "$outfile" "$cachedir"
@@ -196,7 +196,7 @@ END

   cat >"$file" <<'END'
 [m4@&address@hidden@&address@hidden(foo.m4)
-m4@&address@hidden(0)d@&address@hidden
+m4@&address@hidden([])d@&address@hidden
 END
   rm -rf "$file.m4f"
   AT_CHECK_AUTOM4TE([-C "$cachedir" -I "$dir" --language=m4sugar --freeze -o 
"$file.m4f" "$file"])
@@ -464,7 +464,7 @@ AT_SETUP([autoconf: the empty token])

 AT_DATA_M4SH([configure.ac],
 [[m4_init[]m4_pattern_allow([^foo$])
-m4_divert([0])dnl
+m4_divert([])dnl
  line that begins with a space
 ]])

-- 
1.6.5.rc1


reply via email to

[Prev in Thread] Current Thread [Next in Thread]