From 213bd1907be6d7971e3d71f5b762615b6386b3d8 Mon Sep 17 00:00:00 2001 From: Eric Blake Date: Fri, 10 Aug 2007 15:13:01 +0000 Subject: [PATCH] * doc/m4.texinfo (Compatibility): Sync with head. --- ChangeLog | 4 ++++ doc/m4.texinfo | 49 +++++++++++++++++++++++++++++-------------------- 2 files changed, 33 insertions(+), 20 deletions(-) diff --git a/ChangeLog b/ChangeLog index ba60ef4c..fa8cf8b9 100644 --- a/ChangeLog +++ b/ChangeLog @@ -1,3 +1,7 @@ +2007-08-10 Eric Blake + + * doc/m4.texinfo (Compatibility): Sync with head. + 2007-08-10 Konrad Schwarz (tiny change) and Eric Blake diff --git a/doc/m4.texinfo b/doc/m4.texinfo index 80515edb..a24d36e3 100644 --- a/doc/m4.texinfo +++ b/doc/m4.texinfo @@ -5723,9 +5723,10 @@ supplied as part of the argument, as in the example. Unfortunately, the exact output of @code{errprint} is not very portable to other @code{m4} implementations: @acronym{POSIX} requires that all arguments be printed, but some implementations of @code{m4} only print the first. -Furthermore, some BSD implementations always append a newline for each -@code{errprint} call, regardless of whether the last argument already -had one, and @acronym{POSIX} is silent on whether this is acceptable. +Furthermore, some @acronym{BSD} implementations always append a newline +for each @code{errprint} call, regardless of whether the last argument +already had one, and @acronym{POSIX} is silent on whether this is +acceptable. @node Location @section Printing current location @@ -6072,12 +6073,19 @@ once. @chapter Compatibility with other versions of @code{m4} @cindex compatibility -This chapter describes the differences between this implementation of -@code{m4}, and the implementation found under UNIX, notably System V, -Release 3. - -There are also differences in BSD flavors of @code{m4}. No attempt -is made to summarize these here. +This chapter describes the many of the differences between this +implementation of @code{m4}, and of other implementations found under +UNIX, such as System V Release 3, Solaris, and @acronym{BSD} flavors. +In particular, it lists the known differences and extensions to +@acronym{POSIX}. However, the list is not necessarily comprehensive. + +At the time of this writing, @acronym{POSIX} 2001 (also known as IEEE +Std 1003.1-2001) is the latest standard, although a new version of +@acronym{POSIX} is under development and includes several proposals for +modifying what @code{m4} is required to do. The requirements for +@code{m4} are shared between @acronym{SUSv3} and @acronym{POSIX}, and +can be viewed at +@uref{http://www.opengroup.org/onlinepubs/@/000095399/@/utilities/@/m4.html}. @menu * Extensions:: Extensions in @acronym{GNU} M4 @@ -6086,7 +6094,7 @@ is made to summarize these here. @end menu @node Extensions -@section Extensions in @acronym{GNU} @code{m4} +@section Extensions in @acronym{GNU} M4 @cindex @acronym{GNU} extensions @cindex @acronym{POSIX} @@ -6152,7 +6160,8 @@ is modeled after the C library function @code{printf} (@pxref{Format}). @item Searches and text substitution through basic regular expressions are supported by the @code{regexp} (@pxref{Regexp}) and @code{patsubst} -(@pxref{Patsubst}) builtins. +(@pxref{Patsubst}) builtins. Some @acronym{BSD} implementations use +extended regular expressions instead. @item The output of shell commands can be read into @code{m4} with @@ -6183,16 +6192,16 @@ The @code{maketemp} (@pxref{Mkstemp}) macro behaves like @code{mkstemp}, creating a new file with a unique name on every invocation, rather than following the insecure behavior of replacing the trailing @samp{X} characters with the @code{m4} process id. -@end itemize -In addition to the above extensions, @acronym{GNU} @code{m4} implements the -following command line options: @option{-F}, @option{-G}, @option{-I}, -@option{-L}, @option{-R}, @option{-V}, @option{-W}, @option{-d}, @option{-i}, -@option{-l}, @option{--debugfile} and @option{-t}. @xref{Invoking m4}, for a +@item +@acronym{POSIX} only requires support for the command line options +@option{-s}, @option{-D}, and @option{-U}, so all other options accepted +by @acronym{GNU} M4 are extensions. @xref{Invoking m4}, for a description of these options. -Also, the debugging and tracing facilities in @acronym{GNU} @code{m4} are much +The debugging and tracing facilities in @acronym{GNU} @code{m4} are much more extensive than in most other versions of @code{m4}. +@end itemize @node Incompatibilities @section Facilities in System V @code{m4} not in @acronym{GNU} @code{m4} @@ -6390,9 +6399,9 @@ There are a few other incompatibilities between this implementation of the sync lines when the text is being diverted, and System V @code{m4} when the diverted text is being brought back. -The problem is which lines and file names should be attached to text that -is being, or has been, diverted. System V @code{m4} regards all the -diverted text as being generated by the source line containing the +The problem is which lines and file names should be attached to text +that is being, or has been, diverted. System V @code{m4} regards all +the diverted text as being generated by the source line containing the @code{undivert} call, whereas @acronym{GNU} @code{m4} regards the diverted text as being generated at the time it is diverted. -- 2.11.4.GIT