[Top][All Lists]
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: format as a keyword
From: |
Eric Blake |
Subject: |
Re: format as a keyword |
Date: |
Thu, 20 Mar 2008 18:22:22 -0600 |
User-agent: |
Mozilla/5.0 (Windows; U; Windows NT 5.1; en-US; rv:1.8.1.12) Gecko/20080213 Thunderbird/2.0.0.12 Mnenhy/0.7.5.666 |
According to Ray Holme on 3/20/2008 2:49 PM:
| I don't really think this is a bug, but using the word format in an
| input to m4 script wreaks havoc.
Which version of m4? I ask, because prior to m4 1.4.5, format was always
treated as a builtin, but I patched it in 1.4.5 to only be recognized with
arguments. The latest stable version is 1.4.10 (but needs a patch to run
on BSD-based stdio libraries), or you could try beta 1.4.10b (please do -
it's much faster, and I'd like some confidence that it works for everyone
before marking it as stable).
But you are indeed correct that format is a GNU extension not mentioned by
POSIX and not present in Solaris nor BSD implementations of m4.
|
| What I would like to do is STOP m4 from recognizing these 3 words as
| internal macros. They get in the way of programs and SQL and ...
|
| I am going to try "undefine" but I doubt it will work for internal macros.
Why do you doubt? undefine(`format') works just fine. It's even
documented in the manual, with an example of undefining the builtin undefine:
http://www.gnu.org/software/m4/manual/m4.html#Undefine
http://www.gnu.org/software/m4/manual/m4.html#Defn
Or disable it at the command line:
m4 -Uformat
Or, you could disable GNU extensions altogether:
m4 -G
--
Don't work too hard, make some time for fun as well!
Eric Blake address@hidden