[Top][All Lists]
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[SCM] GNU M4 source repository branch, branch-1.6, updated. v1.5.89a-34-
From: |
Eric Blake |
Subject: |
[SCM] GNU M4 source repository branch, branch-1.6, updated. v1.5.89a-34-g8e6cc3c |
Date: |
Mon, 14 Jul 2008 12:42:29 +0000 |
This is an automated email from the git hooks/post-receive script. It was
generated because a ref change was pushed to the repository containing
the project "GNU M4 source repository".
http://git.sv.gnu.org/gitweb/?p=m4.git;a=commitdiff;h=8e6cc3c04610603437d9f67e337d0abf113eb46b
The branch, branch-1.6 has been updated
via 8e6cc3c04610603437d9f67e337d0abf113eb46b (commit)
from f7c6570e3eb5596ab59b014ea83a5114866eb879 (commit)
Those revisions listed above that are new to this repository have
not appeared on any other notification email; so we list those
revisions in full, below.
- Log -----------------------------------------------------------------
commit 8e6cc3c04610603437d9f67e337d0abf113eb46b
Author: Eric Blake <address@hidden>
Date: Mon Jul 14 06:17:50 2008 -0600
Add -g/--gnu command line argument.
* src/m4.c (usage): Mention the new option.
(long_options, OPTSTRING): Add new option.
(main): Use it.
* NEWS: Document this addition.
* doc/m4.texinfo (Limits control): Likewise.
(Incompatibilities): Mention future use of POSIXLY_CORRECT.
* THANKS: Update.
Reported by Joel E. Denny.
Signed-off-by: Eric Blake <address@hidden>
-----------------------------------------------------------------------
Summary of changes:
ChangeLog | 12 ++++++++++++
NEWS | 12 ++++++++++++
THANKS | 1 +
doc/m4.texinfo | 33 +++++++++++++++++++++++++++++++++
src/m4.c | 10 ++++++++--
5 files changed, 66 insertions(+), 2 deletions(-)
diff --git a/ChangeLog b/ChangeLog
index b32f7b8..45a1db7 100644
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,3 +1,15 @@
+2008-07-13 Eric Blake <address@hidden>
+
+ Add -g/--gnu command line argument.
+ * src/m4.c (usage): Mention the new option.
+ (long_options, OPTSTRING): Add new option.
+ (main): Use it.
+ * NEWS: Document this addition.
+ * doc/m4.texinfo (Limits control): Likewise.
+ (Incompatibilities): Mention future use of POSIXLY_CORRECT.
+ * THANKS: Update.
+ Reported by Joel E. Denny.
+
2008-07-11 Eric Blake <address@hidden>
Avoid bogus whitespace in @ovar, @dvar.
diff --git a/NEWS b/NEWS
index bdb7665..1ed9489 100644
--- a/NEWS
+++ b/NEWS
@@ -37,6 +37,18 @@ Foundation, Inc.
then apply this patch:
http://git.sv.gnu.org/gitweb/?p=autoconf.git;a=commitdiff;h=56d42fa71
+** New `-g'/`--gnu' command-line option overrides `-G'/`--traditional'.
+ For now, the environment variable POSIXLY_CORRECT has no effect on M4
+ behavior; but a future release of M4 will behave as though --traditional
+ is implied if POSIXLY_CORRECT is set (this future change is necessary,
+ because in the current release, there is no way to disable GNU
+ extensions that conflict with POSIX without the use of a non-POSIX
+ command-line argument). Clients of M4 that want to use GNU extensions,
+ even when POSIXLY_CORRECT is set, should start using the -g command-line
+ argument, even though it is currently a no-op if -G did not appear
+ earlier in the command line, so that the client will not break in the
+ face of an upgraded m4 and a POSIXLY_CORRECT execution environment.
+
** The `defn' builtin now warns when operating on an undefined macro name.
To simulate 1.4.x behavior, use:
pushdef(`defn', `ifdef(`$1', `builtin(`defn', `$1')')')
diff --git a/THANKS b/THANKS
index 1fa9ba5..6a048b9 100644
--- a/THANKS
+++ b/THANKS
@@ -51,6 +51,7 @@ Jean-Charles Longuet address@hidden
Jim Avera address@hidden
Jim Kingdom address@hidden
Jim Meyering address@hidden
+Joel E. Denny address@hidden
Joel Sherrill address@hidden
John Brzustowski address@hidden
John David Anglin address@hidden
diff --git a/doc/m4.texinfo b/doc/m4.texinfo
index d995818..cad75ca 100644
--- a/doc/m4.texinfo
+++ b/doc/m4.texinfo
@@ -744,6 +744,23 @@ only by your hardware and operating system constraints) in
@acronym{GNU}
@code{m4}.
@table @code
address@hidden -g
address@hidden --gnu
+Enable all the extensions in this implementation. In this release of
+M4, this option is always on by default; it is currently only useful
+when overriding a prior use of @option{--traditional}. However, having
address@hidden behavior as default makes it impossible to write a
+strictly @acronym{POSIX}-compliant client that avoids all incompatible
address@hidden M4 extensions, since such a client would have to use the
address@hidden command-line option to force full @acronym{POSIX}
+behavior. Thus, a future version of M4 will be changed to implicitly
+use the option @option{--traditional} if the environment variable
address@hidden is set. Projects that intentionally use
address@hidden extensions should consider using @option{--gnu} to state
+their intentions, so that the project will not mysteriously break if the
+user upgrades to a newer M4 and has @env{POSIXLY_CORRECT} set in their
+environment.
+
@item -G
@itemx --traditional
Suppress all the extensions made in this implementation, compared to the
@@ -7403,6 +7420,22 @@ However, this appears to be a bug in @acronym{POSIX},
since most
traditional implementations also ignore all whitespace (formfeed,
carriage return, and vertical tab). @acronym{GNU} @code{m4} follows
tradition and ignores all leading unquoted whitespace.
+
address@hidden
address@hidden @env{POSIXLY_CORRECT}
+A strictly-compliant @acronym{POSIX} client is not allowed to use
+command-line arguments not specified by @acronym{POSIX}. However, since
+this version of M4 ignores @env{POSIXLY_CORRECT} and enables the option
address@hidden by default (@pxref{Limits control, , Invoking m4}), a
+client desiring to be strictly compliant has no way to disable
address@hidden extensions that conflict with @acronym{POSIX} when
+directly invoking the compiled @code{m4}. A future version of
address@hidden M4 will honor the environment variable @env{POSIXLY_CORRECT},
+implicitly enabling @option{--traditional} if it is set, in order to
+allow a strictly-compliant client. In the meantime, a client needing
+strict @acronym{POSIX} compliance can use the workaround of invoking a
+shell script wrapper, where the wrapper then adds @option{--traditional}
+to the arguments passed to the compiled @code{m4}.
@end itemize
@node Other Incompatibilities
diff --git a/src/m4.c b/src/m4.c
index 238222f..c73e275 100644
--- a/src/m4.c
+++ b/src/m4.c
@@ -245,6 +245,7 @@ Preprocessor features:\n\
puts ("");
fputs (_("\
Limits control:\n\
+ -g, --gnu override -G to re-enable GNU extensions\n\
-G, --traditional suppress all GNU extensions\n\
-H, --hashsize=PRIME set symbol lookup hash table size [509]\n\
-L, --nesting-limit=NUMBER change artificial nesting limit [1024]\n\
@@ -325,6 +326,7 @@ static const struct option long_options[] =
{"error-output", required_argument, NULL, 'o'}, /* FIXME: deprecate in 2.0 */
{"fatal-warnings", no_argument, NULL, 'E'},
{"freeze-state", required_argument, NULL, 'F'},
+ {"gnu", no_argument, NULL, 'g'},
{"hashsize", required_argument, NULL, 'H'},
{"include", required_argument, NULL, 'I'},
{"interactive", no_argument, NULL, 'i'},
@@ -386,9 +388,9 @@ process_file (const char *name)
'-' forces getopt_long to hand back file names as arguments to opt
'\1', rather than reordering the command line. */
#ifdef ENABLE_CHANGEWORD
-#define OPTSTRING "-B:D:EF:GH:I:L:N:PQR:S:T:U:W:d::eil:o:st:"
+#define OPTSTRING "-B:D:EF:GH:I:L:N:PQR:S:T:U:W:d::egil:o:st:"
#else
-#define OPTSTRING "-B:D:EF:GH:I:L:N:PQR:S:T:U:d::eil:o:st:"
+#define OPTSTRING "-B:D:EF:GH:I:L:N:PQR:S:T:U:d::egil:o:st:"
#endif
#ifdef DEBUG_REGEX
@@ -543,6 +545,10 @@ main (int argc, char *const *argv, char *const *envp)
interactive = true;
break;
+ case 'g':
+ no_gnu_extensions = 0;
+ break;
+
case 'l':
{
long tmp = strtol (optarg, NULL, 10);
hooks/post-receive
--
GNU M4 source repository
[Prev in Thread] |
Current Thread |
[Next in Thread] |
- [SCM] GNU M4 source repository branch, branch-1.6, updated. v1.5.89a-34-g8e6cc3c,
Eric Blake <=