autoconf-patches
[Top][All Lists]
Advanced

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

Re: Multi-Line Definitions


From: Ralf Wildenhues
Subject: Re: Multi-Line Definitions
Date: Sat, 29 Sep 2007 19:23:35 +0200
User-agent: Mutt/1.5.13 (2006-08-11)

Hi Eric,

* Eric Blake-1 wrote on Thu, Sep 27, 2007 at 08:20:05PM CEST:
> 
> > I agree that your patch is a strict improvement over the current state of
> > things.  I also like Ralf Corsepius' analysis that, at least for now,
> > AC_DEFINE should only make sense for the C pre-processor.  My take is that
> > we could start from this patch, then additionally add some checking that
> > if the value argument to AC_DEFINE{,_UNQUOTED} is literal, an error is
> > issued if it contains raw newlines.  And if we do that, then the 'Define a
> > newline' test should be altered to check that we correctly diagnose
> > improper use of newline, while letting \-newline through.
> 
> I'm thinking of applying your patch, along with my followup (munged slightly
> to avoid raw email addresses), in another day or two, unless someone else
> pipes up with a review.

FWIW, I'm working on a patch to create config headers with awk, which
will at least partly supersede my previous patch, not your proposed one.
A comment:

> 2007-09-27  Eric Blake  <address@hidden>
> 
>       Enhance previous patch's handling of raw newlines.
>       * lib/autoconf/general.m4 (_AC_RAW_NEWLINE_RE): New macro.
>       (AC_DEFINE, AC_DEFINE_UNQUOTED): Die on raw newlines in value.

Won't this slow down `autoconf' by much?  AC_DEFINE* are used a lot,
and this problem seems rather, umm, arcane, given that it's never been
reported in practice (Noah's addition of the original test was added to
be consistent with AC_SUBST rather than due to feedback/experience).

Anyway, I'll time it once I get up to speed with git.

>       * tests/torture.at (Define a newline): Remove XFAIL, and demand
>       failure on raw newline.
>       * doc/autoconf.texi (Defining Symbols): Document that raw newlines
>       cannot be used in AC_DEFINE.
>       * THANKS: Update.

Cheers,
Ralf




reply via email to

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