bug-m4
[Top][All Lists]
Advanced

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

Re: [search path] behavior difference.


From: Eric Blake
Subject: Re: [search path] behavior difference.
Date: Fri, 20 Sep 2013 12:25:11 -0600
User-agent: Mozilla/5.0 (X11; Linux x86_64; rv:17.0) Gecko/20130805 Thunderbird/17.0.8

On 09/20/2013 12:11 PM, Eric Blake wrote:

> 
> I further note that 'feature/oleane-name.m4' is not specified on the
> command line, but that you didn't list the contents of m4/cf.m4; if
> there is any caching, it is most likely happening in the m4 code
> embedded in m4/cf.m4 has changed between the two machines you are
> testing on, rather than a bug in m4 itself.

In fact, I'm convinced of that fact.  I just downloaded
sendmail-cf-8.14.7-1.fc19.noarch, and in m4/cf.m4, I see:

ifdef(`_CF_DIR_', `',
        `ifelse(__file__, `__file__',
                `define(`_CF_DIR_', `../')',
                `define(`_CF_DIR_',
                        substr(__file__, 0, eval(len(__file__) - 8)))')')

divert(0)dnl
ifdef(`OSTYPE', `dnl',
`include(_CF_DIR_`'m4/cfhead.m4)dnl

In other words, the authors of sendmail are DELIBERATELY parsing
__file__ and then constructing an absolute path to pass to include(),
rather than passing a relative path and relying on a path lookup.  (I
cringe at the way they are doing it; they are NOT very robust to
arbitrary file names; and I could totally cause things to go haywire by
installing cf.m4 into a directory whose name includes m4 macros - but it
happens to work for their typical installation locations)

-- 
Eric Blake   eblake redhat com    +1-919-301-3266
Libvirt virtualization library http://libvirt.org

Attachment: signature.asc
Description: OpenPGP digital signature


reply via email to

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