Collin Funk wrote:
> > The patch is not right: It assumes that AH_BOTTOM inserts a newline
> > after the given text. But this is not documented, therefore not guaranteed
> > to always happen. Therefore we might end up with garbage after the
> > '#endif', in the same line.
> 
> I highly doubt that Autoconf would change that behavior

It's a general rule that any change can happen that doesn't contradict
existing documentation.

Even more, the comments in Autoconf's autoheader.m4 indicate that the
newline that gets currently added is accidental:

# AH_BOTTOM(TEXT)
# ---------------
# Output TEXT at the bottom of 'config.h.in'.
m4_define([AH_BOTTOM],
[m4_define([_AH_COUNTER], m4_incr(_AH_COUNTER))dnl
AH_VERBATIM([zzzz]_AH_COUNTER, [$1])])

...

# AH_VERBATIM(KEY, TEMPLATE)
# --------------------------
# If KEY is direct (i.e., no indirection such as in KEY=$my_func which
# may occur if there is AC_CHECK_FUNCS($my_func)), issue an autoheader
# TEMPLATE associated to the KEY.  Otherwise, do nothing.  TEMPLATE is
# output as is, with no formatting.

"TEMPLATE is output as is, with no formatting", to me, indicates that

AH_BOTTOM([foo])
AH_BOTTOM([bar])

may actually produce
foobar
in a single line.

Bruno




Reply via email to