diff options
author | Eric Blake <ebb9@byu.net> | 2009-11-27 21:54:54 -0700 |
---|---|---|
committer | Eric Blake <ebb9@byu.net> | 2009-11-27 21:54:54 -0700 |
commit | 58a08cc51756129f0abde91e3917d7cb22413e49 (patch) | |
tree | 7b293e1a95e314aaba9dd2821fd83d934ef20b2e | |
parent | 80481109d9ece4d0a59ded51302873d665f102d2 (diff) | |
download | m4-58a08cc51756129f0abde91e3917d7cb22413e49.tar.gz |
Work around BSD getopt bug.
* gnulib: Update.
* doc/m4.texinfo (Command line files): Add test.
Signed-off-by: Eric Blake <ebb9@byu.net>
(cherry picked from commit a6c565c6f4b934be334dd9ada97b215595d10103)
-rw-r--r-- | ChangeLog | 4 | ||||
-rw-r--r-- | doc/m4.texinfo | 16 | ||||
m--------- | gnulib | 0 |
3 files changed, 20 insertions, 0 deletions
@@ -1,5 +1,9 @@ 2009-11-28 Eric Blake <ebb9@byu.net> + Work around BSD getopt bug. + * gnulib: Update. + * doc/m4.texinfo (Command line files): Add test. + Use correct printf formats. * src/macro.c (adjust_refcount): Use %zu for size_t. * src/builtin.c (m4_maketemp): Ensure format width argument is diff --git a/doc/m4.texinfo b/doc/m4.texinfo index 770fe572..e594128d 100644 --- a/doc/m4.texinfo +++ b/doc/m4.texinfo @@ -1086,6 +1086,22 @@ syscmd([echo 'esyscmd(echo hi >&2 && echo err"print(bye @error{}bye @result{}0 @end example + +@comment Test that we obey POSIX semantics with -D interspersed with +@comment files, even with POSIXLY_CORRECT (BSD getopt gets it wrong). + +$ @kbd{m4 } +@example +ifdef(`__unix__', , + `errprint(` skipping: syscmd does not have unix semantics +')m4exit(`77')')dnl +changequote(`[', `]')dnl +syscmd([POSIXLY_CORRECT=1 ']__program__[' -Dbar=hello foo -Dbar=world foo])dnl +@result{}hello +@result{}world +sysval +@result{}0 +@end example @end ignore @node Syntax diff --git a/gnulib b/gnulib -Subproject 9bb0a7e5780f8cc02b234981fa17cad396a0244 +Subproject c0c5acfbe255f5542bc1c81c7aec223d95e504a |