m4-patches
[Top][All Lists]
Advanced

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

port several recent patches to master


From: Eric Blake
Subject: port several recent patches to master
Date: Tue, 12 Jan 2010 06:25:27 -0700
User-agent: Mozilla/5.0 (Windows; U; Windows NT 5.1; en-US; rv:1.8.1.23) Gecko/20090812 Thunderbird/2.0.0.23 Mnenhy/0.7.6.666

I've been piling up several patches on the branches but not yet ported to
master; this resolves that.

-- 
Don't work too hard, make some time for fun as well!

Eric Blake             address@hidden
From 652c73271aa3feeb9ca1524ba2af8bd48929b931 Mon Sep 17 00:00:00 2001
From: Eric Blake <address@hidden>
Date: Mon, 14 Dec 2009 14:11:22 -0700
Subject: [PATCH 1/2] Update to latest gnulib.

* gnulib: Update.
* ltdl/m4/gnulib-cache.m4: Import xoset.
* m4/output.c (includes): Ensure that gnulib oset usage will
call xalloc_die on memory failure.
* Makefile.am (src/getopt.h): Update snippet from gnulib.
(LINK_WARNING_H, ARG_NONNULL_H): New macros.

Signed-off-by: Eric Blake <address@hidden>
(cherry picked from commit 43b9828d5bfe5c9be902ad86053e59f3a5ab2dd4)
---
 ChangeLog               |    8 ++++++++
 Makefile.am             |   10 +++++++---
 gnulib                  |    2 +-
 ltdl/m4/gnulib-cache.m4 |    5 +++--
 m4/output.c             |    3 ++-
 5 files changed, 21 insertions(+), 7 deletions(-)

diff --git a/ChangeLog b/ChangeLog
index b747e82..95ce8de 100644
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,5 +1,13 @@
 2010-01-05  Eric Blake  <address@hidden>

+       Update to latest gnulib.
+       * gnulib: Update.
+       * ltdl/m4/gnulib-cache.m4: Import xoset.
+       * m4/output.c (includes): Ensure that gnulib oset usage will
+       call xalloc_die on memory failure.
+       * Makefile.am (src/getopt.h): Update snippet from gnulib.
+       (LINK_WARNING_H, ARG_NONNULL_H): New macros.
+
        Fix testsuite failure on newer glibc.
        * tests/testsuite.at (AT_CHECK_M4): Tolerate alternate getopt
        spellings.
diff --git a/Makefile.am b/Makefile.am
index fdaab47..c4af0c4 100644
--- a/Makefile.am
+++ b/Makefile.am
@@ -1,7 +1,7 @@
 ## Makefile.am - template for generating Makefile via Automake
 ##
-## Copyright (C) 2000, 2001, 2003, 2004, 2005, 2006, 2007, 2008, 2009
-## Free Software Foundation, Inc.
+## Copyright (C) 2000, 2001, 2003, 2004, 2005, 2006, 2007, 2008, 2009,
+## 2010 Free Software Foundation, Inc.
 ##
 ## This file is part of GNU M4.
 ##
@@ -108,9 +108,12 @@ BUILT_SOURCES  += src/$(GETOPT_H)
 endif
 EXTRA_DIST     += src/getopt.c src/getopt1.c src/getopt.in.h src/getopt_int.h

+LINK_WARNING_H = $(srcdir)/$(config_aux_dir)/link-warning.h
+ARG_NONNULL_H = $(srcdir)/$(config_aux_dir)/arg-nonnull.h
+
 # We need the following in order to create an <getopt.h> when the
 # system doesn't have one that works with the given compiler.
-src/getopt.h: src/getopt.in.h
+src/getopt.h: src/getopt.in.h $(LINK_WARNING_H) $(ARG_NONNULL_H)
        $(AM_V_GEN)rm -f address@hidden $@ && \
        { echo '/* DO NOT EDIT! GENERATED AUTOMATICALLY! */'; \
          sed -e 's|@''HAVE_GETOPT_H''@|$(HAVE_GETOPT_H)|g' \
@@ -118,6 +121,7 @@ src/getopt.h: src/getopt.in.h
              -e 's|@''PRAGMA_SYSTEM_HEADER''@|@PRAGMA_SYSTEM_HEADER@|g' \
              -e 's|@''NEXT_GETOPT_H''@|$(NEXT_GETOPT_H)|g' \
              -e '/definition of GL_LINK_WARNING/r $(LINK_WARNING_H)' \
+             -e '/definition of _GL_ARG_NONNULL/r $(ARG_NONNULL_H)' \
              < $(srcdir)/src/getopt.in.h; \
        } > address@hidden && \
        mv -f address@hidden $@
diff --git a/gnulib b/gnulib
index 51983dc..0e0f8f1 160000
--- a/gnulib
+++ b/gnulib
@@ -1 +1 @@
-Subproject commit 51983dcb2ce9d20eb1f72d0b877e40fe0de07e87
+Subproject commit 0e0f8f12ec241c0f1c1f21f960bb5cf908a0fa3c
diff --git a/ltdl/m4/gnulib-cache.m4 b/ltdl/m4/gnulib-cache.m4
index 3ea93ba..eb2ce98 100644
--- a/ltdl/m4/gnulib-cache.m4
+++ b/ltdl/m4/gnulib-cache.m4
@@ -1,4 +1,4 @@
-# Copyright (C) 2002-2009 Free Software Foundation, Inc.
+# Copyright (C) 2002-2010 Free Software Foundation, Inc.
 #
 # This file is free software, distributed under the terms of the GNU
 # General Public License.  As a special exception to the GNU General
@@ -15,7 +15,7 @@


 # Specification in the form of a command-line invocation:
-#   gnulib-tool --import --dir=. --local-dir=local --lib=libgnu 
--source-base=gnu --m4-base=ltdl/m4 --doc-base=doc --tests-base=tests/gnu 
--aux-dir=build-aux --with-tests --libtool --macro-prefix=M4 assert autobuild 
avltree-oset binary-io bitrotate clean-temp cloexec close-stream closein 
config-h configmake dirname error execute exit fdl-1.3 fflush filenamecat 
flexmember fopen fopen-safer freadptr freadseek fseeko gendocs gettext 
git-version-gen gnumakefile gnupload gpl-3.0 intprops inttypes memchr2 memcmp2 
memmem mkstemp obstack obstack-printf-posix pipe progname propername quote 
regex regexprops-generic rename setenv snprintf-posix sprintf-posix stdbool 
stdlib-safer strnlen strtod strtol tempname unlocked-io unsetenv 
vasnprintf-posix verify verror wait-process xalloc xalloc-die xmemdup0 
xprintf-posix xstrndup xvasprintf-posix
+#   gnulib-tool --import --dir=. --local-dir=local --lib=libgnu 
--source-base=gnu --m4-base=ltdl/m4 --doc-base=doc --tests-base=tests/gnu 
--aux-dir=build-aux --with-tests --libtool --macro-prefix=M4 assert autobuild 
avltree-oset binary-io bitrotate clean-temp cloexec close-stream closein 
config-h configmake dirname error execute exit fdl-1.3 fflush filenamecat 
flexmember fopen fopen-safer freadptr freadseek fseeko gendocs gettext 
git-version-gen gnumakefile gnupload gpl-3.0 intprops inttypes memchr2 memcmp2 
memmem mkstemp obstack obstack-printf-posix pipe progname propername quote 
regex regexprops-generic rename setenv snprintf-posix sprintf-posix stdbool 
stdlib-safer strnlen strtod strtol tempname unlocked-io unsetenv 
vasnprintf-posix verify verror wait-process xalloc xalloc-die xmemdup0 xoset 
xprintf-posix xstrndup xvasprintf-posix

 # Specification in the form of a few gnulib-tool.m4 macro invocations:
 gl_LOCAL_DIR([local])
@@ -83,6 +83,7 @@ gl_MODULES([
   xalloc
   xalloc-die
   xmemdup0
+  xoset
   xprintf-posix
   xstrndup
   xvasprintf-posix
diff --git a/m4/output.c b/m4/output.c
index b2f6530..0535d93 100644
--- a/m4/output.c
+++ b/m4/output.c
@@ -1,6 +1,6 @@
 /* GNU m4 -- A simple macro processor
    Copyright (C) 1989, 1990, 1991, 1992, 1993, 1994, 1998, 2002, 2004,
-   2006, 2007, 2008, 2009 Free Software Foundation, Inc.
+   2006, 2007, 2008, 2009, 2010 Free Software Foundation, Inc.

    This file is part of GNU M4.

@@ -26,6 +26,7 @@
 #include "clean-temp.h"
 #include "exitfail.h"
 #include "gl_avltree_oset.h"
+#include "gl_xoset.h"
 #include "intprops.h"
 #include "quotearg.h"
 #include "xvasprintf.h"
-- 
1.6.4.2


From dc9d4612150ed7f515739af6d8dc777744c528e1 Mon Sep 17 00:00:00 2001
From: Eric Blake <address@hidden>
Date: Mon, 28 Dec 2009 14:09:35 -0700
Subject: [PATCH 2/2] Use gnulib maintainer-makefile module.

* ltdl/m4/gnulib-cache.m4: Import maintainer-makefile module.
* cfg.mk (local-checks-to-skip): Drop changelog-check; add
sc_cast_of_x_alloc_return_value.
(gnu_ftp_host-alpha, gnu_ftp_host-beta, gnu_ftp_host-major)
(gnu_rel_host): Delete; provided by maint.mk.
(old_NEWS_hash): New macro.
* .prev-version: New file.
* .x-sc_require_config_h: Likewise.
* .x-sc_require_config_h_first: Likewise.
* Makefile.am (syntax_check_exceptions, EXTRA_DIST): Ship new
files.
* maint.mk: Remove from version control; use gnulib instead.
* .gitignore: Update.

Signed-off-by: Eric Blake <address@hidden>
(cherry picked from commit 260383467b3ae57f2cb3c6821718b99fdf278c4b)
---
 .gitignore                   |    1 +
 .prev-version                |    1 +
 .x-sc_require_config_h       |    2 +
 .x-sc_require_config_h_first |    2 +
 ChangeLog                    |   15 +++++++++++
 Makefile.am                  |    9 +++++-
 cfg.mk                       |   27 ++++---------------
 ltdl/m4/gnulib-cache.m4      |    3 +-
 maint.mk                     |   56 ------------------------------------------
 9 files changed, 36 insertions(+), 80 deletions(-)
 create mode 100644 .prev-version
 create mode 100644 .x-sc_require_config_h
 create mode 100644 .x-sc_require_config_h_first
 delete mode 100644 maint.mk

diff --git a/.gitignore b/.gitignore
index d65437e..326c4fe 100644
--- a/.gitignore
+++ b/.gitignore
@@ -104,6 +104,7 @@ libtool
 /m4/obstack.h
 /m4/pathconf.h
 /m4/system.h
+/maint.mk
 Makefile
 Makefile.in
 Makefile.inc
diff --git a/.prev-version b/.prev-version
new file mode 100644
index 0000000..acd81d7
--- /dev/null
+++ b/.prev-version
@@ -0,0 +1 @@
+1.4.13
diff --git a/.x-sc_require_config_h b/.x-sc_require_config_h
new file mode 100644
index 0000000..053cd3f
--- /dev/null
+++ b/.x-sc_require_config_h
@@ -0,0 +1,2 @@
+modules/evalparse.c
+modules/format.c
diff --git a/.x-sc_require_config_h_first b/.x-sc_require_config_h_first
new file mode 100644
index 0000000..053cd3f
--- /dev/null
+++ b/.x-sc_require_config_h_first
@@ -0,0 +1,2 @@
+modules/evalparse.c
+modules/format.c
diff --git a/ChangeLog b/ChangeLog
index 95ce8de..bece78b 100644
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,5 +1,20 @@
 2010-01-05  Eric Blake  <address@hidden>

+       Use gnulib maintainer-makefile module.
+       * ltdl/m4/gnulib-cache.m4: Import maintainer-makefile module.
+       * cfg.mk (local-checks-to-skip): Drop changelog-check; add
+       sc_cast_of_x_alloc_return_value.
+       (gnu_ftp_host-alpha, gnu_ftp_host-beta, gnu_ftp_host-major)
+       (gnu_rel_host): Delete; provided by maint.mk.
+       (old_NEWS_hash): New macro.
+       * .prev-version: New file.
+       * .x-sc_require_config_h: Likewise.
+       * .x-sc_require_config_h_first: Likewise.
+       * Makefile.am (syntax_check_exceptions, EXTRA_DIST): Ship new
+       files.
+       * maint.mk: Remove from version control; use gnulib instead.
+       * .gitignore: Update.
+
        Update to latest gnulib.
        * gnulib: Update.
        * ltdl/m4/gnulib-cache.m4: Import xoset.
diff --git a/Makefile.am b/Makefile.am
index c4af0c4..05fd0bc 100644
--- a/Makefile.am
+++ b/Makefile.am
@@ -52,10 +52,15 @@ include ltdl/Makefile.inc

 # Additional configuration.  Version management comes from suggestions
 # given in build-aux/git-version-gen.
+syntax_check_exceptions = \
+       .x-sc_require_config_h \
+       .x-sc_require_config_h_first
+
 AM_CPPFLAGS    += -Ignu -I$(srcdir)/gnu \
                  -Im4 -I$(srcdir)/m4
-EXTRA_DIST     += bootstrap cfg.mk maint.mk .version \
-                 $(config_macro_dir)/gnulib-cache.m4
+EXTRA_DIST     += bootstrap cfg.mk maint.mk .version .prev-version \
+                 $(config_macro_dir)/gnulib-cache.m4 \
+                 $(syntax_check_exceptions)
 BUILT_SOURCES  += .version
 .version:
        echo $(VERSION) > address@hidden && mv address@hidden $@
diff --git a/cfg.mk b/cfg.mk
index 2aac5ac..fe48db5 100644
--- a/cfg.mk
+++ b/cfg.mk
@@ -1,5 +1,5 @@
 # Customize maint.mk.                           -*- makefile -*-
-# Copyright (C) 2003-2009 Free Software Foundation, Inc.
+# Copyright (C) 2003-2010 Free Software Foundation, Inc.

 # This program is free software: you can redistribute it and/or modify
 # it under the terms of the GNU General Public License as published by
@@ -14,27 +14,12 @@
 # You should have received a copy of the GNU General Public License
 # along with this program.  If not, see <http://www.gnu.org/licenses/>.

-# Use alpha.gnu.org for alpha and beta releases.
-# Use ftp.gnu.org for major releases.
-gnu_ftp_host-alpha = alpha.gnu.org
-gnu_ftp_host-beta = alpha.gnu.org
-gnu_ftp_host-major = ftp.gnu.org
-gnu_rel_host = $(gnu_ftp_host-$(RELEASE_TYPE))
-
 # Used in maint.mk's web-manual rule
 manual_title = GNU macro processor

-url_dir_list = ftp://$(gnu_rel_host)/gnu/m4
-
-# The GnuPG ID of the key used to sign the tarballs.
-gpg_key_ID = F4850180
-
-# Tests not to run as part of "make distcheck".
-# Exclude changelog-check here so that there's less churn in ChangeLog
-# files -- otherwise, you'd need to have the upcoming version number
-# at the top of the file for each `make distcheck' run.
-local-checks-to-skip = changelog-check
+# Tests not to run as part of "make syntax-check".
+# M4 intentionally uses a coding style that compiles under C++.
+local-checks-to-skip = sc_cast_of_x_alloc_return_value

-# The local directory containing the checked-out copy of gnulib used in this
-# release.  Used solely to get gnulib's SHA1 for the "announcement" target.
-gnulib_dir = $(srcdir)/gnulib
+# Hash of NEWS contents, to ensure we don't add entries to wrong section.
+old_NEWS_hash = b63892a79436f9f3cd05e10c3c4657ef
diff --git a/ltdl/m4/gnulib-cache.m4 b/ltdl/m4/gnulib-cache.m4
index eb2ce98..06a8fb8 100644
--- a/ltdl/m4/gnulib-cache.m4
+++ b/ltdl/m4/gnulib-cache.m4
@@ -15,7 +15,7 @@


 # Specification in the form of a command-line invocation:
-#   gnulib-tool --import --dir=. --local-dir=local --lib=libgnu 
--source-base=gnu --m4-base=ltdl/m4 --doc-base=doc --tests-base=tests/gnu 
--aux-dir=build-aux --with-tests --libtool --macro-prefix=M4 assert autobuild 
avltree-oset binary-io bitrotate clean-temp cloexec close-stream closein 
config-h configmake dirname error execute exit fdl-1.3 fflush filenamecat 
flexmember fopen fopen-safer freadptr freadseek fseeko gendocs gettext 
git-version-gen gnumakefile gnupload gpl-3.0 intprops inttypes memchr2 memcmp2 
memmem mkstemp obstack obstack-printf-posix pipe progname propername quote 
regex regexprops-generic rename setenv snprintf-posix sprintf-posix stdbool 
stdlib-safer strnlen strtod strtol tempname unlocked-io unsetenv 
vasnprintf-posix verify verror wait-process xalloc xalloc-die xmemdup0 xoset 
xprintf-posix xstrndup xvasprintf-posix
+#   gnulib-tool --import --dir=. --local-dir=local --lib=libgnu 
--source-base=gnu --m4-base=ltdl/m4 --doc-base=doc --tests-base=tests/gnu 
--aux-dir=build-aux --with-tests --libtool --macro-prefix=M4 assert autobuild 
avltree-oset binary-io bitrotate clean-temp cloexec close-stream closein 
config-h configmake dirname error execute exit fdl-1.3 fflush filenamecat 
flexmember fopen fopen-safer freadptr freadseek fseeko gendocs gettext 
git-version-gen gnumakefile gnupload gpl-3.0 intprops inttypes 
maintainer-makefile memchr2 memcmp2 memmem mkstemp obstack obstack-printf-posix 
pipe progname propername quote regex regexprops-generic rename setenv 
snprintf-posix sprintf-posix stdbool stdlib-safer strnlen strtod strtol 
tempname unlocked-io unsetenv vasnprintf-posix verify verror wait-process 
xalloc xalloc-die xmemdup0 xoset xprintf-posix xstrndup xvasprintf-posix

 # Specification in the form of a few gnulib-tool.m4 macro invocations:
 gl_LOCAL_DIR([local])
@@ -52,6 +52,7 @@ gl_MODULES([
   gpl-3.0
   intprops
   inttypes
+  maintainer-makefile
   memchr2
   memcmp2
   memmem
diff --git a/maint.mk b/maint.mk
deleted file mode 100644
index 88089c3..0000000
--- a/maint.mk
+++ /dev/null
@@ -1,56 +0,0 @@
-## maint.mk - maintainer rules for managing m4 distributions
-##
-## Copyright (C) 2000, 2001, 2003, 2004, 2005, 2006, 2007, 2008, 2009
-## Free Software Foundation, Inc.
-##
-## This file is part of GNU M4.
-##
-## GNU M4 is free software: you can redistribute it and/or modify
-## it under the terms of the GNU General Public License as published by
-## the Free Software Foundation, either version 3 of the License, or
-## (at your option) any later version.
-##
-## GNU M4 is distributed in the hope that it will be useful,
-## but WITHOUT ANY WARRANTY; without even the implied warranty of
-## MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
-## GNU General Public License for more details.
-##
-## You should have received a copy of the GNU General Public License
-## along with this program.  If not, see <http://www.gnu.org/licenses/>.
-
-##                                                                      ##
-##                   --- RULES FOR THE MAINTAINER ---                   ##
-##                                                                      ##
-
-## TODO - fix this file now that m4 is maintained in git, not CVS.
-
-CVS    = cvs # set it to `:' to avoid CVS operations at dist time
-
-# Tag before making distribution.  Also, don't make a distribution if
-# checks fail.  Also, make sure the NEWS file is up-to-date.
-cvs-dist: distcheck # maintainer-check
-       @if sed '1,2d;3q' $(srcdir)/NEWS | grep -e "$(VERSION)" > dev/null; \
-         echo "NEWS not updated; not releasing" 1>&2; \
-         exit 1;
-       fi
-       cd $(srcdir) && \
-         $(CVS) -q tag `echo "Release-$(VERSION)" | sed 's/\./-/g'`
-       $(MAKE) dist
-
-cvs-diff:
-       thisver=`echo "Release-$(VERSION)" | sed 's/\./-/g'`; \
-       if test -z "$$OLDVERSION"; then \
-         prevno=`echo "$(VERSION)" - 0.01 | bc | sed 's/^\./0./'`; \
-       else prevno="$$OLDVERSION"; fi; \
-       prevver=Release-`echo $$prevno | sed 's/\./-/g'`; \
-       cvs -f rdiff -c -r $$prevver -r $$thisver $(PACKAGE) \
-           > $(PACKAGE)-$$prevno-$(VERSION).diff
-
-.PHONY: web-manual
-web-manual:
-       @cd '$(srcdir)/doc'; \
-         $(SHELL) ../$(config_aux_dir)/gendocs.sh \
-           -o '$(abs_builddir)/doc/manual' \
-           --email $(PACKAGE_BUGREPORT) $(PACKAGE) \
-           "$(PACKAGE_NAME) - $(manual_title)"
-       @echo " *** Upload the doc/manual directory to web-cvs."
-- 
1.6.4.2

From 3117f7ea6a22ea5b32877180b460beffba5ca83f Mon Sep 17 00:00:00 2001
From: Eric Blake <address@hidden>
Date: Mon, 4 Jan 2010 15:14:55 -0700
Subject: [PATCH 1/4] Address 'make sc_cast_of_argument_to_free' failures.

* m4/m4private.h (DELETE): Adjust comment and fix parentheses.
* m4/m4.c (m4_delete): Use it to avoid warning.
* m4/module.c (install_builtin_table, module_remove): Likewise.
* m4/symtab.c (m4_symbol_value_delete, m4_symbol_value_copy):
Likewise.
* .x-sc_cast_of_argument_to_free: New file.
* Makefile.am (syntax_check_exceptions): Distribute exceptions.

Signed-off-by: Eric Blake <address@hidden>
---
 .x-sc_cast_of_argument_to_free |    1 +
 ChangeLog                      |    9 +++++++++
 Makefile.am                    |    1 +
 m4/m4.c                        |    2 +-
 m4/m4private.h                 |    5 +++--
 m4/module.c                    |    4 ++--
 m4/symtab.c                    |    8 ++++----
 7 files changed, 21 insertions(+), 9 deletions(-)
 create mode 100644 .x-sc_cast_of_argument_to_free

diff --git a/.x-sc_cast_of_argument_to_free b/.x-sc_cast_of_argument_to_free
new file mode 100644
index 0000000..ad761ae
--- /dev/null
+++ b/.x-sc_cast_of_argument_to_free
@@ -0,0 +1 @@
+m4/m4private.h
diff --git a/ChangeLog b/ChangeLog
index c3d91b7..b478640 100644
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,5 +1,14 @@
 2010-01-07  Eric Blake  <address@hidden>

+       Address 'make sc_cast_of_argument_to_free' failures.
+       * m4/m4private.h (DELETE): Adjust comment and fix parentheses.
+       * m4/m4.c (m4_delete): Use it to avoid warning.
+       * m4/module.c (install_builtin_table, module_remove): Likewise.
+       * m4/symtab.c (m4_symbol_value_delete, m4_symbol_value_copy):
+       Likewise.
+       * .x-sc_cast_of_argument_to_free: New file.
+       * Makefile.am (syntax_check_exceptions): Distribute exceptions.
+
        More whitespace cleanup.
        * HACKING: Nuke trailing whitespace.
        * examples/WWW/Makefile: Likewise.
diff --git a/Makefile.am b/Makefile.am
index 89eb7f0..ddffcff 100644
--- a/Makefile.am
+++ b/Makefile.am
@@ -53,6 +53,7 @@ include ltdl/Makefile.inc
 # Additional configuration.  Version management comes from suggestions
 # given in build-aux/git-version-gen.
 syntax_check_exceptions = \
+       .x-sc_cast_of_argument_to_free \
        .x-sc_prohibit_tab_based_indentation \
        .x-sc_require_config_h \
        .x-sc_require_config_h_first \
diff --git a/m4/m4.c b/m4/m4.c
index 49604e0..1ba5a6c 100644
--- a/m4/m4.c
+++ b/m4/m4.c
@@ -74,7 +74,7 @@ m4_delete (m4 *context)
           m4__search_path *stale = path;
           path = path->next;

-          free ((void*) stale->dir);
+          DELETE (stale->dir); /* Cast away const.  */
           free (stale);
         }
       free (context->search_path);
diff --git a/m4/m4private.h b/m4/m4private.h
index ab5c299..0ee10e2 100644
--- a/m4/m4private.h
+++ b/m4/m4private.h
@@ -615,8 +615,9 @@ extern void m4__include_init (m4 *);


 
-/* Convenience macro to zero a variable after freeing it.  */
-#define DELETE(Expr)    ((Expr) = (free ((void *) Expr), (void *) 0))
+/* Convenience macro to zero a variable after freeing it, as well as
+   casting away any const.  */
+#define DELETE(Expr)    ((Expr) = (free ((void *) (Expr)), (void *) 0))


 #if DEBUG
diff --git a/m4/module.c b/m4/module.c
index 0b92cde..b8ce8d2 100644
--- a/m4/module.c
+++ b/m4/module.c
@@ -152,7 +152,7 @@ install_builtin_table (m4 *context, m4_module *module)
       m4_symbol_pushdef (M4SYMTAB, name, strlen (name), value);

       if (m4_get_prefix_builtins_opt (context))
-        free ((char *) name);
+        DELETE (name);
     }
   if (i)
     m4_debug_message (context, M4_DEBUG_TRACE_MODULE,
@@ -649,7 +649,7 @@ module_remove (m4 *context, m4_module *module, m4_obstack 
*obs)
     {
       size_t i;
       for (i = 0; i < module->builtins_len; i++)
-        free ((char *) module->builtins[i].builtin.name);
+        DELETE (module->builtins[i].builtin.name);
       free (module->builtins);
       free (module);
     }
diff --git a/m4/symtab.c b/m4/symtab.c
index 710d1b3..3ab0353 100644
--- a/m4/symtab.c
+++ b/m4/symtab.c
@@ -378,10 +378,10 @@ m4_symbol_value_delete (m4_symbol_value *value)
       switch (value->type)
         {
         case M4_SYMBOL_TEXT:
-          free ((char *) m4_get_symbol_value_text (value));
+          DELETE (value->u.u_t.text);
           break;
         case M4_SYMBOL_PLACEHOLDER:
-          free ((char *) m4_get_symbol_value_placeholder (value));
+          DELETE (value->u.u_t.text);
           break;
         case M4_SYMBOL_VOID:
         case M4_SYMBOL_FUNC:
@@ -469,10 +469,10 @@ m4_symbol_value_copy (m4 *context, m4_symbol_value *dest, 
m4_symbol_value *src)
   switch (dest->type)
     {
     case M4_SYMBOL_TEXT:
-      free ((char *) m4_get_symbol_value_text (dest));
+      DELETE (dest->u.u_t.text);
       break;
     case M4_SYMBOL_PLACEHOLDER:
-      free ((char *) m4_get_symbol_value_placeholder (dest));
+      DELETE (dest->u.u_t.text);
       break;
     case M4_SYMBOL_VOID:
     case M4_SYMBOL_FUNC:
-- 
1.6.4.2


From d9b1e85c32afae7cd1fd11d1d920e8d8dc196c21 Mon Sep 17 00:00:00 2001
From: Eric Blake <address@hidden>
Date: Mon, 4 Jan 2010 16:56:22 -0700
Subject: [PATCH 2/4] Address 'make sc_error_message_uppercase' failures.

* m4/output.c (m4_freeze_diversions): Silence false positive.
* src/main.c (main): Use 'warning', not 'Warning', in messages.
* m4/utility.c (m4_verror_at_line): Likewise.
* doc/m4.texinfo (Operation modes, Macro Arguments, Undefine)
(Defn, Pushdef, Indir, Builtin, Ifdef, Ifelse, Dumpdef, Trace)
(Debuglen, Debugfile, Dnl, Changeresyntax, Standard Modules)
(Index macro, Regexp, Substr, Translit, Patsubst, Format, Incr)
(Eval, Mkstemp, Syncoutput, Improved forloop)
(Improved fatal_error): Adjust expected output.
* tests/builtins.at (define, mkdtemp, mkstemp): Likewise.
* tests/freeze.at (loading format 1, reloading unknown builtin):
Likewise.
* tests/macros.at (Arity and defn, 'Arity, defn, and freeze')
(pushdef/popdef): Likewise.
* tests/null.err: Likewise.
* tests/options.at (deprecated options, POSIXLY_CORRECT)
(--fatal-warnings, --regexp-syntax, --syncoutput): Likewise.
* tests/others.at (nul character, stdin seekable): Likewise.
* tests/modules.at (AT_CHECK_M4_MODTEST, modules: text):
Likewise.

Signed-off-by: Eric Blake <address@hidden>
---
 ChangeLog         |   22 ++++++
 doc/m4.texinfo    |  190 ++++++++++++++++++++++++++--------------------------
 m4/output.c       |    2 +-
 m4/utility.c      |    8 +-
 src/main.c        |   14 ++--
 tests/builtins.at |    8 +-
 tests/freeze.at   |   10 ++--
 tests/macros.at   |   12 ++--
 tests/modules.at  |   10 ++--
 tests/null.err    |   90 +++++++++++++-------------
 tests/options.at  |   52 +++++++-------
 tests/others.at   |    4 +-
 12 files changed, 222 insertions(+), 200 deletions(-)

diff --git a/ChangeLog b/ChangeLog
index b478640..b317577 100644
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,5 +1,27 @@
 2010-01-07  Eric Blake  <address@hidden>

+       Address 'make sc_error_message_uppercase' failures.
+       * m4/output.c (m4_freeze_diversions): Silence false positive.
+       * src/main.c (main): Use 'warning', not 'Warning', in messages.
+       * m4/utility.c (m4_verror_at_line): Likewise.
+       * doc/m4.texinfo (Operation modes, Macro Arguments, Undefine)
+       (Defn, Pushdef, Indir, Builtin, Ifdef, Ifelse, Dumpdef, Trace)
+       (Debuglen, Debugfile, Dnl, Changeresyntax, Standard Modules)
+       (Index macro, Regexp, Substr, Translit, Patsubst, Format, Incr)
+       (Eval, Mkstemp, Syncoutput, Improved forloop)
+       (Improved fatal_error): Adjust expected output.
+       * tests/builtins.at (define, mkdtemp, mkstemp): Likewise.
+       * tests/freeze.at (loading format 1, reloading unknown builtin):
+       Likewise.
+       * tests/macros.at (Arity and defn, 'Arity, defn, and freeze')
+       (pushdef/popdef): Likewise.
+       * tests/null.err: Likewise.
+       * tests/options.at (deprecated options, POSIXLY_CORRECT)
+       (--fatal-warnings, --regexp-syntax, --syncoutput): Likewise.
+       * tests/others.at (nul character, stdin seekable): Likewise.
+       * tests/modules.at (AT_CHECK_M4_MODTEST, modules: text):
+       Likewise.
+
        Address 'make sc_cast_of_argument_to_free' failures.
        * m4/m4private.h (DELETE): Adjust comment and fix parentheses.
        * m4/m4.c (m4_delete): Use it to avoid warning.
diff --git a/doc/m4.texinfo b/doc/m4.texinfo
index 6cb1472..2d4a81b 100644
--- a/doc/m4.texinfo
+++ b/doc/m4.texinfo
@@ -661,7 +661,7 @@ Operation modes
 @example
 $ @kbd{m4}
 defn(`oops')
address@hidden:stdin:1: Warning: defn: undefined macro `oops'
address@hidden:stdin:1: warning: defn: undefined macro `oops'
 @result{}
 ^D
 @end example
@@ -691,7 +691,7 @@ Operation modes
 @example
 $ @kbd{m4 -E -d}
 defn(`oops')
address@hidden:stdin:1: Warning: defn: undefined macro `oops'
address@hidden:stdin:1: warning: defn: undefined macro `oops'
 @result{}
 ^D
 @end example
@@ -1693,12 +1693,12 @@ Macro Arguments
 @example
 $ @kbd{m4}
 index(`abc')
address@hidden:stdin:1: Warning: index: too few arguments: 1 < 2
address@hidden:stdin:1: warning: index: too few arguments: 1 < 2
 @result{}0
 index(`abc',)
 @result{}0
 index(`abc', `b', `0', `ignored')
address@hidden:stdin:3: Warning: index: extra arguments ignored: 4 > 3
address@hidden:stdin:3: warning: index: extra arguments ignored: 4 > 3
 @result{}1
 @end example

@@ -2254,7 +2254,7 @@ Undefine
 @example
 $ @kbd{m4}
 undefine(`a')
address@hidden:stdin:1: Warning: undefine: undefined macro `a'
address@hidden:stdin:1: warning: undefine: undefined macro `a'
 @result{}
 debugmode(`-d')
 @result{}
@@ -2392,7 +2392,7 @@ Defn
 defn(`defn')
 @result{}
 define(defn(`divnum'), `cannot redefine a builtin token')
address@hidden:stdin:2: Warning: define: invalid macro name ignored
address@hidden:stdin:2: warning: define: invalid macro name ignored
 @result{}
 divnum
 @result{}0
@@ -2407,36 +2407,36 @@ Defn
 define(`', `empty-$1')
 @result{}
 defn(defn(`divnum'))
address@hidden:stdin:9: Warning: defn: invalid macro name ignored
address@hidden:stdin:9: warning: defn: invalid macro name ignored
 @result{}
 pushdef(defn(`divnum'), `oops')
address@hidden:stdin:10: Warning: pushdef: invalid macro name ignored
address@hidden:stdin:10: warning: pushdef: invalid macro name ignored
 @result{}
 traceon(defn(`divnum'))
address@hidden:stdin:11: Warning: traceon: invalid macro name ignored
address@hidden:stdin:11: warning: traceon: invalid macro name ignored
 @result{}
 indir(defn(`divnum'), `string')
address@hidden:stdin:12: Warning: indir: invalid macro name ignored
address@hidden:stdin:12: warning: indir: invalid macro name ignored
 @result{}
 indir(`', `string')
 @result{}empty-string
 traceoff(defn(`divnum'))
address@hidden:stdin:14: Warning: traceoff: invalid macro name ignored
address@hidden:stdin:14: warning: traceoff: invalid macro name ignored
 @result{}
 popdef(defn(`divnum'))
address@hidden:stdin:15: Warning: popdef: invalid macro name ignored
address@hidden:stdin:15: warning: popdef: invalid macro name ignored
 @result{}
 dumpdef(defn(`divnum'))
address@hidden:stdin:16: Warning: dumpdef: invalid macro name ignored
address@hidden:stdin:16: warning: dumpdef: invalid macro name ignored
 @result{}
 undefine(defn(`divnum'))
address@hidden:stdin:17: Warning: undefine: invalid macro name ignored
address@hidden:stdin:17: warning: undefine: invalid macro name ignored
 @result{}
 dumpdef(`')
 @error{}:@tabchar{}`empty-$1'
 @result{}
 m4symbols(defn(`divnum'))
address@hidden:stdin:19: Warning: m4symbols: invalid macro name ignored
address@hidden:stdin:19: warning: m4symbols: invalid macro name ignored
 @result{}
 define(`foo', `define(`$1', $2)')dnl
 foo(`bar', defn(`divnum'))
@@ -2457,7 +2457,7 @@ Defn
 @example
 $ @kbd{m4 -d}
 defn(`foo')
address@hidden:stdin:1: Warning: defn: undefined macro `foo'
address@hidden:stdin:1: warning: defn: undefined macro `foo'
 @result{}
 debugmode(`-d')
 @result{}
@@ -2472,25 +2472,25 @@ Defn
 @result{}AA
 define(`mydivnum', defn(`divnum', `divnum'))mydivnum
 @error{}m4trace: -2- defn(`divnum', `divnum') -> `<divnum><divnum>'
address@hidden:stdin:7: Warning: define: cannot concatenate builtins
address@hidden:stdin:7: warning: define: cannot concatenate builtins
 @error{}m4trace: -1- define(`mydivnum', `<divnum><divnum>') -> `'
 @result{}
 traceoff(`defn', `define')dumpdef(`mydivnum')
 @error{}mydivnum:@tabchar{}`'
 @result{}
 define(`mydivnum', defn(`divnum')defn(`divnum'))mydivnum
address@hidden:stdin:9: Warning: define: cannot concatenate builtins
address@hidden:stdin:9: warning: define: cannot concatenate builtins
 @result{}
 define(`mydivnum', defn(`divnum')`a')mydivnum
address@hidden:stdin:10: Warning: define: cannot concatenate builtins
address@hidden:stdin:10: warning: define: cannot concatenate builtins
 @result{}A
 define(`mydivnum', `a'defn(`divnum'))mydivnum
address@hidden:stdin:11: Warning: define: cannot concatenate builtins
address@hidden:stdin:11: warning: define: cannot concatenate builtins
 @result{}A
 define(`q', ``$@@'')
 @result{}
 define(`foo', q(`a', defn(`divnum')))foo
address@hidden:stdin:13: Warning: define: cannot concatenate builtins
address@hidden:stdin:13: warning: define: cannot concatenate builtins
 @result{}a,
 ifdef(`foo', `yes', `no')
 @result{}yes
@@ -2607,7 +2607,7 @@ Pushdef
 popdef
 @result{}popdef
 popdef(`a', `a')
address@hidden:stdin:3: Warning: popdef: undefined macro `a'
address@hidden:stdin:3: warning: popdef: undefined macro `a'
 @result{}
 debugmode(`-d')
 @result{}
@@ -2782,7 +2782,7 @@ Indir
 indir(`f', define(`f', `3'))
 @result{}3
 indir(`f', undefine(`f'))
address@hidden:stdin:4: Warning: indir: undefined macro `f'
address@hidden:stdin:4: warning: indir: undefined macro `f'
 @result{}
 debugmode(`-d')
 @result{}
@@ -2798,17 +2798,17 @@ Indir
 @example
 $ @kbd{m4 -d}
 indir(defn(`defn'), `divnum')
address@hidden:stdin:1: Warning: indir: invalid macro name ignored
address@hidden:stdin:1: warning: indir: invalid macro name ignored
 @result{}
 indir(`define', defn(`defn'), `divnum')
address@hidden:stdin:2: Warning: define: invalid macro name ignored
address@hidden:stdin:2: warning: define: invalid macro name ignored
 @result{}
 indir(`define', `foo', defn(`divnum'))
 @result{}
 foo
 @result{}0
 indir(`divert', defn(`foo'))
address@hidden:stdin:5: Warning: divert: empty string treated as 0
address@hidden:stdin:5: warning: divert: empty string treated as 0
 @result{}
 @end example

@@ -2822,7 +2822,7 @@ Indir
 @result{}
 indir(`%%:\
 odd', `extra')
address@hidden:stdin:3: Warning: %%\:\\\nodd: extra arguments ignored: 1 > 0
address@hidden:stdin:3: warning: %%\:\\\nodd: extra arguments ignored: 1 > 0
 @result{}0
 @end example

@@ -2893,10 +2893,10 @@ Builtin
 m4_builtin(`divnum')
 @result{}0
 m4_builtin(`m4_divnum')
address@hidden:stdin:2: Warning: m4_builtin: undefined builtin `m4_divnum'
address@hidden:stdin:2: warning: m4_builtin: undefined builtin `m4_divnum'
 @result{}
 m4_indir(`divnum')
address@hidden:stdin:3: Warning: m4_indir: undefined macro `divnum'
address@hidden:stdin:3: warning: m4_indir: undefined macro `divnum'
 @result{}
 m4_indir(`m4_divnum')
 @result{}0
@@ -2915,20 +2915,20 @@ Builtin
 builtin
 @result{}builtin
 builtin()
address@hidden:stdin:2: Warning: builtin: undefined builtin `'
address@hidden:stdin:2: warning: builtin: undefined builtin `'
 @result{}
 builtin(`builtin')
address@hidden:stdin:3: Warning: builtin: too few arguments: 0 < 1
address@hidden:stdin:3: warning: builtin: too few arguments: 0 < 1
 @result{}
 builtin(`builtin',)
address@hidden:stdin:4: Warning: builtin: undefined builtin `'
address@hidden:stdin:4: warning: builtin: undefined builtin `'
 @result{}
 builtin(`builtin', ``'
 ')
address@hidden:stdin:5: Warning: builtin: undefined builtin ``\'\n'
address@hidden:stdin:5: warning: builtin: undefined builtin ``\'\n'
 @result{}
 indir(`index')
address@hidden:stdin:7: Warning: index: too few arguments: 0 < 2
address@hidden:stdin:7: warning: index: too few arguments: 0 < 2
 @result{}0
 @end example

@@ -2985,7 +2985,7 @@ Builtin
 changequote(`[', `]')
 @result{}
 defn1([foo])
address@hidden:stdin:11: Warning: builtin: undefined builtin ``defn\''
address@hidden:stdin:11: warning: builtin: undefined builtin ``defn\''
 @result{}
 defn2([foo])
 @result{}bar
@@ -2996,7 +2996,7 @@ Builtin
 changequote
 @result{}
 defn1(`foo')
address@hidden:stdin:16: Warning: builtin: undefined builtin `[defn]'
address@hidden:stdin:16: warning: builtin: undefined builtin `[defn]'
 @result{}
 @end example

@@ -3069,7 +3069,7 @@ Ifdef
 ifdef(`foo', ``foo' is defined', ``foo' is not defined')
 @result{}foo is defined
 ifdef(`no_such_macro', `yes', `no', `extra argument')
address@hidden:stdin:4: Warning: ifdef: extra arguments ignored: 4 > 3
address@hidden:stdin:4: warning: ifdef: extra arguments ignored: 4 > 3
 @result{}no
 @end example

@@ -3081,7 +3081,7 @@ Ifdef
 define(`', `empty')
 @result{}
 ifdef(defn(`defn'), `yes', `no')
address@hidden:stdin:2: Warning: ifdef: invalid macro name ignored
address@hidden:stdin:2: warning: ifdef: invalid macro name ignored
 @result{}no
 define(`foo', ifdef(`divnum', defn(`divnum'), `undefined'))
 @result{}
@@ -3129,7 +3129,7 @@ Ifelse
 ifelse(`some comments')
 @result{}
 ifelse(`foo', `bar')
address@hidden:stdin:2: Warning: ifelse: too few arguments: 2 < 3
address@hidden:stdin:2: warning: ifelse: too few arguments: 2 < 3
 @result{}
 @end example

@@ -3181,14 +3181,14 @@ Ifelse

 @example
 ifelse(`foo', `bar', `third', `gnu', `gnats')
address@hidden:stdin:1: Warning: ifelse: extra arguments ignored: 5 > 4
address@hidden:stdin:1: warning: ifelse: extra arguments ignored: 5 > 4
 @result{}gnu
 ifelse(`foo', `bar', `third', `gnu', `gnats', `sixth')
 @result{}
 ifelse(`foo', `bar', `third', `gnu', `gnats', `sixth', `seventh')
 @result{}seventh
 ifelse(`foo', `bar', `3', `gnu', `gnats', `6', `7', `8')
address@hidden:stdin:4: Warning: ifelse: extra arguments ignored: 8 > 7
address@hidden:stdin:4: warning: ifelse: extra arguments ignored: 8 > 7
 @result{}7
 @end example

@@ -4117,7 +4117,7 @@ Dumpdef
 @error{}f:@tabchar{}``$0'1'
 @result{}f2
 f(popdef(`f')dumpdef(`f'))
address@hidden:stdin:3: Warning: dumpdef: undefined macro `f'
address@hidden:stdin:3: warning: dumpdef: undefined macro `f'
 @result{}f1
 debugmode(`-d')
 @result{}
@@ -4241,17 +4241,17 @@ Trace
 foo
 @result{}foo
 defn(`foo')
address@hidden:stdin:4: Warning: defn: undefined macro `foo'
address@hidden:stdin:4: warning: defn: undefined macro `foo'
 @result{}
 undefine(`foo')
address@hidden:stdin:5: Warning: undefine: undefined macro `foo'
address@hidden:stdin:5: warning: undefine: undefined macro `foo'
 @result{}
 pushdef(`foo')
 @result{}
 popdef(`foo')
 @result{}
 popdef(`foo')
address@hidden:stdin:8: Warning: popdef: undefined macro `foo'
address@hidden:stdin:8: warning: popdef: undefined macro `foo'
 @result{}
 define(`foo', `bar')
 @result{}
@@ -4263,7 +4263,7 @@ Trace
 ifdef(`foo', `yes', `no')
 @result{}no
 indir(`foo')
address@hidden:stdin:13: Warning: indir: undefined macro `foo'
address@hidden:stdin:13: warning: indir: undefined macro `foo'
 @result{}
 define(`foo', `blah')
 @result{}
@@ -4673,7 +4673,7 @@ Debuglen
 @example
 $ @kbd{m4 -d -l 6 -t echo -t defn}
 debuglen(`oops')
address@hidden:stdin:1: Warning: debuglen: non-numeric argument `oops'
address@hidden:stdin:1: warning: debuglen: non-numeric argument `oops'
 @result{}
 define(`echo', `$@@')
 @result{}
@@ -4732,13 +4732,13 @@ Debugfile
 traceon(`divnum')
 @result{}
 divnum(`extra')
address@hidden:stdin:2: Warning: divnum: extra arguments ignored: 1 > 0
address@hidden:stdin:2: warning: divnum: extra arguments ignored: 1 > 0
 @error{}m4trace: -1- divnum(`extra') -> `0'
 @result{}0
 debugfile()
 @result{}
 divnum(`extra')
address@hidden:stdin:4: Warning: divnum: extra arguments ignored: 1 > 0
address@hidden:stdin:4: warning: divnum: extra arguments ignored: 1 > 0
 @result{}0
 debugfile
 @result{}
@@ -4865,7 +4865,7 @@ Dnl
 @example
 dnl(`args are ignored, but side effects occur',
 define(`foo', `like this')) while this text is ignored: undefine(`foo')
address@hidden:stdin:1: Warning: dnl: extra arguments ignored: 2 > 0
address@hidden:stdin:1: warning: dnl: extra arguments ignored: 2 > 0
 See how `foo' was defined, foo?
 @result{}See how foo was defined, like this?
 @end example
@@ -4880,7 +4880,7 @@ Dnl
 define(`hi', `HI')
 @result{}
 ^D
address@hidden:stdin:1: Warning: dnl: end of file treated as newline
address@hidden:stdin:1: warning: dnl: end of file treated as newline
 @result{}0 HI 2 HI
 @end example

@@ -5361,7 +5361,7 @@ Changeresyntax
 changeresyntax(`Gnu_M4')
 @result{}
 changeresyntax(`unknown')
address@hidden:stdin:4: Warning: changeresyntax: bad syntax-spec: `unknown'
address@hidden:stdin:4: warning: changeresyntax: bad syntax-spec: `unknown'
 @result{}
 @end example

@@ -6799,7 +6799,7 @@ Standard Modules
 ifdef(`__gnu__', `Extensions are active', `Minimal features')
 @result{}Extensions are active
 __gnu__(`ignored')
address@hidden:stdin:3: Warning: __gnu__: extra arguments ignored: 1 > 0
address@hidden:stdin:3: warning: __gnu__: extra arguments ignored: 1 > 0
 @result{}
 @end example

@@ -6893,7 +6893,7 @@ Index macro

 @example
 index(`abc')
address@hidden:stdin:1: Warning: index: too few arguments: 1 < 2
address@hidden:stdin:1: warning: index: too few arguments: 1 < 2
 @result{}0
 index(`abc', `')
 @result{}0
@@ -6973,13 +6973,13 @@ Regexp
 regexp(`abc', `\(b\)', `\\\10\a')
 @result{}\b0a
 regexp(`abc', `b', `\1\')
address@hidden:stdin:2: Warning: regexp: sub-expression 1 not present
address@hidden:stdin:2: Warning: regexp: trailing \ ignored in replacement
address@hidden:stdin:2: warning: regexp: sub-expression 1 not present
address@hidden:stdin:2: warning: regexp: trailing \ ignored in replacement
 @result{}
 regexp(`abc', `\(\(d\)?\)\(c\)', `\1\2\3\4\5\6')
address@hidden:stdin:3: Warning: regexp: sub-expression 4 not present
address@hidden:stdin:3: Warning: regexp: sub-expression 5 not present
address@hidden:stdin:3: Warning: regexp: sub-expression 6 not present
address@hidden:stdin:3: warning: regexp: sub-expression 4 not present
address@hidden:stdin:3: warning: regexp: sub-expression 5 not present
address@hidden:stdin:3: warning: regexp: sub-expression 6 not present
 @result{}c
 @end example

@@ -6988,7 +6988,7 @@ Regexp

 @example
 regexp(`abc')
address@hidden:stdin:1: Warning: regexp: too few arguments: 1 < 2
address@hidden:stdin:1: warning: regexp: too few arguments: 1 < 2
 @result{}0
 regexp(`abc', `')
 @result{}0
@@ -7075,7 +7075,7 @@ Substr

 @example
 substr(`abc')
address@hidden:stdin:1: Warning: substr: too few arguments: 1 < 2
address@hidden:stdin:1: warning: substr: too few arguments: 1 < 2
 @result{}abc
 substr(`abc', `')
 @result{}abc
@@ -7132,10 +7132,10 @@ Substr
 substr(`abcde', `-6', `1', `f')
 @result{}fabcde
 substr(`abcde', `-7', `1', `f')
address@hidden:stdin:5: Warning: substr: substring out of range
address@hidden:stdin:5: warning: substr: substring out of range
 @result{}
 substr(`abcde', `6', `', `f')
address@hidden:stdin:6: Warning: substr: substring out of range
address@hidden:stdin:6: warning: substr: substring out of range
 @result{}
 @end example

@@ -7288,7 +7288,7 @@ Translit

 @example
 translit(`abc')
address@hidden:stdin:1: Warning: translit: too few arguments: 1 < 2
address@hidden:stdin:1: warning: translit: too few arguments: 1 < 2
 @result{}abc
 @end example

@@ -7351,7 +7351,7 @@ Patsubst
 patsubst(`GNUs not Unix', `[A-Z][a-z]+')
 @result{}GN address@hidden }
 patsubst(`GNUs not Unix', `not', `NOT\')
address@hidden:stdin:6: Warning: patsubst: trailing \ ignored in replacement
address@hidden:stdin:6: warning: patsubst: trailing \ ignored in replacement
 @result{}GNUs NOT Unix
 @end example

@@ -7443,7 +7443,7 @@ Patsubst

 @example
 patsubst(`abc')
address@hidden:stdin:1: Warning: patsubst: too few arguments: 1 < 2
address@hidden:stdin:1: warning: patsubst: too few arguments: 1 < 2
 @result{}abc
 patsubst(`abc', `')
 @result{}abc
@@ -7544,14 +7544,14 @@ Format

 @example
 format(`%p', `0')
address@hidden:stdin:1: Warning: format: unrecognized specifier in `%p'
address@hidden:stdin:1: warning: format: unrecognized specifier in `%p'
 @result{}p
 format(`%*d', `')
address@hidden:stdin:2: Warning: format: empty string treated as 0
address@hidden:stdin:2: Warning: format: too few arguments: 2 < 3
address@hidden:stdin:2: warning: format: empty string treated as 0
address@hidden:stdin:2: warning: format: too few arguments: 2 < 3
 @result{}0
 format(`%.1f', `2a')
address@hidden:stdin:3: Warning: format: non-numeric argument `2a'
address@hidden:stdin:3: warning: format: non-numeric argument `2a'
 @result{}2.0
 @end example

@@ -7594,10 +7594,10 @@ Incr
 decr(`7')
 @result{}6
 incr()
address@hidden:stdin:3: Warning: incr: empty string treated as 0
address@hidden:stdin:3: warning: incr: empty string treated as 0
 @result{}1
 decr()
address@hidden:stdin:4: Warning: decr: empty string treated as 0
address@hidden:stdin:4: warning: decr: empty string treated as 0
 @result{}-1
 @end example

@@ -7707,23 +7707,23 @@ Eval
 eval(`+ + - ~ ! ~ 0')
 @result{}1
 eval(`++0')
address@hidden:stdin:8: Warning: eval: invalid operator: `++0'
address@hidden:stdin:8: warning: eval: invalid operator: `++0'
 @result{}
 eval(`1 = 1')
address@hidden:stdin:9: Warning: eval: invalid operator: `1 = 1'
address@hidden:stdin:9: warning: eval: invalid operator: `1 = 1'
 @result{}
 eval(`0 |= 1')
address@hidden:stdin:10: Warning: eval: invalid operator: `0 |= 1'
address@hidden:stdin:10: warning: eval: invalid operator: `0 |= 1'
 @result{}
 eval(`2 || 1 / 0')
 @result{}1
 eval(`0 || 1 / 0')
address@hidden:stdin:12: Warning: eval: divide by zero: `0 || 1 / 0'
address@hidden:stdin:12: warning: eval: divide by zero: `0 || 1 / 0'
 @result{}
 eval(`0 && 1 % 0')
 @result{}0
 eval(`2 && 1 % 0')
address@hidden:stdin:14: Warning: eval: modulo by zero: `2 && 1 % 0'
address@hidden:stdin:14: warning: eval: modulo by zero: `2 && 1 % 0'
 @result{}
 @end example

@@ -7751,9 +7751,9 @@ Eval
 @result{}1
 eval(`0 ** 0')
 @result{}
address@hidden:stdin:5: Warning: eval: divide by zero: `0 ** 0'
address@hidden:stdin:5: warning: eval: divide by zero: `0 ** 0'
 eval(`4 ** -2')
address@hidden:stdin:6: Warning: eval: negative exponent: `4 ** -2'
address@hidden:stdin:6: warning: eval: negative exponent: `4 ** -2'
 @result{}
 eval(`2 || 4 ** -2')
 @result{}1
@@ -7816,7 +7816,7 @@ Eval
 define(`foo', `666')
 @result{}
 eval(`foo / 6')
address@hidden:stdin:11: Warning: eval: bad expression: `foo / 6'
address@hidden:stdin:11: warning: eval: bad expression: `foo / 6'
 @result{}
 eval(foo / 6)
 @result{}111
@@ -7888,16 +7888,16 @@ Eval
 eval(`10', `16')
 @result{}a
 eval(`1', `37')
address@hidden:stdin:9: Warning: eval: radix out of range: 37
address@hidden:stdin:9: warning: eval: radix out of range: 37
 @result{}
 eval(`1', , `-1')
address@hidden:stdin:10: Warning: eval: negative width: -1
address@hidden:stdin:10: warning: eval: negative width: -1
 @result{}
 eval()
address@hidden:stdin:11: Warning: eval: empty string treated as 0
address@hidden:stdin:11: warning: eval: empty string treated as 0
 @result{}0
 eval(` ')
address@hidden:stdin:12: Warning: eval: empty string treated as 0
address@hidden:stdin:12: warning: eval: empty string treated as 0
 @result{}0
 define(`a', `hi')eval(` 10 ', `16')
 @result{}hi
@@ -8335,7 +8335,7 @@ Mkstemp
 define(`tmp', `oops')
 @result{}
 maketemp(`/tmp/fooXXXXXX')
address@hidden:stdin:1: Warning: maketemp: recommend using mkstemp instead
address@hidden:stdin:1: warning: maketemp: recommend using mkstemp instead
 @result{}/tmp/fooa07346
 ifdef(`mkstemp', `define(`maketemp', defn(`mkstemp'))',
       `define(`mkstemp', defn(`maketemp'))dnl
@@ -8351,7 +8351,7 @@ Mkstemp
 @example
 $ @kbd{m4 --safer}
 maketemp(`/tmp/fooXXXXXX')
address@hidden:stdin:1: Warning: maketemp: recommend using mkstemp instead
address@hidden:stdin:1: warning: maketemp: recommend using mkstemp instead
 @error{}m4:stdin:1: maketemp: disabled by --safer
 @result{}
 mkstemp(`/tmp/fooXXXXXX')
@@ -8379,12 +8379,12 @@ Mkstemp
 syscmd(`rm -f foo-??????')sysval
 @result{}0
 define(`file1', maketemp(`foo-XXXXXX'))dnl
address@hidden:stdin:3: Warning: maketemp: recommend using mkstemp instead
address@hidden:stdin:3: warning: maketemp: recommend using mkstemp instead
 ifelse(esyscmd(`echo \` foo-?????? \''), `foo-??????',
        `no file', `created')
 @result{}created
 define(`file2', maketemp(`foo-XX'))dnl
address@hidden:stdin:6: Warning: maketemp: recommend using mkstemp instead
address@hidden:stdin:6: warning: maketemp: recommend using mkstemp instead
 define(`file3', mkstemp(`foo-XXXXXX'))dnl
 ifelse(len(defn(`file1')), len(defn(`file2')),
        `same length', `different')
@@ -8407,19 +8407,19 @@ Mkstemp
 syscmd(`rm -f foo-*')sysval
 @result{}0
 define(`file1', maketemp(`foo-XXXXXX'))dnl
address@hidden:stdin:2: Warning: maketemp: recommend using mkstemp instead
address@hidden:stdin:2: warning: maketemp: recommend using mkstemp instead
 define(`file2', maketemp(`foo-XXXXXX'))dnl
address@hidden:stdin:3: Warning: maketemp: recommend using mkstemp instead
address@hidden:stdin:3: warning: maketemp: recommend using mkstemp instead
 ifelse(file1, file2, `same', `different file')
 @result{}same
 len(maketemp(`foo-XXXXX'))
address@hidden:stdin:5: Warning: maketemp: recommend using mkstemp instead
address@hidden:stdin:5: warning: maketemp: recommend using mkstemp instead
 @result{}9
 define(`abc', `def')
 @result{}
 maketemp(`foo-abc')
 @result{}foo-def
address@hidden:stdin:7: Warning: maketemp: recommend using mkstemp instead
address@hidden:stdin:7: warning: maketemp: recommend using mkstemp instead
 syscmd(`test -f foo-*')sysval
 @result{}1
 @end example
@@ -8777,7 +8777,7 @@ Syncoutput
 @result{}1
 @result{}2
 syncoutput(`blah')
address@hidden:stdin:18: Warning: syncoutput: unknown directive `blah'
address@hidden:stdin:18: warning: syncoutput: unknown directive `blah'
 @result{}
 @end example

@@ -9519,7 +9519,7 @@ Improved forloop
 forloop(`i', `5 + 5', `0xc', ` 0x`'eval(i, `16')')
 @result{} 0xa 0xb 0xc
 forloop(`i', `a', `b', `non-numeric bounds')
address@hidden:stdin:6: Warning: eval: bad input: `(a) <= (b)'
address@hidden:stdin:6: warning: eval: bad input: `(a) <= (b)'
 @result{}
 @end example

@@ -10352,7 +10352,7 @@ Improved fatal_error
 fatal_error(`inside wrapped text')')
 @result{}
 ^D
address@hidden:stdin:6: Warning: divnum: extra arguments ignored: 1 > 0
address@hidden:stdin:6: warning: divnum: extra arguments ignored: 1 > 0
 @result{}0
 @error{}m4:stdin:6: fatal error: inside wrapped text
 @end example
diff --git a/m4/output.c b/m4/output.c
index cbd37ab..72902f3 100644
--- a/m4/output.c
+++ b/m4/output.c
@@ -1098,7 +1098,7 @@ m4_freeze_diversions (m4 *context, FILE *file)
                   || file_stat.st_size != (unsigned long int) 
file_stat.st_size)
                 m4_error (context, EXIT_FAILURE, errno, NULL,
                           _("diversion too large"));
-              xfprintf (file, "D%d,%lu\n", diversion->divnum,
+              xfprintf (file, "%c%d,%lu\n", 'D', diversion->divnum,
                         (unsigned long int) file_stat.st_size);
             }

diff --git a/m4/utility.c b/m4/utility.c
index 337b8bb..137f6fc 100644
--- a/m4/utility.c
+++ b/m4/utility.c
@@ -167,7 +167,7 @@ const char *m4_info_name (const m4_call_info *caller)
    ARGS, on behalf of CALLER (if any), otherwise at the global
    position in CONTEXT.  If ERRNUM, decode the errno value as part of
    the message.  If STATUS, exit immediately with that status.  If
-   WARN, prepend 'Warning: '.  */
+   WARN, prepend 'warning: '.  */
 static void
 m4_verror_at_line (m4 *context, bool warn, int status, int errnum,
                    const m4_call_info *caller, const char *format,
@@ -206,9 +206,9 @@ m4_verror_at_line (m4 *context, bool warn, int status, int 
errnum,
      for non-memory reasons (unlikely), then still use the original
      format.  */
   if (warn && macro)
-    full = xasprintf (_("Warning: %s: %s"), macro, format);
+    full = xasprintf (_("warning: %s: %s"), macro, format);
   else if (warn)
-    full = xasprintf (_("Warning: %s"), format);
+    full = xasprintf (_("warning: %s"), format);
   else if (macro)
     full = xasprintf (_("%s: %s"), macro, format);
   verror_at_line (status, errnum, line ? file : NULL, line,
@@ -243,7 +243,7 @@ m4_error (m4 *context, int status, int errnum, const 
m4_call_info *caller,
 /* Issue a warning, if they are not being suppressed.  The message is
    printf-style, based on FORMAT and any other arguments, and the
    program name, location (if we are currently parsing an input file),
-   and "Warning:" are automatically prepended.  If ERRNUM is non-zero,
+   and "warning:" are automatically prepended.  If ERRNUM is non-zero,
    include strerror output in the message.  If CALLER, prepend the
    message with the macro where the message occurred.  If warnings are
    fatal, call exit immediately, otherwise exit status is
diff --git a/src/main.c b/src/main.c
index 1c7bfd8..e9f2599 100644
--- a/src/main.c
+++ b/src/main.c
@@ -390,7 +390,7 @@ main (int argc, char *const *argv, char *const *envp)
         case HASHSIZE_OPTION:
           /* -H was supported in 1.4.x, but is a no-op now.  FIXME -
              remove support for -H after 2.0.  */
-          error (0, 0, _("Warning: `%s' is deprecated"),
+          error (0, 0, _("warning: `%s' is deprecated"),
                  optchar == 'H' ? "-H" : "--hashsize");
           break;

@@ -399,13 +399,13 @@ main (int argc, char *const *argv, char *const *envp)
           /* Compatibility junk: options that other implementations
              support, but which we ignore as no-ops and don't list in
              --help.  */
-          error (0, 0, _("Warning: `-%c' is deprecated"),
+          error (0, 0, _("warning: `-%c' is deprecated"),
                  optchar);
           break;

         case WORD_REGEXP_OPTION:
           /* Supported in 1.4.x as -W, but no longer present.  */
-          error (0, 0, _("Warning: `%s' is deprecated"), "--word-regexp");
+          error (0, 0, _("warning: `%s' is deprecated"), "--word-regexp");
           break;

         case 's':
@@ -451,7 +451,7 @@ main (int argc, char *const *argv, char *const *envp)
               errno = 0;
               strtol (optarg, &end, 10);
               if (*end == '\0' && errno == 0)
-                error (0, 0, _("Warning: recommend using `-B ./%s' instead"),
+                error (0, 0, _("warning: recommend using `-B ./%s' instead"),
                        optarg);
             }
           /* fall through */
@@ -541,7 +541,7 @@ main (int argc, char *const *argv, char *const *envp)
           break;

         case 'e':
-          error (0, 0, _("Warning: `%s' is deprecated, use `%s' instead"),
+          error (0, 0, _("warning: `%s' is deprecated, use `%s' instead"),
                  "-e", "-i");
           /* fall through */
         case 'i':
@@ -553,7 +553,7 @@ main (int argc, char *const *argv, char *const *envp)
           break;

         case ARGLENGTH_OPTION:
-          error (0, 0, _("Warning: `%s' is deprecated, use `%s' instead"),
+          error (0, 0, _("warning: `%s' is deprecated, use `%s' instead"),
                  "--arglength", "--debuglen");
           /* fall through */
         case 'l':
@@ -579,7 +579,7 @@ main (int argc, char *const *argv, char *const *envp)
              stdout, and --error-output is misnamed since it does not
              affect error messages to stderr.  Change the meaning of -o
              after 2.1.  */
-          error (0, 0, _("Warning: `%s' is deprecated, use `%s' instead"),
+          error (0, 0, _("warning: `%s' is deprecated, use `%s' instead"),
                  optchar == 'o' ? "-o" : "--error-output", "--debugfile");
           /* Don't call m4_debug_set_output here, as it has side effects.  */
           debugfile = optarg;
diff --git a/tests/builtins.at b/tests/builtins.at
index 1993e6f..aad4636 100644
--- a/tests/builtins.at
+++ b/tests/builtins.at
@@ -218,14 +218,14 @@ AT_CHECK_M4([define.m4], 0,
 [[new value.
 hello, world.
 base value.
-]], [[m4:define.m4:1: Warning: undefine: undefined macro `macro'
+]], [[m4:define.m4:1: warning: undefine: undefined macro `macro'
 ]])

 AT_CHECK_M4([--traditional define.m4], 0,
 [[new value.
 hello, world.
 base value.
-]], [[m4:define.m4:1: Warning: undefine: undefined macro `macro'
+]], [[m4:define.m4:1: warning: undefine: undefined macro `macro'
 ]])

 dnl check regression present 2008-02-22 to 2008-04-30.
@@ -728,7 +728,7 @@ AT_DATA([[in]],
 [[mkdtemp(`no_such_dir/m4-fooXXXXXX')
 ]])
 AT_CHECK_M4([in], [0], [[
-]], [[m4:in:1: Warning: mkdtemp: cannot create directory from template 
`no_such_dir/m4-fooXXXXXX': No such file or directory
+]], [[m4:in:1: warning: mkdtemp: cannot create directory from template 
`no_such_dir/m4-fooXXXXXX': No such file or directory
 ]])

 dnl Check that umask has an effect.  drws--S--T is okay.
@@ -757,7 +757,7 @@ AT_DATA([[in]],
 [[mkstemp(`no_such_dir/m4-fooXXXXXX')
 ]])
 AT_CHECK_M4([in], [0], [[
-]], [[m4:in:1: Warning: mkstemp: cannot create file from template 
`no_such_dir/m4-fooXXXXXX': No such file or directory
+]], [[m4:in:1: warning: mkstemp: cannot create file from template 
`no_such_dir/m4-fooXXXXXX': No such file or directory
 ]])

 dnl Check that extra X are appended, but not trailing NUL
diff --git a/tests/freeze.at b/tests/freeze.at
index 18d1c10..b75d520 100644
--- a/tests/freeze.at
+++ b/tests/freeze.at
@@ -170,7 +170,7 @@ define 1
 my_define(bar, 4) 3
 bar${1}
 ]],
-[[m4:input.m4:5: Warning: popdef: undefined macro `my_define'
+[[m4:input.m4:5: warning: popdef: undefined macro `my_define'
 ]])

 dnl Test rejection of v2 features in a v1 frozen file
@@ -528,10 +528,10 @@ AT_CHECK_M4([-R frozen.m4f input.m4], 0,

 a
 ]],
-[[m4:input.m4:4: Warning: defn: a: builtin `b' requested by frozen file not 
found
-m4:input.m4:6: Warning: a: builtin `b' requested by frozen file not found
-m4:input.m4:8: Warning: a: builtin `b' requested by frozen file not found
-m4:input.m4:10: Warning: builtin: undefined builtin `b'
+[[m4:input.m4:4: warning: defn: a: builtin `b' requested by frozen file not 
found
+m4:input.m4:6: warning: a: builtin `b' requested by frozen file not found
+m4:input.m4:8: warning: a: builtin `b' requested by frozen file not found
+m4:input.m4:10: warning: builtin: undefined builtin `b'
 a:     <<b>>
 c:     `'
 ]], [], [ ])
diff --git a/tests/macros.at b/tests/macros.at
index 6b37cc1..31b4492 100644
--- a/tests/macros.at
+++ b/tests/macros.at
@@ -58,8 +58,8 @@ defun
 ]])

 AT_CHECK_M4([input.m4], 0, [expout],
-[[m4:input.m4:5: Warning: define: extra arguments ignored: 3 > 2
-m4:input.m4:10: Warning: defun: extra arguments ignored: 3 > 2
+[[m4:input.m4:5: warning: define: extra arguments ignored: 3 > 2
+m4:input.m4:10: warning: defun: extra arguments ignored: 3 > 2
 ]])

 AT_CLEANUP
@@ -94,7 +94,7 @@ AT_DATA([[expout]],
 ]])

 AT_CHECK_M4([--reload-state=frozen.m4f input.m4], 0, expout,
-[[m4:input.m4:4: Warning: defun: extra arguments ignored: 3 > 2
+[[m4:input.m4:4: warning: defun: extra arguments ignored: 3 > 2
 ]])

 AT_CLEANUP(freezeme.m4 frozen.m4f)
@@ -239,9 +239,9 @@ hej:        `def 4.'
 hej:   `def 3.'
 hej:   `def 2.'
 hej:   `def 1.'
-m4:pushpop.m4:18: Warning: dumpdef: undefined macro `hej'
-m4:pushpop.m4:20: Warning: dumpdef: undefined macro `mac2'
-m4:pushpop.m4:21: Warning: popdef: undefined macro `mac2'
+m4:pushpop.m4:18: warning: dumpdef: undefined macro `hej'
+m4:pushpop.m4:20: warning: dumpdef: undefined macro `mac2'
+m4:pushpop.m4:21: warning: popdef: undefined macro `mac2'
 ]])

 AT_CLEANUP
diff --git a/tests/modules.at b/tests/modules.at
index 1e9b2d9..3b08246 100644
--- a/tests/modules.at
+++ b/tests/modules.at
@@ -133,7 +133,7 @@ Dumpdef: .
 [[Test module loaded.
 test:  <test>
 Test module unloaded.
-m4:input.m4:6: Warning: dumpdef: undefined macro `test'
+m4:input.m4:6: warning: dumpdef: undefined macro `test'
 ]])

 AT_CLEANUP
@@ -455,10 +455,10 @@ modtest
 1
 1,2
 ]], [[Test module loaded.
-m4:input.m4:2: Warning: __test__: extra arguments ignored: 1 > 0
-m4:input.m4:3: Warning: __test__: extra arguments ignored: 2 > 0
-m4:input.m4:4: Warning: onearg: too few arguments: 0 < 1
-m4:input.m4:6: Warning: onearg: extra arguments ignored: 2 > 1
+m4:input.m4:2: warning: __test__: extra arguments ignored: 1 > 0
+m4:input.m4:3: warning: __test__: extra arguments ignored: 2 > 0
+m4:input.m4:4: warning: onearg: too few arguments: 0 < 1
+m4:input.m4:6: warning: onearg: extra arguments ignored: 2 > 1
 Test module unloaded.
 ]])

diff --git a/tests/null.err b/tests/null.err
index 38c610f..2b0b3cf 100644
--- a/tests/null.err
+++ b/tests/null.err
@@ -1,27 +1,27 @@
 builtin:
-m4:null.m4:21: Warning: builtin: undefined builtin `-\0-'
+m4:null.m4:21: warning: builtin: undefined builtin `-\0-'
 changequote:
 echo:  address@hidden/
 m4trace: -1- dumpdef(echo/) -> /
 changeresyntax:
-m4:null.m4:39: Warning: changeresyntax: bad syntax-spec: `\0'
+m4:null.m4:39: warning: changeresyntax: bad syntax-spec: `\0'
 changesyntax:
-m4:null.m4:48: Warning: changesyntax: undefined syntax code: `\0'
+m4:null.m4:48: warning: changesyntax: undefined syntax code: `\0'
 debugfile:
-m4:null.m4:52: Warning: debugfile: argument `/no/such\0/file' truncated
-m4:null.m4:52: Warning: debugfile: cannot set debug file `/no/such': No such 
file or directory
+m4:null.m4:52: warning: debugfile: argument `/no/such\0/file' truncated
+m4:null.m4:52: warning: debugfile: cannot set debug file `/no/such': No such 
file or directory
 debuglen:
-m4:null.m4:55: Warning: debuglen: non-numeric argument `1\0001'
+m4:null.m4:55: warning: debuglen: non-numeric argument `1\0001'
 debugmode:
-m4:null.m4:58: Warning: debugmode: bad debug flags: `-\0-'
+m4:null.m4:58: warning: debugmode: bad debug flags: `-\0-'
 decr:
-m4:null.m4:61: Warning: decr: non-numeric argument `1\0001'
+m4:null.m4:61: warning: decr: non-numeric argument `1\0001'
 defn:
-m4:null.m4:66: Warning: defn: undefined macro `\0-\0'
+m4:null.m4:66: warning: defn: undefined macro `\0-\0'
 divert:
-m4:null.m4:73: Warning: divert: non-numeric argument `1\0001'
+m4:null.m4:73: warning: divert: non-numeric argument `1\0001'
 dumpdef:
-m4:null.m4:81: Warning: dumpdef: undefined macro `\0-\0'
+m4:null.m4:81: warning: dumpdef: undefined macro `\0-\0'
 :      `empty'
 -:     `dash'
 --:   ``$0': $1'
@@ -30,60 +30,60 @@ m4:null.m4:81: Warning: dumpdef: undefined macro `\0-\0'
 body:  `--'
 errprint: -- --
 esyscmd:
-m4:null.m4:91: Warning: esyscmd: argument `echo +\0+' truncated
+m4:null.m4:91: warning: esyscmd: argument `echo +\0+' truncated
 eval:
-m4:null.m4:96: Warning: eval: bad input: `1\0+1'
-m4:null.m4:98: Warning: eval: non-numeric argument `2\0002'
-m4:null.m4:100: Warning: eval: non-numeric argument `1\0001'
+m4:null.m4:96: warning: eval: bad input: `1\0+1'
+m4:null.m4:98: warning: eval: non-numeric argument `2\0002'
+m4:null.m4:100: warning: eval: non-numeric argument `1\0001'
 format:
-m4:null.m4:105: Warning: format: unrecognized specifier in `%\0%'
-m4:null.m4:105: Warning: format: unrecognized specifier in `%\0%'
-m4:null.m4:107: Warning: format: non-numeric argument `1\0001'
-m4:null.m4:107: Warning: format: argument `-\0-' truncated
+m4:null.m4:105: warning: format: unrecognized specifier in `%\0%'
+m4:null.m4:105: warning: format: unrecognized specifier in `%\0%'
+m4:null.m4:107: warning: format: non-numeric argument `1\0001'
+m4:null.m4:107: warning: format: argument `-\0-' truncated
 include:
-m4:null.m4:116: Warning: include: argument `/no/such\0/file' truncated
+m4:null.m4:116: warning: include: argument `/no/such\0/file' truncated
 m4:null.m4:116: include: cannot open `/no/such': No such file or directory
 incr:
-m4:null.m4:119: Warning: incr: non-numeric argument `1\0001'
+m4:null.m4:119: warning: incr: non-numeric argument `1\0001'
 index:
-m4:null.m4:125: Warning: index: non-numeric argument `1\0001'
+m4:null.m4:125: warning: index: non-numeric argument `1\0001'
 indir:
-m4:null.m4:130: Warning: indir: undefined macro `\0-\0'
-m4:null.m4:132: Warning: \0\0%%: extra arguments ignored: 1 > 0
+m4:null.m4:130: warning: indir: undefined macro `\0-\0'
+m4:null.m4:132: warning: \0\0%%: extra arguments ignored: 1 > 0
 maketemp:
-m4:null.m4:147: Warning: maketemp: recommend using mkstemp instead
-m4:null.m4:147: Warning: maketemp: argument `/no/such\0/file' truncated
-m4:null.m4:147: Warning: maketemp: cannot create file from template 
`/no/such': No such file or directory
+m4:null.m4:147: warning: maketemp: recommend using mkstemp instead
+m4:null.m4:147: warning: maketemp: argument `/no/such\0/file' truncated
+m4:null.m4:147: warning: maketemp: cannot create file from template 
`/no/such': No such file or directory
 mkdtemp:
-m4:null.m4:150: Warning: mkdtemp: argument `/no/such\0/file' truncated
-m4:null.m4:150: Warning: mkdtemp: cannot create directory from template 
`/no/such': No such file or directory
+m4:null.m4:150: warning: mkdtemp: argument `/no/such\0/file' truncated
+m4:null.m4:150: warning: mkdtemp: cannot create directory from template 
`/no/such': No such file or directory
 mkstemp:
-m4:null.m4:153: Warning: mkstemp: argument `/no/such\0/file' truncated
-m4:null.m4:153: Warning: mkstemp: cannot create file from template `/no/such': 
No such file or directory
+m4:null.m4:153: warning: mkstemp: argument `/no/such\0/file' truncated
+m4:null.m4:153: warning: mkstemp: cannot create file from template `/no/such': 
No such file or directory
 patsubst:
-m4:null.m4:156: Warning: patsubst: bad regular expression `\\\0\\': Trailing 
backslash
-m4:null.m4:166: Warning: patsubst: bad syntax-spec: `\0'
+m4:null.m4:156: warning: patsubst: bad regular expression `\\\0\\': Trailing 
backslash
+m4:null.m4:166: warning: patsubst: bad syntax-spec: `\0'
 popdef:
-m4:null.m4:173: Warning: popdef: undefined macro `-\0-'
+m4:null.m4:173: warning: popdef: undefined macro `-\0-'
 regexp:
-m4:null.m4:180: Warning: regexp: bad regular expression `\\\0\\': Trailing 
backslash
-m4:null.m4:190: Warning: regexp: bad syntax-spec: `\0'
+m4:null.m4:180: warning: regexp: bad regular expression `\\\0\\': Trailing 
backslash
+m4:null.m4:190: warning: regexp: bad syntax-spec: `\0'
 renamesyms:
-m4:null.m4:195: Warning: renamesyms: bad regular expression `\\\0\\': Trailing 
backslash
-m4:null.m4:201: Warning: renamesyms: bad syntax-spec: `\0'
+m4:null.m4:195: warning: renamesyms: bad regular expression `\\\0\\': Trailing 
backslash
+m4:null.m4:201: warning: renamesyms: bad syntax-spec: `\0'
 sinclude:
-m4:null.m4:206: Warning: sinclude: argument `/no/such\0/file' truncated
+m4:null.m4:206: warning: sinclude: argument `/no/such\0/file' truncated
 substr:
-m4:null.m4:211: Warning: substr: non-numeric argument `1\0001'
-m4:null.m4:213: Warning: substr: non-numeric argument `1\0001'
+m4:null.m4:211: warning: substr: non-numeric argument `1\0001'
+m4:null.m4:213: warning: substr: non-numeric argument `1\0001'
 syncoutput:
-m4:null.m4:218: Warning: syncoutput: unknown directive `\0'
+m4:null.m4:218: warning: syncoutput: unknown directive `\0'
 syscmd:
-m4:null.m4:221: Warning: syscmd: argument `echo +\0+' truncated
+m4:null.m4:221: warning: syscmd: argument `echo +\0+' truncated
 traceon:
 m4trace: -1- --(`--') -> `strange: --'
 m4trace: -1- body -> `-'
 undefine:
-m4:null.m4:240: Warning: undefine: undefined macro `-\0-'
+m4:null.m4:240: warning: undefine: undefined macro `-\0-'
 undivert:
-m4:null.m4:243: Warning: undivert: invalid file name `1\0001'
+m4:null.m4:243: warning: undivert: invalid file name `1\0001'
diff --git a/tests/options.at b/tests/options.at
index 82185e0..80e70d7 100644
--- a/tests/options.at
+++ b/tests/options.at
@@ -35,55 +35,55 @@ Try `m4 --help' for more information.

 dnl -H/--hashsize are no-ops since 2.0
 AT_CHECK_M4([-H1 --hashsize=1], [0], [],
-[[m4: Warning: `-H' is deprecated
-m4: Warning: `--hashsize' is deprecated
+[[m4: warning: `-H' is deprecated
+m4: warning: `--hashsize' is deprecated
 ]])

 dnl -S/-T are no-ops for compatibility
 AT_CHECK_M4([-S1 -T1], [0], [],
-[[m4: Warning: `-S' is deprecated
-m4: Warning: `-T' is deprecated
+[[m4: warning: `-S' is deprecated
+m4: warning: `-T' is deprecated
 ]])

 dnl -Bint can be confused with its no-op meaning in 1.4.x, but all other
 dnl uses of -B or its long option are okay
 AT_CHECK_M4([-B1], [0], [],
-[[m4: Warning: recommend using `-B ./1' instead
+[[m4: warning: recommend using `-B ./1' instead
 ]])
 AT_CHECK_M4([-B./1 --prepend-include=1], [0], [],
 [[]])

 dnl --error-output is a misleading name
 AT_CHECK_M4([--error-output=trace], [0], [],
-[[m4: Warning: `--error-output' is deprecated, use `--debugfile' instead
+[[m4: warning: `--error-output' is deprecated, use `--debugfile' instead
 ]])
 AT_CHECK([rm trace])

 dnl -o will change meaning in the future
 AT_CHECK_M4([-otrace], [0], [],
-[[m4: Warning: `-o' is deprecated, use `--debugfile' instead
+[[m4: warning: `-o' is deprecated, use `--debugfile' instead
 ]])
 AT_CHECK([rm trace])

 dnl -e is an odd spelling for --interactive
 AT_CHECK_M4([-e], [0], [],
-[[m4: Warning: `-e' is deprecated, use `-i' instead
+[[m4: warning: `-e' is deprecated, use `-i' instead
 ]])

 dnl --arglength is an older spelling for --debuglen
 AT_CHECK_M4([--arglength=10], [0], [],
-[[m4: Warning: `--arglength' is deprecated, use `--debuglen' instead
+[[m4: warning: `--arglength' is deprecated, use `--debuglen' instead
 ]])

 AT_CHECK_M4([--arglength=x], [1], [],
-[[m4: Warning: `--arglength' is deprecated, use `--debuglen' instead
+[[m4: warning: `--arglength' is deprecated, use `--debuglen' instead
 m4: invalid --arglength argument `x'
 ]])

 dnl --word-regexp from 1.4.x is no longer supported.  Can't test for its
 dnl alternate spelling -W, as that now means --warnings.
 AT_CHECK_M4([[--word-regexp='[a-zA-Z0-9_]+']], [0], [],
-[[m4: Warning: `--word-regexp' is deprecated
+[[m4: warning: `--word-regexp' is deprecated
 ]])

 AT_CLEANUP
@@ -214,16 +214,16 @@ AT_DATA([in], [[__line__
 dnl()
 ]])
 AT_CHECK_M4([in], [0], [[1
-]], [[m4:in:2: Warning: dnl: extra arguments ignored: 1 > 0
+]], [[m4:in:2: warning: dnl: extra arguments ignored: 1 > 0
 ]])
 AT_CHECK_M4([in -g], [0], [[1
-]], [[m4:in:2: Warning: dnl: extra arguments ignored: 1 > 0
+]], [[m4:in:2: warning: dnl: extra arguments ignored: 1 > 0
 ]])
 AT_CHECK_M4([in -G], [0], [[__line__
-]], [[m4:in:2: Warning: dnl: extra arguments ignored: 1 > 0
+]], [[m4:in:2: warning: dnl: extra arguments ignored: 1 > 0
 ]])
 AT_CHECK_M4([in -W], [0], [[1
-]], [[m4:in:2: Warning: dnl: extra arguments ignored: 1 > 0
+]], [[m4:in:2: warning: dnl: extra arguments ignored: 1 > 0
 ]])
 AT_CHECK_M4([in -Q], [0], [[1
 ]])
@@ -243,7 +243,7 @@ AT_CHECK_M4([in -g], [0], [[1
 AT_CHECK_M4([in -G], [0], [[__line__
 ]])
 AT_CHECK_M4([in -W], [0], [[__line__
-]], [[m4:in:2: Warning: dnl: extra arguments ignored: 1 > 0
+]], [[m4:in:2: warning: dnl: extra arguments ignored: 1 > 0
 ]])
 AT_CHECK_M4([in -Q], [0], [[__line__
 ]])
@@ -528,21 +528,21 @@ dnl()

 dnl By default, warnings don't affect exit status
 AT_CHECK_M4([in], [0], [],
-[[m4:in:1: Warning: dnl: extra arguments ignored: 1 > 0
-m4:in:2: Warning: dnl: extra arguments ignored: 1 > 0
-m4:in:3: Warning: dnl: extra arguments ignored: 1 > 0
+[[m4:in:1: warning: dnl: extra arguments ignored: 1 > 0
+m4:in:2: warning: dnl: extra arguments ignored: 1 > 0
+m4:in:3: warning: dnl: extra arguments ignored: 1 > 0
 ]])

 dnl With one -E, exit status changes, but execution continues
 AT_CHECK_M4([-E in], [1], [],
-[[m4:in:1: Warning: dnl: extra arguments ignored: 1 > 0
-m4:in:2: Warning: dnl: extra arguments ignored: 1 > 0
-m4:in:3: Warning: dnl: extra arguments ignored: 1 > 0
+[[m4:in:1: warning: dnl: extra arguments ignored: 1 > 0
+m4:in:2: warning: dnl: extra arguments ignored: 1 > 0
+m4:in:3: warning: dnl: extra arguments ignored: 1 > 0
 ]])

 dnl With two -E, execution halts immediately
 AT_CHECK_M4([--fatal-warnings --fatal-warnings in], [1], [],
-[[m4:in:1: Warning: dnl: extra arguments ignored: 1 > 0
+[[m4:in:1: warning: dnl: extra arguments ignored: 1 > 0
 ]])

 dnl Exit status can't be affected if there were no warnings
@@ -730,7 +730,7 @@ AT_CHECK_M4([--regexp-syntax= in], [0], [[0
 ]])

 AT_CHECK_M4([-rEXTENDED in], [0], [[
-]], [[m4:in:1: Warning: regexp: bad regular expression `(': Unmatched ( or \(
+]], [[m4:in:1: warning: regexp: bad regular expression `(': Unmatched ( or \(
 ]])

 AT_CHECK_M4([-rgnu-m4 in], [0], [[0
@@ -742,7 +742,7 @@ AT_CHECK_M4([-r"gnu M4" in], [0], [[0
 dnl Test behavior of -r intermixed with files
 AT_CHECK_M4([-rEXTENDED in --regexp-syntax in], [0], [[
 0
-]], [[m4:in:1: Warning: regexp: bad regular expression `(': Unmatched ( or \(
+]], [[m4:in:1: warning: regexp: bad regular expression `(': Unmatched ( or \(
 ]])

 AT_CLEANUP
@@ -821,7 +821,7 @@ hi
 dnl test parse error
 AT_CHECK_M4([--syncoutput=huh in], [0],
 [[hi
-]], [[m4: Warning: --syncoutput: unknown directive `huh'
+]], [[m4: warning: --syncoutput: unknown directive `huh'
 ]])

 AT_CLEANUP
diff --git a/tests/others.at b/tests/others.at
index a5d05e1..3258957 100644
--- a/tests/others.at
+++ b/tests/others.at
@@ -437,7 +437,7 @@ AT_CHECK_M4(["$abs_srcdir/null.m4"], [1],
 [[# This file tests m4 behavior on NUL bytes.
 ]], [stderr])
 AT_CHECK([sed "s|$abs_srcdir/||" stderr], [0],
-[[m4:null.m4:5: Warning: m4exit: non-numeric argument `2\0002'
+[[m4:null.m4:5: warning: m4exit: non-numeric argument `2\0002'
 ]])

 AT_CLEANUP
@@ -706,7 +706,7 @@ AT_DATA([in.m4], [[dnl(
 AT_CHECK([($M4 -EE; cat) < in.m4], [0], [[trailing data
 ]], [stderr])
 AT_CHECK([[$SED 's/^[^:]*[lt-]*m4[.ex]*:/m4:/' stderr]], [0],
-[[m4:stdin:1: Warning: dnl: extra arguments ignored: 1 > 0
+[[m4:stdin:1: warning: dnl: extra arguments ignored: 1 > 0
 ]])

 dnl Not all sed and libc combinations get the remaining tests right (for
-- 
1.6.4.2


From 26b4e1ec676c285bef3209f85e82dc23143b1211 Mon Sep 17 00:00:00 2001
From: Eric Blake <address@hidden>
Date: Thu, 7 Jan 2010 06:25:50 -0700
Subject: [PATCH 3/4] Use correct license on auxiliary documentation.

Finish the work started by commit bef627e995.

* gnulib: Update to latest.
* AUTHORS: Use GFDL 1.3, not 1.2.
* README-alpha: Likewise.
* README: Likewise.
* THANKS: Likewise.
* doc/STYLE: Likewise.
* modules/README: Likewise.
* NEWS: Place under GFDL.
* TODO: Likewise.
* cfg.mk (old_NEWS_hash): Update.

Signed-off-by: Eric Blake <address@hidden>
(cherry picked from commit 6ba66f1202d607726e72e17e1fc778cdafee1941)
---
 AUTHORS        |    2 +-
 ChangeLog      |   12 ++++++++++++
 NEWS           |   18 ++++++++++++++----
 README         |    2 +-
 README-alpha   |    2 +-
 THANKS         |    2 +-
 TODO           |   16 ++++++++++++++++
 cfg.mk         |    2 +-
 doc/STYLE      |    2 +-
 gnulib         |    2 +-
 modules/README |    2 +-
 11 files changed, 50 insertions(+), 12 deletions(-)

diff --git a/AUTHORS b/AUTHORS
index 6d4ef04..b2fdcc9 100644
--- a/AUTHORS
+++ b/AUTHORS
@@ -31,7 +31,7 @@ Markus Duft                 address@hidden        2006-08-03
 Copyright (C) 2000, 2006, 2007, 2010 Free Software Foundation, Inc.

 Permission is granted to copy, distribute and/or modify this document
-under the terms of the GNU Free Documentation License, Version 1.2 or
+under the terms of the GNU Free Documentation License, Version 1.3 or
 any later version published by the Free Software Foundation; with no
 Invariant Sections, with no Front-Cover Texts, and with no Back-Cover
 Texts.  A copy of the license is included in the ``GNU Free
diff --git a/ChangeLog b/ChangeLog
index b317577..45744aa 100644
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,5 +1,17 @@
 2010-01-07  Eric Blake  <address@hidden>

+       Use correct license on auxiliary documentation.
+       * gnulib: Update to latest.
+       * AUTHORS: Use GFDL 1.3, not 1.2.
+       * README-alpha: Likewise.
+       * README: Likewise.
+       * THANKS: Likewise.
+       * doc/STYLE: Likewise.
+       * modules/README: Likewise.
+       * NEWS: Place under GFDL.
+       * TODO: Likewise.
+       * cfg.mk (old_NEWS_hash): Update.
+
        Address 'make sc_error_message_uppercase' failures.
        * m4/output.c (m4_freeze_diversions): Silence false positive.
        * src/main.c (main): Use 'warning', not 'Warning', in messages.
diff --git a/NEWS b/NEWS
index 1488d08..1855b19 100644
--- a/NEWS
+++ b/NEWS
@@ -1,6 +1,4 @@
-GNU m4 NEWS - History of user-visible changes.       -*- outline -*-
-Copyright (C) 1992, 1993, 1994, 1998, 2000, 2001, 2006, 2007, 2008,
-2009, 2010 Free Software Foundation, Inc.
+GNU M4 NEWS - History of user-visible changes.       -*- outline -*-

 * Noteworthy changes in Version 1.9b (200x-??-??) [beta]
   Released by ????, based on git version 1.9a-*
@@ -1162,7 +1160,19 @@ contains the following beta features that were deemed 
worth deferring until
 * Version 0.50 - January 1990, by Rene' Seindal

 * Initial beta release.
-
+
+========================================================================
+
 Local Variables:
 fill-column: 75
 End:
+
+Copyright (C) 1992, 1993, 1994, 1998, 2000, 2001, 2006, 2007, 2008,
+2009, 2010 Free Software Foundation, Inc.
+
+Permission is granted to copy, distribute and/or modify this document
+under the terms of the GNU Free Documentation License, Version 1.3 or
+any later version published by the Free Software Foundation; with no
+Invariant Sections, with no Front-Cover Texts, and with no Back-Cover
+Texts.  A copy of the license is included in the ``GNU Free
+Documentation License'' file as part of this distribution.
diff --git a/README b/README
index 719cc17..c1cfe2e 100644
--- a/README
+++ b/README
@@ -89,7 +89,7 @@ Copyright (C) 2000, 2005, 2006, 2007, 2009, 2010 Free Software
 Foundation, Inc.

 Permission is granted to copy, distribute and/or modify this document
-under the terms of the GNU Free Documentation License, Version 1.2 or
+under the terms of the GNU Free Documentation License, Version 1.3 or
 any later version published by the Free Software Foundation; with no
 Invariant Sections, with no Front-Cover Texts, and with no Back-Cover
 Texts.  A copy of the license is included in the ``GNU Free
diff --git a/README-alpha b/README-alpha
index aa94cef..9d1b394 100644
--- a/README-alpha
+++ b/README-alpha
@@ -16,7 +16,7 @@ GNU m4 has a web-site at http://www.gnu.org/software/m4/
 Copyright (C) 2000, 2006, 2010 Free Software Foundation, Inc.

 Permission is granted to copy, distribute and/or modify this document
-under the terms of the GNU Free Documentation License, Version 1.2 or
+under the terms of the GNU Free Documentation License, Version 1.3 or
 any later version published by the Free Software Foundation; with no
 Invariant Sections, with no Front-Cover Texts, and with no Back-Cover
 Texts.  A copy of the license is included in the ``GNU Free
diff --git a/THANKS b/THANKS
index 4723327..3512369 100644
--- a/THANKS
+++ b/THANKS
@@ -165,7 +165,7 @@ Copyright (C) 2000, 2006, 2007, 2008, 2009, 2010 Free 
Software
 Foundation, Inc.

 Permission is granted to copy, distribute and/or modify this document
-under the terms of the GNU Free Documentation License, Version 1.2 or
+under the terms of the GNU Free Documentation License, Version 1.3 or
 any later version published by the Free Software Foundation; with no
 Invariant Sections, with no Front-Cover Texts, and with no Back-Cover
 Texts.  A copy of the license is included in the ``GNU Free
diff --git a/TODO b/TODO
index d60dd20..06d2247 100644
--- a/TODO
+++ b/TODO
@@ -132,3 +132,19 @@ for any of these ideas or if you have others to add.
     is found on the build machine.  For that matter, it has been a
     while since the perl module has even been built, and perl has had
     new releases in the meantime.
+
+
+Local Variables:
+mode: outline
+outline-regexp: " *[-+*.] \\|"
+End:
+
+Copyright (C) 2000, 2006, 2007, 2009, 2010 Free Software Foundation,
+Inc.
+
+Permission is granted to copy, distribute and/or modify this document
+under the terms of the GNU Free Documentation License, Version 1.3 or
+any later version published by the Free Software Foundation; with no
+Invariant Sections, with no Front-Cover Texts, and with no Back-Cover
+Texts.  A copy of the license is included in the ``GNU Free
+Documentation License'' file as part of this distribution.
diff --git a/cfg.mk b/cfg.mk
index dd710f8..e6616a0 100644
--- a/cfg.mk
+++ b/cfg.mk
@@ -22,7 +22,7 @@ manual_title = GNU macro processor
 local-checks-to-skip = sc_cast_of_x_alloc_return_value

 # Hash of NEWS contents, to ensure we don't add entries to wrong section.
-old_NEWS_hash = b63892a79436f9f3cd05e10c3c4657ef
+old_NEWS_hash = 0ef74b67f86e4f4ec20b67f02d9b1124

 # Always use longhand copyrights.
 update-copyright-env = \
diff --git a/doc/STYLE b/doc/STYLE
index 54aebbc..14ef976 100644
--- a/doc/STYLE
+++ b/doc/STYLE
@@ -92,7 +92,7 @@ following restrictions on coding style apply:
 Copyright (C) 2003, 2006, 2010 Free Software Foundation, Inc.

 Permission is granted to copy, distribute and/or modify this document
-under the terms of the GNU Free Documentation License, Version 1.2 or
+under the terms of the GNU Free Documentation License, Version 1.3 or
 any later version published by the Free Software Foundation; with no
 Invariant Sections, with no Front-Cover Texts, and with no Back-Cover
 Texts.  A copy of the license is included in the ``GNU Free
diff --git a/gnulib b/gnulib
index 0e0f8f1..c1a179c 160000
--- a/gnulib
+++ b/gnulib
@@ -1 +1 @@
-Subproject commit 0e0f8f12ec241c0f1c1f21f960bb5cf908a0fa3c
+Subproject commit c1a179cd48726257211e503550e1199da90c8465
diff --git a/modules/README b/modules/README
index 4a3ef20..c53a6ae 100644
--- a/modules/README
+++ b/modules/README
@@ -95,7 +95,7 @@ or in the case of time2.m4
 Copyright (C) 2000, 2001, 2006, 2010 Free Software Foundation, Inc.

 Permission is granted to copy, distribute and/or modify this document
-under the terms of the GNU Free Documentation License, Version 1.2 or
+under the terms of the GNU Free Documentation License, Version 1.3 or
 any later version published by the Free Software Foundation; with no
 Invariant Sections, with no Front-Cover Texts, and with no Back-Cover
 Texts.  A copy of the license is included in the ``GNU Free
-- 
1.6.4.2


From 8b8afe81fe7dbda9cf1dea6c18a1b4d56e871c7e Mon Sep 17 00:00:00 2001
From: Eric Blake <address@hidden>
Date: Thu, 7 Jan 2010 15:57:38 -0700
Subject: [PATCH 4/4] Address remaining 'make syntax-check' findings.

* gnulib: Update to latest.
* Makefile.am (tests/package.m4): Avoid @@ substitution.
(src_m4_LDADD): Link with libiconv.
* m4/m4private.h (STREQ): New macro.
* m4/resyntax.c (m4_regexp_syntax_encode): Use it.
* src/main.c (process_file): Likewise.
(includes): Drop unused header.
* m4/macro.c (m4_arg_equal): Adjust comment.
* m4/syntax.c: Likewise.
* m4/system_.h: Avoid useless preprocessor parenthesis.
* ltdl/m4/stackovf.m4 (M4_SYS_STACKOVF): Likewise.
* src/stackovf.c: Likewise.
(setup_stackovf_trap): Mark diagnostics.
* modules/mpeval.c (includes): Move quotearg.h inclusion...
* modules/evalparse.c (includes): ...to where it is used.
* cfg.mk (local-checks-to-skip): Exempt tests that cause spurious
failures, but first fix what they were intended to detect.
(_makefile_at_at_check_exceptions): Allow an exception.

Signed-off-by: Eric Blake <address@hidden>
(cherry picked from commit 2f6096389e2047a01618419af3f4471735444520)
---
 ChangeLog           |   22 ++++++++++++++++++++++
 Makefile.am         |   12 ++++++------
 cfg.mk              |   10 +++++++++-
 gnulib              |    2 +-
 ltdl/m4/stackovf.m4 |    6 +++---
 m4/m4private.h      |    3 +++
 m4/macro.c          |    4 ++--
 m4/resyntax.c       |    2 +-
 m4/syntax.c         |    2 +-
 m4/system_.h        |    4 ++--
 modules/evalparse.c |    2 ++
 modules/mpeval.c    |    2 --
 src/main.c          |    3 +--
 src/stackovf.c      |   12 ++++++------
 14 files changed, 59 insertions(+), 27 deletions(-)

diff --git a/ChangeLog b/ChangeLog
index 45744aa..9faab84 100644
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,3 +1,25 @@
+2010-01-08  Eric Blake  <address@hidden>
+
+       Address remaining 'make syntax-check' findings.
+       * gnulib: Update to latest.
+       * Makefile.am (tests/package.m4): Avoid @@ substitution.
+       (src_m4_LDADD): Link with libiconv.
+       * m4/m4private.h (STREQ): New macro.
+       * m4/resyntax.c (m4_regexp_syntax_encode): Use it.
+       * src/main.c (process_file): Likewise.
+       (includes): Drop unused header.
+       * m4/macro.c (m4_arg_equal): Adjust comment.
+       * m4/syntax.c: Likewise.
+       * m4/system_.h: Avoid useless preprocessor parenthesis.
+       * ltdl/m4/stackovf.m4 (M4_SYS_STACKOVF): Likewise.
+       * src/stackovf.c: Likewise.
+       (setup_stackovf_trap): Mark diagnostics.
+       * modules/mpeval.c (includes): Move quotearg.h inclusion...
+       * modules/evalparse.c (includes): ...to where it is used.
+       * cfg.mk (local-checks-to-skip): Exempt tests that cause spurious
+       failures, but first fix what they were intended to detect.
+       (_makefile_at_at_check_exceptions): Allow an exception.
+
 2010-01-07  Eric Blake  <address@hidden>

        Use correct license on auxiliary documentation.
diff --git a/Makefile.am b/Makefile.am
index ddffcff..ecba57f 100644
--- a/Makefile.am
+++ b/Makefile.am
@@ -102,7 +102,7 @@ src_m4_SOURCES += src/stackovf.c
 endif
 src_m4_CPPFLAGS        = $(AM_CPPFLAGS) -Isrc -I$(srcdir)/src
 src_m4_LDFLAGS = $(AM_LDFLAGS) $(DLPREOPEN)
-src_m4_LDADD   = m4/libm4.la
+src_m4_LDADD   = m4/libm4.la $(LTLIBICONV)
 src_m4_DEPENDENCIES = $(PREOPEN_DEPENDENCIES) m4/libm4.la

 ##                                                                      ##
@@ -383,11 +383,11 @@ $(srcdir)/tests/package.m4: .version
        :; \
        { \
          echo '# Signature of the current package.'; \
-         echo 'm4_define([AT_PACKAGE_NAME],      address@hidden@])'; \
-         echo 'm4_define([AT_PACKAGE_TARNAME],   address@hidden@])'; \
-         echo 'm4_define([AT_PACKAGE_VERSION],   address@hidden@])'; \
-         echo 'm4_define([AT_PACKAGE_STRING],    address@hidden@])'; \
-         echo 'm4_define([AT_PACKAGE_BUGREPORT], address@hidden@])'; \
+         echo 'm4_define([AT_PACKAGE_NAME],      [$(PACKAGE_NAME)])'; \
+         echo 'm4_define([AT_PACKAGE_TARNAME],   [$(PACKAGE_TARNAME)])'; \
+         echo 'm4_define([AT_PACKAGE_VERSION],   [$(PACKAGE_VERSION)])'; \
+         echo 'm4_define([AT_PACKAGE_STRING],    [$(PACKAGE_STRING)])'; \
+         echo 'm4_define([AT_PACKAGE_BUGREPORT], [$(PACKAGE_BUGREPORT)])'; \
        } > $(srcdir)/tests/package.m4

 tests/atconfig: config.status
diff --git a/cfg.mk b/cfg.mk
index e6616a0..25a0237 100644
--- a/cfg.mk
+++ b/cfg.mk
@@ -19,7 +19,15 @@ manual_title = GNU macro processor

 # Tests not to run as part of "make syntax-check".
 # M4 intentionally uses a coding style that compiles under C++.
-local-checks-to-skip = sc_cast_of_x_alloc_return_value
+# sc_proper_name_utf8_requires_ICONV doesn't work with non-recursive Makefile
+# sc_po_check assumes a directory layout that we don't quite provide
+local-checks-to-skip = sc_cast_of_x_alloc_return_value \
+       sc_proper_name_utf8_requires_ICONV \
+       sc_po_check
+
+# PRAGMA_SYSTEM_HEADER includes #, which does not work through a
+# Makefile variable, so we exempt it.
+_makefile_at_at_check_exceptions = ' && !/PRAGMA_SYSTEM_HEADER/'

 # Hash of NEWS contents, to ensure we don't add entries to wrong section.
 old_NEWS_hash = 0ef74b67f86e4f4ec20b67f02d9b1124
diff --git a/gnulib b/gnulib
index c1a179c..c535f44 160000
--- a/gnulib
+++ b/gnulib
@@ -1 +1 @@
-Subproject commit c1a179cd48726257211e503550e1199da90c8465
+Subproject commit c535f4489b41f28afd115ae331d69595ea41b6a1
diff --git a/ltdl/m4/stackovf.m4 b/ltdl/m4/stackovf.m4
index 8b9232e..3bf57ad 100644
--- a/ltdl/m4/stackovf.m4
+++ b/ltdl/m4/stackovf.m4
@@ -19,7 +19,7 @@
 # You should have received a copy of the GNU General Public License
 # along with this program.  If not, see <http://www.gnu.org/licenses/>.

-# serial 6
+# serial 7

 # M4_SYS_STACKOVF
 # ---------------
@@ -49,8 +49,8 @@ if test "$ac_cv_func_sigaction" = yes || test 
"$ac_cv_func_sigvec" = yes; then
 #include <sys/resource.h>
 #include <signal.h>
 ]], [[struct rlimit r; getrlimit (RLIMIT_STACK, &r);
-#if (!defined(HAVE_SIGACTION) || !defined(SA_ONSTACK)) \
-    && (!defined(HAVE_SIGVEC) || !defined(SV_ONSTACK))
+#if (!defined HAVE_SIGACTION || !defined SA_ONSTACK) \
+    && (!defined HAVE_SIGVEC || !defined SV_ONSTACK)
 choke me /* SA_ONSTACK and/or SV_ONSTACK are not defined */
 #endif
 ]])], [M4_cv_use_stackovf=yes])
diff --git a/m4/m4private.h b/m4/m4private.h
index 0ee10e2..f7b47f8 100644
--- a/m4/m4private.h
+++ b/m4/m4private.h
@@ -619,6 +619,9 @@ extern void m4__include_init (m4 *);
    casting away any const.  */
 #define DELETE(Expr)    ((Expr) = (free ((void *) (Expr)), (void *) 0))

+/* Avoid negative logic when comparing two strings.  */
+#define STREQ(a, b) (strcmp (a, b) == 0)
+

 #if DEBUG
 # define DEBUG_INCL     1
diff --git a/m4/macro.c b/m4/macro.c
index b88d5cb..d414781 100644
--- a/m4/macro.c
+++ b/m4/macro.c
@@ -1272,8 +1272,8 @@ m4_arg_text (m4 *context, m4_macro_args *argv, size_t 
arg, bool flatten)
 /* Given ARGV, compare text arguments INDEXA and INDEXB for equality.
    Both indices must be non-zero.  Return true if the arguments
    contain the same contents; often more efficient than
-   !strcmp (m4_arg_text (context, argv, indexa),
-            m4_arg_text (context, argv, indexb)).  */
+   STREQ (m4_arg_text (context, argv, indexa),
+          m4_arg_text (context, argv, indexb)).  */
 bool
 m4_arg_equal (m4 *context, m4_macro_args *argv, size_t indexa, size_t indexb)
 {
diff --git a/m4/resyntax.c b/m4/resyntax.c
index 5e7b970..6f6a379 100644
--- a/m4/resyntax.c
+++ b/m4/resyntax.c
@@ -99,7 +99,7 @@ m4_regexp_syntax_encode (const char *spec)

   for (resyntax = m4_resyntax_map; resyntax->spec != NULL; ++resyntax)
     {
-      if (!strcmp (resyntax->spec, canonical))
+      if (STREQ (resyntax->spec, canonical))
         break;
     }

diff --git a/m4/syntax.c b/m4/syntax.c
index 9e8cf42..792a97f 100644
--- a/m4/syntax.c
+++ b/m4/syntax.c
@@ -63,7 +63,7 @@
    will not show up in the syntax-table.

    Having a syntax table allows new facilities.  The new builtin
-   "changesyntax" allows the the user to change the category of any
+   "changesyntax" allows the user to change the category of any
    character.

    By default, '\n' is both ECOMM and SPACE, depending on the context.
diff --git a/m4/system_.h b/m4/system_.h
index 458c2ff..aa28247 100644
--- a/m4/system_.h
+++ b/m4/system_.h
@@ -114,11 +114,11 @@ BEGIN_C_DECLS
    a way sympathetic to the compiler to maximise optimization.  */
 #undef M4_STMT_START
 #undef M4_STMT_END
-#if defined (__GNUC__) && !defined (__STRICT_ANSI__) && !defined (__cplusplus)
+#if defined __GNUC__ && !defined __STRICT_ANSI__ && !defined __cplusplus
 # define M4_STMT_START        (void)(
 # define M4_STMT_END          )
 #else
-# if (defined (sun) || defined (__sun__))
+# if defined sun || defined __sun__
 #  define M4_STMT_START      if (1)
 #  define M4_STMT_END        else (void)0
 # else
diff --git a/modules/evalparse.c b/modules/evalparse.c
index 3ed29d7..574541e 100644
--- a/modules/evalparse.c
+++ b/modules/evalparse.c
@@ -35,6 +35,8 @@
    both `eval' and `mpeval', but which is redefined appropriately when
    this file is #included into its clients.  */

+#include "quotearg.h"
+
 typedef enum eval_token
   {
     ERROR, BADOP,
diff --git a/modules/mpeval.c b/modules/mpeval.c
index 44a0d3d..ae620cb 100644
--- a/modules/mpeval.c
+++ b/modules/mpeval.c
@@ -32,8 +32,6 @@
 #  include <gmp.h>
 #endif

-#include "quotearg.h"
-
 /* Rename exported symbols for dlpreload()ing.  */
 #define m4_builtin_table        mpeval_LTX_m4_builtin_table
 #define m4_macro_table          mpeval_LTX_m4_macro_table
diff --git a/src/main.c b/src/main.c
index e9f2599..240e241 100644
--- a/src/main.c
+++ b/src/main.c
@@ -26,7 +26,6 @@

 #include "m4.h"

-#include "close-stream.h"
 #include "closein.h"
 #include "configmake.h"
 #include "getopt.h"
@@ -302,7 +301,7 @@ size_opt (char const *opt, int oi, int optchar)
 static void
 process_file (m4 *context, const char *name)
 {
-  if (strcmp (name, "-") == 0)
+  if (STREQ (name, "-"))
     /* TRANSLATORS: This is a short name for `standard input', used
        when a command line file was given as `-'.  */
     m4_push_file (context, stdin, _("stdin"), false);
diff --git a/src/stackovf.c b/src/stackovf.c
index 95a5c3a..fb2aa1a 100644
--- a/src/stackovf.c
+++ b/src/stackovf.c
@@ -118,7 +118,7 @@

 typedef void (*handler_t) (void);

-#if defined(__ultrix) && defined(__vax)
+#if defined __ultrix && defined __vax
 extern char    *sbrk            (int);
 extern int      getrlimit       (int, struct rlimit *);
 extern int      sigstack        (struct sigstack *, struct sigstack *);
@@ -313,7 +313,7 @@ Error - Do not know how to set up stack-ovf trap handler...
   /* Calculate the approximate expected addr for a stack-ovf trap.  */

   if (getrlimit (RLIMIT_STACK, &rl) < 0)
-    error (EXIT_FAILURE, errno, "getrlimit");
+    error (EXIT_FAILURE, errno, _("getrlimit"));
   stack_len = (rl.rlim_cur < rl.rlim_max ? rl.rlim_cur : rl.rlim_max);
   stackbot = (char *) argv;
   grows_upward = ((char *) &stack_len > stackbot);
@@ -386,7 +386,7 @@ Error - Do not know how to set up stack-ovf trap handler...
         free (stackbuf);
         if (errno == ENOSYS)
           return;
-        error (EXIT_FAILURE, errno, "sigaltstack");
+        error (EXIT_FAILURE, errno, _("sigaltstack"));
       }
   }

@@ -408,7 +408,7 @@ Error - Do not know how to set up stack-ovf trap handler...
         free (stackbuf);
         if (errno == ENOSYS)
           return;
-        error (EXIT_FAILURE, errno, "sigstack");
+        error (EXIT_FAILURE, errno, _("sigstack"));
       }
   }

@@ -431,7 +431,7 @@ Error - Do not know how to set up stack-ovf trap handler...
   sigemptyset (&act.sa_mask);
   act.sa_flags = (SA_ONSTACK | SA_RESETHAND | SA_SIGINFO);
   if (sigaction (SIGSEGV, &act, NULL) < 0)
-    error (EXIT_FAILURE, errno, "sigaction");
+    error (EXIT_FAILURE, errno, _("sigaction"));

 #else /* ! HAVE_SIGACTION */

@@ -439,7 +439,7 @@ Error - Do not know how to set up stack-ovf trap handler...
   vec.sv_mask = 0;
   vec.sv_flags = (SV_ONSTACK | SV_RESETHAND);
   if (sigvec (SIGSEGV, &vec, NULL) < 0)
-    error (EXIT_FAILURE, errno, "sigvec");
+    error (EXIT_FAILURE, errno, _("sigvec"));

 #endif /* ! HAVE_SIGACTION */

-- 
1.6.4.2

Attachment: signature.asc
Description: OpenPGP digital signature


reply via email to

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