autoconf-patches
[Top][All Lists]
Advanced

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

Re: AS_MESSAGE_FD


From: Eric Blake
Subject: Re: AS_MESSAGE_FD
Date: Sat, 22 Nov 2008 12:46:43 -0700
User-agent: Mozilla/5.0 (Windows; U; Windows NT 5.1; en-US; rv:1.8.1.18) Gecko/20081105 Thunderbird/2.0.0.18 Mnenhy/0.7.5.666

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

According to Ralf Wildenhues on 11/22/2008 10:43 AM:
>> -[m4_ifset([AS_MESSAGE_LOG_FD],
>> +[m4_ifval(AS_MESSAGE_LOG_FD,
> 
> If these kinds of changes are required in Autoconf code, it looks like
> user code might be affected, too.  Have you checked for third-party
> instances of this?  Also, is this an incompatibility to earlier
> semantics?

The semantics should be identical for third-party use; this is merely an
optimization change.

m4_ifset([AS_MESSAGE_LOG_FD], [a], [b]) expands to:

m4_ifdef([AS_MESSAGE_LOG_FD],
  [m4_if(m4_defn([AS_MESSAGE_LOG_FD]), [], [b], [a])], [b])

But since AS_MESSAGE_LOG_FD (if defined) must expand to either a number or
the empty string, then it should generally be safe to expand
AS_MESSAGE_LOG_FD rather than going through m4_defn (well, it is possible
to have AS_MESSAGE_LOG_FD defined as [$[3]], as in my recent as_fn_error,
but even that string is still safe for immediate expansion; and there were
other places in m4sh that perform AS_MESSAGE_LOG_FD expansion).  Also, by
guaranteeing a definition from m4sh (rather than the previous semantics
where it was undefined if the user didn't supply it), the m4_ifdef portion
of m4_ifset is wasted effort.  Which leaves us with the faster:

m4_ifval(AS_MESSAGE_LOG_FD, [a], [b])

expanding to

m4_if(AS_MESSAGE_LOG_FD, [], [b], [a])

- --
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

iEYEARECAAYFAkkoYaMACgkQ84KuGfSFAYC0fACgn+HRGSOhTvjeQUf0v0RYlwB5
G60An2cMFcQ4p03fyhiWBsVZI4I6r5nv
=Ekbo
-----END PGP SIGNATURE-----




reply via email to

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