autoconf-patches
[Top][All Lists]
Advanced

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

Re: fix last weekend's regressions in AC_DEFINE


From: Eric Blake
Subject: Re: fix last weekend's regressions in AC_DEFINE
Date: Mon, 01 Oct 2007 13:24:16 -0600
User-agent: Mozilla/5.0 (Windows; U; Windows NT 5.1; en-US; rv:1.8.1.6) Gecko/20070728 Thunderbird/2.0.0.6 Mnenhy/0.7.5.666

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

According to Ralf Wildenhues on 10/1/2007 12:05 PM:
> FWIW, the ChangeLog entry is a bit misleading, as
>   AC_DEFINE([MACRO([with], [args])])
> 
> is broken with respect to autoheader anyway.  One needs to use
>   AC_DEFINE(MACRO([with], [args]))
> 
> instead, otherwise the template will not be right.  IOW, with
>   AC_INIT
>   AC_CONFIG_HEADERS([config.h])
>   AC_DEFUN([FOO], [$1])
>   AC_DEFINE([FOO([BAR])], 1, [text])
>   AC_OUTPUT
> 
> config.h.in contains FOO rather than BAR.  I assume there is other code
> out there besides _AC_F77_WRAPPERS that uses the lesser quotation BTW.

Hmm, I'll add that to my list of things to review more closely when I can
get time.

> 
>>  m4_define([AC_DEFINE_TRACE],
>>  [AS_LITERAL_IF([$1], [AC_DEFINE_TRACE_LITERAL(
>> -  m4_if(m4_index([[$1]], [(]), [-1], [[$1]],
>> -       [m4_substr([[$1]], [0], m4_index([[$1]], [(]))]))])])
>> +  m4_if(m4_index([$1], [(]), [-1], [[$1]],
> 
> Was this change in the first argument to m4_index from [[$1]] to [$1]
> fixing some issue, too?

Merely that since it was for internal consumption, m4_index([$1]) uses 2
bytes less memory than m4_index([[$1]]) (ie. my original introduction of
the m4_if last weekend was unnecessarily overquoted in that one instance).

>  If not, can it break some user code?  Thanks.

No, since the point of the m4_if was to check whether `(' appeared in the
string at all, before trying to do the m4_bpatsubst that was there before
I broke it last weekend.

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

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

iD8DBQFHAUlg84KuGfSFAYARAh97AKCzMhFgHYBvUWmTcg8sRtfeIqX5cgCeJ+lg
TKVr3ite+ng0D++l/TPD/O0=
=lERE
-----END PGP SIGNATURE-----




reply via email to

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