autoconf-patches
[Top][All Lists]
Advanced

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

Re: semantique de m4 mal definie


From: Tim Van Holder
Subject: Re: semantique de m4 mal definie
Date: Thu, 26 Jun 2003 17:07:49 +0200

> you suggest to step back into specified behavior (the interaction
> between define and pushdef being unspecified in something apparently
> named Single Unix).
> 
> My answer is no.  I do not care about Single Unix's specification for
> M4, and I keep on planning using more GNU M4 features.  GNU M4 is a
> requirement for Autoconf, and there is no plan to make it easy to use
> other M4s.

Consider it a defect in GNU m4 then Akim, if it does not adhere to the
Single Unix Specification (IEEE Std 1003.1).  It's much like the POSIX
incompatibilities being fixed in bison - GNU tools are supposed to
_first_ implement the standards (i.e. provide viable replacements for
system tools) and then optionally provide additional functionality.

At the very least the GNU m4 manual should make mention of define's
behaviour wrt push/popdef in the documentation for define itself; it
is currently only mentioned in the documentation for push/popdef.
It should also mention this incompatibility if you decide to support
the Single Akim Specification instead :-)

Requiring GNU m4 in autoconf is fine, depending on a misfeature in it
is not.  Adjusting m4sugar to work with both semantics would then be a
good idea, as it allows the code to work with current GNU m4 (using the
'bad' BSD semantics) as well as future GNU m4s that use the SUS
behaviour.

For reference, here is part of the SUS spec for m4
(http://www.unix.org/single_unix_specification/, free registration
required):

define
    The second argument shall become the defining text of the macro
    whose name is the first argument.
defn
    The defining text of the defn macro shall be the quoted definition
   (using the current quoting strings) of its arguments.
popdef
    The popdef macro shall delete the current definition of its
    arguments, replacing that definition with the previous one. If
   there is no previous definition, the macro is undefined.
pushdef
    The pushdef macro shall be equivalent to the define macro with the
    exception that it shall preserve any current definition for future
    retrieval using the popdef macro.
undefine
    The undefine macro shall delete all definitions (including those
    preserved using the pushdef macro) of the macros named by its
    arguments.






reply via email to

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